Repository navigation
Launch OpenCode 2 setup from zro opencode when v2 is installed - #35
LeonHibnik wants to merge 1 commit into
Conversation
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
left a comment
There was a problem hiding this comment.
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.
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.