behavior-wrapped 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,5 +4,5 @@
4
4
  {"timestamp":"2026-06-07T10:00:05.000Z","type":"response_item","payload":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"Let me check that carefully."}]}}
5
5
  {"timestamp":"2026-06-07T10:00:07.000Z","type":"response_item","payload":{"type":"function_call","name":"exec_command","call_id":"synthetic-call-1","arguments":"{}"}}
6
6
  {"timestamp":"2026-06-07T10:00:09.000Z","type":"response_item","payload":{"type":"function_call_output","call_id":"synthetic-call-1","output":"synthetic build passed"}}
7
- {"timestamp":"2026-06-07T10:00:10.000Z","type":"event_msg","payload":{"type":"token_count","info":{"total_token_usage":{"input_tokens":800,"output_tokens":200,"cache_write_input_tokens":0,"cached_input_tokens":1000,"reasoning_output_tokens":50,"total_tokens":2050}}}}
7
+ {"timestamp":"2026-06-07T10:00:10.000Z","type":"event_msg","payload":{"type":"token_count","info":{"total_token_usage":{"input_tokens":1800,"output_tokens":250,"cache_write_input_tokens":0,"cached_input_tokens":1000,"reasoning_output_tokens":50,"total_tokens":2050}}}}
8
8
  {"timestamp":"2026-06-07T10:00:12.000Z","type":"event_msg","payload":{"type":"task_complete","started_at":"2026-06-07T10:00:01.000Z","completed_at":"2026-06-07T10:00:12.000Z","duration_ms":11000,"turn_id":"synthetic-turn-1"}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "behavior-wrapped",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "A private, local-first Wrapped report for Claude Code, Cowork, and Codex behavior.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -458,8 +458,8 @@ function normalizeCodexRecords(records, { includePrivateToolDetails = false } =
458
458
  type: "system",
459
459
  timestamp: record.timestamp,
460
460
  message: { model: currentModel, usage: {
461
- input_tokens: usage.input_tokens,
462
- output_tokens: usage.output_tokens,
461
+ input_tokens: Math.max(0, usage.input_tokens - usage.cached_input_tokens - usage.cache_write_input_tokens),
462
+ output_tokens: Math.max(0, usage.output_tokens - usage.reasoning_output_tokens),
463
463
  cache_creation_input_tokens: usage.cache_write_input_tokens,
464
464
  cache_read_input_tokens: usage.cached_input_tokens,
465
465
  reasoning_output_tokens: usage.reasoning_output_tokens,