Repository navigation
refactor(core): drop the legacy Console config path - #59595
Conversation
There was a problem hiding this comment.
I found no problems with this change. I checked it by running provider-opencode.test.ts (47 pass) and the wider packages/core config and plugin suites (706 pass). tsc -b tsconfig.json tsconfig.tests.json is clean. The typecheck script itself failed here with "Script not found "check"", so I ran tsc directly. I can't run a real Console sign-in here, so the tests' mock Console server is the coverage.
Every 200 response from /api/v2/config is now read as a regular config. Policies reach the policy plugin through the Console's config document, and the hosted search provider is offered only when that config names opencode.
Public API: unchanged. No SDK, HTTP API, plugin API, config key or CLI change. Only the client's reading of the Console's private /api/v2/config response changes. A Console still sending the old response would silently lose the credential headers on its MCP servers and its web search default. That's fine as long as every Console serves the regular format, as the description says.
No blocking concerns.
# Conflicts: # packages/core/src/plugin/provider/opencode.ts
There was a problem hiding this comment.
The new commit only merges dev. This PR's own changes are the same as in my last review, and my earlier review left no open threads. After the merge, provider-opencode.test.ts still passes (47 of 47) and tsc -b is clean. The public API is still unchanged. No new concerns.
The OpenCode Console now serves a regular OpenCode config to every OpenCode build that can read one, so the plugin no longer needs to understand the Console's original
/api/v2/configresponse. This removes that second code path, which applied providers, policies, web search and MCP servers itself, so there is one way Console settings reach the client: a config layer.Stacked on #59592 (Console web search gate); the first commit here is that PR.
packages/core/src/plugin/provider/opencode-legacy.ts: deleted.packages/core/src/plugin/provider/opencode.ts: the snapshot holds the Console's config or nothing. Publishing, the web search gate, the inference explainer and the fetch read it directly; the$schemacheck is gone.packages/core/src/config/plugin/policy.ts: comment no longer describes legacy Console statements.packages/core/test/plugin/provider-opencode.test.ts:Follow-up, not in this PR:
ManagedPolicy's statements are now only set by tests, which use it to inject organization policy into skill, MCP and plugin tests. Removing the service means moving those tests onto config documents.