@mai0313/vct 2.8.0 → 2.9.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
@@ -288,12 +288,12 @@ Every `usage` and `analysis` scan reads and writes a per-session ledger under `~
288
288
  │Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
289
289
  │bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
290
290
  └──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
291
- ┌ Antigravity ─────────┐
291
+ ┌ Antigravity ──────+2 ┐
292
292
  │- just now│
293
- │G 7d ▰▱▱▱▱ 8% 2d18h│
294
- │G 5h ▰▰▱▱▱ 23% 2h50m│
295
- │C 7d ▰▰▰▱▱ 57% 20h5m│
296
- │C 5h ▱▱▱▱▱ 0% 4h59m│
293
+ │Gemini Models │
294
+ │5h ▰▰▱▱▱ 23% │
295
+ │weekly ▰▱▱▱▱ 8% │
296
+ │Claude and GPT models │
297
297
  └──────────────────────┘
298
298
  ```
299
299
 
@@ -302,13 +302,13 @@ Every `usage` and `analysis` scan reads and writes a per-session ledger under `~
302
302
  - **Copilot** — plan tier plus your premium-request quota, shown as two gauges: percent used and the used / total request count (e.g. `45/1500`), from GitHub's Copilot API (`GET /copilot_internal/user`), read from `~/.copilot/config.json`. The request impersonates the Copilot CLI. The token is long-lived, so there is no refresh; a `401` / `403` shows a `run: copilot login` hint.
303
303
  - **Cursor** — plan tier, total / auto / API percent **used**, and on-demand spend from cursor.com (`GET /api/usage-summary`), using the session token in `~/.config/cursor/auth.json`.
304
304
  - **Grok** — plan tier plus your included-allowance usage for the current weekly or monthly period, from the Grok CLI's own billing endpoint (`GET /v1/billing?format=credits`), read from `~/.grok/auth.json`. A prepaid balance is shown only once it is non-zero, and pay-as-you-go spend once you have either spent something or set a cap. The request impersonates the Grok CLI; a `401` / `403` shows a `run: grok login` hint.
305
- - **Antigravity** — the weekly and 5-hour limits of each shared model pool (Gemini, and Claude / GPT), from the `agy` CLI's own `/usage` command (`agy -p /usage --output-format json`). The card names each limit by its pool's first word, or only its initial in a narrow card (`G 7d` is the Gemini weekly limit). `/usage` reports no plan, so the first line shows only the age. agy keeps its own sign-in fresh, so vct only checks that `~/.gemini/antigravity-cli/antigravity-oauth-token` exists and never reads or writes it. Each poll starts agy (a few seconds and about 260 MB), so this card refreshes at most every 5 minutes. When agy cannot sign in, the card shows a `run: agy acp --login` hint and the dashboard does not run agy again until that file changes.
305
+ - **Antigravity** — the limits of each shared model pool (for agy: Gemini, and Claude / GPT, each with a 5-hour and a weekly limit), from the `agy` CLI's own `/usage` command (`agy -p /usage --output-format json`). The card names each pool as agy does and labels each limit by agy's own window (`5h` first, then `weekly`); a card too short for every pool flags the rest with `+N`, and the `Q` overlay grows to show them. `/usage` reports no plan, so the first line shows only the age. vct runs `agy` from your `PATH`, or else from where agy installs (`~/.local/bin/agy`, `%LOCALAPPDATA%\agy\bin\agy.exe`) or where Google's internal Jetski build lives (`/google/bin/releases/jetski-devs/tools/cli` on gLinux, `/usr/local/bin/jetski` on macOS); an agy that has not signed in never hides a Jetski install. agy keeps its own sign-in fresh, so vct only checks that `~/.gemini/antigravity-cli/antigravity-oauth-token` exists and never reads or writes it; Jetski signs in its own way, so finding it is enough. Each poll starts agy (a few seconds and about 260 MB), so this card refreshes at most every 5 minutes. When agy cannot sign in, the card shows a `run: agy acp --login` hint and the dashboard does not run agy again until that file changes.
306
306
 
307
307
  **Automatic token refresh.** For Claude, Codex, and Grok, when a token is near expiry or rejected, vct refreshes it and writes the new token back to the provider's own credential file (in that CLI's exact format). For Grok, every other login in the file is preserved on write. If a refresh cannot proceed, the panel shows a `run: <provider> auth login` hint instead of breaking. Copilot (long-lived token) and Cursor (kept fresh by its own client) are read-only — vct never writes their credential files. Antigravity's token belongs to agy, which refreshes it whenever vct asks it for `/usage`.
308
308
 
309
- A panel appears only for a provider whose credentials are present. Panels are placed on a uniform grid that fits as many cards per row as the terminal allows and wraps the rest onto the next row. On a terminal too short to spend rows on the grid, it folds into a one-line digest showing the gauges that still fit and counting the rest; press `Q` for the full-detail overlay, where every card has room for every line whatever the terminal size, and `p` for the Provider Usage panel with per-provider tokens and share. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
309
+ A panel appears only for a provider whose credentials are present. Panels are placed on a uniform grid that fits as many cards per row as the terminal allows and wraps the rest onto the next row. On a terminal too short to spend rows on the grid, it folds into a one-line digest showing the gauges that still fit and counting the rest; press `Q` for the full-detail overlay, whose cards grow to the tallest card while every provider still fits, so every line has room on a tall enough terminal, and `p` for the Provider Usage panel with per-provider tokens and share. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
310
310
 
311
- > **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS. agy keeps its sign-in in the Keychain there too, so the Antigravity panel is not shown on macOS either. Cursor's `~/.config/cursor` credential path is Linux-oriented.
311
+ > **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS. agy keeps its sign-in in the Keychain there too, so on macOS the Antigravity panel is shown only for Google's internal Jetski build. Cursor's `~/.config/cursor` credential path is Linux-oriented.
312
312
 
313
313
  ---
314
314
 
@@ -485,7 +485,7 @@ vct version --json # Machine-readable JSON
485
485
 
486
486
  **Print a provider's raw quota/usage API response — no parsing, no aggregation.**
487
487
 
488
- Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor / Grok) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent` / `grok`). `vct quota antigravity` instead runs `agy -p /usage --output-format json` once and prints what agy printed; agy refreshes its own token as it does so.
488
+ Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor / Grok) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent` / `grok`). `vct quota antigravity` instead runs `agy -p /usage --output-format json` once (or Jetski, found the way the dashboard finds it) and prints what it printed; agy refreshes its own token as it does so.
489
489
 
490
490
  > The previous name `vct fetch` is kept as a hidden alias, so existing scripts keep working.
491
491
 
@@ -572,7 +572,7 @@ Generic placeholder names (e.g. `default`, what cursor-agent records for auto-mo
572
572
  - **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.
573
573
  - **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
574
574
  - **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.
575
- - **Antigravity**: priced from LiteLLM like the other file-based providers, under the model each request's generation record names. Compaction requests name no model, so their tokens are counted under `unknown` at $0.
575
+ - **Antigravity**: priced from LiteLLM like the other file-based providers, under the model each request's generation record names. Compaction requests name no model, so their tokens are priced as the model in use when they ran.
576
576
  - **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.
577
577
 
578
578
  ---
package/README.zh-CN.md CHANGED
@@ -288,12 +288,12 @@ Grok 的 `usage` 是单一时点的本地 context 估算:vct 会把 `signals.j
288
288
  │Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
289
289
  │bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
290
290
  └──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
291
- ┌ Antigravity ─────────┐
291
+ ┌ Antigravity ──────+2 ┐
292
292
  │- just now│
293
- │G 7d ▰▱▱▱▱ 8% 2d18h│
294
- │G 5h ▰▰▱▱▱ 23% 2h50m│
295
- │C 7d ▰▰▰▱▱ 57% 20h5m│
296
- │C 5h ▱▱▱▱▱ 0% 4h59m│
293
+ │Gemini Models │
294
+ │5h ▰▰▱▱▱ 23% │
295
+ │weekly ▰▱▱▱▱ 8% │
296
+ │Claude and GPT models │
297
297
  └──────────────────────┘
298
298
  ```
299
299
 
@@ -302,13 +302,13 @@ Grok 的 `usage` 是单一时点的本地 context 估算:vct 会把 `signals.j
302
302
  - **Copilot** — 方案类型,以及你的 premium 请求额度,以两个进度条呈现:已用百分比,以及已用 / 总量的请求数(例如 `45/1500`),来自 GitHub 的 Copilot API(`GET /copilot_internal/user`),从 `~/.copilot/config.json` 读取。该请求会模拟 Copilot CLI。token 为长期有效,因此不需要刷新;遇到 `401` / `403` 时会显示 `run: copilot login` 提示。
303
303
  - **Cursor** — 方案类型、total / auto / API **已用**百分比,以及按需消费,来自 cursor.com(`GET /api/usage-summary`),使用 `~/.config/cursor/auth.json` 中的 session token。
304
304
  - **Grok** — 方案类型,以及当前每周或每月周期内的方案内含额度用量,来自 Grok CLI 自己的计费端点(`GET /v1/billing?format=credits`),从 `~/.grok/auth.json` 读取。预付余额只有在非零时才会显示;按量付费的消费则在你有过消费、或设置了上限之后才会显示。该请求会模拟 Grok CLI;遇到 `401` / `403` 时会显示 `run: grok login` 提示。
305
- - **Antigravity** — 每个共享模型池(Gemini,以及 Claude / GPT)的每周与 5 小时额度,来自 `agy` CLI 自己的 `/usage` 命令(`agy -p /usage --output-format json`)。卡片以模型池名称的第一个词标示每个额度,卡片较窄时只用首字母(`G 7d` 是 Gemini 的每周额度)。`/usage` 不提供方案名称,所以第一行只显示数据的新旧。agy 会自行维持登录状态,因此 vct 只检查 `~/.gemini/antigravity-cli/antigravity-oauth-token` 是否存在,从不读取或写入它。每次轮询都会启动一次 agy(需要几秒、约 260 MB),所以这张卡片最多每 5 分钟更新一次。agy 无法登录时,卡片会显示 `run: agy acp --login` 提示,而且在该文件变动之前,仪表盘不会再运行 agy。
305
+ - **Antigravity** — 每个共享模型池的额度(agy 的是 Gemini 以及 Claude / GPT,各有 5 小时与每周额度),来自 `agy` CLI 自己的 `/usage` 命令(`agy -p /usage --output-format json`)。卡片直接使用 agy 给出的模型池名称,每个额度则按 agy 的时间窗原样标示(`5h` 排在最前,然后是 `weekly`);卡片放不下所有模型池时,其余的以 `+N` 标出,`Q` 浮层会加高到全部放得下。`/usage` 不提供方案名称,所以第一行只显示数据的新旧。vct 会运行 `PATH` 上的 `agy`,找不到时改找 agy 的安装位置(`~/.local/bin/agy`、`%LOCALAPPDATA%\agy\bin\agy.exe`),或 Google 内部版本 Jetski 的位置(gLinux 上的 `/google/bin/releases/jetski-devs/tools/cli`、macOS 上的 `/usr/local/bin/jetski`);尚未登录的 agy 不会挡掉 Jetski。agy 会自行维持登录状态,因此 vct 只检查 `~/.gemini/antigravity-cli/antigravity-oauth-token` 是否存在,从不读取或写入它;Jetski 有自己的登录方式,找到它就够了。每次轮询都会启动一次 agy(需要几秒、约 260 MB),所以这张卡片最多每 5 分钟更新一次。agy 无法登录时,卡片会显示 `run: agy acp --login` 提示,而且在该文件变动之前,仪表盘不会再运行 agy。
306
306
 
307
307
  **自动刷新 token。** 对 Claude、Codex 和 Grok,当 token 接近过期或被拒绝时,vct 会刷新它并把新 token 写回该 provider 自己的凭证文件(采用该 CLI 的原始格式)。写入 Grok 的凭证文件时,会保留文件中其他所有的登录信息。如果刷新失败,面板会显示 `run: <provider> auth login` 提示,而不会直接中断。Copilot(长期有效的 token)和 Cursor(由其自身客户端保持最新)为只读——vct 从不写入它们的凭证文件。Antigravity 的 token 属于 agy,每当 vct 向它询问 `/usage` 时由 agy 自行刷新。
308
308
 
309
- 只有在某个 provider 的凭证存在时,才会显示对应的面板。面板排在一个统一网格上:一行放得下几张就放几张,放不下的自动折到下一行。当终端高度不足以留给网格时,它会收成一行摘要,显示放得下的 gauge,并把其余的记成数量;按 `Q` 打开完整的额度浮层,无论终端多大,每张卡片都放得下全部内容,按 `p` 打开 Provider Usage 面板,里面有各 provider 的 token 数与占比。额度面板仅在交互式 TUI 中显示;`--table`、`--text`、`--json` 不受影响。
309
+ 只有在某个 provider 的凭证存在时,才会显示对应的面板。面板排在一个统一网格上:一行放得下几张就放几张,放不下的自动折到下一行。当终端高度不足以留给网格时,它会收成一行摘要,显示放得下的 gauge,并把其余的记成数量;按 `Q` 打开完整的额度浮层,卡片会加高到最高那张的高度(前提是所有 provider 仍放得下),终端够高时每张卡片都放得下全部内容,按 `p` 打开 Provider Usage 面板,里面有各 provider 的 token 数与占比。额度面板仅在交互式 TUI 中显示;`--table`、`--text`、`--json` 不受影响。
310
310
 
311
- > **平台说明:** 在 macOS 上,Claude Code 会把 OAuth 凭证保存在系统 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不会显示 Claude 面板。agy 在 macOS 上同样把登录信息保存在 Keychain,所以也不会显示 Antigravity 面板。Cursor 的 `~/.config/cursor` 凭证路径偏向 Linux。
311
+ > **平台说明:** 在 macOS 上,Claude Code 会把 OAuth 凭证保存在系统 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不会显示 Claude 面板。agy 在 macOS 上同样把登录信息保存在 Keychain,所以 macOS 上只有 Google 内部版本 Jetski 会显示 Antigravity 面板。Cursor 的 `~/.config/cursor` 凭证路径偏向 Linux。
312
312
 
313
313
  ---
314
314
 
@@ -485,7 +485,7 @@ vct version --json # 机读 JSON
485
485
 
486
486
  **打印某个供应商的原始 quota/usage API 响应 — 不解析、不聚合。**
487
487
 
488
- 对 `usage` 面板使用的同一个 quota 端点(Claude / Codex / Copilot / Cursor / Grok)发一次请求,直接打印原始 body,方便你查看 API 的实际结构或检查凭证是否正常。它读取各供应商已保存的凭证,并且**不会**刷新 token:token 过期时,请用对应供应商自己的 CLI 重新登录(`claude` / `codex` / `copilot` / `cursor-agent` / `grok`)。`vct quota antigravity` 则是运行一次 `agy -p /usage --output-format json` 并打印 agy 的输出;agy 会在运行时自行刷新 token。
488
+ 对 `usage` 面板使用的同一个 quota 端点(Claude / Codex / Copilot / Cursor / Grok)发一次请求,直接打印原始 body,方便你查看 API 的实际结构或检查凭证是否正常。它读取各供应商已保存的凭证,并且**不会**刷新 token:token 过期时,请用对应供应商自己的 CLI 重新登录(`claude` / `codex` / `copilot` / `cursor-agent` / `grok`)。`vct quota antigravity` 则是运行一次 `agy -p /usage --output-format json`(或按仪表盘相同的方式找到的 Jetski)并打印它的输出;agy 会在运行时自行刷新 token。
489
489
 
490
490
  > 旧名称 `vct fetch` 保留为隐藏别名,现有脚本仍可继续使用。
491
491
 
@@ -572,7 +572,7 @@ vct config migrate
572
572
  - **OpenCode**:只有在 LiteLLM 上**精确**匹配时,才会根据 token 为一个全新的 model 名称定价;若没有精确匹配,vct 会信任该 assistant message 自身存储的费用,而不是从一个只是大致相似的名称去猜测。
573
573
  - **Hermes**:与 OpenCode 相同,LiteLLM 上**精确**匹配时按 token 定价,否则使用 Hermes 自身存储的费用。
574
574
  - **DeepSeek Harness**:`dsh` 本身不记录任何费用,因此全部经由与其他 file-based provider 相同的查找链依 LiteLLM 计价,没有 OpenCode 或 Hermes 那样的 stored cost 兜底。它会路由到部署方配置的任意 provider,因此部署自定义的 model 名称很常见;LiteLLM 完全比对不到时费用为 $0。
575
- - **Antigravity**:与其他 file-based provider 一样依 LiteLLM 计价,model 取自每个 request 的 generation 记录。Compaction request 没有记录 model,其 token 会记在 `unknown` 下,费用为 $0。
575
+ - **Antigravity**:与其他 file-based provider 一样依 LiteLLM 计价,model 取自每个 request 的 generation 记录。Compaction request 没有记录 model,其 token 按当时正在使用的 model 计价。
576
576
  - **Grok**:只会把 `contextTokensUsed` 作为 cache-read token 计价(若该 model 未公布 cache-read 费率则改用 input 费率);这是单一时点的本地 context 估算,不是累计的 billed usage。
577
577
 
578
578
  ---
package/README.zh-TW.md CHANGED
@@ -288,12 +288,12 @@ Grok 的 `usage` 是單一當下的本地 context 估算:vct 會把 `signals.j
288
288
  │Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
289
289
  │bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
290
290
  └──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
291
- ┌ Antigravity ─────────┐
291
+ ┌ Antigravity ──────+2 ┐
292
292
  │- just now│
293
- │G 7d ▰▱▱▱▱ 8% 2d18h│
294
- │G 5h ▰▰▱▱▱ 23% 2h50m│
295
- │C 7d ▰▰▰▱▱ 57% 20h5m│
296
- │C 5h ▱▱▱▱▱ 0% 4h59m│
293
+ │Gemini Models │
294
+ │5h ▰▰▱▱▱ 23% │
295
+ │weekly ▰▱▱▱▱ 8% │
296
+ │Claude and GPT models │
297
297
  └──────────────────────┘
298
298
  ```
299
299
 
@@ -302,13 +302,13 @@ Grok 的 `usage` 是單一當下的本地 context 估算:vct 會把 `signals.j
302
302
  - **Copilot** — 方案類型以及你的 premium 請求額度,以兩個進度條呈現:已用百分比,以及已用 / 總量請求數(例如 `45/1500`),來自 GitHub 的 Copilot API(`GET /copilot_internal/user`),從 `~/.copilot/config.json` 讀取。該請求會模擬 Copilot CLI。token 為長期有效,因此不需要刷新;遇到 `401` / `403` 時會顯示 `run: copilot login` 提示。
303
303
  - **Cursor** — 方案類型、total / auto / API **已用**百分比,以及按需消費,來自 cursor.com(`GET /api/usage-summary`),使用 `~/.config/cursor/auth.json` 中的 session token。
304
304
  - **Grok** — 方案類型以及目前每週或每月週期的內含額度用量,來自 Grok CLI 自己的計費端點(`GET /v1/billing?format=credits`),從 `~/.grok/auth.json` 讀取。預付餘額只有在不為零時才會顯示;按量計費的消費則在你有過消費、或設定了上限之後才會顯示。該請求會模擬 Grok CLI;遇到 `401` / `403` 時會顯示 `run: grok login` 提示。
305
- - **Antigravity** — 每個共用模型池(Gemini,以及 Claude / GPT)的每週與 5 小時額度,來自 `agy` CLI 自己的 `/usage` 指令(`agy -p /usage --output-format json`)。卡片以模型池名稱的第一個字標示每個額度,卡片較窄時只用首字母(`G 7d` 是 Gemini 的每週額度)。`/usage` 不提供方案名稱,所以第一行只顯示資料的新舊。agy 會自行維持登入狀態,因此 vct 只檢查 `~/.gemini/antigravity-cli/antigravity-oauth-token` 是否存在,從不讀取或寫入它。每次輪詢都會啟動一次 agy(需要幾秒、約 260 MB),所以這張卡片最多每 5 分鐘更新一次。agy 無法登入時,卡片會顯示 `run: agy acp --login` 提示,而且在該檔案變動之前,儀表板不會再執行 agy。
305
+ - **Antigravity** — 每個共用模型池的額度(agy 的是 Gemini 以及 Claude / GPT,各有 5 小時與每週額度),來自 `agy` CLI 自己的 `/usage` 指令(`agy -p /usage --output-format json`)。卡片直接用 agy 給的模型池名稱,每個額度則以 agy 的時間窗原樣標示(`5h` 排最前,接著是 `weekly`);卡片放不下所有模型池時,其餘的以 `+N` 標出,`Q` 浮層會加高到全部放得下。`/usage` 不提供方案名稱,所以第一行只顯示資料的新舊。vct 會執行 `PATH` 上的 `agy`,找不到時改找 agy 的安裝位置(`~/.local/bin/agy`、`%LOCALAPPDATA%\agy\bin\agy.exe`),或 Google 內部版本 Jetski 的位置(gLinux 上的 `/google/bin/releases/jetski-devs/tools/cli`、macOS 上的 `/usr/local/bin/jetski`);尚未登入的 agy 不會擋掉 Jetski。agy 會自行維持登入狀態,因此 vct 只檢查 `~/.gemini/antigravity-cli/antigravity-oauth-token` 是否存在,從不讀取或寫入它;Jetski 有自己的登入方式,找到它就夠了。每次輪詢都會啟動一次 agy(需要幾秒、約 260 MB),所以這張卡片最多每 5 分鐘更新一次。agy 無法登入時,卡片會顯示 `run: agy acp --login` 提示,而且在該檔案變動之前,儀表板不會再執行 agy。
306
306
 
307
307
  **自動刷新 token。** 對 Claude、Codex 和 Grok,當 token 接近過期或被拒絕時,vct 會刷新它並把新的 token 寫回該 provider 自己的憑證檔案(採用該 CLI 的原始格式)。寫入 Grok 的憑證檔案時,會保留該檔案中其他所有的登入資訊。如果刷新失敗,面板會顯示 `run: <provider> auth login` 提示,而不會直接中斷。Copilot(長期有效的 token)和 Cursor(由其自身用戶端保持最新)為唯讀——vct 從不寫入它們的憑證檔案。Antigravity 的 token 屬於 agy,每當 vct 向它詢問 `/usage` 時由 agy 自行刷新。
308
308
 
309
- 只有在某個 provider 的憑證存在時,才會顯示對應的面板。面板排在一個統一網格上:一列放得下幾張就放幾張,放不下的自動折到下一列。當終端高度不足以留給網格時,它會收成一行摘要,顯示放得下的 gauge,並把其餘的記成數量;按 `Q` 開啟完整的額度浮層,無論終端多大,每張卡片都放得下全部內容,按 `p` 開啟 Provider Usage 面板,裡面有各 provider 的 token 數與佔比。額度面板僅在互動式 TUI 中顯示;`--table`、`--text`、`--json` 不受影響。
309
+ 只有在某個 provider 的憑證存在時,才會顯示對應的面板。面板排在一個統一網格上:一列放得下幾張就放幾張,放不下的自動折到下一列。當終端高度不足以留給網格時,它會收成一行摘要,顯示放得下的 gauge,並把其餘的記成數量;按 `Q` 開啟完整的額度浮層,卡片會加高到最高那張的高度(前提是所有 provider 仍放得下),終端夠高時每張卡片都放得下全部內容,按 `p` 開啟 Provider Usage 面板,裡面有各 provider 的 token 數與佔比。額度面板僅在互動式 TUI 中顯示;`--table`、`--text`、`--json` 不受影響。
310
310
 
311
- > **平台說明:** 在 macOS 上,Claude Code 會把 OAuth 憑證儲存在系統 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不會顯示 Claude 面板。agy 在 macOS 上同樣把登入資訊存在 Keychain,所以也不會顯示 Antigravity 面板。Cursor 的 `~/.config/cursor` 憑證路徑偏向 Linux。
311
+ > **平台說明:** 在 macOS 上,Claude Code 會把 OAuth 憑證儲存在系統 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不會顯示 Claude 面板。agy 在 macOS 上同樣把登入資訊存在 Keychain,所以 macOS 上只有 Google 內部版本 Jetski 會顯示 Antigravity 面板。Cursor 的 `~/.config/cursor` 憑證路徑偏向 Linux。
312
312
 
313
313
  ---
314
314
 
@@ -485,7 +485,7 @@ vct version --json # 機器可讀的 JSON
485
485
 
486
486
  **印出某個供應商的原始 quota/usage API 回應 — 不解析、不彙整。**
487
487
 
488
- 對 `usage` 面板使用的同一個 quota 端點(Claude / Codex / Copilot / Cursor / Grok)發一次請求,直接印出原始 body,方便你檢視 API 的實際結構或確認憑證是否正常。它讀取各供應商已儲存的憑證,而且**不會**刷新 token:token 過期時,請用對應供應商自己的 CLI 重新登入(`claude` / `codex` / `copilot` / `cursor-agent` / `grok`)。`vct quota antigravity` 則是執行一次 `agy -p /usage --output-format json` 並印出 agy 的輸出;agy 會在執行時自行刷新 token。
488
+ 對 `usage` 面板使用的同一個 quota 端點(Claude / Codex / Copilot / Cursor / Grok)發一次請求,直接印出原始 body,方便你檢視 API 的實際結構或確認憑證是否正常。它讀取各供應商已儲存的憑證,而且**不會**刷新 token:token 過期時,請用對應供應商自己的 CLI 重新登入(`claude` / `codex` / `copilot` / `cursor-agent` / `grok`)。`vct quota antigravity` 則是執行一次 `agy -p /usage --output-format json`(或用儀表板相同的方式找到的 Jetski)並印出它的輸出;agy 會在執行時自行刷新 token。
489
489
 
490
490
  > 舊名稱 `vct fetch` 保留為隱藏別名,現有 script 仍可繼續使用。
491
491
 
@@ -572,7 +572,7 @@ vct config migrate
572
572
  - **OpenCode**:只有在 LiteLLM **完全比對**成功時,才會依 token 為新型 model 計價;若沒有完全比對,vct 會採信該 assistant 訊息本身儲存的費用,而不是從名稱相近的 model 去猜測。
573
573
  - **Hermes**:與 OpenCode 相同,LiteLLM **完全比對**成功時依 token 計價,否則使用 Hermes 本身儲存的費用。
574
574
  - **DeepSeek Harness**:`dsh` 本身不記錄任何費用,因此一律經由與其他 file-based provider 相同的查找鏈依 LiteLLM 計價,沒有 OpenCode 或 Hermes 那樣的 stored cost 兜底。它會路由到部署方設定的任意 provider,因此部署自訂的 model 名稱很常見;LiteLLM 完全比對不到時費用為 $0。
575
- - **Antigravity**:和其他 file-based provider 一樣依 LiteLLM 計價,model 取自每個 request 的 generation 紀錄。Compaction request 沒有記錄 model,其 token 會記在 `unknown` 下,費用為 $0。
575
+ - **Antigravity**:和其他 file-based provider 一樣依 LiteLLM 計價,model 取自每個 request 的 generation 紀錄。Compaction request 沒有記錄 model,其 token 依當下正在使用的 model 計價。
576
576
  - **Grok**:只會把 `contextTokensUsed` 當成 cache-read token 計價(若該 model 沒有公布 cache-read 費率則改用 input 費率);這是單一當下的本地 context 估算,不是累計的 billed usage。
577
577
 
578
578
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mai0313/vct",
3
- "version": "2.8.0",
3
+ "version": "2.9.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",