usagebench 0.0.0-stage → 0.2.3
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.
- package/LICENSE +21 -0
- package/README.md +251 -2
- package/dist/anon.d.ts +11 -0
- package/dist/anon.js +108 -0
- package/dist/audit.d.ts +1 -0
- package/dist/audit.js +173 -0
- package/dist/bip39_english.d.ts +1 -0
- package/dist/bip39_english.js +126 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +95 -0
- package/dist/compare.d.ts +16 -0
- package/dist/compare.js +200 -0
- package/dist/diff.d.ts +1 -0
- package/dist/diff.js +86 -0
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.js +138 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +181 -0
- package/dist/logs.d.ts +22 -0
- package/dist/logs.js +122 -0
- package/dist/repro.d.ts +1 -0
- package/dist/repro.js +154 -0
- package/dist/secrets.d.ts +11 -0
- package/dist/secrets.js +100 -0
- package/fixtures/claude/2.1.321_compaction-zeroed-usage.continued.expected.json +21 -0
- package/fixtures/claude/2.1.321_compaction-zeroed-usage.continued.jsonl +3 -0
- package/fixtures/claude/2.1.321_compaction-zeroed-usage.original.expected.json +21 -0
- package/fixtures/claude/2.1.321_compaction-zeroed-usage.original.jsonl +2 -0
- package/fixtures/claude/2.1.334_main.expected.json +21 -0
- package/fixtures/claude/2.1.334_main.jsonl +162 -0
- package/fixtures/claude/2.1.335_sidechain.expected.json +21 -0
- package/fixtures/claude/2.1.335_sidechain.jsonl +60 -0
- package/fixtures/claude/2.1.335_stream-abort-tool-error.expected.json +21 -0
- package/fixtures/claude/2.1.335_stream-abort-tool-error.jsonl +200 -0
- package/fixtures/claude/synthetic_duplicate-id-partial-usage.expected.json +22 -0
- package/fixtures/claude/synthetic_duplicate-id-partial-usage.jsonl +6 -0
- package/fixtures/codex/0.160.0_compacted.expected.json +38 -0
- package/fixtures/codex/0.160.0_compacted.jsonl +200 -0
- package/fixtures/codex/0.171.0-alpha.13.2_subagent-forked.expected.json +38 -0
- package/fixtures/codex/0.171.0-alpha.13.2_subagent-forked.jsonl +154 -0
- package/fixtures/codex/0.173.0-alpha.4.1_basic.expected.json +38 -0
- package/fixtures/codex/0.173.0-alpha.4.1_basic.jsonl +200 -0
- package/fixtures/codex/synthetic_total-reset.expected.json +39 -0
- package/fixtures/codex/synthetic_total-reset.jsonl +12 -0
- package/package.json +48 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent": "codex",
|
|
3
|
+
"synthetic": true,
|
|
4
|
+
"is_sidechain": false,
|
|
5
|
+
"parent_session": false,
|
|
6
|
+
"usage_lines": 4,
|
|
7
|
+
"unique_messages": 4,
|
|
8
|
+
"compacted_copies": 0,
|
|
9
|
+
"rule": "codex_record_by_response_id",
|
|
10
|
+
"token_count_events": 5,
|
|
11
|
+
"token_count_naive": {
|
|
12
|
+
"input": 4400,
|
|
13
|
+
"output": 190,
|
|
14
|
+
"cache_write": 0,
|
|
15
|
+
"cache_read": 3000,
|
|
16
|
+
"reasoning": 25
|
|
17
|
+
},
|
|
18
|
+
"token_count_dedup": {
|
|
19
|
+
"input": 3400,
|
|
20
|
+
"output": 140,
|
|
21
|
+
"cache_write": 0,
|
|
22
|
+
"cache_read": 2200,
|
|
23
|
+
"reasoning": 15
|
|
24
|
+
},
|
|
25
|
+
"naive": {
|
|
26
|
+
"input": 3400,
|
|
27
|
+
"output": 140,
|
|
28
|
+
"cache_write": 0,
|
|
29
|
+
"cache_read": 2200,
|
|
30
|
+
"reasoning": 15
|
|
31
|
+
},
|
|
32
|
+
"dedup": {
|
|
33
|
+
"input": 3400,
|
|
34
|
+
"output": 140,
|
|
35
|
+
"cache_write": 0,
|
|
36
|
+
"cache_read": 2200,
|
|
37
|
+
"reasoning": 15
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{"timestamp": "2026-01-01T00:00:00.000Z", "ordinal": 0, "type": "session_meta", "payload": {"id": "id_fake000001", "session_id": "id_fake000001", "timestamp": "2026-01-01T00:00:00.000Z", "cwd": "<redacted>", "originator": "<redacted>", "cli_version": "0.173.0", "source": "cli", "model_provider": "openai"}}
|
|
2
|
+
{"timestamp": "2026-01-01T00:00:00.100Z", "ordinal": 1, "type": "turn_context", "payload": {"turn_id": "id_fake000003", "cwd": "<redacted>", "approval_policy": "never", "model": "gpt-6.2-sol", "effort": "medium"}}
|
|
3
|
+
{"timestamp": "2026-01-01T00:00:01.000Z", "ordinal": 2, "type": "token_usage_record", "payload": {"thread_id": "id_fake000001", "turn_id": "id_fake000003", "session_id": "id_fake000001", "root_turn_id": "id_fake000003", "response_id": "resp_fake000004", "usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "turn_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "thread_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}}}
|
|
4
|
+
{"timestamp": "2026-01-01T00:00:01.010Z", "ordinal": 3, "type": "event_msg", "payload": {"type": "token_count", "info": {"total_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "last_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "last_usage_includes_reasoning": true, "model_context_window": 475000}, "rate_limits": null}}
|
|
5
|
+
{"timestamp": "2026-01-01T00:00:01.020Z", "ordinal": 4, "type": "event_msg", "payload": {"type": "token_count", "info": {"total_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "last_token_usage": {"input_tokens": 1000, "cached_input_tokens": 800, "cache_write_input_tokens": 0, "output_tokens": 50, "reasoning_output_tokens": 10, "total_tokens": 1050}, "last_usage_includes_reasoning": true, "model_context_window": 475000}, "rate_limits": null}}
|
|
6
|
+
{"timestamp": "2026-01-01T00:00:02.000Z", "ordinal": 5, "type": "token_usage_record", "payload": {"thread_id": "id_fake000001", "turn_id": "id_fake000003", "session_id": "id_fake000001", "root_turn_id": "id_fake000003", "response_id": "resp_fake000005", "usage": {"input_tokens": 1200, "cached_input_tokens": 1000, "cache_write_input_tokens": 0, "output_tokens": 30, "reasoning_output_tokens": 0, "total_tokens": 1230}, "turn_token_usage": {"input_tokens": 1200, "cached_input_tokens": 1000, "cache_write_input_tokens": 0, "output_tokens": 30, "reasoning_output_tokens": 0, "total_tokens": 1230}, "thread_token_usage": {"input_tokens": 2200, "cached_input_tokens": 1800, "cache_write_input_tokens": 0, "output_tokens": 80, "reasoning_output_tokens": 10, "total_tokens": 2280}}}
|
|
7
|
+
{"timestamp": "2026-01-01T00:00:02.010Z", "ordinal": 6, "type": "event_msg", "payload": {"type": "token_count", "info": {"total_token_usage": {"input_tokens": 2200, "cached_input_tokens": 1800, "cache_write_input_tokens": 0, "output_tokens": 80, "reasoning_output_tokens": 10, "total_tokens": 2280}, "last_token_usage": {"input_tokens": 1200, "cached_input_tokens": 1000, "cache_write_input_tokens": 0, "output_tokens": 30, "reasoning_output_tokens": 0, "total_tokens": 1230}, "last_usage_includes_reasoning": true, "model_context_window": 475000}, "rate_limits": null}}
|
|
8
|
+
{"timestamp": "2026-01-01T00:00:02.500Z", "ordinal": 7, "type": "event_msg", "payload": {"type": "token_count", "info": null, "rate_limits": null}}
|
|
9
|
+
{"timestamp": "2026-01-01T00:00:03.000Z", "ordinal": 8, "type": "token_usage_record", "payload": {"thread_id": "id_fake000001", "turn_id": "id_fake000003", "session_id": "id_fake000001", "root_turn_id": "id_fake000003", "response_id": "resp_fake000006", "usage": {"input_tokens": 500, "cached_input_tokens": 0, "cache_write_input_tokens": 0, "output_tokens": 20, "reasoning_output_tokens": 5, "total_tokens": 520}, "turn_token_usage": {"input_tokens": 500, "cached_input_tokens": 0, "cache_write_input_tokens": 0, "output_tokens": 20, "reasoning_output_tokens": 5, "total_tokens": 520}, "thread_token_usage": {"input_tokens": 500, "cached_input_tokens": 0, "cache_write_input_tokens": 0, "output_tokens": 20, "reasoning_output_tokens": 5, "total_tokens": 520}}}
|
|
10
|
+
{"timestamp": "2026-01-01T00:00:03.010Z", "ordinal": 9, "type": "event_msg", "payload": {"type": "token_count", "info": {"total_token_usage": {"input_tokens": 500, "cached_input_tokens": 0, "cache_write_input_tokens": 0, "output_tokens": 20, "reasoning_output_tokens": 5, "total_tokens": 520}, "last_token_usage": {"input_tokens": 500, "cached_input_tokens": 0, "cache_write_input_tokens": 0, "output_tokens": 20, "reasoning_output_tokens": 5, "total_tokens": 520}, "last_usage_includes_reasoning": true, "model_context_window": 475000}, "rate_limits": null}}
|
|
11
|
+
{"timestamp": "2026-01-01T00:00:04.000Z", "ordinal": 10, "type": "token_usage_record", "payload": {"thread_id": "id_fake000001", "turn_id": "id_fake000003", "session_id": "id_fake000001", "root_turn_id": "id_fake000003", "response_id": "resp_fake000007", "usage": {"input_tokens": 700, "cached_input_tokens": 400, "cache_write_input_tokens": 0, "output_tokens": 40, "reasoning_output_tokens": 0, "total_tokens": 740}, "turn_token_usage": {"input_tokens": 700, "cached_input_tokens": 400, "cache_write_input_tokens": 0, "output_tokens": 40, "reasoning_output_tokens": 0, "total_tokens": 740}, "thread_token_usage": {"input_tokens": 1200, "cached_input_tokens": 400, "cache_write_input_tokens": 0, "output_tokens": 60, "reasoning_output_tokens": 5, "total_tokens": 1260}}}
|
|
12
|
+
{"timestamp": "2026-01-01T00:00:04.010Z", "ordinal": 11, "type": "event_msg", "payload": {"type": "token_count", "info": {"total_token_usage": {"input_tokens": 1200, "cached_input_tokens": 400, "cache_write_input_tokens": 0, "output_tokens": 60, "reasoning_output_tokens": 5, "total_tokens": 1260}, "last_token_usage": {"input_tokens": 700, "cached_input_tokens": 400, "cache_write_input_tokens": 0, "output_tokens": 40, "reasoning_output_tokens": 0, "total_tokens": 740}, "last_usage_includes_reasoning": true, "model_context_window": 475000}, "rate_limits": null}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "usagebench",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Conformance fixtures, log-format-change radar, doctor and secret audit for AI coding agent usage logs (Claude Code, Codex, antigravity-cli)",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"claude-code",
|
|
8
|
+
"codex",
|
|
9
|
+
"jsonl",
|
|
10
|
+
"token-usage",
|
|
11
|
+
"usage-tracker",
|
|
12
|
+
"conformance",
|
|
13
|
+
"fixtures",
|
|
14
|
+
"ai-coding-agent"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/logwright/usagebench#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/logwright/usagebench/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/logwright/usagebench.git",
|
|
23
|
+
"directory": "parser"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "dist/index.js",
|
|
27
|
+
"types": "dist/index.d.ts",
|
|
28
|
+
"bin": {
|
|
29
|
+
"usagebench": "dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"fixtures"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=20"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"prepack": "npm run build && node -e \"const fs = require('fs'); for (const f of ['README.md', 'LICENSE']) fs.copyFileSync('../' + f, f); fs.rmSync('fixtures', {recursive: true, force: true}); for (const a of ['claude', 'codex']) fs.cpSync('../fixtures/' + a, 'fixtures/' + a, {recursive: true})\"",
|
|
41
|
+
"test": "node test/e2e.ts"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^26.6.11",
|
|
45
|
+
"typescript": "^7.0.2"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|