Commit c9bbae6
release: v1.108.136 — receipt calendar windows, --rates, per-day savings meter
Three receipt/meter changes, shipped together (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. Exists so anything that prices token counts (the
console, scripts, exports) reads the one table the suite ships with,
instead of keeping its own 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.
- Why: windowed views ("today", "this month") can now be answered by
the meter itself, which is the authoritative record of what each call
actually avoided. Transcript scans can't fill that role: they miss
history that's been cleared and they model conservatively.
No INDEX_VERSION or wire change. 25 new tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 38427c4 commit c9bbae6
8 files changed
Lines changed: 575 additions & 13 deletions
File tree
- src/jcodemunch_mcp
- cli
- storage
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
5 | 70 | | |
6 | 71 | | |
7 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
283 | | - | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments