feat(hooks): consolidate shared transport helpers

This commit is contained in:
William Valentin
2026-03-26 11:22:27 -07:00
parent d49785cb25
commit fdfcb50e80
10 changed files with 374 additions and 948 deletions
+11
View File
@@ -205,6 +205,17 @@ Sample Codex hook configuration lives in [hooks/codex/hooks.json](/home/will/lab
The current Codex integration does not assume tool or subagent span hooks exist. If a newer Codex CLI exposes official tool/span hooks, they can be added separately without changing the run/session flow above.
## Gemini Hook
The `hooks/gemini/` directory contains a TypeScript handler for Gemini CLI telemetry. The current integration maps Gemini hook events into agentmon's session/run/span model:
- `onStart` maps to `session.start` and an initial `run.start`
- `onStop` maps to `run.end` and `session.end`
- `onToolCall` maps to `span.start`
- `onToolResult` maps to `span.end`
Sample Gemini hook configuration lives in [hooks/gemini/hooks.json](/home/will/lab/agentmon/hooks/gemini/hooks.json). Install the handler from that directory so the `agentmon-gemini-handler` binary is available, then point Gemini CLI at the sample hook config and set `AGENTMON_INGEST_URL` to your ingest gateway.
## Go SDK
Emit events from Go applications: