Skip to content

Releases

v1.2.0 — Universal OpenCode V2 Plugin Mesh & Security Hardening

Choose a tag to compare

@huseyincig huseyincig released this 20 Nov 19:24

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 across opencode-smart-questions, opencode-guardian, opencode-hi, opencode-lazy-skill-engine, and opencode-trim in any combination.
  • Session Interaction Leases & Failover RPC Bridge (src/index.ts, src/ui.tsx, src/bridge.ts): Acquire and synchronize user_interaction session 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 in registerMeshStateRpc.
  • 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 enforcing hasGuardianMetadata(value, 'remediation') for Guardian messages (rejecting visible or partially spoofed metadata) and requiring trusted provenance on context hook event.system parts.
  • Complete Lease & Settlement Lifecycle (src/ui.tsx, src/index.ts): Release user_interaction leases immediately on auto-reply fire(), !stillPending sync checks, formID-only or evt.properties settlement payloads, user inbox messages, session.deleted, and dispose().
  • 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 local file:// development.
  • Verification: 159/159 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode v2.3.2 host acceptance scenarios pass (npm run test:all).

v1.1.2

Choose a tag to compare

@huseyincig huseyincig released this 19 Nov 14:38

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) in keyInput so OpenCode v2.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): Added setHandoffIfEligible with synchronous fast-path for cached sessions and automatic session.sync fallback when session.synthetic or session.inbox.enqueued arrives before a root session is cached.
  • Server directory resolution (src/index.ts): sessionDirectoryFromInfo now checks both sessionInfo.location?.directory and flat sessionInfo.directory, and context.event.subscribe forwards event.location?.directory to isSessionEligible.
  • OpenCode v2.3.1+ & npm 11 compatibility (src/ui.tsx, tests/v2-live-acceptance.mjs): Treat OpenCode UnknownError HTTP 500 JSON responses as rejected synthetic deliveries without consuming remediation budget, support npm 11's object-form npm pack --json output, 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

Choose a tag to compare

@huseyincig huseyincig released this 17 Nov 07:36

What's Fixed in v1.1.1

  • Config fallback fix (src/config.ts): Strip function resolveConfig before validating static fallback keys so { resolveConfig, ...fallbackOptions } applies fallback settings when resolveConfig(directory) returns undefined.
  • Reactive TUI slot (src/ui.tsx): Use reactive getSessionID(), markers, and uiText accessors in session.composer.top slot render.
  • Settlement & session scope hardening (src/ui.tsx, src/index.ts): Added a 512-entry LRU settledForms tombstone against late duplicate form.created events, enforced isEligibleTuiSessionSync on TUI session.synthetic/session.inbox.enqueued handlers, and enforced isSessionEligible in the server prompt hook.
  • Draft lock & keyboard precision (src/ui.tsx): Added exclusive flag: 'wx' to ensureDraftLock (refuses symlinks), ignored non-editing navigation keys (pageup, pagedown, home, end, scrollup, scrolldown, f1–f12), and cancelled in-flight sync forms on typing/paste.
  • Detector, marker stripping & deduplication (src/detector.ts, src/view-model.ts, src/handoff.ts, src/form-adapter.ts): Scoped commonMarkers fallback to default marker configs, made stripMarker case-insensitive, moved registerSmartQuestionsCapability refcount to globalThis symbols, and deduplicated ui.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

Choose a tag to compare

@huseyincig huseyincig released this 17 Nov 07:08

1.1.0 — 2026-11-17

  • Dynamic per-session directory config (resolveConfig): Added optional options.resolveConfig?: (directory: string) => unknown support in resolveSmartQuestionConfig (src/config.ts), src/index.ts, and src/ui.tsx so multi-directory hosts can resolve per-session configuration dynamically while preserving 100% standalone .opencode/smart-question.json behavior when omitted.
  • Event stream reconnect resilience: Updated context.event.subscribe in src/index.ts with an AbortController-aware exponential backoff reconnect loop (250 ms → 30 s cap) so transient EventBusOverflowError or stream interruptions recover automatically without silently stopping event handling.
  • Bounded TUI remediation & chain caches: Added 512-entry LRU eviction (setBounded) for remediatedForms and sessionChains in src/ui.tsx alongside session.deleted cleanup.
  • Verification: 135/135 unit & regression tests, 7/7 sandbox scenarios, and 8/8 live OpenCode v2.3.0 host acceptance scenarios pass (npm run test:all).

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

Choose a tag to compare

@huseyincig huseyincig released this 16 Nov 22:22

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).

v0.8.2 - Fallback Recommendation Preservation, In-Flight Cancellation, and Subagent Support

Choose a tag to compare

@huseyincig huseyincig released this 19 Oct 21:48

What's Changed in v0.8.2

  • Recommendation Preservation in Fallback Mode (ui.tsx, backend.ts):
    • In remediate-then-fallback policy, 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.
  • 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 asynchronous form.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.
  • Subagent Support & Lifecycle Cancellation (session-scope.ts, types.ts, backend.ts):
    • Adds documented includeSubagents opt-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.
  • 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

Choose a tag to compare

@huseyincig huseyincig released this 16 Oct 23:12

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

Choose a tag to compare

@huseyincig huseyincig released this 09 Oct 14:58

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

Choose a tag to compare

@huseyincig huseyincig released this 07 Oct 14:47

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, and unclassifiedQuestionPolicy: '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

Choose a tag to compare

@huseyincig huseyincig released this 07 Oct 11:22

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.message and 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 unclassifiedQuestionPolicy ensures 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.