hermes-agent/website/docs/guides
Teknium 0f82c757e0
feat(hooks): add duration_ms to post_tool_call + transform_tool_result
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-24 17:08:06 -07:00
..
_category_.json docs: add Guides & Tutorials section, restructure sidebar 2026-03-08 19:37:34 -07:00
automate-with-cron.md docs: fix 30+ inaccuracies across documentation (#9023) 2026-04-13 10:53:10 -07:00
automation-templates.md docs: automation templates gallery + comparison post (#9821) 2026-04-14 12:30:50 -07:00
aws-bedrock.md feat: native AWS Bedrock provider via Converse API 2026-04-15 16:17:17 -07:00
build-a-hermes-plugin.md feat(hooks): add duration_ms to post_tool_call + transform_tool_result 2026-04-24 17:08:06 -07:00
cron-troubleshooting.md docs: add QQBot to all 14 docs pages (full platform parity) 2026-04-14 00:11:49 -07:00
daily-briefing-bot.md docs(cron): clarify default model/provider setup for scheduled jobs 2026-04-23 02:04:45 -07:00
delegation-patterns.md docs(delegate): clarify that the parent agent, not the user, populates goal/context (#13698) 2026-04-21 14:27:06 -07:00
github-pr-review-agent.md fix(docs): unbreak docs-site-checks — ascii-guard diagram + MDX <1% (#12984) 2026-04-20 04:29:02 -07:00
local-llm-on-mac.md docs: document streaming timeout auto-detection for local LLMs (#6990) 2026-04-09 23:28:25 -07:00
migrate-from-openclaw.md feat: rebrand OpenClaw references to Hermes during migration 2026-04-12 00:33:54 -07:00
python-library.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
team-telegram-assistant.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
tips.md docs: fix 40+ discrepancies between documentation and codebase (#5818) 2026-04-07 10:17:44 -07:00
use-mcp-with-hermes.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
use-soul-with-hermes.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
use-voice-mode-with-hermes.md feat(voice): add cli beep toggle 2026-04-21 00:29:29 -07:00
webhook-github-pr-review.md docs: add PR review guides, rework quickstart, slim down installation 2026-04-19 05:30:50 -07:00
work-with-skills.md feat(plugins): namespaced skill registration for plugin skill bundles 2026-04-14 10:42:58 -07:00