feat(voyage): wire Stop event to otel-export.mjs in hooks.json

Step 13 of v4.1 — adds Stop hook entry pointing to
hooks/scripts/otel-export.mjs (added in Step 12 / commit c5fb745).
Mounts the orchestrator on Claude Code's Stop event so OTel/Prometheus
export runs at session-end when VOYAGE_EXPORT_MODE is set.

HIGH-risk-mitigering: tests/hooks/hooks-json-stop-wired.test.mjs
asserter at Stop-key finnes, refererer otel-export.mjs, bruker
\${CLAUDE_PLUGIN_ROOT}-substitusjon, og har type:command.

Tests: 464 → 468 (4 new). All green.
This commit is contained in:
Kjell Tore Guttormsen 2026-05-09 09:48:44 +02:00
commit a39f7ec2e2
2 changed files with 75 additions and 0 deletions

View file

@ -60,6 +60,16 @@
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/otel-export.mjs"
}
]
}
]
}
}