Repository navigation
feat: a smaller public API - #108
Conversation
|
This PR doesn't touch the catalog or its generator. Any branch that runs the check now fails it the same way, including the base of this stack (#105). There is no fix yet. The shim has to be regenerated with The repository's nightly run ( Generated by Claude Code |
Merge origin/claude/vigilant-mendel-bctz9n-p1b (835c793) into P2, so #108 is one merge from its parent's green tip again. No conflicts; P2's own commits touch none of the count-bearing hunks. - fixed resolutions-3-P2-R3-1: the parent's 798ba2e arrives unchanged. src/catalog-data.ts is the nightly blob (0f22c3e) with the newly listed free Zen model, byte-identical to the parent tip, never hand-edited; src/go-limits-data.ts did not move. The restated counts (Zen 81 served / 131 listed, no-SDK 24, free 9, dated 2026-11-03) come from the parent's side in both READMEs, docs/redirect-planes.md, docs/protocol-routing-and-merge.md and test/catalog.test.ts. Correction 2 ("take main's blobs") is superseded for the generated files by the parents' decision to carry the nightly refresh, so every branch above P2 inherits the same blob through its parent merge. - deferred resolutions-3-P2-R3-2: no worktree file is wrong (docs/improvement-plan.md states D9 correctly); the PR body's D9 line is rewritten in the post-step-11 body pass, per the plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
|
Restacked onto main 1.8.0. The branch now carries Conflicts and how they were resolvedBarrel and test door
Wrapper alias (D9)
Config and docs
Follow-ups after the merge
Dropped
Review rounds
Live re-measures still owedThe restack adds no live re-measures of its own. CI on Unresolved high findings
Generated by Claude Code |
835c793 to
a503b98
Compare
0563db6 to
d0fbb2c
Compare
d0fbb2c to
5e7a442
Compare
Phase **P2** of `docs/improvement-plan.md`, restacked onto 1.8.1. The barrel is the host's contract and nothing more — `apply`, `Config`, `inject`, `name` and the config types — and `test/public-api.test.ts` pins the list, so widening it is a reviewed change rather than an accident of an export statement. Everything else is internal. - **`test/support/src.ts` is the one door tests use into `src`.** Each name is re-exported from the module that DEFINES it, never through the barrel, so a module move edits one file. `test/architecture.test.ts` enforces both halves: every name is declared in its target, and no test outside the named exemptions imports a `src` path. - **The retired alias is retired again (D9).** `@viztor/dsh-opencode` stops publishing: `scripts/wrapper-forwarder.ts`, its test, and the wrapper branch of `publish-scoped.ts` are gone, and the deprecation message already published stays as the final one. `main` had revived the alias to fix its forwarder (#135); this is the other half of that decision, now that the forwarder works. - **The scoped targets move to `scripts/scoped-targets.ts`**, so the release workflow and the publish script read one list. - **`scripts/package-checks.ts`** holds the manifest assertions the publish path and the bundle gate share. Restacked by rebasing the branch's net change onto 1.8.1, then removing the two files the patch deletes rather than empties. Restacked onto main after P1b merged; the branch was pushed while the pull request still targeted the stacked base, so this commit is re-pushed to trigger the workflow against `main`.
5e7a442 to
3654e35
Compare
Phase P2 of
docs/improvement-plan.md. It is stacked on #107 (P1b). Below that come #106 (P1a) and #105.This is a 1.x minor (D6). Nobody consumes the removed exports, so there is no
!and no BREAKING footer.The barrel
src/index.tsis the host's contract and nothing more:test/public-api.test.tspins this list, so widening it is a reviewed change. It opened as a green pin of the old barrel, then shrank in this PR.ModelRouteConfig.PluginConfig.modelRoutesalready referenced it, but it could not be named from the barrel.LEGACY_NAME,LEGACY_PKG,OPENCODE_CLI_VERSION,OPENCODE_PATCH_USER_AGENT,OPENCODE_USER_AGENT.CONFIG_DEFAULTS, the tenDEFAULT_*constants,ENDPOINT_FAMILIES,KEY_SOURCE_POLICIES,resolveConfig,ALL_MODELS_MARKER,readBoolean,readString,readStringList,unwrapNode.fallbackSessionId,isOpenCodeMessageId,isOpenCodeSessionId,headerValueFor,newOpenCodeMessageId,openCodeSessionIdFor,OPENCODE_UA,pinnedSessionId,sessionIdForRequestand the four session header constants; alsowithStoreand theActiveTurnStatetype.DUMMY_BASH_TOOL,DUMMY_READ_TOOL,isCoreToolModel,maybeInjectCoreTools,RESPONSES_PATH,hasSessionHeader,isOpenCodeRequest,patchFetchand theCordisContexttype.clearCapturedApiKeys,extractApiKeyFromHeaders,getCapturedApiKey,isPlaceholderApiKey,recordCapturedApiKey,tierForRequest,discoverGoConfig,effectiveGoKeyRef,resolveGoApiKey,resolveGoBaseURL,resolveOpencodeStoreKey,resolveZenCreditInfo,toGoBaseURL.GoUsageService,parseGoUsage,parseUsageQueryand theGoUsage,UsageQueryandUsageWindowtypes;calculateTurnCost,clearSessionUsageStore,describeModel,formatModelRate,formatUsd,getSessionUsage,recordTurnUsageand theModelCostRateandSessionUsageSnapshottypes.models-catalogconstant and function, plus theCatalogModelSpec,CatalogProviderandParsedCatalogstypes.models-discoverydecorators and helpers.responses-routesconstant and function, and theresponses-providerhelpers.resolveRoutedKeyand theRoutedKeyDetailstype (D4: exported and never called).scripts/check.ts' consumer probe reads onlyapplyandConfig, so it still passes.Also in this PR
srcnow go throughtest/support/src.ts. It re-exports each name from the module that defines it. A gate inarchitecture.test.tsrejects a staticsrcimport anywhere else. Its exemptions are named:vi.mocktargets, re-imports aftervi.resetModules(), the architecture and public-API tests, the jsdom client tests, andtest/support/. The source-reading gates share a comment blanker that has its own known-answer tests.exports⊆files../src/*is gone fromexports.check.tsnow fails when an exports target is outside the published files, using the pure helpers inscripts/package-checks.ts, which are tested against fixtures.internalRoutesis deleted (D2). The per-protocol routes always mount until P-R1 makes the plugin own the plane routes. A row that still carriesinternalRoutesvalidates and the key is ignored; a test feeds such a row and pins that. The bridge-disposer test now targets the "every internal route is already declared" exit.@viztor/dsh-opencodeis no longer published (D9). The deprecation message already on npm stays as its final word.SCOPED_TARGETSlives in a side-effect-freescripts/scoped-targets.ts.release.ymlverifies exactly that list, andcheck.tsasserts the two agree.main's fix(publish): the retired alias must LINK, not fail on every load #135 forwarder (scripts/wrapper-forwarder.ts) and its real-Node link test (test/wrapper-forwarder.test.ts) are deleted again. The last published alias, 1.8.0, stays a working one.resolveRoutedKey.Restacked onto main 1.8.0
The branch now carries
main1.8.0 through its parent: #107 merged #106, which merged #105, the one phase that mergesmain.0563db6re-merges the parent after its catalog refresh, so this branch is one merge from #107's tip.Scope after the restack
apply,Config,inject,nameand the config types.test/public-api.test.tspins that list../src/*export is gone, everyexportstarget is insidefiles, andresolveRoutedKeyandinternalRoutesare deleted.srcthroughtest/support/src.ts, including the testsmainadded (go-limits-html,google-thinking, the gateway-contract mock,catalog,usage-contract,settings-remote).parseAccountRef,callUsageRead,GO_MODEL_LIMITSandLEGACY_PLANE_APIare reached through the door, not the barrel.@viztor/dsh-opencodealias thatmainrevived in fix(publish): the retired alias must LINK, not fail on every load #135 is retired again (D9).scripts/wrapper-forwarder.tsand its test are deleted, andpublish-scoped/release.ymlpublish onlydsh-opencode-patchand@viztor/dsh-opencode-patch.Dropped because of
mainor the parentmain's alias publishing inscripts/publish-scoped.ts: the forwarder, its forwarding cordis patch and the redirect README for@viztor/dsh-opencode. D9 supersedes it.main'sscripts/wrapper-forwarder.tsandtest/wrapper-forwarder.test.ts, under D9.src/index.tsexport list, which this PR's barrel replaces.internalRouteslines incordis.patch.yml, because this PR deletes the setting.Decisions applied
cordis.patch.ymltakes the parent's wording:debuggoverns the console, and namingdebugFilewrites the file.Restack commits:
bab4fc8merges the parent.521b98froutesmain's new tests through the one door. The door gainsLEGACY_PLANE_API.737a49ddrops the forwarder fromdocs/testing.md.c15aca0stops the count-sweep record asserting a superseded catalog.0563db6re-merges the parent.Catalog:
src/catalog-data.tsis the nightly generated blob, carried unchanged from #105 through the parent and never hand-edited. Zen serves 81 of its 131 listed models, as of 2026-11-03.Live re-measures CI must confirm: the restack adds none of its own. CI on
0563db6must pass two checks:release.ymlandSCOPED_TARGETSto agree on the two packages.The scheduled live suites are owed exactly as on the parent. The Verification table below predates the restack, so CI on
0563db6is the verification of record.Review
Three lenses reviewed the change (correctness and host contracts, tests, repository rules), and two independent skeptics checked each finding. Over three rounds, every upheld finding was fixed: 3 medium and 18 low.
The restack had its own three review rounds. They found 4 findings, all 4 were upheld, and all 4 are now fixed: 2 in the worktree and 2 in this body.
Verification
All run locally:
pnpm run checktest:mockscripts/check.tstest:mockThe diff contains no local paths.
Generated by Claude Code