claude-token-saver 3.11.1 β†’ 3.11.2

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/README.en.md CHANGED
@@ -77,7 +77,7 @@ The statusline appears at the bottom of Claude Code right away. If auto-registra
77
77
  | `✦ current` / `πŸ“… weekly` | 5-hour / 7-day rate-limit window usage + reset time |
78
78
  | `πŸ“¦` | Context usage (e.g. `Ctx 68% of 1M`) β€” colored by fill. Current models default to 1M with no premium, but token volume itself drives per-turn cost and 5H/7D burn |
79
79
  | `πŸ’°` | Cumulative savings from prompt caching |
80
- | `πŸ”€` | Cumulative savings from delegation β€” what running work on a cheaper tier saved, a different number from `πŸ’°`. Hidden until a delegation has actually been measured |
80
+ | `πŸ”€` | **Cumulative savings from model routing** β€” what work handled by a cheaper model instead of this one saved. A different number from prompt-cache savings (`πŸ’°`). Hidden until a delegation has actually been measured |
81
81
 
82
82
  When something is wrong, a **warning chip leads the line**:
83
83
 
@@ -302,7 +302,7 @@ Also update `statusLine.command` in `~/.claude/settings.json` to `claude-token-s
302
302
  ## Release notes
303
303
 
304
304
  ### v3.11.0 (2026-08-21)
305
- - **Delegation savings chip in the statusline** β€” `πŸ”€ Delegation saved $3.2`. The existing `πŸ’° Cache saved` covers the prompt cache; this one is what running work on a cheaper tier saved. Zero or missing data hides the chip entirely, so nothing changes for direct-API users. The statusline only reads `model-rules.json` β€” it never triggers a scan (it re-renders every few seconds). Segment name: `delegated`.
305
+ - **Routing savings chip in the statusline** β€” `πŸ”€ Routing saved $3.2`. Cumulative savings from model routing, placed right after the model name so it reads early in the line. The existing `πŸ’° Cache saved` covers the prompt cache and is a different number. Zero or missing data hides the chip entirely, so nothing changes for direct-API users. The statusline only reads `model-rules.json` β€” it never triggers a scan (it re-renders every few seconds). Segment name: `delegated`.
306
306
  - **Role-learning mis-classification fixed** β€” subagent records sometimes land in the parent transcript without an `isSidechain` flag, and that circumstantial evidence could outvote stated evidence, confirming a haiku profile as the session model (measured: 16 against 1, agreement exactly at the 80% line). Stated evidence (`Task(model:)` parameters, agent-definition frontmatter) and inferred evidence are now tallied separately, and an inference is not adopted when stated evidence contradicts it. Undecided ids stay `unknown` and leave the aggregate.
307
307
 
308
308
  ### v3.10.0 (2026-08-20)
package/README.md CHANGED
@@ -76,7 +76,7 @@ npm i -g claude-token-saver
76
76
  | `✦ current` / `πŸ“… weekly` | 5μ‹œκ°„ / 7일 rate-limit μœˆλ„ μ‚¬μš©λ₯  + 리셋 μ‹œκ° |
77
77
  | `πŸ“¦` | μ»¨ν…μŠ€νŠΈ μ‚¬μš©λ₯  (예: `Ctx 68% of 1M`) β€” μ‚¬μš©λ₯  κΈ°μ€€ λ…Ή/ν™©/적. ν˜„μž¬ λͺ¨λΈμ€ 1M이 기본·프리미엄 μ—†μŒμ΄μ§€λ§Œ, ν† ν°λŸ‰ μžμ²΄κ°€ ν„΄λ‹Ή λΉ„μš©κ³Ό 5H/7D ν•œλ„λ₯Ό νƒœμ›λ‹ˆλ‹€ |
78
78
  | `πŸ’°` | μΊμ‹œκ°€ μ ˆμ•½ν•΄μ€€ λˆ„μ  κΈˆμ•‘ |
79
- | `πŸ”€` | μœ„μž„μ΄ μ ˆμ•½ν•΄μ€€ λˆ„μ  κΈˆμ•‘ β€” 더 μ‹Ό ν‹°μ–΄λ‘œ λ‚΄λ €μ„œ μ•„λ‚€ λͺ«μ΄λ©° `πŸ’°`μ™€λŠ” λ‹€λ₯Έ μˆ˜μΉ˜μž…λ‹ˆλ‹€. μ‹€μΈ‘ μœ„μž„μ΄ μ—†μœΌλ©΄ ν‘œμ‹œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ |
79
+ | `πŸ”€` | **λͺ¨λΈ μœ„μž„μœΌλ‘œ μ•„λ‚€ λˆ„μ  λΉ„μš©** β€” 같은 일을 더 μ‹Ό λͺ¨λΈμ΄ λŒ€μ‹  μ²˜λ¦¬ν•΄μ„œ μ•„λ‚€ κΈˆμ•‘μ΄λ©°, ν”„λ‘¬ν”„νŠΈ μΊμ‹œ 절감(`πŸ’°`)κ³ΌλŠ” λ‹€λ₯Έ μˆ˜μΉ˜μž…λ‹ˆλ‹€. μ‹€μΈ‘ μœ„μž„μ΄ μ—†μœΌλ©΄ ν‘œμ‹œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ |
80
80
 
81
81
  λ¬Έμ œκ°€ κ°μ§€λ˜λ©΄ **κ²½κ³  칩이 맨 μ•žμ—** λΆ™μŠ΅λ‹ˆλ‹€:
82
82
 
@@ -258,7 +258,7 @@ npm uninstall -g claude-cache-monitor && npm i -g claude-token-saver
258
258
  ## 릴리슀 λ…ΈνŠΈ
259
259
 
260
260
  ### v3.11.0 (2026-08-21)
261
- - **statusline에 μœ„μž„ 절감 μΉ© μΆ”κ°€** β€” `πŸ”€ Delegation saved $3.2`. κΈ°μ‘΄ `πŸ’° Cache saved`λŠ” ν”„λ‘¬ν”„νŠΈ μΊμ‹œ 절감이고, μƒˆ 칩은 **더 μ‹Ό ν‹°μ–΄λ‘œ λ‚΄λ €μ„œ μ•„λ‚€ κΈˆμ•‘**μž…λ‹ˆλ‹€. 값이 0μ΄κ±°λ‚˜ 데이터가 μ—†μœΌλ©΄ 칩을 μ•„μ˜ˆ 그리지 μ•Šμ•„ 직접 API μ‚¬μš©μžμ—κ²ŒλŠ” 아무것도 λŠ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. statusline은 `model-rules.json`을 읽기만 ν•˜λ©° μŠ€μΊ”μ„ λŒλ¦¬μ§€ μ•ŠμŠ΅λ‹ˆλ‹€(5μ΄ˆλ§ˆλ‹€ ν˜ΈμΆœλ˜λŠ” μžλ¦¬μž…λ‹ˆλ‹€). μ„Έκ·Έλ¨ΌνŠΈ 이름은 `delegated`μž…λ‹ˆλ‹€.
261
+ - **statusline에 μœ„μž„ 절감 μΉ© μΆ”κ°€** β€” `πŸ”€ Routing saved $3.2`. λͺ¨λΈ μœ„μž„μœΌλ‘œ μ•„λ‚€ λˆ„μ  λΉ„μš©μ΄λ©°, λͺ¨λΈ 이름 λ°”λ‘œ 뒀에 놓여 쀄 μ•žμͺ½μ—μ„œ μ½νž™λ‹ˆλ‹€. κΈ°μ‘΄ `πŸ’° Cache saved`(ν”„λ‘¬ν”„νŠΈ μΊμ‹œ 절감)μ™€λŠ” λ‹€λ₯Έ μˆ˜μΉ˜μž…λ‹ˆλ‹€. 값이 0μ΄κ±°λ‚˜ 데이터가 μ—†μœΌλ©΄ 칩을 μ•„μ˜ˆ 그리지 μ•Šμ•„ 직접 API μ‚¬μš©μžμ—κ²ŒλŠ” 아무것도 λŠ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. statusline은 `model-rules.json`을 읽기만 ν•˜λ©° μŠ€μΊ”μ„ λŒλ¦¬μ§€ μ•ŠμŠ΅λ‹ˆλ‹€(5μ΄ˆλ§ˆλ‹€ ν˜ΈμΆœλ˜λŠ” μžλ¦¬μž…λ‹ˆλ‹€). μ„Έκ·Έλ¨ΌνŠΈ 이름은 `delegated`μž…λ‹ˆλ‹€.
262
262
  - **μ—­ν•  ν•™μŠ΅μ˜ μ˜€λΆ„λ₯˜ μˆ˜μ •** β€” μ„œλΈŒμ—μ΄μ „νŠΈ λ ˆμ½”λ“œκ°€ λΆ€λͺ¨ νŠΈλžœμŠ€ν¬λ¦½νŠΈμ— `isSidechain` 없이 μ„žμ—¬ λ“€μ–΄μ˜€λŠ” κ²½μš°κ°€ μžˆμ–΄, κ·Έ μ •ν™© 증거가 λͺ…μ‹œ 증거λ₯Ό 이겨 haiku ν”„λ‘œνŒŒμΌμ΄ μ„Έμ…˜ λͺ¨λΈλ‘œ ν™•μ •λ˜κ³€ ν–ˆμŠ΅λ‹ˆλ‹€(μ‹€μΈ‘ 16건 λŒ€ 1건, ν•©μ˜μœ¨ μ •ν™•νžˆ 80%). 이제 **λͺ…μ‹œ 증거(`Task(model:)` νŒŒλΌλ―Έν„°Β·μ—μ΄μ „νŠΈ μ •μ˜ frontmatter)와 μ •ν™© 증거(sidechain ν”Œλž˜κ·Έ λΆ€μž¬)λ₯Ό 뢄리해 집계**ν•˜κ³ , λͺ…μ‹œ 증거가 이λ₯Ό λ°˜λ°•ν•˜λ©΄ μ •ν™© 좔둠을 μ±„νƒν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 확정이 μ•ˆ 되면 `unknown`으둜 남아 μ§‘κ³„μ—μ„œ λΉ μ§‘λ‹ˆλ‹€.
263
263
 
264
264
  ### v3.10.0 (2026-08-20)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-token-saver",
3
- "version": "3.11.1",
3
+ "version": "3.11.2",
4
4
  "description": "Route the easy work your expensive Claude model keeps repeating down to haiku/sonnet β€” post-hoc session analysis, no realtime router, no extra LLM calls.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -260,14 +260,15 @@ export function formatReport(data, { color = true, verbose = false, timer = true
260
260
  // tier saved, summed from the rule registry route-scan maintains. Hidden
261
261
  // when zero or absent: a permanent "$0" is noise for direct-API users and
262
262
  // for anyone who has not delegated yet.
263
- // The label mirrors "Cache saved" on purpose: two savings figures reading in
264
- // the same shape is what makes the second one legible at a glance.
265
- // text: "Delegation saved $3.2" | same in verbose
266
- // icon: "πŸ”€ $3.2" | verbose: "πŸ”€ Delegation saved $3.2"
263
+ // "Routing saved" says what earned the money β€” work that ran on a cheaper
264
+ // model instead of this one. It leads the line rather than trailing it
265
+ // because it is the headline number of the whole tool, not a footnote.
266
+ // text: "Routing saved $3.2" | same in verbose
267
+ // icon: "πŸ”€ $3.2" | verbose: "πŸ”€ Routing saved $3.2"
267
268
  const delegationSaved = Number(data.delegationSaved) || 0;
268
269
  const delegateLabel = isIcon
269
- ? (verbose ? 'πŸ”€ Delegation saved' : 'πŸ”€')
270
- : 'Delegation saved';
270
+ ? (verbose ? 'πŸ”€ Routing saved' : 'πŸ”€')
271
+ : 'Routing saved';
271
272
  const delegateSeg = delegationSaved > 0
272
273
  ? `${c(GREEN)}${delegateLabel}${c(RESET)} ${formatMoney(delegationSaved)}`
273
274
  : null;
@@ -489,6 +490,10 @@ export function formatReport(data, { color = true, verbose = false, timer = true
489
490
  if (spikeSeg && want('spike')) segs.push(spikeSeg);
490
491
  if (harnessSeg && want('harness')) segs.push(harnessSeg);
491
492
  if (modelSeg && want('model')) segs.push(modelSeg);
493
+ // Delegation savings ride up front, next to the model that would otherwise
494
+ // have done the work. "Cache saved" stays at the tail: it is a lifetime brag
495
+ // stat, while this one is the point of the tool.
496
+ if (delegateSeg && want('delegated')) segs.push(delegateSeg);
492
497
  if (want('hit')) segs.push(hitSeg);
493
498
  if (want('ttl')) segs.push(ttlSeg);
494
499
  for (const { key, seg } of usageSegs) {
@@ -499,8 +504,6 @@ export function formatReport(data, { color = true, verbose = false, timer = true
499
504
  // it sits near the tail. The period label closes the line as a quiet
500
505
  // timeframe footer.
501
506
  if (want('saved')) segs.push(saveSeg);
502
- // Both savings numbers sit side by side, then the period label closes the line.
503
- if (delegateSeg && want('delegated')) segs.push(delegateSeg);
504
507
  if (want('period')) segs.push(periodSeg);
505
508
  // Trailing erase-to-end-of-line so any leftover characters from a previous
506
509
  // (longer) statusline render don't bleed into ours. \x1b[K is the standard