state-hub/api
tegwick 21b6a410c2 feat(token-events): auto-capture real token counts via PostToolUse hook
- Add PATCH /token-events/{id} endpoint to correct heuristic events
- Add `note` filter to GET /token-events/ list
- Add TokenEventPatch schema
- Add task_token_hook.py: PostToolUse hook that reads the Claude Code
  session transcript, computes per-task token delta, and replaces the
  heuristic token event with real measured counts (note="measured")
- Register hook in ~/.claude/settings.json on mcp__state-hub__update_task_status
  Covers both interactive sessions and ralph-workplan loops

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:38:45 +02:00
..
models feat(capability-registry): CUST-WP-0031 domain capability registry 2026-03-31 17:23:45 +02:00
routers feat(token-events): auto-capture real token counts via PostToolUse hook 2026-04-01 22:38:45 +02:00
schemas feat(token-events): auto-capture real token counts via PostToolUse hook 2026-04-01 22:38:45 +02:00
config.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
database.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
doi_engine.py perf(doi): fingerprint-based DB cache for DoI results 2026-03-20 01:47:19 +01:00
main.py feat(token-tracking): record AI token consumption per task (CUST-WP-0029) 2026-03-29 17:46:46 +02:00