hermes-agent/website/docs/user-guide
Teknium 30307a9802
feat(plugins): add pre_approval_request / post_approval_response hooks (#16776)
Plugins can now observe dangerous-command approval events in real time,
on both the CLI-interactive path and the async gateway path. This is the
missing hook surface external tools need to build approval notifiers
(macOS menu-bar allow/deny, Slack alerts, audit logs, etc.) without
forking Hermes or running a parallel gateway adapter.

Changes:
- hermes_cli/plugins.py: add two entries to VALID_HOOKS
- tools/approval.py: fire both hooks from check_all_command_guards --
  around prompt_dangerous_approval (CLI surface) and around the
  notify_cb + blocking event.wait loop (gateway surface)
- website/docs/user-guide/features/hooks.md: document both hooks with
  a macOS-notification example
- tests/tools/test_approval_plugin_hooks.py: 5 tests covering CLI once,
  CLI deny, plugin-crash resilience, gateway approve, gateway timeout

Hooks are observer-only: return values are ignored, so plugins cannot
veto or pre-answer an approval (use pre_tool_call for that). A crashing
plugin cannot break the approval flow -- invoke_hook swallows per-
callback errors, and the wrapper logs and swallows dispatch-layer
errors too.

Surface kwarg distinguishes "cli" from "gateway"; post hook reports
choice as one of once/session/always/deny/timeout.
2026-04-27 20:08:33 -07:00
..
features feat(plugins): add pre_approval_request / post_approval_response hooks (#16776) 2026-04-27 20:08:33 -07:00
messaging yuanbao platform (#16298) 2026-04-26 18:50:49 -07:00
skills feat(skills): bundle touchdesigner-mcp by default 2026-04-27 18:22:58 -07:00
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
checkpoints-and-rollback.md feat(checkpoints): auto-prune orphan and stale shadow repos at startup (#16303) 2026-04-26 19:05:52 -07:00
cli.md feat(busy): add 'steer' as a third display.busy_input_mode option (#16279) 2026-04-26 18:21:29 -07:00
configuration.md feat(providers): add GMI Cloud as a first-class API-key provider (#11955) 2026-04-27 11:17:59 -07:00
docker.md docs(docker): restore accidentally-redacted placeholder strings 2026-04-28 08:21:40 +10:00
git-worktrees.md docs: restructure site navigation — promote features and platforms to top-level (#4116) 2026-03-30 18:39:51 -07:00
profiles.md docs: clarify profiles vs workspaces 2026-04-19 02:00:46 -07:00
security.md docs: comprehensive docs audit — cover 13 features from last week's PRs (#5815) 2026-04-07 10:21:03 -07:00
sessions.md fix(gateway): canonicalize WhatsApp identity in session keys 2026-04-24 07:55:55 -07:00
tui.md Revert "feat(onboarding): port first-touch hints to the TUI (#16054)" (#16062) 2026-04-26 06:31:37 -07:00