Repository navigation
feat: add OpenCode plugin support (0.7.4) - #27
Merged
Merged
Conversation
This branch is waiting to be deployed
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.
What
Add OpenCode support as a native plugin with seven
agy--prefixed skills, sharing the existing companion and prompt templates. Install throughopencode plugin, restart, and invoke/agy-<persona>or/agy-jobs.Closes #26.
Why
OpenCode uses a flat skill-name space and a different plugin entrypoint. It needs branded entrypoints and automatic package registration, while keeping the same canonical workflows and avoiding manual skill-path configuration.
Design
scripts/generate-skills.mjsgenerator with Pi and OpenCode target configurations for output directory, naming, invocation syntax, metadata removal, and appended compatibility guidance. Generateopencode-skills/from canonicalskills/, adapting names, invocation tokens, resource paths, and host metadata. Existing Pi outputs stay unchanged.templates/harness-compatibility.mdguidance used by Pi; share companion code, prompt templates, and reference assets.prepack, whose presence makes pacote spawn nested npm inside OpenCode’s compiled runtime and fail Git dependency preparation.pack:checkedvalidates before creating an archive,prepublishOnlyvalidates publishing, and CI still checks generated files. A regression verifies that stale output fails before archive creation.Verification
npm test: 198 passed, 0 failed, including generated-content, package-resource, plugin-registration, and fake-agy lifecycle checks.npm run check:skills: generated files current; existing Pi outputs unchanged.npm run pack:checkedandgit diff --checkpassed.reviewerskill/command, and valid resource paths.opencode plugin ... --global; all seven skills and installed companion paths were verified.Live verification
Tested on macOS with OpenCode 1.18.34, the real Antigravity CLI 1.2.11, and DeepSeek as the OpenCode host model. The plugin was installed from the public GitHub commit through
opencode plugin; OpenCode settings/cache and the task repository were disposable. Existing credentials were used without being copied into the repository or PR./agy-askAGY_OPENCODE_LIVE_OK, and the host relayed it (15.8 s)./agy-stafferdone, and returned the verification code from a fixture file (37.8 s)./agy-implementersum.mjs, collected its result, and independently rerannode sum.test.mjssuccessfully (37.6 s). The original test and unrelated fixture stayed byte-identical; no commit was made.The requested legacy model ID
deepseek-v4-flashwas rejected by OpenCode's current model catalog before any AGY execution. The successful runs useddeepseek/deepseek-flash(current V4.1 Flash). DeepSeek's official model documentation says V4 Flash is retired and legacy API names route to V4.1 Flash. These results therefore do not claim a test of the retired V4 weights. The ask check preceded the generator-only refactor; staffer and implementer ran from commit373b7cc, whose generated skills and companion are unchanged.Compatibility
Targets OpenCode
>=1.18.34 <2; V2 support is not claimed. Git-backed plugin updates use a new tag or commit reference because OpenCode caches previously installed specs. Node.js and an installed, authenticated Antigravity CLI remain prerequisites.Release
Targets 0.7.4. Package, Claude Code, and Codex manifests are bumped together, with
docs/releases/v0.7.4.mdfollowing the existing release-note format. No extra OpenCode-specific workflow appendix is added. The release-only changes passed all 10 Pi/OpenCode packaging tests and generated-skill consistency checks.Try this PR
opencode plugin 'agy-staff@git+https://github.com/keli-wen/agy-staff.git#5cca91fed6a99f3cceb30f37c60844d99289f777' --globalRestart OpenCode, then run
/agy-ask reply with OK.