Add OpenCode 2 plugin with full feature parity - #74
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Same problem here, confirming from a production install:
This blocks all V2 users today — memory features are completely unavailable. I run V2 daily and can |
|
Hi @FoTrix yes we are shipping plugin compatibility for opencode-v2 soon! |
OpenCode 2 rejects the V1 root export, so 2.0.13 fails to load for every OpenCode 2 user (#74). Ship a server plugin at `opencode-supermemory/server` (resolved automatically by OpenCode 2), a `./tui` companion that renders activity notices as toasts, and a shared `./rpc` contract, while keeping the root export unchanged for OpenCode V1. The V2 runtime mirrors main's V1 behavior: direct/advisory/off recall with per-session dedupe and 3s fail-open timeouts, first-message profile context, keyword nudges, the shared `supermemory` tool plus a read-only `supermemory_recall` tool that the installer auto-allows, bounded and idempotent automatic capture from the session transcript, native compaction enrichment with summary capture (`compactionEnabled`), update checks, and activity notices over plugin RPC. Recall context is re-applied on every model call for the same prompt because OpenCode 2 hook messages are request-local. Shared services now back both generations: the tool executor, compaction prompt, activity notice formatting, and a comment-preserving JSONC editor that registers `plugin`, `plugins`, and the recall permission. The installer and `status` report both registrations. Also fix the `src/cli.ts` typecheck failure that blocked the 2.0.14 release, import jsonc-parser's ESM build so bundles load under Node and Bun, run tests in the release workflow, and bump to 2.0.15.
dd69681 to
fa5645b
Compare
PR #81 added the footer but was merged into graphite-base/81 instead of main, so it never shipped. Fold it into one `./tui` module that OpenCode V1 loads through tui.jsonc (`tui()`) and OpenCode 2 loads automatically next to the server plugin (`setup()`). Both show `◪ supermemory · running` while a session is busy and the latest recall or save activity otherwise; OpenCode 2 also renders the server's activity notices as toasts from the same plugin. The installer enables the V1 footer in tui.jsonc, `status` reports it, and direct-recall parts carry recall metadata so the V1 footer can read them.
The prompt footer is rendered on the home screen too, so the extra home.footer.status slot duplicated the footer.

Summary
OpenCode 2 rejects the V1 root export (
Plugin must export a default definition with an id and an effect or setup function), so 2.0.13 fails to load for every OpenCode 2 user. This adds an OpenCode 2 server plugin, keeps the V1 root export unchanged, and brings the V2 runtime to parityWhat ships
opencode-supermemory/server: OpenCode 2 resolves this export automatically from"plugins": ["opencode-supermemory"]. The runtime provides direct/advisory/off recall with per-session dedupe and 3s fail-open timeouts, first-message profile context, keyword nudges, the sharedsupermemorytool, a read-onlysupermemory_recalltool that the installer auto-allows, transcript-based automatic capture with idempotent capture IDs and timeouts, native compaction enrichment plus summary capture (compactionEnabled), update checks, and activity notices.opencode-supermemory/tuiandopencode-supermemory/rpc: the server emits notices over plugin RPC and the TUI companion renders them as toasts, so update and recall notices never enter model context (parity with Show Supermemory activity in OpenCode #80).plugin(V1),plugins(V2), and the recall permission.installandstatusreport both registrations.