claude-token-saver 3.12.0 → 3.12.1
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 +4 -1
- package/README.md +4 -1
- package/package.json +1 -1
- package/src/formatters/statusline.js +12 -6
package/README.en.md
CHANGED
|
@@ -301,8 +301,11 @@ Also update `statusLine.command` in `~/.claude/settings.json` to `claude-token-s
|
|
|
301
301
|
|
|
302
302
|
## Release notes
|
|
303
303
|
|
|
304
|
+
### v3.12.1 (2026-08-22)
|
|
305
|
+
- **Routing-savings headline reads more clearly** — the amounts are now in the savings green (the one unambiguously good number on the line), `wk`/`mo`/`all` are spelled out as `weekly`/`monthly`/`total`, and the period now leads the amount. Three bare amounts in a row read as a single number until the eye found the trailing marker.
|
|
306
|
+
|
|
304
307
|
### v3.12.0 (2026-08-22)
|
|
305
|
-
- **Routing saved now leads the statusline with weekly / monthly / lifetime totals** — `🔀 Routing saved $1.3
|
|
308
|
+
- **Routing saved now leads the statusline with weekly / monthly / lifetime totals** — `🔀 Routing saved weekly $1.3 · monthly $2.0 · total $9.8`. Each delegated subagent run's saving is recorded in a ledger (`delegation-ledger.json`) keyed by its transcript path, so overlapping re-scans upsert instead of double-counting; the statusline sums 7-day, 30-day, and lifetime windows on line 1 while the other chips move to line 2. An empty ledger keeps the legacy one-line layout, and `--single-line` forces it (some macOS Claude Code builds render only the first line). Totals start accruing from the release — no back-fill.
|
|
306
309
|
- **`harness check` reports context weight** — the approximate per-request token cost of CLAUDE.md (warns over the ~4k guideline) and whether a `.claudeignore` exists. Advisory only; the 🅷 N/5 score is unaffected.
|
|
307
310
|
- **Self-describing ARNs resolve without learning** — `foundation-model/anthropic.claude-…` and system cross-region profiles (`inference-profile/us.anthropic.claude-…`) embed the model id yet resolved to `unknown`, dropping delegation and cost aggregation entirely on gateway machines that hadn't accumulated learning samples. They now pass straight to the existing tier classifier; opaque application-profile ids keep the override/learning path.
|
|
308
311
|
|
package/README.md
CHANGED
|
@@ -257,8 +257,11 @@ npm uninstall -g claude-cache-monitor && npm i -g claude-token-saver
|
|
|
257
257
|
|
|
258
258
|
## 릴리스 노트
|
|
259
259
|
|
|
260
|
+
### v3.12.1 (2026-08-22)
|
|
261
|
+
- **라우팅 절감 헤드라인의 가독성 정리** — 금액을 절감 녹색으로 칠하고(그 줄에서 유일하게 명확한 호재입니다), `wk`·`mo`·`all` 축약을 `weekly`·`monthly`·`total`로 풀었으며, 금액이 앞서던 순서를 뒤집어 기간이 먼저 오게 했습니다. 금액 셋이 연달아 나오면 뒤따르는 기간 표시를 찾기 전까지 한 덩어리로 읽혔습니다.
|
|
262
|
+
|
|
260
263
|
### v3.12.0 (2026-08-22)
|
|
261
|
-
- **Routing saved가 주간·월간·누적으로 statusline 1줄째에 올라옵니다** — `🔀 Routing saved $1.3
|
|
264
|
+
- **Routing saved가 주간·월간·누적으로 statusline 1줄째에 올라옵니다** — `🔀 Routing saved weekly $1.3 · monthly $2.0 · total $9.8`. 위임 절감 이벤트를 서브에이전트 run 단위로 원장(`delegation-ledger.json`)에 기록하고(트랜스크립트 경로 키라 재스캔이 겹쳐도 중복 집계 없음), 7일·30일·전체 합산을 표시합니다. 나머지 칩은 2줄째로 내려갑니다. 원장이 비어 있으면 기존 1줄 그대로이고, 일부 환경(macOS 구버전 Claude Code)에서 첫 줄만 보이면 `--single-line`으로 기존 레이아웃을 유지할 수 있습니다. 집계는 원장 도입 시점부터 시작합니다(소급 없음).
|
|
262
265
|
- **`harness check`가 컨텍스트 무게도 알려줍니다** — CLAUDE.md의 요청당 대략 토큰(~4k 가이드라인 초과 시 경고)과 `.claudeignore` 유무를 표시합니다. 자문 정보일 뿐 🅷 N/5 점수에는 반영하지 않습니다.
|
|
263
266
|
- **모델명이 내장된 ARN은 학습 없이 즉시 해석** — `foundation-model/anthropic.claude-…`와 시스템 교차 리전 프로파일(`inference-profile/us.anthropic.claude-…`)은 자원 ID가 곧 모델명인데도 `unknown`으로 떨어져, 학습 표본이 쌓이기 전의 게이트웨이 환경에서 위임·비용 집계가 통째로 빠졌습니다. 이제 즉시 기존 티어 분류로 넘깁니다. 불투명한 application-profile ID는 종전대로 오버라이드/학습 경로입니다.
|
|
264
267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.1",
|
|
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": {
|
|
@@ -277,19 +277,25 @@ export function formatReport(data, { color = true, verbose = false, timer = true
|
|
|
277
277
|
// Routing-totals headline line (multi-line layout). Week/month/lifetime
|
|
278
278
|
// sums from the delegation ledger — the number the whole tool exists to
|
|
279
279
|
// grow, so it gets line 1 to itself while the diagnostics move to line 2.
|
|
280
|
-
// icon: "🔀 Routing saved $1.2
|
|
281
|
-
// text: "Routing saved $1.2
|
|
280
|
+
// icon: "🔀 Routing saved weekly $1.2 · monthly $3.4 · total $9.8"
|
|
281
|
+
// text: "Routing saved weekly $1.2 · monthly $3.4 · total $9.8"
|
|
282
282
|
const totals = data.delegationTotals;
|
|
283
283
|
let totalsLine = null;
|
|
284
284
|
if (!singleLine && totals && Number(totals.total) > 0) {
|
|
285
|
+
// Money is green throughout — it is saved cost, the one number on the
|
|
286
|
+
// line that is unambiguously good news. The period markers stay gray so
|
|
287
|
+
// the eye lands on the amounts, not on "wk / mo / all".
|
|
288
|
+
// Period first, amount second — three bare amounts in a row read as one
|
|
289
|
+
// number until the eye finds the trailing marker, so the label leads and
|
|
290
|
+
// the green amount answers it.
|
|
285
291
|
const part = (usd, label) =>
|
|
286
|
-
`${
|
|
292
|
+
`${c(GRAY)}${label}${c(RESET)} ${c(GREEN)}${formatMoney(Number(usd) || 0)}${c(RESET)}`;
|
|
287
293
|
const head = isIcon ? '🔀 Routing saved' : 'Routing saved';
|
|
288
294
|
totalsLine =
|
|
289
295
|
`${c(GREEN)}${c(BOLD)}${head}${c(RESET)} ` +
|
|
290
|
-
`${part(totals.week, '
|
|
291
|
-
`${part(totals.month, '
|
|
292
|
-
`${part(totals.total, '
|
|
296
|
+
`${part(totals.week, 'weekly')} ${c(GRAY)}·${c(RESET)} ` +
|
|
297
|
+
`${part(totals.month, 'monthly')} ${c(GRAY)}·${c(RESET)} ` +
|
|
298
|
+
`${part(totals.total, 'total')}`;
|
|
293
299
|
}
|
|
294
300
|
|
|
295
301
|
// Period label honors hour-precision configs (`mode 6h` → "6h", `mode 1d` → "1d").
|