@mai0313/vibe-coding-tracker 2.6.4 → 2.7.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.md CHANGED
@@ -35,7 +35,7 @@ Stop wondering how much your AI coding sessions cost. Get **real-time cost track
35
35
 
36
36
  ### Ultra-Lightweight
37
37
 
38
- Built with Rust for minimal resource footprint. The interactive TUI dashboard typically sits at **under ~50 MB of resident memory** once the first refresh is done, even with hundreds of long-context sessions on disk — no Electron, no bloated runtimes. A compact process-local summary cache reparses only new or changed sources after the first scan, while dedicated scan workers and glibc allocator tuning keep long-running CPU and RSS honest.
38
+ Built with Rust for minimal resource footprint. The interactive TUI dashboard typically sits at **around 60 MB of resident memory** once the first refresh is done, even with thousands of sessions on disk — no Electron, no bloated runtimes. A persistent per-session ledger under `~/.vct/sessions/` means only new or changed sources are ever parsed again, even across runs, while dedicated scan workers and glibc allocator tuning keep long-running CPU and RSS honest.
39
39
 
40
40
  ### Beautiful Visualizations
41
41
 
@@ -305,6 +305,10 @@ Grok `usage` is one point-in-time local context estimate: vct records `signals.j
305
305
 
306
306
  For noninteractive `usage` and `analysis` scans, vct exits with an error when every discovered source fails. If only some sources fail, it keeps the successful results and prints one diagnostic summary to stderr. The TUI stays best-effort and preserves its last successful payload instead.
307
307
 
308
+ ### Session Ledger
309
+
310
+ Every `usage` and `analysis` scan reads and writes a per-session ledger under `~/.vct/sessions/` (one `<provider>.json` per assistant). A session that has not changed is never parsed twice, so one-shot runs and the dashboard's first paint only spend time on what changed. More importantly, a session stays in the ledger after its source is gone: when an assistant prunes its own history (Claude Code keeps 30 days by default) or a whole session directory such as `~/.claude/projects` is deleted, every total still includes it, and noninteractive runs print a one-line note saying how many sessions came from the ledger. A resumed session is re-read when its log changes. The ledger holds only per-day token counts and tool counters in each provider's own shape, never transcripts or prices, and vct never deletes it: an unreadable file is renamed aside and a file written by a newer vct is left alone. Delete the directory to start over from what is on disk. `vct analysis --json` and `vct analysis FILE` parse their files in full and do not use it.
311
+
308
312
  ### Live Quota Panels
309
313
 
310
314
  `vct usage` shows **live quota usage for Claude Code, Codex, GitHub Copilot, Cursor, and Grok right in the dashboard — with zero setup.** No status-line hook, no credentials to enter: vct reads each provider's own credentials, calls its usage API on a background thread, and keeps the panels current while you work. Every gauge is percent **used**, so a full bar means the window is spent, not untouched. (Prefer a quieter dashboard? Trim `panels` under `[usage.quota]` in [`config.toml`](#configuration), or set it to `[]` to hide the quota cards entirely. The per-provider cost line under the table is local scan data, not a quota panel, so it stays whatever you set here.)
package/README.zh-CN.md CHANGED
@@ -35,7 +35,7 @@
35
35
 
36
36
  ### 超轻量级
37
37
 
38
- 使用 Rust 构建, 资源占用极低. 交互式 TUI 面板完成首次刷新后, 常驻内存通常控制在 **约 50 MB 以内**, 即使磁盘上有数百个长 context session 文件也不例外. 首次扫描后, 精简的 process-local summary cache 只会重新解析新增或变更的 source, dedicated scan worker 与 glibc allocator 调整也能让长时间运行的 CPU 和 RSS 保持稳定.
38
+ 使用 Rust 构建, 资源占用极低. 交互式 TUI 面板完成首次刷新后, 常驻内存通常在 **60 MB 左右**, 即使磁盘上有数千个 session 文件也不例外. `~/.vct/sessions/` 下的 session 账本让每次运行都只需重新解析新增或变更的 source, dedicated scan worker 与 glibc allocator 调整也能让长时间运行的 CPU 和 RSS 保持稳定.
39
39
 
40
40
  ### 精美的可视化
41
41
 
@@ -305,6 +305,10 @@ Grok 的 `usage` 是单一时点的本地 context 估算:vct 会把 `signals.j
305
305
 
306
306
  对于非交互式 `usage` 与 `analysis` 扫描, 如果所有找到的 source 都失败, vct 会以错误结束. 如果只有部分 source 失败, vct 会保留成功的结果, 并向 stderr 打印一则诊断摘要. TUI 则保持 best-effort, 并保留上一次成功的 payload.
307
307
 
308
+ ### Session 账本
309
+
310
+ 每次 `usage` 与 `analysis` 扫描都会读写 `~/.vct/sessions/` 下的 session 账本(每个助手一个 `<provider>.json`)。没有变动的 session 不会被解析第二次,所以一次性运行与面板的首次加载只需处理有变动的部分。更重要的是,来源消失后 session 仍会留在账本里:当助手清掉自己的历史(Claude Code 默认只保留 30 天),或整个 session 目录(例如 `~/.claude/projects`)被删除时,所有汇总仍会把它们算进去,非交互式运行也会打印一行说明有多少 session 来自账本。继续对话的 session 会在日志变动时重新读取。账本只保存每日的 token 数与工具计数(沿用各 provider 自己的字段形状),不存对话内容也不存价格,而且 vct 永远不会删除它:读不了的文件会改名放在旁边,较新版 vct 写的文件则原封不动。想从磁盘现状重新开始,删掉这个目录即可。`vct analysis --json` 与 `vct analysis FILE` 会完整解析文件,不使用账本。
311
+
308
312
  ### 实时额度面板
309
313
 
310
314
  `vct usage` 会**在仪表盘中直接显示 Claude Code、Codex、GitHub Copilot、Cursor 与 Grok 的实时额度用量——完全零配置。** 不需要 status-line hook,也无需手动输入任何凭证:vct 会读取各 provider 自己的 OAuth 凭证,在后台线程调用其用量 API,并在你工作时保持面板持续更新。每个进度条都是**已用**百分比,所以进度条满格代表该额度周期已耗尽,而不是还没开始用。(想要更清爽的面板?在 [`config.toml`](#%E9%85%8D%E7%BD%AE) 中精简 `[usage.quota]` 下的 `panels`,或设为 `[]` 隐藏所有额度卡片。表格下方那行各 provider 成本是本机扫描数据而不是额度面板,所以不受这里的设置影响。)
package/README.zh-TW.md CHANGED
@@ -35,7 +35,7 @@
35
35
 
36
36
  ### 超輕量
37
37
 
38
- 以 Rust 打造, 資源佔用極低. 互動式 TUI 儀表板完成首次刷新後通常維持在 **~50 MB 以內的常駐記憶體**, 即使硬碟上有數百個長 context session 也一樣. 首次掃描後, 精簡的 process-local summary cache 只會重新解析新增或變更的 source, dedicated scan worker 與 glibc allocator 調整也能讓長時間執行時的 CPU 和 RSS 維持穩定.
38
+ 以 Rust 打造, 資源佔用極低. 互動式 TUI 儀表板完成首次刷新後通常維持在 **60 MB 左右的常駐記憶體**, 即使硬碟上有數千個 session 也一樣. `~/.vct/sessions/` 底下的 session 帳本讓每次執行都只需重新解析新增或變更的 source, dedicated scan worker 與 glibc allocator 調整也能讓長時間執行時的 CPU 和 RSS 維持穩定.
39
39
 
40
40
  ### 精美視覺化
41
41
 
@@ -305,6 +305,10 @@ Grok 的 `usage` 是單一當下的本地 context 估算:vct 會把 `signals.j
305
305
 
306
306
  對於非互動式 `usage` 與 `analysis` 掃描, 如果所有找到的 source 都失敗, vct 會回傳錯誤. 如果只有部分 source 失敗, vct 會保留成功的結果, 並向 stderr 印出一則診斷摘要. TUI 則保持 best-effort, 並保留上一次成功的 payload.
307
307
 
308
+ ### Session 帳本
309
+
310
+ 每次 `usage` 與 `analysis` 掃描都會讀寫 `~/.vct/sessions/` 底下的 session 帳本(每個助手一個 `<provider>.json`)。沒有變動的 session 不會被解析第二次,所以一次性執行與儀表板的首次載入只需處理有變動的部分。更重要的是,來源消失後 session 仍會留在帳本裡:當助手清掉自己的歷史(Claude Code 預設只保留 30 天),或整個 session 目錄(例如 `~/.claude/projects`)被刪除時,所有總計仍會把它們算進去,非互動式執行也會印出一行說明有多少 session 來自帳本。繼續對話的 session 會在紀錄檔變動時重新讀取。帳本只保存每日的 token 數與工具計數(沿用各 provider 自己的欄位形狀),不存對話內容也不存價格,而且 vct 永遠不會刪除它:讀不了的檔案會改名放在旁邊,較新版 vct 寫的檔案則原封不動。想從磁碟現況重新開始,刪掉這個目錄即可。`vct analysis --json` 與 `vct analysis FILE` 會完整解析檔案,不使用帳本。
311
+
308
312
  ### 即時額度面板
309
313
 
310
314
  `vct usage` 會**在儀表板中直接顯示 Claude Code、Codex、GitHub Copilot、Cursor 與 Grok 的即時額度用量——完全零設定。** 不需要 status-line hook,也不需要手動輸入憑證:vct 會讀取各 provider 自己的 OAuth 憑證,在背景執行緒呼叫其用量 API,並在你工作時讓面板保持最新。每個進度條都是**已用**百分比,所以進度條滿格代表該額度週期已用盡,而不是還沒開始用。(想要更清爽的儀表板嗎?在 [`config.toml`](#%E8%A8%AD%E5%AE%9A) 中精簡 `[usage.quota]` 下的 `panels`,或設為 `[]` 隱藏所有額度卡片。表格下方那行各 provider 成本是本機掃描資料而不是額度面板,所以不受這裡的設定影響。)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mai0313/vibe-coding-tracker",
3
- "version": "2.6.4",
3
+ "version": "2.7.1",
4
4
  "description": "Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results",
5
5
  "author": "Wei Lee <mai@mai0313.com>",
6
6
  "license": "MIT",