Adds an auto permission mode (--auto, permissions = "auto", /auto [on|off|log]).
Per bash/write/edit call, in order:
danger::classify rules BLOCK: rm -rf of home/root/project/outside project, sudo, dd/mkfs, download piped to interpreter, force push, push to main/master, credential files sent over network, publish/deploy (npm, cargo, docker push, kubectl delete, terraform destroy), SQL DROP, writes to /etc, ~/.ssh, rc files, .git/hooks. Checked per chain segment; a block wins over stored "always" rules. Model gets blocked by auto mode: <reason>.
Rules ALLOW routine work inside the project.
Rest: one cheap-model request (danger::Judge, Haiku/Luna, ~300 in / <=100 out tokens, 20s timeout) answers ALLOW/BLOCK; failure or no judge -> normal prompt.
yolo skips all of it. claude_cli bridge uses the same gate (gate_why, deny message passed through), no judge there.
Tests: danger.rs tables (block/allow/ask/chain/judge parse), tool.rs integration (block without prompt, stored rule cannot beat block, judge allow, yolo bypass). fmt, clippy, workspace tests, e2e, m4-m8, sandbox, claude_cli, lsp install all green.
Note: tests/tui_smoke.py "second prompt for bash" flakes ~1 in 6 runs, also on plain main (measured), so all.sh stopped there; the remaining scripts were run individually.
Untested: real Haiku/Luna judge replies (no live login here), real claude deny message format, macOS paths. Pattern rules are not a sandbox.
Adds an auto permission mode (`--auto`, `permissions = "auto"`, `/auto [on|off|log]`).
Per bash/write/edit call, in order:
1. `danger::classify` rules BLOCK: rm -rf of home/root/project/outside project, sudo, dd/mkfs, download piped to interpreter, force push, push to main/master, credential files sent over network, publish/deploy (npm, cargo, docker push, kubectl delete, terraform destroy), SQL DROP, writes to /etc, ~/.ssh, rc files, .git/hooks. Checked per chain segment; a block wins over stored "always" rules. Model gets `blocked by auto mode: <reason>`.
2. Rules ALLOW routine work inside the project.
3. Rest: one cheap-model request (`danger::Judge`, Haiku/Luna, ~300 in / <=100 out tokens, 20s timeout) answers ALLOW/BLOCK; failure or no judge -> normal prompt.
yolo skips all of it. claude_cli bridge uses the same gate (`gate_why`, deny message passed through), no judge there.
Tests: danger.rs tables (block/allow/ask/chain/judge parse), tool.rs integration (block without prompt, stored rule cannot beat block, judge allow, yolo bypass). fmt, clippy, workspace tests, e2e, m4-m8, sandbox, claude_cli, lsp install all green.
Note: `tests/tui_smoke.py` "second prompt for bash" flakes ~1 in 6 runs, also on plain main (measured), so `all.sh` stopped there; the remaining scripts were run individually.
Untested: real Haiku/Luna judge replies (no live login here), real claude deny message format, macOS paths. Pattern rules are not a sandbox.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds an auto permission mode (
--auto,permissions = "auto",/auto [on|off|log]).Per bash/write/edit call, in order:
danger::classifyrules BLOCK: rm -rf of home/root/project/outside project, sudo, dd/mkfs, download piped to interpreter, force push, push to main/master, credential files sent over network, publish/deploy (npm, cargo, docker push, kubectl delete, terraform destroy), SQL DROP, writes to /etc, ~/.ssh, rc files, .git/hooks. Checked per chain segment; a block wins over stored "always" rules. Model getsblocked by auto mode: <reason>.danger::Judge, Haiku/Luna, ~300 in / <=100 out tokens, 20s timeout) answers ALLOW/BLOCK; failure or no judge -> normal prompt.yolo skips all of it. claude_cli bridge uses the same gate (
gate_why, deny message passed through), no judge there.Tests: danger.rs tables (block/allow/ask/chain/judge parse), tool.rs integration (block without prompt, stored rule cannot beat block, judge allow, yolo bypass). fmt, clippy, workspace tests, e2e, m4-m8, sandbox, claude_cli, lsp install all green.
Note:
tests/tui_smoke.py"second prompt for bash" flakes ~1 in 6 runs, also on plain main (measured), soall.shstopped there; the remaining scripts were run individually.Untested: real Haiku/Luna judge replies (no live login here), real claude deny message format, macOS paths. Pattern rules are not a sandbox.