@mai0313/vibe-coding-tracker 2.5.1 → 2.6.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
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
22
+ **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, and DeepSeek Harness usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@ Choose your preferred view:
48
48
 
49
49
  ### Zero Configuration
50
50
 
51
- Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
51
+ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, and DeepSeek Harness. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
52
52
 
53
53
  ### Rich Insights
54
54
 
@@ -62,15 +62,15 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
62
62
 
63
63
  ## Key Features
64
64
 
65
- | Feature | Description |
66
- | --------------------- | ------------------------------------------------------------------------ |
67
- | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok |
68
- | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
- | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
- | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
- | **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, and Grok |
72
- | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, compact incremental scans — built with Rust |
73
- | **Live Updates** | Responsive loading and background refreshes with change highlighting |
65
+ | Feature | Description |
66
+ | --------------------- | ----------------------------------------------------------------------------------------- |
67
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, and DeepSeek Harness |
68
+ | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
+ | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
+ | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
+ | **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, and Grok |
72
+ | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, compact incremental scans — built with Rust |
73
+ | **Live Updates** | Responsive loading and background refreshes with change highlighting |
74
74
 
75
75
  ---
76
76
 
@@ -285,7 +285,7 @@ Totals (by Provider)
285
285
  ]
286
286
  ```
287
287
 
288
- Every row serializes the same flat token fields regardless of provider (Codex's internal nested shape is normalized before output).
288
+ Every row serializes the same flat token fields regardless of provider (Codex's internal nested shape is normalized before output). A provider that bills a bucket the others don't have adds its own key: a Gemini row that spent tool tokens carries `tool_tokens`, which LiteLLM has no rate for and which are counted in `total_tokens` alone.
289
289
 
290
290
  ### What It Scans
291
291
 
@@ -299,6 +299,7 @@ The tool automatically scans these directories:
299
299
  - `~/.cursor/chats/*/*/store.db` (Cursor — SQLite chat stores, used for `analysis` and a local `usage` estimate consistent with the other providers)
300
300
  - `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
301
301
  - `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
302
+ - `$DSH_HOME/sessions/*/*/session.jsonl.zstd` (DeepSeek Harness — defaults to `~/.dsh`; a root configured with `compression = "none"` writes `session.jsonl` instead, and both are read)
302
303
 
303
304
  Grok `usage` is one point-in-time local context estimate: vct records `signals.json`'s `contextTokensUsed` as cache-read tokens and estimates cost at the model's cache-read price. It is not cumulative billed usage. `analysis` reconstructs completed Read / Write / Edit / Bash / TodoWrite operations from the sibling `updates.jsonl`. For your actual billed allowance, see the Grok quota panel below.
304
305
 
@@ -347,7 +348,7 @@ A panel appears only for a provider whose credentials are present. Panels are pl
347
348
  | `--json` | Complete parser results as JSON: one object for `<FILE>`, otherwise an array of objects |
348
349
  | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter for all-session analysis (see table above; not accepted with `<FILE>`) |
349
350
 
350
- See [`tests/fixtures/sessions/`](tests/fixtures/sessions/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/).
351
+ See [`tests/fixtures/sessions/`](tests/fixtures/sessions/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) and the DeepSeek Harness one under [`tests/fixtures/sessions/dsh/`](tests/fixtures/sessions/dsh/).
351
352
 
352
353
  ### Basic Usage
353
354
 
@@ -467,7 +468,7 @@ At startup, vct silently checks for a newer release at most once per UTC day. A
467
468
 
468
469
  After a Unix update, vct re-executes the current command with the new binary. On Windows, the current command finishes and a helper applies the replacement afterwards. The automatic path never modifies installs from cargo, npm, PyPI, a distro package, or an unmarked manual or development build. Update those through their package manager instead. To add automatic updates to an existing direct install, run the current official installer once more so it creates the marker.
469
470
 
470
- Set `general.auto_update = false` in `~/.vct/config.toml` to disable startup checks and automatic updates. The explicit `vct update` command retains its existing manual behavior.
471
+ Set `general.auto_update = false` in `~/.vct/config.toml` to disable startup checks and automatic updates. The explicit `vct update` command retains its existing manual behavior. `VCT_OFFLINE=1` also applies to it: `--check`, the interactive prompt, and `--force` alike return without contacting GitHub.
471
472
 
472
473
  ### Basic Usage
473
474
 
@@ -605,6 +606,7 @@ opencode = true
605
606
  cursor = true
606
607
  hermes = true
607
608
  grok = true
609
+ dsh = true
608
610
 
609
611
  [logging]
610
612
  # Minimum level written to ~/.vct/logs/vct-YYYY-MM-DD.log.
@@ -679,10 +681,11 @@ Generic placeholder names (e.g. `default`, what cursor-agent records for auto-mo
679
681
 
680
682
  ### Cost Details
681
683
 
682
- - **Context tiers are per request**: LiteLLM's "above Nk tokens" rates (e.g. GPT-5.x above 272k, Gemini above 200k) apply only to requests whose own prompt context crossed the threshold. Providers without per-request granularity — and offline scans — bill at base rates, so tiered-model costs are a lower bound there.
684
+ - **Context tiers are per request**: LiteLLM's "above Nk tokens" rates (e.g. GPT-5.x above 272k, Gemini above 200k) and its Qwen / doubao volume rows alike apply only to requests whose own prompt context crossed the boundary — never to a whole scan's token sum. Each request bills at whichever of the model's published rows its own context reached, so a model priced in four bands charges its top band for the requests that got there. Providers without per-request granularity — and offline scans — bill at the lowest rate, so tiered-model costs are a lower bound there.
683
685
  - **Beyond tokens**: Claude web-search tool calls (`server_tool_use.web_search_requests`) are billed per query on top of the token cost; every other model's per-query charge is $0.
684
686
  - **OpenCode**: a novel model name is priced from its tokens only on an **exact** LiteLLM match; with no exact match, vct trusts the assistant message's own stored cost instead of guessing from a loosely-similar name.
685
687
  - **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
688
+ - **DeepSeek Harness**: `dsh` records no cost of its own, so every model is priced from LiteLLM through the same lookup chain as the other file-based providers — there is no stored-cost fallback like OpenCode's or Hermes's. It routes to whatever the deployment configures, so expect deployment-defined model names, which land at $0 when nothing in LiteLLM matches.
686
689
  - **Grok**: `contextTokensUsed` is priced as cache-read tokens only (falling back to the input rate when the model publishes no cache-read price); this is a point-in-time local context estimate, not cumulative billed usage.
687
690
  - **Cache is raw**: the daily cache stores the filtered upstream LiteLLM JSON (not a derived shape), so tiered / batch pricing stays available without re-fetching, and each pricing map owns a small in-process LRU so repeated lookups stay cheap without cross-map contamination.
688
691
 
package/README.zh-CN.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **实时追踪你的 AI 编程开销。** Vibe Coding Tracker 是一款基于 Rust 构建的轻量级高性能 CLI 工具,用于监控和分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 和 Grok 上的使用情况——提供详细的费用明细、token 统计和代码操作洞察,同时保持极低的内存占用。
22
+ **实时追踪你的 AI 编程开销。** Vibe Coding Tracker 是一款基于 Rust 构建的轻量级高性能 CLI 工具,用于监控和分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 和 DeepSeek Harness 上的使用情况——提供详细的费用明细、token 统计和代码操作洞察,同时保持极低的内存占用。
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  ### 零配置
50
50
 
51
- 自动检测并处理来自 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 和 Grok 的日志。无需任何设置——直接运行即可分析。首次运行时会自动生成一个带有合理默认值的 `~/.vct/config.toml`,方便你日后想调整行为时使用(参见 [配置](#%E9%85%8D%E7%BD%AE))。
51
+ 自动检测并处理来自 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 和 DeepSeek Harness 的日志。无需任何设置——直接运行即可分析。首次运行时会自动生成一个带有合理默认值的 `~/.vct/config.toml`,方便你日后想调整行为时使用(参见 [配置](#%E9%85%8D%E7%BD%AE))。
52
52
 
53
53
  ### 丰富的洞察
54
54
 
@@ -62,15 +62,15 @@
62
62
 
63
63
  ## 核心特性
64
64
 
65
- | 特性 | 说明 |
66
- | ---------------- | --------------------------------------------------------------------- |
67
- | **多供应商支持** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 和 Grok |
68
- | **智能定价** | 模糊模型匹配 + 从 LiteLLM 每日缓存更新 |
69
- | **4 种显示模式** | 交互式 TUI、静态表格、纯文本和 JSON |
70
- | **双维度分析** | token/费用统计(`usage`)+ 代码操作统计(`analysis`) |
71
- | **实时额度面板** | Claude、Codex、Copilot、Cursor 和 Grok 的实时额度用量 |
72
- | **超轻量级** | TUI 常驻内存 50 MB 以内、精简的 incremental scan, 基于 Rust 构建 |
73
- | **实时更新** | 响应式 loading 与后台 refresh, 并高亮变化 |
65
+ | 特性 | 说明 |
66
+ | ---------------- | --------------------------------------------------------------------------------------- |
67
+ | **多供应商支持** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 和 DeepSeek Harness |
68
+ | **智能定价** | 模糊模型匹配 + 从 LiteLLM 每日缓存更新 |
69
+ | **4 种显示模式** | 交互式 TUI、静态表格、纯文本和 JSON |
70
+ | **双维度分析** | token/费用统计(`usage`)+ 代码操作统计(`analysis`) |
71
+ | **实时额度面板** | Claude、Codex、Copilot、Cursor 和 Grok 的实时额度用量 |
72
+ | **超轻量级** | TUI 常驻内存 50 MB 以内、精简的 incremental scan, 基于 Rust 构建 |
73
+ | **实时更新** | 响应式 loading 与后台 refresh, 并高亮变化 |
74
74
 
75
75
  ---
76
76
 
@@ -285,7 +285,7 @@ Totals (by Provider)
285
285
  ]
286
286
  ```
287
287
 
288
- 无论来源 provider 是什么,每一行都会输出相同的扁平 token 字段(Codex 内部的嵌套结构会在输出前规范化)。
288
+ 无论来源 provider 是什么,每一行都会输出相同的扁平 token 字段(Codex 内部的嵌套结构会在输出前规范化)。若某个 provider 计费的 bucket 是其他 provider 没有的,该行会额外带上自己的 key:实际用掉 tool token 的 Gemini 行会带 `tool_tokens`,LiteLLM 没有对应费率,只计入 `total_tokens`。
289
289
 
290
290
  ### 扫描范围
291
291
 
@@ -299,6 +299,7 @@ Totals (by Provider)
299
299
  - `~/.cursor/chats/*/*/store.db`(Cursor,SQLite 会话库,用于 `analysis`,并给出一个与其他 provider 一致的本地 `usage` 估算)
300
300
  - `~/.hermes/state.db`(Hermes,SQLite 数据库,遵循 `$HERMES_HOME`;仅 `usage`)
301
301
  - `$GROK_HOME/sessions/*/*/signals.json`(Grok CLI,默认使用 `~/.grok`;同层的 `updates.jsonl` 提供 `analysis` 数据)
302
+ - `$DSH_HOME/sessions/*/*/session.jsonl.zstd`(DeepSeek Harness,默认使用 `~/.dsh`;若该 root 配置为 `compression = "none"` 则写成 `session.jsonl`,两种都会读取)
302
303
 
303
304
  Grok 的 `usage` 是单一时点的本地 context 估算:vct 会把 `signals.json` 的 `contextTokensUsed` 记为 cache-read token,并按该 model 的 cache-read 费率估算费用。这不是累计的 billed usage。`analysis` 会从同层的 `updates.jsonl` 还原已完成的 Read / Write / Edit / Bash / TodoWrite 操作。至于你实际计费的额度,请参见下方的 Grok 额度面板。
304
305
 
@@ -347,7 +348,7 @@ Grok 的 `usage` 是单一时点的本地 context 估算:vct 会把 `signals.j
347
348
  | `--json` | 完整 parser 结果. 搭配 `<FILE>` 时为单一 object, 否则为 object 数组 |
348
349
  | `--daily` / `--weekly` / `--monthly` / `--all` | 所有 session 的时间范围筛选. 不可与 `<FILE>` 同时使用, 其他说明见上方表格 |
349
350
 
350
- 参见 [`tests/fixtures/sessions/`](tests/fixtures/sessions/) 目录,其中包含四种 JSONL provider 的示例输入与对应 JSON 输出,以及 [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) 下的 Grok session fixture。
351
+ 参见 [`tests/fixtures/sessions/`](tests/fixtures/sessions/) 目录,其中包含四种 JSONL provider 的示例输入与对应 JSON 输出,以及 [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) 下的 Grok session fixture 和 [`tests/fixtures/sessions/dsh/`](tests/fixtures/sessions/dsh/) 下的 DeepSeek Harness session fixture。
351
352
 
352
353
  ### 基本用法
353
354
 
@@ -467,7 +468,7 @@ vct 启动时每天 UTC 日期最多检查一次新版. 只有通过官方 `scri
467
468
 
468
469
  Unix 应用更新后, vct 会用新版 binary 重新执行当前命令. Windows 会先让当前命令结束, 再由 helper 应用替换. 自动流程绝不会修改通过 cargo, npm, PyPI, distro package 安装的版本, 也不会修改没有 marker 的手动安装或 development build. 请通过相应的 package manager 更新. 现有直接安装只要再运行一次当前官方 installer, 就会创建 marker 并启用自动更新.
469
470
 
470
- 在 `~/.vct/config.toml` 中设置 `general.auto_update = false` 可以关闭启动检查和自动更新. 显式执行的 `vct update` 会保留原有手动行为.
471
+ 在 `~/.vct/config.toml` 中设置 `general.auto_update = false` 可以关闭启动检查和自动更新. 显式执行的 `vct update` 会保留原有手动行为. `VCT_OFFLINE=1` 对它同样有效: `--check`, 交互式确认和 `--force` 都会直接返回, 不会连接 GitHub.
471
472
 
472
473
  ### 基本用法
473
474
 
@@ -604,6 +605,7 @@ opencode = true
604
605
  cursor = true
605
606
  hermes = true
606
607
  grok = true
608
+ dsh = true
607
609
 
608
610
  [logging]
609
611
  # 写入 ~/.vct/logs/vct-YYYY-MM-DD.log 的最低日志级别。
@@ -678,10 +680,11 @@ vct config migrate
678
680
 
679
681
  ### 费用细节
680
682
 
681
- - **Context tier 按单个 request 计**:LiteLLM 的「above Nk tokens」费率(如 GPT-5.x 超过 272k、Gemini 超过 200k)只应用在自身 prompt context 超过阈值的那些 request 上。没有 per-request 粒度的 provider(以及离线扫描)一律按基础费率计价,因此这类 model 的费用是下界。
683
+ - **Context tier 按单个 request 计**:LiteLLM 的「above Nk tokens」费率(如 GPT-5.x 超过 272k、Gemini 超过 200k)与 Qwen / doubao 的用量级距同样只应用在自身 prompt context 超过分界的那些 request 上,不会应用到整次扫描的 token 总和。每个 request 会落在自身 context 实际到达的那一级费率上,因此一个分成四级的 model 对真的到达最高级的 request 就按最高级计价。没有 per-request 粒度的 provider(以及离线扫描)一律按最低一级的费率计价,因此这类 model 的费用是下界。
682
684
  - **不止 token**:Claude 的 web-search 工具调用(`server_tool_use.web_search_requests`)会在 token 费用之外按每次查询计费;其他所有 model 的每次查询费用均为 $0。
683
685
  - **OpenCode**:只有在 LiteLLM 上**精确**匹配时,才会根据 token 为一个全新的 model 名称定价;若没有精确匹配,vct 会信任该 assistant message 自身存储的费用,而不是从一个只是大致相似的名称去猜测。
684
686
  - **Hermes**:与 OpenCode 相同,LiteLLM 上**精确**匹配时按 token 定价,否则使用 Hermes 自身存储的费用。
687
+ - **DeepSeek Harness**:`dsh` 本身不记录任何费用,因此全部经由与其他 file-based provider 相同的查找链依 LiteLLM 计价,没有 OpenCode 或 Hermes 那样的 stored cost 兜底。它会路由到部署方配置的任意 provider,因此部署自定义的 model 名称很常见;LiteLLM 完全比对不到时费用为 $0。
685
688
  - **Grok**:只会把 `contextTokensUsed` 作为 cache-read token 计价(若该 model 未公布 cache-read 费率则改用 input 费率);这是单一时点的本地 context 估算,不是累计的 billed usage。
686
689
  - **缓存为原始数据**: 每日 cache 保存经过筛选的 LiteLLM 上游原始 JSON (而非派生结构), 因此 tiered / batch 定价无需重新获取即可使用. 每个 pricing map 各自拥有一个小型 process-local LRU, 重复查找保持低开销, 也不会在不同 map 之间互相污染.
687
690
 
package/README.zh-TW.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **即時追蹤你的 AI 程式設計花費。** Vibe Coding Tracker 是一款以 Rust 打造的輕量、高效能 CLI 工具,能監控與分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 及 Grok 的使用狀況——提供詳細的費用明細、token 統計資料與程式碼操作分析,同時維持極低的記憶體使用量。
22
+ **即時追蹤你的 AI 程式設計花費。** Vibe Coding Tracker 是一款以 Rust 打造的輕量、高效能 CLI 工具,能監控與分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 及 DeepSeek Harness 的使用狀況——提供詳細的費用明細、token 統計資料與程式碼操作分析,同時維持極低的記憶體使用量。
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  ### 零設定
50
50
 
51
- 自動偵測並處理 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 及 Grok 的日誌檔。不需要任何設定——直接執行就能分析。首次執行時會以合理的預設值建立 `~/.vct/config.toml`,日後若想微調行為即可編輯它(見 [設定](#%E8%A8%AD%E5%AE%9A))。
51
+ 自動偵測並處理 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 及 DeepSeek Harness 的日誌檔。不需要任何設定——直接執行就能分析。首次執行時會以合理的預設值建立 `~/.vct/config.toml`,日後若想微調行為即可編輯它(見 [設定](#%E8%A8%AD%E5%AE%9A))。
52
52
 
53
53
  ### 豐富洞察
54
54
 
@@ -62,15 +62,15 @@
62
62
 
63
63
  ## 主要功能
64
64
 
65
- | 功能 | 說明 |
66
- | ---------------- | --------------------------------------------------------------------- |
67
- | **多供應商支援** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes 及 Grok |
68
- | **智慧定價** | 模糊模型比對 + 每日從 LiteLLM cache 更新 |
69
- | **4 種顯示模式** | 互動式 TUI、靜態表格、純文字及 JSON |
70
- | **雙重分析** | Token / 費用統計(`usage`)+ 程式碼操作統計(`analysis`) |
71
- | **即時額度面板** | 即時顯示 Claude、Codex、Copilot、Cursor 與 Grok 的額度用量 |
72
- | **超輕量** | TUI 常駐記憶體 ~50 MB 以內、精簡的 incremental scan, 以 Rust 打造 |
73
- | **即時更新** | 響應式 loading 與背景 refresh, 並突顯變更 |
65
+ | 功能 | 說明 |
66
+ | ---------------- | --------------------------------------------------------------------------------------- |
67
+ | **多供應商支援** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor、Hermes、Grok 及 DeepSeek Harness |
68
+ | **智慧定價** | 模糊模型比對 + 每日從 LiteLLM cache 更新 |
69
+ | **4 種顯示模式** | 互動式 TUI、靜態表格、純文字及 JSON |
70
+ | **雙重分析** | Token / 費用統計(`usage`)+ 程式碼操作統計(`analysis`) |
71
+ | **即時額度面板** | 即時顯示 Claude、Codex、Copilot、Cursor 與 Grok 的額度用量 |
72
+ | **超輕量** | TUI 常駐記憶體 ~50 MB 以內、精簡的 incremental scan, 以 Rust 打造 |
73
+ | **即時更新** | 響應式 loading 與背景 refresh, 並突顯變更 |
74
74
 
75
75
  ---
76
76
 
@@ -285,7 +285,7 @@ Totals (by Provider)
285
285
  ]
286
286
  ```
287
287
 
288
- 無論來源 provider 為何,每一列都會輸出相同的扁平 token 欄位(Codex 內部的巢狀結構會在輸出前正規化)。
288
+ 無論來源 provider 為何,每一列都會輸出相同的扁平 token 欄位(Codex 內部的巢狀結構會在輸出前正規化)。若某個 provider 計費的 bucket 是其他 provider 沒有的,該列會額外帶上自己的 key:實際用掉 tool token 的 Gemini 列會帶 `tool_tokens`,LiteLLM 沒有對應費率,只計入 `total_tokens`。
289
289
 
290
290
  ### 掃描範圍
291
291
 
@@ -299,6 +299,7 @@ Totals (by Provider)
299
299
  - `~/.cursor/chats/*/*/store.db`(Cursor,SQLite 對話庫,用於 `analysis`,並產生與其他 provider 一致的本地 `usage` 估算)
300
300
  - `~/.hermes/state.db`(Hermes,SQLite 資料庫,遵循 `$HERMES_HOME`;僅 `usage`)
301
301
  - `$GROK_HOME/sessions/*/*/signals.json`(Grok CLI,預設使用 `~/.grok`;同層的 `updates.jsonl` 提供 `analysis` 資料)
302
+ - `$DSH_HOME/sessions/*/*/session.jsonl.zstd`(DeepSeek Harness,預設使用 `~/.dsh`;若該 root 設定為 `compression = "none"` 則寫成 `session.jsonl`,兩種都會讀取)
302
303
 
303
304
  Grok 的 `usage` 是單一當下的本地 context 估算:vct 會把 `signals.json` 的 `contextTokensUsed` 記為 cache-read token,並以該 model 的 cache-read 費率估算費用。這不是累計的 billed usage。`analysis` 會從同層的 `updates.jsonl` 還原已完成的 Read / Write / Edit / Bash / TodoWrite 操作。想知道實際計費的額度用量,請參考下方的 Grok 額度面板。
304
305
 
@@ -347,7 +348,7 @@ Grok 的 `usage` 是單一當下的本地 context 估算:vct 會把 `signals.j
347
348
  | `--json` | 完整 parser 結果. 搭配 `<FILE>` 時為單一 object, 否則為 object 陣列 |
348
349
  | `--daily` / `--weekly` / `--monthly` / `--all` | 所有 session 的時間範圍篩選. 不可與 `<FILE>` 同時使用, 其他說明見上方表格 |
349
350
 
350
- 請參考 [`tests/fixtures/sessions/`](tests/fixtures/sessions/) 目錄,裡面有四種 JSONL provider 的範例輸入與對應的 JSON 輸出,以及 [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) 下的 Grok session fixture。
351
+ 請參考 [`tests/fixtures/sessions/`](tests/fixtures/sessions/) 目錄,裡面有四種 JSONL provider 的範例輸入與對應的 JSON 輸出,以及 [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) 下的 Grok session fixture 與 [`tests/fixtures/sessions/dsh/`](tests/fixtures/sessions/dsh/) 下的 DeepSeek Harness session fixture。
351
352
 
352
353
  ### 基本用法
353
354
 
@@ -467,7 +468,7 @@ vct 啟動時最多每天 UTC 日期檢查一次新版. 只有透過官方 `scri
467
468
 
468
469
  Unix 套用更新後, vct 會用新版 binary 重新執行目前指令. Windows 則會讓目前指令結束, 再由 helper 套用替換. 自動流程絕不會修改透過 cargo, npm, PyPI, distro package 安裝的版本, 或沒有 marker 的手動與 development build. 請透過對應 package manager 更新. 既有的直接安裝只要再執行一次目前的官方 installer, 就會建立 marker 並啟用自動更新.
469
470
 
470
- 在 `~/.vct/config.toml` 設定 `general.auto_update = false` 可關閉啟動檢查與自動更新. 明確執行的 `vct update` 會保留原有的手動行為.
471
+ 在 `~/.vct/config.toml` 設定 `general.auto_update = false` 可關閉啟動檢查與自動更新. 明確執行的 `vct update` 會保留原有的手動行為. `VCT_OFFLINE=1` 對它同樣有效: `--check`, 互動式確認與 `--force` 都會直接返回, 不會連線到 GitHub.
471
472
 
472
473
  ### 基本用法
473
474
 
@@ -604,6 +605,7 @@ opencode = true
604
605
  cursor = true
605
606
  hermes = true
606
607
  grok = true
608
+ dsh = true
607
609
 
608
610
  [logging]
609
611
  # 寫入 ~/.vct/logs/vct-YYYY-MM-DD.log 的最低日誌等級。
@@ -678,10 +680,11 @@ vct config migrate
678
680
 
679
681
  ### 費用細節
680
682
 
681
- - **Context tier 以單一 request 計**:LiteLLM 的「above Nk tokens」費率(如 GPT-5.x 超過 272k、Gemini 超過 200k)只套用在自身 prompt context 超過門檻的那些 request 上。沒有 per-request 粒度的 provider(以及離線掃描)一律以基本費率計價,因此這類 model 的費用是下界。
683
+ - **Context tier 以單一 request 計**:LiteLLM 的「above Nk tokens」費率(如 GPT-5.x 超過 272k、Gemini 超過 200k)與 Qwen / doubao 的用量級距同樣只套用在自身 prompt context 超過分界的那些 request 上,不會套用到整次掃描的 token 總和。每個 request 會落在自身 context 實際到達的那一級費率上,因此一個分成四級的 model 對真的到達最高級的 request 就以最高級計價。沒有 per-request 粒度的 provider(以及離線掃描)一律以最低一級的費率計價,因此這類 model 的費用是下界。
682
684
  - **不只 token**:Claude 的網頁搜尋工具呼叫(`server_tool_use.web_search_requests`)會在 token 費用之外,按每次查詢計費;其他所有 model 的每次查詢費用皆為 $0。
683
685
  - **OpenCode**:只有在 LiteLLM **完全比對**成功時,才會依 token 為新型 model 計價;若沒有完全比對,vct 會採信該 assistant 訊息本身儲存的費用,而不是從名稱相近的 model 去猜測。
684
686
  - **Hermes**:與 OpenCode 相同,LiteLLM **完全比對**成功時依 token 計價,否則使用 Hermes 本身儲存的費用。
687
+ - **DeepSeek Harness**:`dsh` 本身不記錄任何費用,因此一律經由與其他 file-based provider 相同的查找鏈依 LiteLLM 計價,沒有 OpenCode 或 Hermes 那樣的 stored cost 兜底。它會路由到部署方設定的任意 provider,因此部署自訂的 model 名稱很常見;LiteLLM 完全比對不到時費用為 $0。
685
688
  - **Grok**:只會把 `contextTokensUsed` 當成 cache-read token 計價(若該 model 沒有公布 cache-read 費率則改用 input 費率);這是單一當下的本地 context 估算,不是累計的 billed usage。
686
689
  - **原始 cache**: 每日 cache 儲存經過篩選的 LiteLLM 上游原始 JSON (而非衍生結構), 因此 tiered / batch 定價不需重新取得即可使用. 每個 pricing map 各自擁有一個小型 process-local LRU, 重複查詢維持低成本, 也不會在不同 map 之間互相污染.
687
690
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mai0313/vibe-coding-tracker",
3
- "version": "2.5.1",
3
+ "version": "2.6.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",