fix(opencode): install plugin SDK at runtime#2574
Merged
benfrank241 merged 1 commit intoJul 7, 2026
Merged
Conversation
The OpenCode plugin imports @opencode-ai/plugin/tool from its built dist entrypoint, so the package must be present in OpenCode's isolated plugin cache. Keeping it only as a peer dependency lets npm skip it during plugin installation, which can make the plugin fail to load with ERR_MODULE_NOT_FOUND. Move @opencode-ai/plugin into dependencies and remove the peer-only declaration. Keep @vectorize-io/hindsight-client as a runtime dependency, and sync package-lock.json so npm installs the cache tree needed by OpenCode. Verified with npm run build, npm pack --json, and a local opencode plugin install from the generated tarball. The generated cache contained both runtime dependencies and direct import of the plugin entrypoint succeeded.
Member
|
clean, correct fix. thanks! |
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.
Summary
Move
@opencode-ai/plugininto the OpenCode integration's runtime dependencies and remove the peer-only declaration. The built plugin entrypoint imports@opencode-ai/plugin/tool, so OpenCode needs that package available in its isolated plugin cache when loading the integration.@vectorize-io/hindsight-clientremains a runtime dependency, and the lockfile is updated to reflect the new dependency classification.Fixes #2573
Verification
npm run buildnpm pack --jsonopencode plugin ...@file:in a fresh temporary project