Skip to content

v1.0.0 — Pure OpenCode V2 Plugin (OpenCode v2.3.0+)

Choose a tag to compare

@huseyincig huseyincig released this 16 Nov 22:22
· 4 commits to main since this release

1.0.0 — 2026-11-17

Breaking: Dropped OpenCode V1 support and @opencode-ai/plugin; Smart Questions is now a pure OpenCode V2 plugin targeting @opencode/plugin ^2.3.0 (opencode v2.3.0+).

  • Pure OpenCode V2 Server Plugin (src/index.ts): Export Plugin.define({ id: 'opencode-smart-questions', setup }), register session.hook('context') and session.hook('prompt'), and subscribe to context.event.subscribe (session.synthetic, session.inbox.enqueued, form.replied, form.cancelled, session.deleted) with reverse-order disposal.
  • Pure OpenCode V2 TUI Plugin (src/ui.tsx, scripts/emit-tui.mjs): Export Plugin.define({ id: 'opencode-smart-questions.tui', setup }), rewrite @opencode/plugin/tui to opentui:runtime-module:%40opencode%2Fplugin%2Ftui, fix context.data.session.message.list/sync lookup, replace non-existent message.created with typed V2 events, extract SessionInfo.agent in resolveAgentName, enforce draft lockfile / canUseDraftCoordination checks in fire(), and add in-flight async race guards.
  • Handoff & Protocol Fixes (src/handoff.ts): Prevent Smart Questions' own synthetic remediation messages (metadata['opencode-smart-questions'] === true) from resetting active Guardian handoffs in extractCurrentTurnGuardianHandoff, and support SessionInboxItem payloads.
  • Verification: 131/131 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode v2.3.0 host acceptance scenarios pass (npm run test:all).