Repository navigation
Feat/opencode v2 - #6
Merged
Merged
Conversation
index.js is now the package main and carries both generations: OpenCode 2 calls setup (.opencode/plugins/orchestrate-v2.js), OpenCode 1 calls a lazy server that loads the unchanged V1 entry, so @opencode-ai/plugin is never imported on a V2 host. The V2 entry wires the same pure modules to the V2 API: skills via ctx.skill.transform, bootstrap and role-prompt refresh via the context session hook, [TASK OUTCOME]/[CACHE STATUS] via execute.after on the subagent tool, squad_* tools with JSON Schema inputs, and the rate-limit guard via the retry hook (vetoes the retry instead of aborting) plus the event stream for terminal errors and silent hangs. V2 shapes are converted at the edge in src/v2/adapt.js. Shared by both entries now: tool wording and variant checks (src/squad-tools.js), task notes (src/task-notes.js) and the process-wide lookups (.opencode/plugins/runtime.js). Not available on V2: toasts (no TUI handle for server plugins) and squad_compact's model choice (V2 compaction takes no model). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ariables The runtime.js extraction carried the _inventoryCache/_hasSquadCache declarations along, leaving orchestrate.js referencing undeclared variables (ReferenceError on the first V1 turn). Enable biome's noUndeclaredVariables so this class of slip fails the lint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…per-project model_data on V2 .opencode/plugins/ is auto-loaded by both hosts when opencode runs in this repo, so only the V1 entry stays there. On V2 the background service's cwd is not the project, so model_data.json is resolved from ctx.location and cached per directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
No description provided.