Skip to content

Version v2.0.0

Choose a tag to compare

@MrDoe MrDoe released this 21 Sep 21:38
· 110 commits to main since this release

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 V1 server key and named export are gone)
    • dist/tui.js: { id, setup } (the V1 tui() entrypoint and the V1 callback-based settings dialog — ~17 KB of code — were removed)
  • @opencode/plugin dependency >=2.0.0; dev deps bumped (@opencode-ai/plugin pinned 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", SchemaError missing default.setup). The TUI setup is 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 translated enter → return, prompt.submit dispatch verified against the V2 keybind reference; settings dialog ported to promise-based context.ui.dialog.select/prompt + toast.show; ResolvedTheme → legacy {accent, text, textMuted} mapping; model picker rebuilt from context.data.provider/model.list(); returns a cleanup that unclaims the sidebar slot
  • CI publish divergence: removed tsconfig.json paths that pointed into the gitignored .opencode/node_modules — local typecheck silently used different type versions than CI's npm ci, which failed the first v2.0.0 publish attempt. Local and CI now resolve @opencode-ai/plugin identically from package.json + lockfile.
  • opencode-rag init test derives the @opencode-ai/plugin version from package.json instead 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