Skip to content

v1.108.136 — receipt calendar windows, --rates, per-day savings meter

Choose a tag to compare

@jgravelle jgravelle released this 17 Jul 16:10

Three receipt/meter changes (v1.108.134-136 in the CHANGELOG):

receipt calendar windows (--since / --until / --by-day)

  • --since / --until accept dates. A bare date means local midnight, and --until is exclusive, so adjacent windows never double-count a call that lands on the boundary.
  • --by-day adds a per-day series to the JSON export; the series sums to the window total by construction.
  • The export gains a window block describing the range that produced the figures. --days behavior is unchanged when neither new flag is given.

receipt --rates

  • Emits the model input-price table as JSON and exits; scans no transcripts. Consumers that price token counts (the console, scripts, exports) read the one table the suite ships with instead of keeping a copy that drifts whenever published pricing changes.

savings meter per-local-day rollup

  • The per-call savings meter (_savings.json) now writes a daily map alongside the lifetime total. Same read-modify-write flush chokepoint, so it stays multi-process safe. Capped at 750 days.
  • Windowed views ("today", "this month") can now be answered by the meter itself — the authoritative record of what each call actually avoided — instead of transcript scans, which miss cleared history and model conservatively.

No INDEX_VERSION or wire change. 25 new tests. Pairs with jmunch-console v0.8.81 (savings windows + pricing-model picker).