codeburn/src
Resham Joshi a88dffe7aa
fix(export): give the JSON export stable keys (#1864)
* fix(export): give the JSON export stable keys

The JSON export reused the CSV row builders, so its keys were display
headers with spaces and parentheses, and the money keys changed name
with the configured currency. A program had to reshape the file before
it could read it.

The builders now produce one camelCase row, and a single key to header
map writes the CSV, so every CSV header line stays byte-identical. The
JSON schema moves to codeburn.export.v3; the currency is stated once in
currency.code and the money values stay converted to it.

Before (v2, EUR):
{"Period":"7 Days","Date":"2026-11-02","Cost (EUR)":1.1,"Saved (EUR)":0,"API Calls":1,"Sessions":1,"Input Tokens":100000,"Output Tokens":50000,"Cache Read Tokens":200000,"Cache Write Tokens":30000,"costBasis":{"calculated":1}}

After (v3, EUR):
{"period":"7 Days","date":"2026-11-02","cost":1.1,"saved":0,"apiCalls":1,"sessions":1,"inputTokens":100000,"outputTokens":50000,"cacheReadTokens":200000,"cacheWriteTokens":30000,"costBasis":{"calculated":1}}

v2 consumers must rename keys. New keys can still appear under v3.

* docs: changelog entry for the v3 export JSON

* test: read the v3 export keys
2026-11-05 00:49:36 +01:00
..
act fix(act): price realized savings the way the finding priced them (#1859) 2026-11-04 21:56:22 +01:00
data fix(codex): price requests on the ultrafast service tier (#1851) 2026-11-04 19:08:36 +01:00
guard feat(guard): warn and stop identical-call loops and failing-command retries (#1857) 2026-11-04 19:29:23 +01:00
mcp feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
plugins chore(deps): bump zod from 3.25.76 to 4.6.7 (#1837) 2026-11-04 19:08:05 +01:00
providers chore: drop the no-zstd fallbacks the 22.15 floor made unreachable (#1855) 2026-11-04 19:29:18 +01:00
quota fix(quota): label every Claude Max multiplier and the Ultra tier (#1850) 2026-11-04 19:08:23 +01:00
sharing fix(overview): group thousands in the integer part of costs only (#1714) 2026-10-10 07:05:12 +02:00
sync feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
antigravity-statusline.ts fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
audit-report.ts fix(codex): count cache writes toward the long-context threshold, tier only above 272k (#1706) 2026-10-10 02:55:47 +02:00
bash-utils.ts perf(classifier): linear bash separator split 2026-08-16 18:31:41 -07:00
behavioral-weight.ts fix(claude): attribute each call to the project of its own cwd (#1689) 2026-10-08 06:28:32 +02:00
billing-filter.ts feat(cli): filter usage by billing route and mode (#1486) 2026-09-19 11:32:06 -07:00
branch-spend.ts Consistent period totals and incremental refresh (#1467) 2026-09-17 12:35:05 +02:00
budget.ts feat(budget): spend budgets with overview display and scriptable --check (#562) 2026-07-16 11:10:16 -07:00
cache-dir.ts chore: remove Roo Code support (#1551) 2026-09-24 21:34:39 +02:00
cache-refresh-lock.ts fix(cache-lock): coalesce heartbeat ticks; make time-sensitive tests deterministic (#1559) 2026-09-25 05:06:43 +02:00
cache-sweep.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
classifier.ts fix(claude): count the PowerShell tool as a shell tool (#1806) 2026-10-31 00:50:52 +01:00
cli-date.ts feat(cli): add lifetime period for CLI and dashboard (#753) 2026-07-20 05:24:33 -07:00
cli.ts chore: raise the Node floor to 22.15 and make zstd unconditional (#1846) 2026-11-04 17:37:28 +01:00
codex-cache.ts fix(codex): match mcp-cli only in command position (#1845) 2026-11-03 17:58:38 +01:00
codex-credits.ts fix(codex): price Codex Auto Review by date (#1641) 2026-10-05 19:43:33 +02:00
codex-fork-replay.ts fix(codex): attribute native Codex tool events (#1767) 2026-11-02 17:15:31 +01:00
codex-jsonl-fields.ts fix(codex): attribute native Codex tool events (#1767) 2026-11-02 17:15:31 +01:00
codex-session-index.ts feat(codex): show thread names from session_index.jsonl (#1687) 2026-10-09 13:25:13 +02:00
codex-throughput.ts fix(codex): read Zstandard-compressed rollouts (#1786) 2026-10-26 02:40:29 +01:00
compare-cohorts.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
compare-stats.ts feat(sessions): show each session's cache hit rate (#1861) 2026-11-04 21:56:28 +01:00
compare.tsx fix(compare): skip a provider whose discovery fails instead of exiting (#1643) 2026-10-05 23:40:45 +02:00
config.ts feat: project links put a folder in a repo project (#1695) 2026-10-08 17:41:23 +02:00
content-utils.ts fix(parser): flatten already-sliced previews and memoize canonical path walks 2026-08-16 01:49:10 -07:00
context-budget.ts fix(context-budget): stop double-counting home skills and CLAUDE.md 2026-08-04 06:32:58 +03:00
context-tree-codex.ts fix(codex): read Zstandard-compressed rollouts (#1786) 2026-10-26 02:40:29 +01:00
context-tree.ts context: Fable and Mythos 5 report a 1M window (#1522) 2026-09-23 16:35:29 +02:00
context-tui.tsx fix(cli): default NODE_ENV to production so Ink's React build stops leaking user-timing entries. 2026-09-07 10:27:46 -03:00
copilot-aiu.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
currency.ts fix(currency): show USD instead of a foreign symbol when no FX rate is available (#1715) 2026-10-10 07:05:23 +02:00
cursor-cache.ts Honor redirected Copilot and Cursor storage roots (#1624) 2026-10-04 22:17:28 +02:00
cursor-import.ts fix(cache): drop stale cursor-agent slices on days a Cursor import covers (#1710) 2026-10-10 03:16:02 +02:00
cursor-sync.ts fix(cursor): unwrap Cursor 3.27 safe-storage sessions (#1802) 2026-10-30 22:32:51 +01:00
daily-cache.ts fix(claude): estimate the output of subagent messages that never got a final usage row (#1854) 2026-11-04 19:48:32 +01:00
dashboard.tsx feat(sessions): show each session's cache hit rate (#1861) 2026-11-04 21:56:28 +01:00
day-aggregator.ts feat: group projects by git repository (#1691) 2026-10-08 06:45:26 +02:00
doctor.ts windows: discover provider roots inside WSL distros (#1062) 2026-09-19 12:33:29 -07:00
editor-data-dir.ts Honor redirected Copilot and Cursor storage roots (#1624) 2026-10-04 22:17:28 +02:00
export.ts fix(export): give the JSON export stable keys (#1864) 2026-11-05 00:49:36 +01:00
fetch-utils.ts fix(network): add timeouts to critical-path fetches (#445) (#448) 2026-06-06 03:25:36 +02:00
format.ts feat: mark estimated dollars the same way in every view (#1657) 2026-10-06 22:27:13 +02:00
fs-utils.ts chore: raise the Node floor to 22.15 and make zstd unconditional (#1846) 2026-11-04 17:37:28 +01:00
git-origin.ts fix(projects): stop the git origin walk at the folder's own repo (#1707) 2026-10-10 02:55:54 +02:00
granular-history.ts fix(web): count legend title uniqueness in code points 2026-08-21 21:59:13 +05:30
hermes-session-ledger.ts feat(cli): filter usage by billing route and mode (#1486) 2026-09-19 11:32:06 -07:00
ink-win.ts fix(ink-win): strip synchronized-update escapes instead of exact-matching them 2026-08-04 03:06:47 +03:00
launcher-homes.ts chore: raise the Node floor to 22.15 and make zstd unconditional (#1846) 2026-11-04 17:37:28 +01:00
live-sessions.ts feat(dock): one Claude ring per config directory, with its own sessions and today (#1570) 2026-09-28 19:06:53 +02:00
main.ts feat(sessions): show each session's cache hit rate (#1861) 2026-11-04 21:56:28 +01:00
math-utils.ts dashboard: fold instead of spread when measuring column widths (#1460) 2026-09-16 18:52:02 +02:00
menubar-installer.ts fix(menubar): read the download whole so Electron's Node cannot crash mid-update (#1745) 2026-10-11 08:55:16 +02:00
menubar-json.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
model-breakdown.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
model-efficiency.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
models-report.ts feat: mark estimated dollars the same way in every view (#1657) 2026-10-06 22:27:13 +02:00
models.ts fix(codex): price requests on the ultrafast service tier (#1851) 2026-11-04 19:08:36 +01:00
optimize-one-hour-cache.ts feat(optimize): flag one-hour cache writes the next request never needed (#1860) 2026-11-05 00:10:23 +01:00
optimize.ts feat(optimize): flag one-hour cache writes the next request never needed (#1860) 2026-11-05 00:10:23 +01:00
overview.ts fix(overview): group thousands in the integer part of costs only (#1714) 2026-10-10 07:05:12 +02:00
parse-worker.ts fix(codex): attribute native Codex tool events (#1767) 2026-11-02 17:15:31 +01:00
parse-workers.ts fix(codex): attribute native Codex tool events (#1767) 2026-11-02 17:15:31 +01:00
parser.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
path-privacy.ts fix(sync): address project privacy review 2026-08-24 20:09:27 +05:30
peak-hours.ts Track peak vs off-peak usage for first-party DeepSeek and Z.ai routes (#1561) 2026-09-28 18:48:38 +02:00
period-diff.ts fix(claude): attribute each call to the project of its own cwd (#1689) 2026-10-08 06:28:32 +02:00
persistent-codeburn.ts refactor(cli): share persistent-codeburn resolver; tighten Antigravity hook ownership 2026-05-31 20:07:57 -07:00
plan-usage.ts Copilot: count every agent round and bill exact credits in VS Code chat sessions (#1752) 2026-10-13 01:02:04 +02:00
plans.ts feat: Google AI plan presets and the Antigravity tier label (#1683) 2026-10-07 23:34:49 +02:00
pr-signals.ts fix(pr): charge pushed branches to their PR and show every PR's details (#1737) 2026-10-10 23:47:23 +02:00
project-filter-warnings.ts fix(cli): judge a pattern against the day cache, and never on screen 2026-09-11 17:29:55 +02:00
provider-issues.ts feat: telemetry for CLI error causes, provider read failures and update results (#1702) 2026-10-09 12:47:49 +02:00
quota.ts prerelease: quota NaN guard, 10-year daily retention, test date bomb (#764) 2026-07-20 07:37:56 -07:00
serve.ts perf(cursor): stop JSON and menubar answers waiting on cursor.com (#1724) 2026-10-10 07:24:37 +02:00
session-cache.ts fix(claude): estimate the output of subagent messages that never got a final usage row (#1854) 2026-11-04 19:48:32 +01:00
session-contributions.ts feat(sessions): fold subagent sessions into their parent row (#1690) 2026-10-08 06:27:58 +02:00
session-count-label.ts fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
session-output.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
session-population.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
session-why.ts feat(pr): attribute PR work honestly and show one shot, review runs and follow-ups (#1733) 2026-10-10 21:40:39 +02:00
sessions-report.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
sessions-tui.tsx feat(sessions): show each session's cache hit rate (#1861) 2026-11-04 21:56:28 +01:00
spend-flow.ts fix(cli): judge a pattern against the day cache, and never on screen 2026-09-11 17:29:55 +02:00
sqlite.ts fix: stop a Full Disk Access blocked Warp read from freezing serve, and harden the Grok Bot quota reader (#1487) 2026-09-18 15:23:22 -07:00
status-snapshot-semantic.ts fix: exact Today session counts and the Overview estimate-marker crash (#1794) 2026-10-26 22:53:08 +01:00
streak.ts Consistent period totals and incremental refresh (#1467) 2026-09-17 12:35:05 +02:00
telemetry-snapshot.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
text-table.ts dashboard: fold instead of spread when measuring column widths (#1460) 2026-09-16 18:52:02 +02:00
token-estimate.ts Extract shared token estimation helper, migrate all CHARS_PER_TOKEN sites (#644) (#677) 2026-07-16 11:58:22 -07:00
types.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
update.ts feat(update): one codeburn update command for CLI, menu bar and desktop (#1740) 2026-10-11 04:33:57 +02:00
usage-aggregator.ts feat(export): say where every dollar comes from (#1863) 2026-11-05 00:10:27 +01:00
user-timing-guard.ts fix(cli): clear the user-timing buffer blind on the guard tick. 2026-09-07 10:57:14 -03:00
web-dashboard.ts feat(web): --allowed-host for an authenticating reverse proxy (#1789) 2026-11-02 17:17:06 +01:00
work-units.ts feat(sessions): deterministic work-unit resolver and sessions --by-work-unit (CB-2 slice 1) (#1145) 2026-08-25 09:30:05 -07:00
workflow-insights.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
wsl.ts windows: discover provider roots inside WSL distros (#1062) 2026-09-19 12:33:29 -07:00
yield.ts fix(yield): rescue sessions whose branch shipped past the session's window (#1476) 2026-09-18 17:10:27 -07:00