feat(providers): honor resolved dispatch modes for opencode - #1769
Merged
Merged
Conversation
…ew for opencode OpenCode's serve API exposes per-tool permission asks but no native turn-review verdict, so getApprovalReviewSupport honestly reports unavailable and the adapter leaves the approval-review capability undeclared. Resolved modes now reach the wire path: Full Access auto-answers permission asks with "always" instead of carding, while questions still surface to the user.
Add the opencode boundary factory, boundary id, and core synthetic fixture so the suite validates the adapter as a second server-side provider alongside codex. Version evidence names the serve request generations the adapter speaks, since no upstream semver is pinned.
5 tasks
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.
What
Closes #1626.
Implements the OpenCode slice of #1626. Every dispatched OpenCode turn now carries and honors its resolved modes.
OpenCodeProviderimplementsgetApprovalReviewSupportand honestly reportsunavailable, since the upstreamserveAPI exposes per-tool permission asks but no native turn-review verdict. Full Access turns auto-answer upstream permission asks withalwaysthrough the existingrelayDecisionpath instead of surfacing a card; question asks still card because they are interactive input, not permission gates. Supervised behavior is unchanged. The adapter is also registered in the shared provider conformance suite with a boundary factory, boundary id, and a core synthetic fixture.Why
#1626 wires the provider-neutral review seam (#1614/#1615) into OpenCode as the second adapter. Resolved
permissionModeandapprovalReviewModealready reachsendTurntop-level; the adapter previously ignored them. Because OpenCode has no native reviewer, theapproval-reviewcapability stays undeclared so the Composer never offers Auto for it, and the policy records the real reason instead of the generic no-method fallback.Review Notes
What this PR does not cover, and why:
getApprovalReviewSupportcan only honestly returnunavailable. A client-side synthesized review (second session + verdict parsing) was rejected because it would fabricate a lifecycle Enforce automatic-review fallback and permission safety #1615 forbids, and a denied verdict would have no enforcement hook. If upstream ships the auto-approve classifier work,getApprovalReviewSupportis the single place to flip.requiredstatus comes from the provider's own inspection, and no upstream signal exists to produce it. Dispatch still resolves to manual with the recorded reason.approval-reviewfixture profile because there is no review behavior to replay.serveconfig change because the pooled server is shared across threads in a worktree and a config write would leak between them.legacy/v2) the adapter speaks; no upstream semver is pinned in the repo.tsc --noEmitandoxlintclean across all touched packages,verify-mcode runtime checkprovider and contract phases green. Live OpenCode proof is a coverage gap: theopencodeCLI is not installed in this environment.