Repository navigation
Releases
v1.2.0 — Universal OpenCode V2 Plugin Mesh & Security Hardening
What's Changed in v1.2.0
- Universal OpenCode V2 Plugin Mesh Interoperability (
src/bridge.ts,src/handoff.ts,src/index.ts,src/ui.tsx): Added zero-dependency OpenCode V2 Plugin Mesh bridge (BRIDGE_REVISION: 2.3.0) enabling seamless coordination acrossopencode-smart-questions,opencode-guardian,opencode-hi,opencode-lazy-skill-engine, andopencode-trimin any combination. - Session Interaction Leases & Failover RPC Bridge (
src/index.ts,src/ui.tsx,src/bridge.ts): Acquire and synchronizeuser_interactionsession leases (Math.max(timeoutMs + 15000, 120000)TTL) while forms are active so orchestrators (opencode-hi) and policy engines (opencode-guardian) defer background harvesting/remediation; added automatic primary/standby failover inregisterMeshStateRpc. - Multi-Peer Handoff & Strict Anti-Spoofing Provenance (
src/handoff.ts,src/index.ts): Support[OPENCODE_HANDOFF:v1]handoffs from any verified mesh peer (source=guardian,source=opencode-hi, etc.) and[opencode-mesh remediation]markers while strictly enforcinghasGuardianMetadata(value, 'remediation')for Guardian messages (rejectingvisibleor partially spoofed metadata) and requiring trusted provenance oncontexthookevent.systemparts. - Complete Lease & Settlement Lifecycle (
src/ui.tsx,src/index.ts): Releaseuser_interactionleases immediately on auto-replyfire(),!stillPendingsync checks,formID-only orevt.propertiessettlement payloads, user inbox messages,session.deleted, anddispose(). - Documentation & Installation Guide (
README.md,docs/*): Expanded installation instructions covering global (~/.config/opencode/opencode.json), project-scoped (opencode.json/.opencode/opencode.json), CLI/npm global & local commands, explicit server/TUI entrypoints, and localfile://development. - Verification: 159/159 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode
v2.3.2host acceptance scenarios pass (npm run test:all).
v1.1.2
What's Fixed in v1.1.2
- Shortcut & modifier key filtering (
src/ui.tsx): Ignore modifier-only keys (shift,ctrl,control,alt,meta,super,capslock,numlock,scrolllock) and shortcut chords (ctrl/meta/alt/super) inkeyInputso OpenCodev2.3.1+tab switching, panel search (Ctrl+F/Cmd+F), and copy shortcuts do not cancel active auto-selection countdowns. - Uncached session sync for TUI handoffs (
src/ui.tsx): AddedsetHandoffIfEligiblewith synchronous fast-path for cached sessions and automaticsession.syncfallback whensession.syntheticorsession.inbox.enqueuedarrives before a root session is cached. - Server directory resolution (
src/index.ts):sessionDirectoryFromInfonow checks bothsessionInfo.location?.directoryand flatsessionInfo.directory, andcontext.event.subscribeforwardsevent.location?.directorytoisSessionEligible. - OpenCode
v2.3.1+& npm 11 compatibility (src/ui.tsx,tests/v2-live-acceptance.mjs): Treat OpenCodeUnknownErrorHTTP 500 JSON responses as rejected synthetic deliveries without consuming remediation budget, support npm 11's object-formnpm pack --jsonoutput, and report live host version dynamically.
Verification: 149/149 unit & regression tests, 7/7 sandbox scenarios, 8/8 live OpenCode v2.3.2 acceptance scenarios, tsc --noEmit, strict typecheck, oxlint --deny-warnings, and npm audit (0 vulnerabilities).
v1.1.1
What's Fixed in v1.1.1
- Config fallback fix (
src/config.ts): Strip functionresolveConfigbefore validating static fallback keys so{ resolveConfig, ...fallbackOptions }applies fallback settings whenresolveConfig(directory)returnsundefined. - Reactive TUI slot (
src/ui.tsx): Use reactivegetSessionID(),markers, anduiTextaccessors insession.composer.topslotrender. - Settlement & session scope hardening (
src/ui.tsx,src/index.ts): Added a 512-entry LRUsettledFormstombstone against late duplicateform.createdevents, enforcedisEligibleTuiSessionSyncon TUIsession.synthetic/session.inbox.enqueuedhandlers, and enforcedisSessionEligiblein the serverprompthook. - Draft lock & keyboard precision (
src/ui.tsx): Added exclusiveflag: 'wx'toensureDraftLock(refuses symlinks), ignored non-editing navigation keys (pageup,pagedown,home,end,scrollup,scrolldown,f1–f12), and cancelled in-flightsyncforms on typing/paste. - Detector, marker stripping & deduplication (
src/detector.ts,src/view-model.ts,src/handoff.ts,src/form-adapter.ts): ScopedcommonMarkersfallback to default marker configs, madestripMarkercase-insensitive, movedregisterSmartQuestionsCapabilityrefcount toglobalThissymbols, and deduplicatedui.tsx/form-adapter.ts.
Verification: 145/145 unit & regression tests, 7/7 sandbox scenarios, 8/8 live OpenCode v2.3.0 acceptance scenarios, tsc --noEmit, oxlint --deny-warnings, and npm audit (0 vulnerabilities).
v1.1.0 — Dynamic Per-Session Config, SSE Reconnect & Bounded TUI Caches
1.1.0 — 2026-11-17
- Dynamic per-session directory config (
resolveConfig): Added optionaloptions.resolveConfig?: (directory: string) => unknownsupport inresolveSmartQuestionConfig(src/config.ts),src/index.ts, andsrc/ui.tsxso multi-directory hosts can resolve per-session configuration dynamically while preserving 100% standalone.opencode/smart-question.jsonbehavior when omitted. - Event stream reconnect resilience: Updated
context.event.subscribeinsrc/index.tswith anAbortController-aware exponential backoff reconnect loop (250 ms → 30 s cap) so transientEventBusOverflowErroror stream interruptions recover automatically without silently stopping event handling. - Bounded TUI remediation & chain caches: Added 512-entry LRU eviction (
setBounded) forremediatedFormsandsessionChainsinsrc/ui.tsxalongsidesession.deletedcleanup. - Verification: 135/135 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode
v2.3.0host acceptance scenarios pass (npm run test:all).
v1.0.0 — Pure OpenCode V2 Plugin (OpenCode v2.3.0+)
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): ExportPlugin.define({ id: 'opencode-smart-questions', setup }), registersession.hook('context')andsession.hook('prompt'), and subscribe tocontext.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): ExportPlugin.define({ id: 'opencode-smart-questions.tui', setup }), rewrite@opencode/plugin/tuitoopentui:runtime-module:%40opencode%2Fplugin%2Ftui, fixcontext.data.session.message.list/synclookup, replace non-existentmessage.createdwith typed V2 events, extractSessionInfo.agentinresolveAgentName, enforce draft lockfile /canUseDraftCoordinationchecks infire(), 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 inextractCurrentTurnGuardianHandoff, and supportSessionInboxItempayloads. - Verification: 131/131 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode
v2.3.0host acceptance scenarios pass (npm run test:all).
v0.8.2 - Fallback Recommendation Preservation, In-Flight Cancellation, and Subagent Support
What's Changed in v0.8.2
- Recommendation Preservation in Fallback Mode (
ui.tsx,backend.ts):- In
remediate-then-fallbackpolicy, preserves recommended selections (including multiselect answers) across all classified questions once the remediation budget is exhausted. The V1 TUI permits that fallback instead of installing a manual-answer lock.
- In
- Race Condition & Duplicate Event Hardening (
ui.tsx,backend.ts):- Keeps rejected remediation retryable when duplicate question events arrive during network transport.
- Preserves V2 form reply ownership (
pending.has(form.id)) and user-interaction cancellation across duplicate form events and asynchronousform.sync/ reply completion.
- Ambiguous Option Label Rejection (
form-adapter.ts):- Rejects ambiguous V2 label-to-value mappings even when first-option fallback is enabled, safely classifying duplicated labels as
unclassified.
- Rejects ambiguous V2 label-to-value mappings even when first-option fallback is enabled, safely classifying duplicated labels as
- Subagent Support & Lifecycle Cancellation (
session-scope.ts,types.ts,backend.ts):- Adds documented
includeSubagentsopt-in configuration while preserving root-session isolation by default. - Cancels in-flight V1 question handling on session deletion, user messages, settlement, and plugin disposal; rejected history lookups cannot revive cancelled work.
- Adds documented
- Expanded Automated Test Suite:
- Added 13 debugging regression tests covering remediation exhaustion, ambiguous labels, duplicate forms, and subagent session scopes.
- 169 of 169 tests passing (100% pass) across unit, fallback, and integration scenarios.
- 0 linter warnings / errors across 21 files.
v0.8.1
Highlights of v0.8.1
• Reserved Form Field Key Preservation (form-adapter.ts):
• Preserves own serialized answers for reserved field keys (e.g. __proto__) using safe object property assignment (Object.hasOwn).
• Deleted Session Overlay Cleanup (ui.tsx):
• Deleting an owning session (session.deleted event) now immediately releases the question lockfile and clears TUI overlay state, preventing orphaned overlays.
• 100% Passing Test Suite:
• 152 of 152 automated unit, fallback, visibility, and regression tests passing.
• 10 of 10 isolated sandbox scenarios passing.
• 0 linter warnings / errors across 19 files.
v0.8.0 - Synthetic Remediation Retries and TUI Lint Hardening
Highlights of v0.8.0
- Synthetic Remediation Retry Resilience (
backend&ui):- Structured synthetic rejections and transport send failures remain retryable without exhausting duplicate or budget state prematurely.
- TUI Runtime Lint Hardening:
- Resolved compiler and linter diagnostics across Solid/OpenTUI UI rendering adapters while maintaining dual-mode V1 and V2 host parity.
- 100% Passing Test Suite: 150 of 150 automated unit, fallback, visibility, and regression tests passing with 0 warnings/errors.
v0.6.0 - Flexible Detection, Multi-Step Fallback & Unattended Safety
Highlights of v0.6.0
- Flexible Recommendation Matching: Recognizes recommendations regardless of whether they appear as exact suffixes (
[SQ:recommended]), prefixes ((Recommended),(Önerilen),[SQ:recommended] Option), lowercase variations, descriptions (description: "(Recommended)"), or localized Turkish markers. - Multi-Step & Multi-Field Form Fallback: In complex multi-step questions (Step 1, Step 2, Step 3) or multi-field V2 forms, steps with explicit recommendations are honored, while steps without explicit markers fall back to the logical first option. Ensures long unattended agent runs never stall or deadlock.
- Unattended Safety & Policy Configuration: Added support for
fallbackToFirstOption: true,fallbackOnManual: true, andunclassifiedQuestionPolicy: 'fallback-first' | 'remediate-then-fallback' | 'remediate' | 'ignore'in configuration. - Comprehensive Overlay State Surface: The TUI overlay now visibly surfaces all handled selectable question states with dedicated color branding:
- AUTO (cyan border, green checklist, live countdown timer)
- MANUAL (yellow border, manual approval required)
- UNCLASSIFIED (cyan border, agent remediation in progress)
- ERROR (red border, diagnostic failure message)
- 100% Passing Test Suite: 148 of 148 automated unit, fallback, visibility, and regression tests passing with 0 warnings/errors.
v0.5.0 — Unclassified Question Policy & Session Chain Resets
OpenCode Smart Questions v0.5.0
What's Changed
- Configurable Unclassified Policy: Added
unclassifiedQuestionPolicy: 'remediate' | 'ignore'setting across V1 backend and V2 UI layers to control whether unclassified questions trigger protocol remediation prompts or passive waiting. - Session Chain Resets: In
chat.messageand user turn handlers, unclassified remediation chains now properly reset on new user turns, preventing remediation starvation in long sessions. - Fail-Safe Config Normalization: Strict validation of
unclassifiedQuestionPolicyensures invalid configurations fail-closed without altering auto-reply policies. - Automated Verification: 136 of 136 unit and regression tests pass with 0 warnings and 0 errors on Oxlint and strict TypeScript compilation.