Repository navigation
Releases
v0.16.0 — Universal V2 Plugin Mesh Bridge, External State & Local/Global Scope Isolation
What's Changed in v0.16.0
- Universal OpenCode V2 Plugin Mesh Bridge (
src/bridge.tsv2.2.0): Zero-dependency N-way interoperability acrossopencode-guardian,opencode-hi,opencode-smart-questions, and sibling V2 plugins viaSymbol.for("opencode.mesh.v2")andopencode-mesh.stateRPC. - Cryptographic Provenance, Session Leases & Deterministic Interventions: Preserves
metadata["opencode-mesh"].tokeninsanitizeObject, coordinatesuser_interaction/active_remediation/orchestration_dispatchleases, records/clears deterministic mesh interventions, and synchronizes active handoffs across Guardian, Hi, and Smart Questions. - External Per-Project State Directory (Zero
.opencode/Pollution): Stores per-project audit logs in~/.local/state/opencode-guardian/projects/<projectHash>/guardian-events.jsonl(0600) instead of<project>/.opencode/, preventing untracked files in git repositories and read-only.opencode/sandbox lockouts inopencode-hi. IsolatesNODE_TEST_CONTEXTruns underos.tmpdir()/opencode-guardian-tests-<pid>/with automatic process-exit cleanup. - Local vs. Global Project Scope Isolation: Project-local installations strictly supervise only their own project directory (and subdirectories) without interfering with unrelated projects on the shared OpenCode server; global installations (
~/.config/opencode/...) supervise all projects while honoring per-project overrides. - Documentation & Verification: Expanded
README.mdinstallation guide (Global, Project-Local,.opencode/plugins/Wrapper/Symlink,file://, and Remote TUIcli.json). Verified with 789/789 unit/regression tests, 18/18 sandbox scenarios, and 10/10 live OpenCodev2.3.2+ Bun1.4.4acceptance checks.
opencode-guardian v0.15.2
OpenCode v2.3.1-v2.3.2 compatibility & hardening release:
- Evidence & Background Execution (
src/evidence.ts,src/index.ts,src/locale-intents.ts): Properly handlesstate.metadata.error === true, running/timeout-to-background bash tools,experimental.idlesession tracking, Code Modeexecutestate.metadata.toolCallsexpansion, string/structuredoutputextraction, andsynthetic/shellmessage normalization. - Task Contract (
src/task-contract.ts): Rejects directory reads and zero-line reads as source-review evidence. - Agent Capability (
src/agent-capability.ts): Mergescontext.agent.list()base permissions withsession.permissionsinstead of returning early. - Secret Sanitization (
src/secrets/patterns.ts,src/secrets/sanitizer.ts): Prevents false-positive redaction ofpasscounters and preserves falsy primitives (null,undefined,boolean,number,"") in object properties. - Verification: 781/781 unit tests, strict TypeScript & oxlint (0 warnings/errors), 18/18 sandbox tests, and 10/10 live OpenCode v2.3.2 acceptance tests.
opencode-guardian v0.15.1
Patch release hardening V2 Message/Part prototype preservation in sanitizeMessages, safeValues exemptions, shell.create.before cwd resolution, directory-scoped ./rpc clear, TUI context.options & early toast scope, and timer documentation alignment. Verified: 773/773 unit tests, 18/18 sandbox scenarios, 10/10 live OpenCode v2.3.0 + Bun 1.4.4 acceptance checks.
v0.15.0 — Pure OpenCode v2.3.0 Architecture (End of V1 Support)
Breaking Changes
- End of OpenCode V1 Support: Removed OpenCode V1 (
1.x/@opencode-ai/plugin/./server/sidebar_content/ V1 idle fallback) support. Users on OpenCode 1.x should pinopencode-guardian@0.14.0. - Pure OpenCode V2 (
>=2.3.0) & OpenTUI (>=0.8.4) Alignment: UpdatedpeerDependenciesfloors to@opencode/plugin >=2.3.0,@opentui/core >=0.8.4,@opentui/solid >=0.8.4, andsolid-js >=1.9.0with zero runtime dependencies.
What's New
- Typed
./rpcExport (dist/intervention-rpc.js): Exposesguardian.interventions.getandguardian.interventions.clearviaRpc.define(@opencode/plugin/rpc) withsessionIDmaxLength: 256validation and project-directory-scoped{}clearing. shell.hook("create.before")Preflight Boundary: Enforces preflight checks at shell creation alongsidetool.hook("execute.before")with LIFO hook rollback on setup failure.session.fork& Background Subagent Isolation: Treatssession.fork/session.forkedas independent root sessions, honors top-levellocation.directory, and isolatesbackground === truesubagents inexecute.afterso sibling background subagents are never starved.- Security & Sanitizer Hardening: Preserves
Uint8Array/ArrayBufferviews and non-plain object prototypes (Messageclass) insanitizeObject/sanitizeMessages; inspects multi-stage commands viasplitShellStages; fixestask/completion-gate"in progress"false-verified guard; preserves botheditIntegrityandfingerprintinVerificationSnapshotStore; re-verifiesverifiedStateDirsvialstatSync. - TUI Bun
1.4.4Adaptive Fallback & RPC Race Fixes: Fixeddist/tui.jsfallback to./tui-standalone.jsin Bun1.4.4withoutResolveMessagecrashes, fixedGuardianSidebarreactiveprops.sessionIDupdates, subscribed tosession.moved, and added per-session generation gating for 500ms RPC polls.
Verification
- Unit & Regression Suite: 765 / 765 PASS (
npm test) - Sandbox Scenarios: 18 / 18 PASS (
node sandbox/comprehensive-test.mjs) - Security Benchmark: 17 / 17 PASS (
tests/security-benchmark.test.mjs) - Live OpenCode v2.3.0 + Bun 1.4.4 + Packed
.tgzAcceptance: 10 / 10 PASS (node sandbox/v2-live-acceptance.mjs)
v0.14.0 — Low-I/O Telemetry Architecture & OpenCode v2.3.0 Compatibility
Highlights
🚀 Low-I/O Telemetry Architecture & Bounded Rotation
- Zero-I/O Benign Filtering: Introduced
telemetry.level("violations"|"all"|"off"), defaulting to"violations". High-frequency non-violation events (preflight-allowed,post-inspected) bypass disk writes entirely, reducing telemetry disk I/O by 90–95% and eliminating benchmark freezes. - In-Process Permission Caching: Caches verified
.opencode-guardianstate directory paths to eliminate redundantmkdirSync/lstatSyncsyscalls per event. - Strict Size Bounds: Telemetry log size is strictly capped at
512 KiBby default (configurable viatelemetry.maxBytes), with bounded single-file rotation. - Environment Variable Overrides:
OPENCODE_GUARDIAN_LOG_LEVEL=violations|all|offOPENCODE_GUARDIAN_TELEMETRY=true|falseOPENCODE_GUARDIAN_MAX_LOG_BYTES=<bytes>
⚡ OpenCode v2.2.7 – v2.3.0 Engine Compatibility
- Exit Code Normalization:
src/evidence.tsnormalizes standardized"Exit code: N"lines across command outputs and tracks signal kills and timeouts (SIGTERM,SIGKILL,SIGINT). - Read-Only Git Tool Expansion:
src/agent-capability.tsregisters read-only Git tools (diff,git_diff,log,git_log,show,git_show) without triggering destructive write warnings. - Lifecycle Cleanliness: Unified telemetry and session teardown across OpenCode V1 (
server) and V2 (setup/runtimeForDirectory) lifecycles. - V2 Hook Conformance: Aligned session hook registry with OpenCode v2.3.0 strict hook names.
🛡️ Production Verification & Quality
- 100% Automated Test Suite: 797/797 tests passing (
node --test). - End-to-End Scenarios: 18/18 end-to-end integration scenarios passing (
sandbox/comprehensive-test.mjs). - Live OpenCode Host Acceptance: 6/6 live security acceptance tests passing on native OpenCode v2.3.0 binary (
sandbox/v2-live-acceptance.mjs). - Zero Runtime Dependencies:
npm audit --omit=devconfirms 0 vulnerabilities.
v0.13.0
OpenCode Guardian v0.13.0 Release Notes
- Streaming Loop Hardening & Bounded Watcher:
StreamLoopWatcherinsrc/stream-loop.tsshared across both OpenCode V1 and V2 host adapters. - V1 Stream Tracking: Inspects
message.part.updatedstrictly for active assistant messages; automatically disables inspection upon user turn start, assistant completion, or session idle/interruption. - V2 Stream Tracking: Natively consumes
session.text.started|delta|endedandsession.reasoning.started|delta|endedevents with incremental delta concatenation (2,048-char bounded tail). - Rule Configuration Semantics: Full support for
error,warn, andoffrule severities in string or object form ({ severity: 'warn' });warnmode logs warnings and dispatches advisory toast notifications without interrupting output. - Concurrency & Project Isolation: Per-response mutex locks prevent duplicate interrupt calls on simultaneous parts; V2 event ingestion continues non-blocking during asynchronous project resolution.
- Timeout & Retry Gating: Adds 3-second interrupt timeout (
AbortSignal.timeout(3000)); bounded retry allows at most three attempts per response on continued stream growth, suppressing overlapping retries on ambiguous timeouts. - Quoted Literal Fixture Protection: Excludes short quoted numeric and hex literals (15–128 characters) from low-entropy and cycle false positives, preventing legitimate test hashes from triggering blocks.
- Extended Period Support: Detects longer periodic sentence structures up to 512 UTF-16 code units within the 2,048-character inspection window.
- Telemetry & TUI Status: Introduces
stream-interrupt-requestedaudit event, toast notifications, and TUI status indicator (▲ stream stop requested). - 781 Tests Passing: 16 new stream-loop hardening tests added, 0 warnings, 0 lint errors, 18/18 smoke and integration tests verified.
v0.12.5
OpenCode Guardian v0.12.5 Release Notes
-
Degenerative Reasoning & Text Loop Breaker: Language-agnostic detection (
detectDegenerativeLoopinsrc/degeneration.ts) of runaway model repetition cycles (DeepSeek V4.1 Flash 'Hmm...', Kimi repeating Chinese/Japanese token cascades, runaway punctuation, code repeat loops like 'None, None, None...', and low-entropy babble collapse). -
In-Flight Live Streaming Abort: Real-time stream interceptor on
message.part.updatedevents in both V1 and V2 host adapters immediately invokesclient.session.abortorcontext.session.interruptafter$\ge 40$ chars of detected loop growth ($< 0.02$ ms execution overhead), preventing thousands of wasted generation tokens. -
Circuit Breaker Turn Inspection:
runtime/circuit-breakerinspects assistant text and reasoning parts, emitting structured findings and actionable remediation directives. -
Negative False-Positive Protections: Exempts Markdown table rows (
|---|---|), comment banners (// ===), hash dividers, fixture arrays, and standard code loops. - 765 Tests Passing: 24 new regression tests covering multilingual positive cases, negative exemptions, circuit breaker tripping, and V1/V2 streaming aborts.
v0.12.4 — Source audit fixes, boundary hardening and native write support
What's Changed in v0.12.4
- Native Write Recognition: Recognize native
writetool payloads in preflight and telemetry categories; reject hardcoded credentials and source truncation placeholders while allowing safe file writes. - V2 Session Directory Resolution: Resolve the active session directory before V2 tool preflight and before-edit observation, ensuring multi-project environments evaluate strict per-project configuration without guessing directories from incomplete creation events.
- V2 Auxiliary Model Guard Isolation: Install V2 auxiliary model guards independently of the initial project's secret setting and evaluate effective settings per request; support dynamic config updates and clean disposer teardown.
- Connection String Secret Redaction: Redact connection-string passwords with empty usernames or absent paths (including Redis, MySQL, Postgres URLs) while preserving URI structure and surrounding punctuation.
- Replacement Edit and Deletion Tracking: Record structured replacement edits (including empty replacement and deletion operations) and individual affected paths as mutations in evidence tracking, ensuring stale test executions cannot satisfy post-change verification requirements.
- Patch Dependency Inspection: Inspect each patch file independently for undeclared dependencies (
no-ghost-deps), retaining each file's language and nearest manifest boundaries across mixed-language and documentation edits. - Expanded Test Coverage: Added 10 new regression tests in
tests/source-audit-fixes.test.mjs, raising automated test coverage from 731 to 741 tests.
Verification
- Automated Tests: 741 / 741 PASS
- Typecheck: Strict mode 0 errors
- Linter: 0 warnings, 0 errors
- End-to-End Sandbox: 18 / 18 scenarios PASS
- Documentation: 8 / 8 files verified with valid links and accessible SVG
v0.12.3 — Multilingual In-Progress Protection & Subagent Completion Gate Hardening
0.12.3 — 2026-10-21
- Multilingual in-progress detection across all 13 supported international locales: Spanish, Portuguese, French, German, Russian, Arabic, Hindi, Chinese, Japanese, Korean, Indonesian, English, and Turkish.
- Subagent progress protection: Subagents reporting ongoing progress in any supported language (e.g. "en progreso", "trabajo en curso", "en cours", "in Bearbeitung", "в процессе", "قيد التنفيذ", "काम जारी है", "进行中", "進行中", "진행 중", "sedang berlangsung", "işlem devam ediyor", "in progress") are recognized with
isInProgress === trueandisClosing === false, eliminating false-positive completion gate blocking. - Orchestrator delegation support: Prevents false-positive blocks when an orchestrator delegates work to a child subagent or waits for child execution.
- Actionable numbered remediation prompts: Restructures all 14 rule remediation prompts with standardized, numbered
ACTION REQUIRED:directives. - Anti-distraction directive: Forbids agents from reading, modifying, or exploring Guardian's own plugin files or internal audit logs during remediation.
- Automated test suite: 731 / 731 tests passing, 18 / 18 sandbox scenarios, standard and strict TypeScript checks pass, 0 linter warnings or errors.
Validation on Node 24.22.0: 731 tests, standard/strict TypeScript checks, lint, smoke test and 18 simulated scenarios passed. Package metadata and documentation identify v0.12.3.
v0.12.1 — Documentation & Verification Maintenance
0.12.1 — 2026-10-20
• Documentation alignment, test summary reconciliation and verification reporting maintenance.
• Maintain full 14-discipline rule coverage and bounded edit integrity heuristics.
Validation on Node 24.22.0: 725 tests, standard/strict TypeScript checks, lint, smoke test and 18 simulated scenarios passed. Package metadata and documentation identify v0.12.1.