You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opencode-action installs OpenCode through the v1 curl installer and invokes opencode github run. OpenCode v2 beta is distributed through the npm next channel, uses the opencode2 executable, and does not currently expose a compatible github run command.
The bundled /review-pr workflow does not require the full OpenCode GitHub event runner: it can execute the trusted review orchestrator and submit structured reviews through fixed helper scripts. This makes review-only mode the smallest viable scope for initial v2 support.
Goal
Add opt-in OpenCode v2 support for /review-pr while retaining OpenCode v1 as the default runtime.
Problem
opencode-actioninstalls OpenCode through the v1 curl installer and invokesopencode github run. OpenCode v2 beta is distributed through the npmnextchannel, uses theopencode2executable, and does not currently expose a compatiblegithub runcommand.The bundled
/review-prworkflow does not require the full OpenCode GitHub event runner: it can execute the trusted review orchestrator and submit structured reviews through fixed helper scripts. This makes review-only mode the smallest viable scope for initial v2 support.Goal
Add opt-in OpenCode v2 support for
/review-prwhile retaining OpenCode v1 as the default runtime.Dependencies
opencode github run#57: action-owned GitHub App token exchange and cleanup.Proposed changes
Add an explicit runtime input such as:
Do not infer the runtime generation solely from
opencode-version, because v2 packages may still use 1.x package versions during development.Keep
runtime: v1as the default.Install v2 from a pinned or caller-selected
@opencode-ai/cli@nextversion and invokeopencode2.Restrict
runtime: v2-betato detected/review-prruns; fail clearly for general issue or PR-comment automation.Invoke the bundled review agent through the v2 noninteractive
runcommand.Translate the separate
modelandvariantinputs to the v2provider/model#variantsyntax without silently normalizing unsupported values.Preserve prompt expansion, explicit agent selection, timeout handling, failure annotations, and action outputs.
Add a v1/v2 CI matrix with a credential-free CLI smoke test and mocked review helper coverage.
Document the beta support level and compatibility policy.
Acceptance criteria
runtime: v2-betasuccessfully startsopencode2 runfor/review-pr.opencode github run#57.