mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
d432b56dbc
Anthropic's /v1/messages usage block returns more fields than we were capturing. The flat 4-field view (input_tokens, output_tokens, cache_creation_input_tokens, cache_read_input_tokens) historically dropped: - cache_creation.ephemeral_5m_input_tokens (1.25x rate price tier) - cache_creation.ephemeral_1h_input_tokens (2x rate price tier) - server_tool_use.web_search_requests (billed per-request, not per-token) Extends: - Usage interface (types.ts): nested cache_creation + server_tool_use - TrackEvent (tracker.ts): cache_create_5m_tokens, cache_create_1h_tokens, web_search_requests as optional fields - toTrackEvent copy logic: passes through when defined, omits when absent (a real 0 stays 0 - the dashboard needs to tell "missing" from "zero") Also adds .gitignore entries for draumode MCP scratch files (*.draumode.ts, *.excalidraw) so exploratory diagrams don't leak into the repo. Pure data collection. No behavior change. Sets up the dashboard fixes (tasks #20 and #21) where the data will actually get rendered. 282 tests pass, typecheck clean, build clean.