Skip to content

v0.6.0

Choose a tag to compare

@marcelocantos marcelocantos released this 19 Apr 12:17
· 25 commits to master since this release
7825918

Highlights

🎯T27 — Shell-script content-hash approval gate

doit now asks for explicit user approval the first time it sees a
bash foo.sh, sh foo.sh, zsh foo.sh, or ./foo.sh invocation,
keyed by SHA-256 of the script's contents. Subsequent invocations of
the same content bypass the prompt; modifying the script changes the
hash and forces re-approval. Approvals live at
~/.config/doit/script-approvals.yaml.

  • Tier-0 gate: runs before L1/L2/L3.
  • MCP elicitation shows the path, size, hash, and a content preview.
  • Audit log carries script_hash / script_path on every matched run.
  • New MCP tools: doit_approvals_list, doit_approvals_revoke.
  • Scope is deliberately narrow — pipelines, compound commands, and
    bash -c "…" fall through to normal policy.

🎯T26.1 — Time expectations + timeout enforcement

doit_execute and doit_dry_run accept two optional fields:

  • timeout_seconds — hard ceiling. doit kills the entire process
    group on expiry (SIGKILL, exit code 137).
  • expected_duration_seconds — soft estimate, recorded alongside the
    actual duration in the audit log.

New audit fields: expected_duration_ms, timed_out.

🎯T26.2 — L1 rules can inspect time expectations

Starlark rules may opt into request metadata by declaring a third
meta parameter on check. Existing two-parameter rules are
unaffected. The new built-in rule flag-duration-mismatch flags
sleep N commands where N exceeds 2× expected_duration_seconds.

🎯T26.3 — L2 learns per-pattern durations

doit aggregates p50/p95 durations per (cap, subcmd) from the audit
log and persists them at ~/.config/doit/duration-stats.yaml. Two
new bypassable L2 rules use the learned distribution:

  • duration-anomaly — expected_duration_seconds below p50/5 or
    above p95×5 for a pattern with ≥5 samples.
  • timeout-too-short — timeout_seconds below learned p50.

Both are skipped under --retry. Inspect with the new
doit_durations_list MCP tool.

Also in this release

  • 🎯T17 — Engine now treats commands as opaque strings (segments/tiers
    audit fields deprecated, retained for reader compatibility).
  • 🎯T20 — Dead tier code removed.
  • 🎯T22 — Sessions can start when L3 is disabled.
  • 🎯T25 — deny-rm-catastrophic covers system dirs and globs.

Upgrade notes

No breaking changes to the MCP tool surface, engine API, config
schema, or audit log format. Additive only. Safe to upgrade from
v0.5.0 in place.

brew update
brew upgrade marcelocantos/tap/doit

Documentation

  • STABILITY.md — full v0.6.0 interaction surface snapshot
  • agents-guide.md — updated with script-hash trust model, time expectations, and duration learning