hermes-agent/website/docs/user-guide/features
Teknium 59b56d445c
feat(hooks): add duration_ms to post_tool_call + transform_tool_result (#15429)
Plugin hooks fired after a tool dispatch now receive an integer
duration_ms kwarg measuring how long the tool's registry.dispatch()
call took (time.monotonic() before/after). Inspired by Claude Code
2.1.119 which added the same field to PostToolUse hook inputs.

Wire points:
- model_tools.py: measure dispatch latency, pass duration_ms to
  invoke_hook("post_tool_call", ...) and invoke_hook("transform_tool_result", ...)
- hermes_cli/hooks.py: include duration_ms in the synthetic payload
  used by 'hermes hooks test' and 'hermes hooks doctor' so shell-hook
  authors see the same shape at development time as runtime
- shell hooks (agent/shell_hooks.py): no code change needed;
  _serialize_payload already surfaces non-top-level kwargs under
  payload['extra'], so duration_ms lands at extra.duration_ms for
  shell-hook scripts

Plugin authors can now build latency dashboards, per-tool SLO alerts,
and regression canaries without having to wrap every tool manually.

Test: tests/test_model_tools.py::test_post_tool_call_receives_non_negative_integer_duration_ms
E2E: real PluginManager + dispatch monkey-patched with a 50ms sleep,
hook callback observes duration_ms=50 (int).

Refs: https://code.claude.com/docs/en/changelog (2.1.119, Apr 23 2026)
2026-04-25 22:13:12 -07:00
..
_category_.json
acp.md
api-server.md
batch-processing.md
browser.md feat(browser): CDP supervisor — dialog detection + response + cross-origin iframe eval (#14540) 2026-04-23 22:23:37 -07:00
built-in-plugins.md feat(plugins): make all plugins opt-in by default 2026-04-20 04:46:45 -07:00
code-execution.md docs(execute_code): document project/strict execution modes (#12073) 2026-04-18 01:53:09 -07:00
context-files.md
context-references.md
credential-pools.md
cron.md feat(cron): per-job workdir for project-aware cron runs (#15110) 2026-04-24 05:07:01 -07:00
delegation.md docs: document delegation width + depth knobs (#13745) 2026-04-21 17:54:39 -07:00
extending-the-dashboard.md docs(dashboard): document page-scoped plugin slots (#15662) 2026-04-25 06:59:24 -07:00
fallback-providers.md refactor(memory): remove flush_memories entirely (#15696) 2026-04-25 08:21:14 -07:00
honcho.md
hooks.md feat(hooks): add duration_ms to post_tool_call + transform_tool_result (#15429) 2026-04-25 22:13:12 -07:00
image-generation.md feat(image-gen): add GPT Image 2 to FAL catalog (#13677) 2026-04-21 13:35:31 -07:00
mcp.md
memory-providers.md feat(hindsight): richer session-scoped retain metadata 2026-04-22 05:27:10 -07:00
memory.md
overview.md feat(delegate): orchestrator role and configurable spawn depth (default flat) 2026-04-21 14:23:45 -07:00
personality.md
plugins.md docs(plugins): correct pre_gateway_dispatch doc text and add hooks.md section 2026-04-24 03:02:03 -07:00
provider-routing.md
rl-training.md fix(docs): Add links to Atropos and wandb in user guide 2026-04-23 03:07:06 -07:00
skills.md refactor(commands): drop /provider, /plan handler, and clean up slash registry (#15047) 2026-04-24 03:10:52 -07:00
skins.md
spotify.md feat(spotify): wire setup wizard into 'hermes tools' + document cron usage (#15180) 2026-04-24 07:24:28 -07:00
tool-gateway.md
tools.md
tts.md feat(tts): complete KittenTTS integration (tools/setup/docs/tests) 2026-04-21 01:28:32 -07:00
vision.md fix(tui): improve macOS paste and shortcut parity 2026-04-21 08:00:00 -07:00
voice-mode.md feat(voice): add cli beep toggle 2026-04-21 00:29:29 -07:00
web-dashboard.md docs(dashboard): document page-scoped plugin slots (#15662) 2026-04-25 06:59:24 -07:00