Skip to content

Releases

v0.16.0

Choose a tag to compare

@edseabolt edseabolt released this 19 Nov 03:13
8c1ff09

turnstile v0.16.0

This release makes journal durability a first-class concern and hardens the evidence pipeline end to end. Rotated journal generations are now archived to gzip cold storage by default, chained appends are serialized across hosts with a lockfile, and the append hot path amortizes its per-row filesystem work. The evidence workflow gains freshness enforcement in the PR flow — staleness walk-back, files-list truncation detection, and a refresh instruction before every PR-adding push. A deep documentation audit's 22 findings are fixed, and OpenCode 2.3.2 joins the tested host list.

New: journal archive-on-rotate (#384)

  • Pruned journal generations are gzip-compressed into an archive/ directory instead of being deleted — bounded by the new journalArchiveGenerations key (default 5, ~2.5 MB per journal family).
  • The archive is cold storage only: replay never reads it; verify and the CLI surfaces do.

New: evidence freshness in the PR flow (#377, #372, #375, #367)

  • The injected policy instructs an evidence refresh before every PR-adding push (#377).
  • Staleness comparison walks back to the parent commit for evidence-only heads, and staleness emits a journal event at comparison time (#375).
  • The evidence-only check detects files-list truncation instead of trusting a clipped manifest (#372).

New: marker diagnostics

  • config-validate warns when a custom marker regex compiles but has no capture groups, so it can never attribute a verdict (#366).
  • Delta-truncated marker spans journal a diagnostic; the probe is suppressed for spans already seen complete (#364).

Fixed

  • Chained appends are serialized across hosts with a file lock (bounded retry, mtime-based stale steal), fixing multi-host journal corruption (#383).
  • The append hot path amortizes per-row mkdir and torn-tail repair to once per append batch (#385).
  • Chained telemetry error and rekey rows route through the journaler, so they enter the hash chain instead of bypassing it (#386).
  • Evidence: a child-keyed latest line resolves to the parent session (#382); the artifact's journal read is scoped to the task's session tree (#368).
  • Delivery: parent-keyed string deliveries are classified as parent-authored by event origin, fixing misattributed verdicts (#381).
  • Dispatch: tamper stamps are keyed by parent+agent, avoiding false positives under concurrent dispatches (#378); armed probes and pre-gate read paths peek instead of minting evidence (#369).
  • Policy: the retry prompt restates the marker syntax; injected texts carry a hash stamp (#378).
  • The prompt hook body is wrapped fail-open, so a body error can no longer block prompt admission (#365).

Performance

  • The fingerprint hot path collapses to a single git rev-parse with a 250 ms timeout (#379).

Docs

  • All 22 actionable findings from the 2026-11-18 deep documentation audit are fixed (#387): the swapped passVerified/stampVerified param docs, 8 stale setup.ts reader attributions in types.ts, 10 fabricated module-map edges plus 4 missing module nodes in the d01 diagram, and the retention math updated for archive-on-rotate.

Host compatibility

  • OpenCode 2.3.2 added to the tested list (HOST_COMPAT and the README matrix).

Install

npx opencode-turnstile@0.16.0 init

v0.15.0

Choose a tag to compare

@edseabolt edseabolt released this 14 Nov 01:51
8645498

turnstile v0.15.0

This release adds scoped provenance verification with per-row inclusion proofs and confines the planner's write surface to the configured plans directory. Scoped verify answers "was this session's evidence committed and untampered?" for a single session instead of the whole journal, reporting a Merkle proof per row; the planner write confinement turns an over-broad child sandbox into an explicit, configurable boundary. Synthetic verdict attribution and the plan-gate arm on permission evaluations picked up fixes, and the documentation set was restructured — architecture, usage, and journal each split into per-section files with a full plain-language pass.

New: prov scoped verify with per-row inclusion proofs (#330)

  • prov --verify --session <id> reports per-row inclusion facts: each row is anchored (with its Merkle proof), unanchored (open epoch window), or pruned (window committed out of retention), with the committed epoch count — exit 0 with the facts either way.
  • A mutated prov row localizes the tamper to the row and its epoch in both JSON and human output.
  • The unscoped prov --verify contract is tightened alongside: pruned-window rows report null proofs and the committed epoch count rather than failing the check.

New: planner write confinement (#331)

  • Planner child write/edit is confined to the configured plansDir: writes inside the plans dir (including the plans-dir path itself and scratch targets) are allowed; writes outside are blocked with the configured dir named.
  • Honors custom relative and absolute plansDir values; executor and other pipeline children stay exempt; the planner identified via the emitter-agent fallback is confined too.

Fixed

  • Subagent verdicts are credited from synthetic inbox completions; synthetic verdicts dedupe per child and refusedApprove suppression is covered at replay and credit time (#342, #336).
  • The plan-gate arm on permission evaluations routes on both task and subagent actions, so executor dispatches through either shape hit the gate (#344).
  • The marker-retry prompt tells the child its output was received and parsed, instead of implying it was lost (#348).
  • The differential harness default ref is re-pointed at the requirements-phase commit (#333).
  • The hermetic git test env points at an empty temp file instead of /dev/null (#328).

Docs

  • docs/architecture.md and docs/usage.md split into per-section files under docs/architecture/ and docs/usage/; docs/journal.md split under docs/journal/ with config examples for every anchor sink and the plugin-sink contract (#334, #338, #332).
  • Plain-language (ISO 24495-1) pass across the split docs, README trim, and diagram prose synced with code (#337, #335, #334).
  • The journal audit-path description is corrected: the tree is Bitcoin-style, not RFC 6962/9162 (#340).
  • All 17 findings from the 2026-11-13 deep documentation audit are fixed (#346); turnstile-config quotes the actual config-warning wording (#347).
  • README compatibility matrix updated to turnstile 0.15.x with OpenCode 2.3.0 added to the tested list.

Tests

  • Tamper matrix characterizes wrong-epoch-root commit detection (#326); the plugin anchor-sink seam is pinned through the real prov --verify CLI (#327); the absent-anchored arm of prov --verify is pinned at the CLI spawn level (#325); scoped verify gains a 455-line CLI-level test suite (#330); planner write confinement gains a dedicated guard suite (#331).

Install

npx opencode-turnstile@0.15.0 init

v0.14.0

Choose a tag to compare

@edseabolt edseabolt released this 12 Nov 04:56
90afe20

turnstile v0.14.0

This release adds tamper evidence to the journal and pins its detection boundary with a differential test matrix. Opting in chains every journal row with SHA-256 over canonical JSON, batches the chain into Merkle-rooted epochs, and publishes each epoch to independent anchor sinks so a rewritten journal can be distinguished from a real one — with opencode-turnstile prov --verify available offline anytime. Marker classification and chain verification picked up fixes along the way.

New: journal tamper evidence (#312)

  • Per-record hash chain — with tamperEvidence.enabled (default false; existing journals and consumers stay on the unchained row shape), every journal row carries seq, prevHash, and hash (SHA-256 over RFC 8785-style canonical JSON of {prevHash, ts, payload}).
  • Merkle epochs — every tamperEvidence.epochEntries (default 512) data rows, a chained chain-epoch commit row carries the epoch's Merkle root and head.
  • Anchor sinks — epoch refs publish fire-and-forget at task completion to independent stores in escalating trust domains: session-state (host, default), git-note and commit-trailer (repository), or an external {plugin: "..."} sink; an array publishes to all and verification reports the weakest vouching domain.
  • Verification — opencode-turnstile prov --verify folds the chain across rotation generations, re-derives epoch roots, and cross-checks anchored refs (exit 0 intact, 1 broken/unanchored); tamperEvidence.verifyOnSessionEnd runs the same check once per session at idle and journals/toasts the verdict.
  • Config surface (tamperEvidence.enabled, .anchor, .epochEntries, .verifyOnSessionEnd) mirrored in examples/turnstile.example.json, the schema, the README config table, and docs/architecture.md §"Tamper evidence".

New: differential tamper-matrix harness (#312, #315)

  • Integration harness (tests/tamper-matrix.test.ts) builds a captured honest journal through the real write path — with a rotation generation and a task-completion anchor — and pins nine mutation classes to expected prov --verify verdicts: local edits/deletes/inserts/reorders/forks fail at the chain fold; rewrite-all with a recomputed chain and truncate-and-continue ("recurring cleaner") fail only at the anchor check; the un-anchored tail is a deliberately documented blind spot.
  • Behavior pins for the prov CLI env, the row-8 absent split, shared harness options, and exact fold reasons (#315).

Fixed

  • Marker results are classified from the regex capture group (#310) — surrounding text no longer leaks into classification.
  • Chain verify hardened against restart, rotation, and multi-host edge cases (#312): monotonic epoch indices across rotations and trust-root handling for pruned generations.

Docs

  • Replay global re-slice inclusion and boot memory bounds documented (#302).
  • freshFlags() JSDoc covers counter fields (#304); waiver-unreachability test pin for waiverStateNote (#303).
  • README compatibility matrix row updated to turnstile 0.14.x; HOST_COMPAT unchanged (floor stays OpenCode ≥ 2.0.22, < 3.0.0).

Install

npx opencode-turnstile@0.14.0 init

v0.13.0

Choose a tag to compare

@edseabolt edseabolt released this 10 Nov 19:08
76d884f

turnstile v0.13.0

This release makes the pipeline's front door configurable and turns the decision ledger into a queryable analysis surface. A new optional requirements phase can run before the planner, the decision ledger now captures human waivers and permission overrides (not just prompts and denials), and a new prov-views CLI derives origin labels, noise rates, and taste-drift aggregates from the raw ledger offline. Enforcement also picked up a fix: reviewer dispatches admitted through a dormant path now count toward the review ensemble.

New: optional requirements phase (#306)

  • Config-gated — requirementsPhase (default false) inserts a requirements agent leg before the planner; maxRequirementsRounds caps the loop, with waiver exemption, mirrored in the example config, schema, and agents/requirements.md.
  • The pipeline-status formatter renders the requirements stage, and the policy injection describes the phase only when it is on.

New: decision-ledger derivations (#290, #298, #289, #288)

  • opencode-turnstile prov-views — derived views over the ledger: origin labels for stated prompts (instruction vs chatter vs waiver-carried), chatter noise rate, and taste-drift aggregates over denials and overrides, bucketed per day and per session; --json support with a sha256 hash on stated rows.
  • prov:override capture — parent write/edit after-surface journals overrides, with a child-write adjacency tracker attributing the override to the dispatch context; rendered in the prov surface.
  • prov:waiver capture — plan-gate and reviewer-gate waiver sites journal prov:waiver rows.
  • turnstile-prov-views skill — vendored alongside turnstile-prov for the new surface.

New: differential characterization harness (#292)

  • scripts/differential.* and a suite of behavior-pin tests pin gate messages, config, journal shapes, decision-ledger shapes, replay round-trips, and export shape against drift.

Fixed

  • Reviewer ensemble counted on the dormant dispatch admit path (#293) — dispatches admitted while the review gate was dormant now credit the ensemble count, closing a hole where a credited approval could land without the ensemble being satisfied.

Changed

  • All functions brought under the 30-line ceiling (#305).
  • Docs audit fixes across docs/architecture.md, docs/usage.md, policy prose, and the d01–d05 diagrams (#287); hero banner decision-ledger chip sizing fixes.
  • Host compatibility tested list adds OpenCode 2.2.7.

Install

npx opencode-turnstile@0.13.0 init

v0.12.0

Choose a tag to compare

@edseabolt edseabolt released this 09 Nov 03:22
4392f3f

turnstile v0.12.0

This release adds the decision ledger: turnstile now records the human side of the pipeline — every prompt you give it and every permission denial you make — into a secret-redacted, observe-only journal you can query with a new prov command. Capture is dumb and derivation is offline: rows are verbatim (after mechanical redaction), never classified at write time, and never coupled to enforcement — no new gates, no state changes, replay-inert.

New: decision ledger (#277)

  • Capture — every admitted parent-session prompt journals a prov:stated entry (secret-redacted at write time, capped at 2000 chars with a truncated marker), and each human permission denial at the plan/landing/hands-on ask sites journals a prov:denied entry with the ask kind. Capture is gated on the new decisionLedger.enabled key (default true); false silences all prov:* journaling with no other behavior change.
  • opencode-turnstile prov — new read-only CLI subcommand printing the ledger: every session interleaved, or one session by ID; --json for raw rows, --tail <n> to bound output.
  • Redaction — a fixed pattern list (API keys, AWS access keys, bearer/authorization headers, GitHub tokens, key/token assignments, private-key blocks) replaces matches with [REDACTED] before truncation, so a secret straddling the cap boundary is never left half-visible.
  • Mechanics — new pure modules src/decision-ledger.ts (entry builders) and src/decision-ledger-redact.ts (redaction); payloads are canonically serializable so a future tamper-evidence chain needs no migration of existing rows. prov:* entries are replay-inert and capture is fail-open (an error journals and never throws).

New: hero/demo showcase (#278)

The README hero and demo SVGs now include the decision ledger in the rendered pipeline.

Added

  • decisionLedger.enabled config key (default true), mirrored in examples/turnstile.example.json and schemas/turnstile.schema.json.
  • opencode-turnstile prov [sessionID] [--json] [--tail <n>] subcommand.

Changed

  • Docs, d02-hooks diagram, usage configuration table, and README updated for the ledger and the prov command.

Install

npx opencode-turnstile@0.12.0 init

v0.11.0

Choose a tag to compare

@edseabolt edseabolt released this 04 Nov 02:50
d089bd8

turnstile v0.11.0

This release is about giving the operator a direct hand and tidying the engine room: a new opt-in gate lets you review a plan yourself before the plan-reviewer sees it, the skill surface is reworked around on/off control and evidence/config introspection, and a large refactor wave splits the enforcement core into focused single-concern modules with the architecture docs and diagrams synced alongside.

New: opt-in user plan review (#269)

A new config gate pauses the pipeline before plan-reviewer dispatch so you can review the plan yourself first; your approval enters the gate flow directly. Opt-in via the plan-user-review setting; see docs/usage.md and tests/plan-user-review.test.ts for the enforced contract.

New: skill surface rework (#263, #266)

  • turnstile-suspend is replaced by turnstile-on and turnstile-off — suspension and resume are now two explicit skills instead of one.
  • New turnstile-evidence and turnstile-config skills: publish/inspect evidence bundles and show the resolved configuration raw.
  • turnstile-status and turnstile-log ship as skills instead of commands.
  • turnstile-setup is renamed turnstile-init to match its npm run target.

Fixed

  • fix(gates): shared retire helper; a rejected dispatch now clears the nudge latch (#271)
  • fix(install): the retired-path sweep removes repo-owned dangling symlinks and emptied directories (#265)
  • fix(config): boolean keys are terminal in scalar validation, so true/false no longer fall through string coercion (#268)

Changed

  • Docs: turnstile-config shows raw config contents in its report; docs/usage.md documents the retired-path sweep in install maintenance.

Internal

  • Module-split refactor wave: hooks core composed from module-level concern state, with extraction of dispatch/budget/review gates (#264), plan scan/status/enforce modules, ledger parent-edge registry, tool-policy guards, event stream handlers, permission evaluate arms, journal sinks, prompt admission, bash-write guards, config merge/validate, shell parsing, and verdict capture. Module map and d01/d02/d04 diagrams re-synced.

v0.10.0

Choose a tag to compare

@edseabolt edseabolt released this 01 Nov 23:50
1c4ff98

turnstile v0.10.0

This release is about meeting the session where it is: the plugin now starts dormant until the pipeline actually engages, plans carry an impact advisory that replaces the blunt parent-hands-on block, bare subagent output gets a bounded marker-retry loop before it fails the gate, and the journal splits into per-session sinks so status, evidence, and the new log session timeline can reason about a session in isolation.

New: dormant-until-engaged enforcement (#254)

The gates no longer fire from session start — enforcement activates when the pipeline engages (plan bound, dispatch made, or gate state present). alwaysEnforce opts back into always-on enforcement for setups that want the old behavior. New module src/engagement.ts owns the determination.

New: plan-impact advisory (#256)

While a plan is bound, the parent's out-of-plan hands-on writes no longer block outright: the new plan-impact advisory classifies the write target against the plan scope (src/plan-scope.ts) and lets the hands-on ladder decide, with landing-gate preservation and relativized plan-impact targets (#247).

New: marker-retry compliance loop (#251)

Bare subagent output that omits gate markers gets one bounded retry with the marker contract re-stated before the gate fails — instead of an immediate red gate on a formatting miss.

New: log session timeline (#253)

opencode-turnstile log session renders a per-session timeline from the journal, with corrected credit folding, waiver counting, and rendering of policy/tool/permission/evidence rows and directory/reason/exempt-tool fields.

Added

  • Per-session journal segmentation — journalPerSession config key routes each parent session's journal rows to its own sink; replay merges per-session generations ts-ordered with the shared tail, and status/evidence read segmented sinks (#252, plus a replay fix to read session generations once with shared error handling).
  • Commit-lint classifier gives a concrete mismatch diagnosis and escalates through a retry, and now requires the separator space its regex always demanded (#257).

Changed

  • Plan gate: write targets outside the project are classified uninspectable so the hands-on ladder decides, rather than the plan gate guessing (#258).

Fixed

  • fix(commit-lint): classifier requires the separator space the regex requires (#248)
  • fix: landing gate preserved and plan-impact targets relativized (#247)
  • Docs: per-session persistence across usage/architecture/policy prose; d03/d04/d05 diagrams updated and re-rendered

Security

Notes

Zero runtime dependencies, as always. Host compatibility: ≥2.0.22, <3.0.0. Full docs: README, usage, architecture, SECURITY. Install pinned: npx opencode-turnstile@0.10.0 ….

v0.9.0

Choose a tag to compare

@edseabolt edseabolt released this 31 Oct 20:20
e29f3d0

turnstile v0.9.0

This release is about the gate knowing what it's gating: enforcement state is now task-scoped and keyed to the active plan, escalation to the human runs through an explicit ask-first ladder with sticky task-scoped releases, and the parent's own hands — its write/edit tools and file-writing bash commands — pass through the same gate the children do. Shadow mode is gone for good, and interrupted reviews recover from the journal instead of dying with the session.

Breaking

  • Shadow mode removed — the observe/meta-mode config keys are gone; there is one enforcement mode, and config carrying the removed keys is rejected with a diagnostic (#220).
  • Escalation defaults to block-only release — the new escalation: ask|block key replaces the old implicit behavior: block (default) releases only on your explicit approval, ask prompts (#224).
  • Task-scoped gate state — gate state is keyed on the active plan, and the plan-gate task arm splits by escalation mode (#231). Legacy durable plan approvals are re-keyed transparently on replay, and opencode-turnstile status surfaces the migration as a table advisory (#237, issue #230).

New: hands-on gate

The parent session's own write/edit calls — and bash commands that write files (heredocs, tee, redirection, sed -i, dd) — now route through the same escalation ladder the pipeline uses. Registered pipeline children stay exempt, heredoc-bearing commands cap at telemetry, and scratch temp-dir targets are exempt while symlink-chain depth exhaustion fails toward gating (#218, #229, #231).

New: governance redesign (#231)

  • Prompt intent classification — the plugin classifies each admitted prompt's intent and nudges pipeline entry accordingly, with a policy head + intent nudge on the session.context primary-turn draft.
  • Ask-first ladder — escalations ask before they block; releases are sticky for the task scope and restored from the journal on replay.
  • Maintenance dispatch — a dedicated maintenance path with spec-region plan keying, hardened eligibility, and an MNT column in status.
  • Child re-seeding — child edges are journaled at setParent and re-seeded on setup, so a journaled agent upgrade re-journals the edge (#231).

Fixed

  • fix(replay): recover interrupted review state from the journal, restore task fingerprints on gate rows, and attribute verdict replay to the emitting agent (#236, issue #232)
  • fix(classifier): skip tee dev and fd-dup operands, dd of= dev targets, and prefix words
  • fix(registration): agent-name precedence for pipeline-child registration; delivery agent resolves input echo before event.agent
  • fix(persistence): gate-events trace renamed to .log
  • Docs: factual-defect fixes across README/usage/architecture/AGENTS/skills and source docstrings; d01/d02/d04 diagrams synced with code and re-rendered (#238)

Notes

Zero runtime dependencies, as always. Host compatibility: ≥2.0.22, <3.0.0 — 2.2.5 now verified and in the tested list. Full docs: README, usage, architecture, SECURITY.

v0.8.0

Choose a tag to compare

@edseabolt edseabolt released this 28 Oct 20:57
461ab01

turnstile v0.8.0

This release is about turnstile getting out of the way — and owning the host it runs on. Enforcement can now be suspended at runtime with two typed prompt markers, without config surgery or a restart; a session-end summary replaces the silence when a session goes idle; and the plugin now detects an incompatible opencode host at startup instead of misbehaving on one.

New: gate suspend/resume (TURNSTILE OFF: / TURNSTILE ON:)

TURNSTILE OFF: working through a prototype stretch

A user-typed TURNSTILE OFF: suspends blocking for the session: gate decisions keep being computed and journaled but never throw BLOCKED — observe-like, not blind — and all earned state clears. TURNSTILE ON: resumes enforcement with a fresh task scope; no credit earned while suspended rehydrates. Suspension restores from the journal tail, so a restart mid-suspension does not silently re-enforce, and a refused:true entry is replay-inert so the kill switch cannot be bypassed by its own journal row. The literals are config keys (suspendMarker / resumeMarker), and allowSuspend: false refuses both markers with a journaled diagnostic — deliberately not an agent-dispatchable off switch: the markers are honored only from admitted user prompts. A thin skill (turnstile-suspend, installed by npm run init) documents the markers, and opencode-turnstile status gains a per-session suspension column (#212, issue #184).

New: host-compat detection

At setup, turnstile evaluates the running opencode version against a declared compatibility window (≥2.0.22, <3.0.0) and fails open — compatible, incompatible, or unknown — surfacing a verdict toast instead of silently misbehaving on an untested host. The tested list now includes 2.2.0 (#210, issue #178).

New: session-end summary

When a session goes idle, one recap line reports what the pipeline verified: test-claims credited, premature dispatches blocked, waivers spent — with the journal path named. sessionSummary ships quiet (silent for zero-activity sessions); on always prints, off restores the old silence (#208, issue #177).

Fixed

  • fix(install): refresh the ledger version stamp on content-identical upgrades (#206, issue #203)
  • fix(config): an explicit empty bareOutput resolves as unset instead of trapping the bare-output gate (#204, issue #191)

Notes

Zero runtime dependencies, as always. Full docs: README, usage, architecture, SECURITY.

v0.7.0

Choose a tag to compare

@edseabolt edseabolt released this 27 Oct 19:35
96b1dcc

turnstile v0.7.0

The journal leaves the machine. This release ships the evidence surface end to end: summarize a task's verified pipeline record, publish it as a sticky PR comment, and — as of this release — the repo that builds turnstile runs all of it on its own pull requests.

New: opencode-turnstile evidence

npx opencode-turnstile evidence --task latest --out .turnstile/evidence.json

Folds the journal's replay window into a shareable turnstile-evidence/v1 document: derived counts, canonical marker lines, and shas only — session IDs, prompts, and command text are absent by construction. --validate re-checks a committed artifact in CI; --format markdown renders the sticky-comment body. The review section reports against the ensemble bar the runtime credits at (two unwaived reviewer dispatches under reviewEnsemble: "enforce", one under "advise") — a refusal stamp keeps it red, a human release satisfies it.

New: sticky PR-comment Action

examples/turnstile-evidence.yml — copy into your repo's .github/workflows/. Two jobs, two trust levels: a pull_request validate job with read-only permissions, and a pull_request_target publish job that runs base-context code with pull-requests: write, no checkout, and no run step — it reads the committed artifact through the Contents API, asserts two byte invariants, and upserts exactly one comment keyed on <!-- turnstile:evidence -->. This release's pin (opencode-turnstile@0.7.0) is the first published version with the evidence subcommand; earlier pins exit 2.

Field-tested on itself

Turnstile's own repo runs the evidence workflow on its PRs: the badge posted on #197 is the live demo, screenshot in the README. The demo caught two real Actions-runtime bugs before any consumer did — the github.paginate Promise misuse and a find-vs-null guard — both fixed here.

Fixed

  • fix(evidence): review bar derives from reviewEnsemble (the credit rule), not maxReviewerRounds (the dispatch cap); ensemble fold is last-wins over running counts, honoring refusal stamps and human releases — a fully-credited task can no longer render reviewer 2/4 red
  • fix(evidence): sanitize folded marker fields, guard validate crash paths, forged-green bypass closed (#193)
  • fix(markers): guard parser regexes against broadening drift in check-markers (#194)
  • fix(install): copy-mode installs the full src/ tree and verifies plugin load (#195)

Notes

Zero runtime dependencies, as always. Full docs: README, usage, architecture, SECURITY.