Repository navigation
Version v2.0.0
OpenCodeRAG v2.0.0 — OpenCode V2 only
Breaking
- OpenCode 1.x support dropped. Both plugin entrypoints now export the pure V2 shape
{ id, setup }:dist/plugin-entry.js:{ id, setup }(the V1serverkey and named export are gone)dist/tui.js:{ id, setup }(the V1tui()entrypoint and the V1 callback-based settings dialog — ~17 KB of code — were removed)
@opencode/plugindependency>=2.0.0; dev deps bumped (@opencode-ai/pluginpinned 1.18.18,@opentui/*0.5, vite 8, pdfjs-dist 6); peer range@opencode-ai/plugin >=1.18.0.
Fixed
- TUI plugin failed to load under OpenCode V2 (
PluginModule.LoadError: "Plugin must export a default definition with an id and an effect or setup function",SchemaErrormissingdefault.setup). The TUIsetupis role-aware:- server role (context without
ui/keymap): safe no-op — the server loads every.opencode/plugins/*.js - TUI role: sidebar via
context.ui.slot({ append: "sidebar.content" }); one global keymap layer with the three commands (settings / add-file-list / add-chunks), keybindings translatedenter→return,prompt.submitdispatch verified against the V2 keybind reference; settings dialog ported to promise-basedcontext.ui.dialog.select/prompt+toast.show;ResolvedTheme→ legacy{accent, text, textMuted}mapping; model picker rebuilt fromcontext.data.provider/model.list(); returns a cleanup that unclaims the sidebar slot
- server role (context without
- CI publish divergence: removed
tsconfig.jsonpathsthat pointed into the gitignored.opencode/node_modules— local typecheck silently used different type versions than CI'snpm ci, which failed the first v2.0.0 publish attempt. Local and CI now resolve@opencode-ai/pluginidentically from package.json + lockfile. opencode-rag inittest derives the@opencode-ai/pluginversion frompackage.jsoninstead of hardcoding it.
Docs
doc/plugin.md: V2-only export pattern;doc/troubleshooting.md: schema-error entry, log-grep guidance, updated debug snippets;doc/development.md: release process corrected to the real push → tag → GitHub Release → CI-publish flow;doc/roadmap.md: V2 export line.
Full Changelog: v1.23.3...v2.0.0