Skip to content

v0.8.0: rules that fit you, and a live hook (experimental)

Choose a tag to compare

@ntinosgkiou-code ntinosgkiou-code released this 26 Oct 09:28
· 7 commits to main since this release

Rules that fit you, and a live hook (experimental).

New

  • scan --write-rules my-rules.json: writes a copy of the starter pack in which the kinds of action that do not appear in your history (the agent never force-pushed, never read a secret file, never destroyed cloud resources) get a first deny rule, and the kinds you use keep the starter rules. Needs 200 judged actions, otherwise it locks nothing and says so. A proposal in a file: nothing is blocked by it.
  • python -m agentdryrun hook (experimental): the same rules applied live as a Claude Code PreToolUse hook. Refused: the call is blocked with the reason. Needs approval: you are asked. Would pass: no output, so Claude Code's normal permission flow decides (it never answers "allow"). --mode observe --log hook-log.jsonl judges and logs without blocking: start there. --print-settings prints the settings.json block.

What was checked

  • 142 tests, CI green on Python 3.9/3.11/3.12, Node 18/22 and the MCP SDKs.
  • --write-rules run on a real 90-day history: 7 kinds locked, 6 kept, the same verdicts as the pack on that history (as it must be).
  • The hook: its protocol was read from Claude Code's hooks documentation and exercised with simulated calls (deny, ask, no output, observe, bad input, non-ASCII). A test found a real bug: JSON printed through a Windows console code page could become unparseable (which fails open); the output is now ASCII-escaped.

What was NOT checked

  • The hook has not been run inside a live Claude Code session. A hook that crashes or times out lets the call through unless you set "onFailure": "block" (needs a recent Claude Code).
  • Pattern matching: it misses scripts and paths built at run time, and flags a few harmless things. Claude Code only. Not a sandbox.
  • The package is not on PyPI yet (the publish workflow is ready and switched off until the owner configures PyPI).