| 1 | [[hooks]] |
| 2 | name = "shell guard (staging, release freeze)" |
| 3 | event = "tool_call_before" |
| 4 | command = 'cd "$DEEPSEEK_WORKSPACE" && echo "4c8e10ebe99524e6a5b2f0fbb090a8f4881f95b2bf732f020c566a610f949aa4 scripts/agent-guard.py" | shasum -a 256 -c -s && exec python3 scripts/agent-guard.py' |
| 5 | timeout_secs = 10 |
| 6 | continue_on_error = true |
| 7 | condition = { type = "tool_name", name = "bash" } |
| 8 | |
| 9 | [[hooks]] |
| 10 | name = "edit guard (CODEWHALE_RELEASE_FREEZE=1)" |
| 11 | event = "tool_call_before" |
| 12 | command = '[ -z "$CODEWHALE_RELEASE_FREEZE" ] || { cd "$DEEPSEEK_WORKSPACE" && echo "4c8e10ebe99524e6a5b2f0fbb090a8f4881f95b2bf732f020c566a610f949aa4 scripts/agent-guard.py" | shasum -a 256 -c -s && exec python3 scripts/agent-guard.py; }' |
| 13 | timeout_secs = 10 |
| 14 | continue_on_error = true |
| 15 | |
| 16 | [hooks.condition] |
| 17 | type = "any" |
| 18 | conditions = [ |
| 19 | { type = "tool_category", category = "file_write" }, |
| 20 | { type = "tool_name", name = "write_file" }, |
| 21 | { type = "tool_name", name = "edit_file" }, |
| 22 | { type = "tool_name", name = "fim_edit" }, |
| 23 | ] |
| 24 |