Skip to content

Launch OpenCode 2 setup from zro opencode when v2 is installed - #35

Open
LeonHibnik wants to merge 1 commit into
mainfrom
feat/opencode-launch
Open

LeonHibnik wants to merge 1 commit into
mainfrom
feat/opencode-launch

Conversation

@LeonHibnik

Copy link
Copy Markdown
Collaborator

Detect the installed OpenCode major version and reuse the OpenCode 2 launch plan (standalone environment and provider config) for v2, while zro opencode2 keeps working.

Detect the installed OpenCode major version and reuse the OpenCode 2
launch plan (standalone environment and provider config) for v2, while
zro opencode2 keeps working.

@zro-inference zro-inference left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes zro opencode version-aware: it probes the installed opencode binary via a new commandVersion helper, parses the major version, threads it into LaunchContext.opencodeMajor, and delegates to the OpenCode 2 adapter (remapping the returned plan back to the opencode tool/label/command) when v2 is detected; zro opencode2 keeps working. Supporting changes are small and coherent — SpawnOptions.stdio widens to StdioOptions to allow the piped version probe, and docs/CHANGELOG are updated alongside two new tests covering the v2 delegation path in both the adapter and the CLI. The guard defaults to (ctx.opencodeMajor ?? 1), so the existing v1 path is preserved when detection is skipped or fails, and tests assert that v2 output still yields the expected --standalone args and OpenCode 2 provider config. No findings to raise. Note: the four specialist analysis passes (correctness, security, test-coverage, adversarial) all timed out and returned no findings, so this approval reflects a scoped read of the diff and changed files rather than a fully verified multi-lens review — a human pass on the version-parsing regex and probe failure paths would be worthwhile.

JenClaude command reference

Reply with @MoonMathJen on this PR to trigger commands:

Command Example What it does
Re-review @MoonMathJen rereview Re-review after changes (full or scoped — see below)
Stop @MoonMathJen stop Cancel in-progress review
Stop + summarize @MoonMathJen stop and summarize Post partial findings so far
Focus specialty @MoonMathJen only security Review only the named specialty
Skip specialty @MoonMathJen skip test-coverage Review everything except the named specialty
Change model @MoonMathJen pr-review-model: kimi-k2.7-coder Run this review with a specific model
Add context @MoonMathJen focus on auth edge cases Free-text guidance passed to reviewers

Specialties: correctness, security, test-coverage, adversarial

Any text in the comment beyond a recognized command is passed to the reviewers as context. Use it to point them at areas that matter, explain what changed since the last review, or call out constraints (e.g. "skip generated files", "the auth flow is the riskiest part here"). Hard review rules still win over reviewer guidance.


JenClaude metrics: cost $0.000, time 43m 41s, tokens 63,402.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants