Skip to content

fix: support opencode desktop and 2.x - #6

Merged
carson2222 merged 1 commit into
mainfrom
feat/desktop-v2-runtime
Sep 26, 2026
Merged

carson2222 merged 1 commit into
mainfrom
feat/desktop-v2-runtime

Conversation

@carson2222

Copy link
Copy Markdown
Owner

Fixes #4. Fixes #5.

  • Desktop runs plugins in Node, which has no Bun global and can't load TypeScript from node_modules. The package now ships a bundled dist/index.js, finds snip with plain Node, and reads savings through node:sqlite when Bun is absent.
  • The default export now also has setup, which opencode 2.x needs. It rewrites the shell tool through execute.before. 1.x ignores the extra key.
  • CI builds the bundle and loads it from node_modules on Node 24.

Verified with:

  • 103 tests, typecheck and the Node smoke.
  • A real opencode 1.18 CLI session loading the bundle.
  • opencode v2.0.18 built from source, installing the packed tarball and rewriting a real shell tool call.

Not covered: the savings toast on 2.x, which has no toast API for plugins.

@carson2222
carson2222 merged commit dd96f92 into main Sep 26, 2026
1 check 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

1 participant