Files
hermes-agent/agent
overtoneblue e17276c7b4 agent: forward first stream chunk timestamp to post_api_request hook
interruptible_streaming_api_call already records first_chunk_at in its
per-attempt stream diagnostics (agent.stream_diag) for failure telemetry,
but the value was dropped on the success path. Stash it on the agent at
stream completion and forward it as first_chunk_at in the existing
post_api_request plugin-hook payload, alongside started_at/ended_at.

Consumers (observability plugins, shell hooks) can now derive TTFB
(first_chunk_at - started_at) and true generation throughput
(output_tokens / (ended_at - first_chunk_at)) without any new
instrumentation in the hot path.

Backward compatible: existing hook subscribers ignore unknown kwargs.
2026-09-01 08:30:45 -07:00
..