hermes-agent/website/docs
Peter Fontana 3988c3c245 feat: shell hooks — wire shell scripts as Hermes hook callbacks
Users can declare shell scripts in config.yaml under a hooks: block that
fire on plugin-hook events (pre_tool_call, post_tool_call, pre_llm_call,
subagent_stop, etc). Scripts receive JSON on stdin, can return JSON on
stdout to block tool calls or inject context pre-LLM.

Key design:
- Registers closures on existing PluginManager._hooks dict — zero changes
  to invoke_hook() call sites
- subprocess.run(shell=False) via shlex.split — no shell injection
- First-use consent per (event, command) pair, persisted to allowlist JSON
- Bypass via --accept-hooks, HERMES_ACCEPT_HOOKS=1, or hooks_auto_accept
- hermes hooks list/test/revoke/doctor CLI subcommands
- Adds subagent_stop hook event fired after delegate_task children exit
- Claude Code compatible response shapes accepted

Cherry-picked from PR #13143 by @pefontana.
2026-04-20 20:53:51 -07:00
..
developer-guide fix(ci): resolve 4 pre-existing main failures (docs lint + 3 stale tests) (#11373) 2026-04-16 20:43:41 -07:00
getting-started docs: add PR review guides, rework quickstart, slim down installation 2026-04-19 05:30:50 -07:00
guides fix(docs): unbreak docs-site-checks — ascii-guard diagram + MDX <1% (#12984) 2026-04-20 04:29:02 -07:00
integrations refactor: remove smart_model_routing feature (#12732) 2026-04-19 18:12:55 -07:00
reference fix(docs): unbreak docs-site-checks — ascii-guard diagram + MDX <1% (#12984) 2026-04-20 04:29:02 -07:00
user-guide feat: shell hooks — wire shell scripts as Hermes hook callbacks 2026-04-20 20:53:51 -07:00
index.md fix(docs): show sidebar on docs homepage 2026-04-16 04:24:45 -07:00