Skip to content

Add OpenCode 2 harness support - #34

Merged
jeremyfelder merged 4 commits into
mainfrom
feat/opencode2
Oct 29, 2026
Merged

jeremyfelder merged 4 commits into
mainfrom
feat/opencode2

Conversation

@jeremyfelder

Copy link
Copy Markdown
Collaborator

Adds support for opencode2.

zro-inference
zro-inference previously approved these changes Oct 29, 2026

@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.

Adds an opencode2 harness end to end: catalog/alias/SUPPORTED_TOOLS wiring, a new opencode2 tool module with v2 provider/MCP config builders and --standalone arg handling, a shared opencode-shared.ts extracted from the v1 tool, plus CI, CHANGELOG, README, and test updates. The builder and launch-plan tests are solid (variant merging, legacy v1 entry stripping, copy exclusions, debug/server arg handling), and no tests are deleted. Remaining notes are test-coverage and forward-compatibility items — most notably that the v1 opencode copy filter changed behavior via the extraction without a test, and that opencode2 will need to honor main's gateway/no-auth LaunchContext fields once rebased.

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 44m 29s, tokens 2,918,890.

Comment thread src/engine/tools/opencode2.ts Resolved
Comment thread src/engine/tools/opencode-shared.ts Resolved
Comment thread tests/opencode2.test.ts Resolved
Comment thread src/engine/tools/opencode2.ts Resolved
@jeremyfelder

Copy link
Copy Markdown
Collaborator Author

Addressed the P2s:

  • opencode2 now honors inferenceBaseUrl, mcpUrl, and noAuth, and is included in tests/no-auth.test.ts.
  • Added a v1 OpenCode copy-exclusion test; shared copy logic now skips symlinks and credential files.
  • Added coverage for existing provider headers.

@MoonMathJen rereview

@jeremyfelder
jeremyfelder merged commit a30377d into main Oct 29, 2026
28 checks passed
@jeremyfelder
jeremyfelder deleted the feat/opencode2 branch October 29, 2026 12:46

@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.

Adds the opencode2 harness end to end: catalog/alias/SUPPORTED_TOOLS wiring, a new opencode2 tool module with v2 provider/MCP config builders and --standalone arg handling, a shared opencode-shared.ts extracted from the v1 tool, plus CI, CHANGELOG, README and test updates. The builder and launch-plan tests are solid (variant merging, legacy v1 entry stripping, copy exclusions, debug/server arg handling), and no tests are deleted.

This re-review confirms all four previously raised P2 items are materially fixed in the current code: opencode2 now threads inferenceBaseUrl/mcpUrl/noAuth and is included in tests/no-auth.test.ts's tool list; the v1 opencode copy behavior changed by the extraction is now covered by tests/opencode.test.ts; the shared copy logic uses lstat and skips symlinks, asserted in both harness tests; and the non-empty provider headers branch has coverage. Config copies stay under the per-session XDG_CONFIG_HOME, the API key remains an {env:ZRO_API_KEY} reference, and previews redact. Nothing blocking remains.

Prior threads: 4 resolved as fixed, 0 resolved as acknowledged, 0 still open.


JenClaude metrics: cost $0.000, time 43m 09s, tokens 1,806,849.

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