From fa53e36438e0cbab92365f5a37a78433b2332a3b Mon Sep 17 00:00:00 2001 From: Sworntech-dev Date: Wed, 17 Jun 2026 02:39:23 +0300 Subject: [PATCH] docs(hooks): document manual shell hook allowlisting --- website/docs/user-guide/features/hooks.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/docs/user-guide/features/hooks.md b/website/docs/user-guide/features/hooks.md index 89a055d5e10..b36cd7b69fb 100644 --- a/website/docs/user-guide/features/hooks.md +++ b/website/docs/user-guide/features/hooks.md @@ -1385,6 +1385,23 @@ Non-TTY runs (gateway, cron, CI) need one of these three — otherwise any newly **Script edits are silently trusted.** The allowlist keys on the exact command string, not the script's hash, so editing the script on disk does not invalidate consent. `hermes hooks doctor` flags mtime drift so you can spot edits and decide whether to re-approve. +#### Manual allowlisting + +Manual allowlisting is useful for non-TTY or service-account deployments where an operator cannot answer the first-use prompt interactively. The allowlist file is `~/.hermes/shell-hooks-allowlist.json`, and the expected format is an `approvals` array. Each approval records the hook `event` and the exact `command` string: + +```json +{ + "approvals": [ + { + "event": "post_llm_call", + "command": "/home/hermes/.hermes/hooks/my-hook.py" + } + ] +} +``` + +The command string must match the configured hook command exactly. A path-keyed object with a `sha256` field is not the expected format and will not approve the hook. Verify manual entries with `hermes hooks list`. + ### The `hermes hooks` CLI | Command | What it does |