Repository navigation
feat: add experimental OpenCode V2 support and diagnostics - #29
AlaeddineMessadi wants to merge 3 commits into
Conversation
|
Interressing about this PR, wainting merge to test this MCP |
|
Thanks for your interest, @brocasm! This PR adds OpenCode V1/V2 compatibility and better setup diagnostics. It’s still a draft while we finish validation and work through an upstream V2 API limitation. If you’d like to test it before the merge, I’d be happy to share setup instructions. Feedback on your MCP client and workflow would be really helpful! |
|
Context that may be useful for the V2 detection/readiness work in this branch. Testing 3.0.0 against OpenCode v2 (
No action requested — flagging the readiness/handshake expectations in case they're relevant here. I can re-test against |
|
Status update and new plan for this PR. Upstream: anomalyco/opencode#49690 is still open. In 2.2.0 the Plan: #35 (thanks @norandom!) ports the server to the 2.x
@brocasm, thanks for your patience. If you're on OpenCode 2.x, #35 is the one to watch and test. |
OpenCode V2 changes session, input, permission and lifecycle contracts, so existing V1 routes cannot preserve their behavior directly. This adds typed V1/V2 adapters, detection, read-only diagnostics, normalized operations, durable V2 jobs and native MCP Tasks while preserving V1 support.
Prerelease scope
Prepare 3.1.0-rc.2 with experimental V2 support. V2 maps 64 tools, retains 22 intentional V1-only exceptions, and disables
opencode_command_executebefore submission. V1 commands remain available. The manifest also covers resources, templates and prompts, and generates the compatibility reference.The user approved this reduced prerelease scope. The original 65-tool milestone remains incomplete, but upstream command correlation #49690 does not block this experimental candidate. Nothing has been merged or published. Future publication must use the tested archive with
--tag next, preserving stable npmlatestat 3.0.0.Compatibility and issue #31
serveno longer prints "opencode server listening on ..." #31 fix from the other agent: reject recognized V2/newer executables before V1 SDK auto-start, charge the version probe against the startup deadline, and provide V2 connection instructions. Unknown launcher versions retain bounded SDK startup. Invalid V1 health JSON cannot trigger replacement startup; failed owned children close exactly once.Validation
d173d13d38961d350ad07f9644ddd5bd2b21ffd9, including full tests, generated docs, installed-package and isolated native compatibility checks. Ubuntu Node 22 also passed coverage and audit. CI run 39155772654. Exact-archive Node 24 native checks also passed locally.Archive:
opencode-mcp-3.1.0-rc.2.tgz, 196116 bytes, 134 entries. Integrity:sha512-coxSRIxFzipefaddTrZNs0iQ4Z0y8U1Bciu5FSKoWyk2FWLcfARV0w3BMBUVRJG5+CMUMgEjv7BToAeMoj46hw==.An initial coverage run overlapped another build writing shared
distand produced a CLI exit mismatch; a standalone rerun and clean-install suite passed. The failure log is retained, and subsequent builds/tests ran sequentially.Evidence boundaries
Live inference, durable execution/restart recovery, cancellation against a provider, interactive forms/permissions, OAuth completion and GUI clients remain unverified. Fixture/contract tests do not establish those behaviors. Keep V2 experimental until the documented live acceptance checks pass. Windows Node 26 from #31 is outside the Node 22/24 matrix.
Addresses #31; contributor PR #34's OpenChamber authentication work remains separate. The other agent's uncommitted worktree and the earlier rc.1 archive remain intact.
See
plans/008-experimental-prerelease.mdfor acceptance and archive evidence,plans/007-ci-and-opencode-2.0.32.mdfor the preceding upgrade,plans/004-v2-writes-input.mdfor the command unblock checklist, andMIGRATION.mdfor lifecycle/option limitations.