Repository navigation
Conversation
The barrel is the host's contract and nothing more: apply, Config, inject, name and the config types. Everything else is internal, and test/public-api.test.ts pins the list, so widening it is a reviewed change. The 1.x line keeps its version scheme: nobody consumes the removed exports (D6). - Every test reaches src through test/support/src.ts, importing each name from the module that defines it; a gate rejects a static src import anywhere else outside its named exemptions. - package.json no longer exports ./src/*, and check.ts fails when an exports target is outside the published files. - resolveRoutedKey is deleted: it was exported and never called. - The internalRoutes setting is deleted; the per-protocol routes always mount until the plugin owns the plane routes. A row that still carries it validates and the key is ignored. - @viztor/dsh-opencode is no longer published. The deprecation message already on npm stays as its final word, and check.ts asserts that the release workflow verifies exactly what publish-scoped.ts publishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
|
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 |
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.wrapper-forwarderhelper and its test are gone with the wrapper.resolveRoutedKey.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.
Verification
All run locally:
pnpm run checktest:mockscripts/check.tstest:mockThe diff contains no local paths.
Generated by Claude Code