Repository navigation
fix(drive): discover current V2 services through @opencode/client - #89
Merged
Merged
Conversation
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Drive 2.1.0 cannot attach to a current OpenCode V2 server. The script server starts and logs
server listening, then Drive fails withOpenCode service registration was not foundand stops it before any TUI launches (#87). The pinned@opencode-ai/[email protected]probes/api/health, but current V2 answers service discovery on/api/statusand returns 404 for the old route, soService.discovertreats a healthy server as absent.What Changes
Drive now pins the renamed SDK,
@opencode/[email protected], whoseService.discoverprobes/api/status.GET /api/health→ 404 → "registration not found"GET /api/status→{ version, pid, urls }→ attached@opencode-ai/[email protected]@opencode/[email protected]Manual probes follow the same SDK surface:
opencode.health.get()opencode.server.status()opencode.form.list({ sessionID })/form.state(...)opencode.session.form.list(...)/session.form.get(...).statepermission.reply({ ..., reply: "once" })permission.reply({ ..., decision: "once" })plugin.awaitActivation({ location })model.default/agent.listuntil populated (endpoint removed upstream)session.rename(...)session.update(...)The fake OpenCode test fixture serves
/api/status. It still rejects a wrongx-opencode-directory, but only when the header is present, because the discovery probe deliberately carries no directory.Scope
Fixes #87. Provider
packagefixtures keep@opencode-ai/ai/...; current V2 rewrites that prefix to@opencode/ai/, so they are unaffected. No Drive protocol or CLI changes.Verification
check: 0 errors (1 pre-existing lint warning inrecording/marks.ts)test: 38 files / 274 tests pass (vitest) and 40 pass (bun test CLI integration)OpenCode service registration was not foundon 2.1.0 now attaches the SDK, launches the TUI, controls a simulatedshelltool call, and captures frames against a current V2 checkout.