Skip to content

fix(opencode): install plugin SDK at runtime#2574

Merged
benfrank241 merged 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/opencode-plugin-sdk-runtime
Jul 7, 2026
Merged

fix(opencode): install plugin SDK at runtime#2574
benfrank241 merged 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/opencode-plugin-sdk-runtime

Conversation

@Sanderhoff-alt

@Sanderhoff-alt Sanderhoff-alt commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Move @opencode-ai/plugin into 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-client remains a runtime dependency, and the lockfile is updated to reflect the new dependency classification.

Fixes #2573

Verification

  • npm run build
  • npm pack --json
  • Installed the generated tarball with opencode plugin ...@file: in a fresh temporary project
  • Confirmed the OpenCode cache contained both runtime dependencies
  • Confirmed direct import of the built plugin entrypoint succeeded

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.
@benfrank241

Copy link
Copy Markdown
Member

clean, correct fix. thanks!

@benfrank241 benfrank241 merged commit ae7099f into vectorize-io:main Jul 7, 2026
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode plugin should install plugin SDK as a runtime dependency

2 participants