Repository navigation
Support OpenCode V2 while preserving V1 compatibility - #43
Merged
Merged
Conversation
Comment on lines
+53
to
+65
| runs-on: blacksmith-2vcpu-ubuntu-2404 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: bash tests/ci/npm_with_retry.sh ci | ||
| - run: bash tests/ci/npm_with_retry.sh install -g @opencode/cli@latest | ||
| - run: npm run build | ||
| - run: | | ||
| ARCHIVE=$(npm pack --silent | tail -1) | ||
| node scripts/smoke-v2.mjs "$ARCHIVE" |
Comment on lines
+78
to
+95
| runs-on: blacksmith-2vcpu-ubuntu-2404 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ["2.0.26", "latest"] | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: bash tests/ci/npm_with_retry.sh ci | ||
| - run: bash tests/ci/npm_with_retry.sh install -g @opencode/cli@${{ matrix.version }} | ||
| - run: npm run build | ||
| - name: Packed V2 host contract | ||
| run: | | ||
| ARCHIVE=$(npm pack --silent | tail -1) | ||
| node scripts/smoke-v2.mjs "$ARCHIVE" |
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.
Executive Summary
Add OpenCode V2 support while preserving the existing V1 integration.
/v2entrypoint for tools and gateway sessions.source-map-jsto the patched 1.2.2 release.Description
Adds a V2 host adapter, tool registration, native approval integration, session handling, and shared-service lifecycle support. The installer selects the appropriate entrypoint, backs up recognized generated wrappers, and preserves custom wrappers for manual migration. Setup guidance and bundled skills cover both versions.
Adds packed-package V2 checks alongside the V1 checks. The dependency lockfile also upgrades the development dependency
source-map-jsfrom 1.2.1 to 1.2.2 to address the open Dependabot advisory.Reason
OpenCode V2 changed its plugin and server APIs, preventing the existing plugin from loading. Users need a migration path that preserves V1 compatibility and their configuration.
Decisions
/v2because a combined object export would exclude older supported V1 releases.Testing
npm test: 1,306 passed; one pre-existing skip.npm run typecheck,npm run build, andnpm run lint: passed; lint retains existing warnings.npm audit: zero vulnerabilities;npm ls source-map-jsresolves 1.2.2.scripts/smoke-loader.sh: packed-plugin checks passed on OpenCode 1.15.0, 1.18.35, and 1.19.0, including tools, sessions, approvals, and cancellation.scripts/smoke-v2.mjs: packed-plugin checks passed on OpenCode 2.0.26, including gateway conversations, approvals, timeout/cancel cleanup, agent selection, compaction, service recovery, and plugin reload.install.sh --no-setupexercised against a temporary configuration directory: generated the V2 wrapper without changing the active installation. Wrapper tests cover upgrades, downgrades, and preservation of custom content.inkbox-opencode doctor; expect the matching entrypoint and host configuration to be recognized. With configured test credentials, confirm a gateway conversation completes and native permission rules are honored. Live external messaging was not exercised.Related PRs
None.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.