docs: match Hermes hook examples to installed filenames

This commit is contained in:
haelyra committed 2026-10-09 15:49:53 -04:00
1 parent df77893e0a
commit 9c21c20744
1 file changed
+3 -3
+3 -3
View File
@@ -51,11 +51,11 @@ cat >> ~/.hermes/config.yaml <<EOF
hooks:
pre_tool_call:
- matcher: "patch|write_file|edit|write|apply_patch|str_replace_editor"
command: "python3 $HOOK_DIR/ecc-config-protection.py"
command: "python3 $HOOK_DIR/config-protection.py"
timeout: 10
post_tool_call:
- matcher: "patch|write_file|edit|write|apply_patch|str_replace_editor"
command: "python3 $HOOK_DIR/ecc-check-console-log.py"
command: "python3 $HOOK_DIR/check-console-log.py"
timeout: 10
EOF
```
@@ -81,7 +81,7 @@ real target (the hook only blocks edits to configs that already exist):
```bash
T=$(mktemp -d) && touch "$T/eslint.config.mjs"
echo "{\"hook_event_name\":\"pre_tool_call\",\"tool_name\":\"patch\",\"tool_input\":{\"path\":\"$T/eslint.config.mjs\",\"old_string\":\"a\",\"new_string\":\"b\"}}" \
| python3 ~/.hermes/hooks/ecc-config-protection.py
| python3 ~/.hermes/hooks/hermes/config-protection.py
# {"decision": "block", "reason": "BLOCKED: modifying eslint.config.mjs ..."}
```