feat(axi-sdk-js): add OpenCode ambient integration#38
Merged
Conversation
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.
Intent
The developer wanted to add OpenCode support to the AXI JavaScript SDK’s existing self-installation system, which already handled Claude and Codex. They asked the agent to research OpenCode’s plugin documentation, discuss the design via lavish-axi, then implement an ambient-context-only OpenCode plugin that injects the AXI home view without adding a custom tool. They explicitly allowed using their real OpenCode setup for development/testing and required end-to-end validation before declaring completion. They also wanted confirmation that downstream users would get OpenCode support automatically after upgrading the SDK, while preserving Claude and Codex behavior.
What Changed
dist/output.Risk Assessment
Testing
npm testinpackages/axi-sdk-jsnpm testnpx vitest run test/hooks.test.tsnpx vitest run test/cli.test.ts -t "hooks automatically|hook installation"Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
Round 1 - passed ✅
✅ **Rebase** - passed
Round 1 - passed ✅
Round 1 - passed ✅
🔧 **Test** - 1 issue found → auto-fixed
Round 1 - found 1 warning
packages/axi-sdk-js/test/fixtures/version-bin.mjs:1-npm testfails in the subprocess integration tests because this fixture imports../../dist/cli.js, butdist/is not present in the fresh worktree after dependency installation. The focused OpenCode and hook-installation tests run successfully without the prebuilt package output.npm testnpx vitest run test/hooks.test.tsnpx vitest run test/cli.test.ts -t "hooks automatically|hook installation"Round 2 (auto-fix) - passed ✅
npm testinpackages/axi-sdk-js🔧 **Document** - 4 issues found → auto-fixed
Round 1 - found 4 issues (2 warnings, 2 infos)
.agents/skills/axi/SKILL.md:154- The AXI skill still says default ambient-context app targets are Claude Code and Codex only. The SDK change now self-installs OpenCode support by default too, so this guidance should include OpenCode to avoid agents building new AXIs from stale target-app assumptions..agents/skills/axi/SKILL.md:163- The per-app integration guidance lists Claude Code and Codex but has no OpenCode entry. It should document that OpenCode is supported via a managed plugin in~/.config/opencode/plugins/using ambient system-context injection rather than a nativeSessionStarthook.README.md:77- The public principle summary describes ambient context only as self-installing into session hooks. With OpenCode support, the implementation can self-install through a plugin instead, so the summary should be broadened to mention session hooks or plugins/context integrations.docs/index.html:578- The website's Ambient context section says the agent context always comes from session hooks that output to stdout. The new OpenCode path injects the AXI home view through a managed plugin system-context transform, so this public documentation should be updated to avoid excluding the OpenCode behavior.Round 2 (auto-fix) - passed ✅
🔧 **Lint** - 4 issues found → auto-fixed
Round 1 - found 4 warnings
docs/index.html:1- Prettier formatting check failed for this changed file.packages/axi-sdk-js/README.md:1- Prettier formatting check failed for this changed file.packages/axi-sdk-js/src/hooks.ts:1- Prettier formatting check failed for this changed file.packages/axi-sdk-js/test/hooks.test.ts:1- Prettier formatting check failed for this changed file.Round 2 (auto-fix) - passed ✅
✅ **Push** - passed
Round 1 - passed ✅