繁體中文

新功能

Antigravity 額度會提醒,也能提早預警

現在 agy_session 和 agy_weekly 兩列會發通知,不再因為漏列在通知允許清單而一路耗盡卻沒消息。它們也接上各自的用量追蹤器,會在額度歸零前顯示警告,而不是等到底才沉默。Antigravity 的資料來自經過快取(把查過的結果暫存起來直接用)的網路端點;快取過期時,快照會標成不可用,因而不會誤報額度已用完。預測採用快照自己的 fetched_at 時間,而非輪詢當下的時鐘,避免同一份每五分鐘才變動的資料被重複讀取後憑空算出趨勢。兩列使用 3600 秒視窗;原本十分鐘的預設視窗湊不齊 MIN_FORECAST_SAMPLES,等同根本無法預測。過期快照也會完全停用預測,與 agy_window_keeper 一致。

新功能

usage doctor 能抓出 Codex 歷史搬遷後的歸零

usage doctor(用來檢查使用資料異常的指令)現在會檢查 Codex 的歷史搬遷。Codex 開始寫入 rollout_migration_state 這類資料表後,若搬遷完成、工作階段的 .jsonl 檔不再寫入,loaders/codex_loader.py 會毫無錯誤地回傳零 token(AI 計費與計量的文字單位)數。現在只要 .jsonl 在最近七天沒有任何項目,但 thread_history_1.sqlite 裡的 thread_turns 卻有同一時段資料,檢查便會警告你。這能指出原本悄悄把計數歸零的落差。

新功能

usage doctor 會核對 Claude 費用是否偏離官方數字

帳單對不上時,問題可能不在你,而在離線價目表已經過時。

它會把 usage-status.json 的 cost.total_cost_usd 與 usage 自行算出的金額相比。差距同時超過 20% 與 $1 時便會警告。撰寫這項功能的那台機器上,兩者相差 46.4%,原因是價目表把 claude-opus-5 標成真實費率的一半。這正是離線備援價目表可能掩蓋的價格漂移。

問題修復

WIN95 與 Newspaper 的專案用量卡不再截掉資料列

WIN95 與 Newspaper 面板上的專案用量卡,現在不會只露出標題列,把底下資料列截掉。面板量自然高度時會暫時把整條 height: 100% 改成 auto。但兩個面板都把專案卡寫成 flex: 1,其彈性基準是零;卡片自己的 overflow: hidden 是復古視窗外框所需,卻壓掉可撐開內容的自動最小尺寸。量測時,卡片因此縮成標題列,WIN95 報出 877 像素、Newspaper 報出 876 像素,而結構相同的 Classic 是 923 像素。

現在量測會暫時把這類可拉伸子項固定為 flex: 0 0 auto,量完再還原,因此面板的視覺設計不會改變。

新功能

八個模組搬進新套件,專案根目錄少了雜物

八個模組搬離根目錄,行為不變。burn_rate、usage_rate、window_keeper、agy_window_keeper 搬進 quota/;time_utils、usage_logging、usage_lang、usage_dir_sweeper 搬進 usage_common/。

共用工具套件叫 usage_common,不用 common,uvx usage-cli 的進入點會把頂層套件裝進共用的 site-packages,common 易撞名。未留相容墊片:所有 import 一次更新,pyproject.toml 移除八個 py-modules 項目並加入兩個套件,setup_app.py 也更新。

English

FEATURE

Antigravity quota now notifies and warns ahead

The agy_session and agy_weekly rows now send notifications instead of being omitted from the notification allow-list and running down silently. Each row also has its own usage tracker, so it can warn before quota reaches zero rather than stay quiet until then. Antigravity data comes from a network endpoint behind a local cache, which stores a previously fetched result for reuse. When that cache is stale, its snapshot is marked unavailable, so it cannot announce that quota has run out. Forecasting uses the snapshot's fetched_at time instead of the polling clock, preventing repeated reads of a payload that changes only every five minutes from inventing a trend. Both rows use a 3600-second window because the default ten-minute window cannot gather MIN_FORECAST_SAMPLES. A stale snapshot also suppresses forecasting, matching agy_window_keeper.

FEATURE

usage doctor catches Codex history migrations that zero counts

usage doctor, a command that checks for problems in usage data, now looks for a Codex history migration. After Codex began writing tables such as rollout_migration_state, a completed migration could stop the session .jsonl files from being written while loaders/codex_loader.py silently returned zero token counts. It now warns when .jsonl files contain no entry from the last seven days while thread_history_1.sqlite has thread_turns from that same window. That exposes a mismatch that used to zero counts without an error.

FEATURE

usage doctor compares Claude costs with the official figure

When a bill does not match, the problem may be an outdated offline price table rather than you.

It compares cost.total_cost_usd in usage-status.json with the amount usage calculates itself, then warns when the gap is both over 20% and over $1. On the machine where this feature was written, the figures differed by 46.4% because the price table listed claude-opus-5 at half its real rate. That is the kind of price drift an offline fallback table can hide.

BUGFIX

WIN95 and Newspaper project cards no longer clip rows

Project usage cards on the WIN95 and Newspaper panels no longer show only their title bar while clipping the rows below. To measure natural height, a panel temporarily releases the height: 100% chain to auto. Yet both panels write the project card as flex: 1, whose flex basis is zero, while the card's overflow: hidden, needed by retro window chrome, suppresses the automatic content-based minimum size that would keep it open. During measurement the card therefore collapsed to its title bar: WIN95 reported 877 pixels and Newspaper 876, versus 923 for structurally identical Classic.

Measurement now temporarily pins stretching children to flex: 0 0 auto and restores them afterward, leaving each panel's visual design unchanged.

FEATURE

Eight modules move into packages, clearing repository root

The repository root has eight fewer loose modules, while behavior stays unchanged. burn_rate, usage_rate, window_keeper, and agy_window_keeper moved into quota/; time_utils, usage_logging, usage_lang, and usage_dir_sweeper moved into usage_common/.

The shared utility package is called usage_common, not common, because the uvx usage-cli entry point installs top-level packages into shared site-packages, where common can easily collide with another package. No compatibility shims remain: every repository import was updated in one pass, pyproject.toml dropped eight py-modules entries and added the two packages, and setup_app.py followed.

原始 CHANGELOG

Original changelogAntigravity 額度會提醒,也能提早預警
**Antigravity quota now raises notifications, the way Claude Code and Codex already did.** The `agy_session` and `agy_weekly` channels were missing from the notification allow-list, so the two Antigravity rows could run to the floor without ever saying so. Antigravity quota is the one source that comes from a network endpoint behind a local cache rather than a file on disk, so `QuotaRowState.available` is hard-coded to `True`; a stale snapshot now passes `available=False` instead, so an expired cache can no longer announce that the quota has run out.
**The Antigravity rows now warn before the quota is gone, not after.** They had never been wired to the burn-rate forecast, so their `warning` flag was permanently `False` — Claude and Codex warned ahead of a reset and Antigravity stayed silent until it hit the floor. Both rows now register their own tracker. Samples are timestamped with the snapshot's own `fetched_at` rather than the wall clock, because the Antigravity snapshot only changes every five minutes and polling would otherwise read the same payload again and invent a slope out of it. Both rows use a 3600-second window: at one sample per five minutes the default ten-minute window never collects `MIN_FORECAST_SAMPLES`, which is the same as not forecasting at all. A stale snapshot suppresses the forecast entirely, matching what `agy_window_keeper` already does.
Original changelogusage doctor 能抓出 Codex 歷史搬遷後的歸零
**`usage doctor` now catches a Codex history migration that would silently zero the token counts.** Codex has begun writing tables such as `rollout_migration_state`, and if that migration lands and the `.jsonl` files stop being written, `loaders/codex_loader.py` returns zero without an error anywhere. The check warns when the session `.jsonl` files hold no entry from the last seven days while `thread_history_1.sqlite` does hold `thread_turns` from that window.
Original changelogusage doctor 會核對 Claude 費用是否偏離官方數字
**`usage doctor` now reconciles its own Claude cost against the official one.** It compares `cost.total_cost_usd` from `usage-status.json` with the figure usage calculates itself and warns when they differ by more than 20% and more than $1. On the machine this was written on they differed by 46.4%, because the price table listed `claude-opus-5` at half its real rate — exactly the kind of drift the offline fallback table is known to hide.
Original changelogWIN95 與 Newspaper 的專案用量卡不再截掉資料列
**The project usage card no longer clips its rows on the WIN95 and Newspaper panels.** A panel measures its own natural height by releasing the whole `height: 100%` chain to `auto`. Both panels write their project card as `flex: 1`, which means a flex basis of zero, and the card's own `overflow: hidden` — the retro window chrome depends on it — suppresses the automatic content-based minimum size that would otherwise hold the card open. The card therefore collapsed to its title bar during the measurement, and the reported height was short by exactly the project rows: 877 pixels for WIN95 and 876 for Newspaper against 923 for the structurally identical Classic. The measurement now pins such stretching children to `flex: 0 0 auto` while it measures and restores them afterwards, so no panel's visual design changes.
Original changelog八個模組搬進新套件,專案根目錄少了雜物
**Eight more modules moved out of the repository root.** `quota/` took `burn_rate`, `usage_rate`, `window_keeper`, and `agy_window_keeper`; `usage_common/` took `time_utils`, `usage_logging`, `usage_lang`, and `usage_dir_sweeper`. The shared-utility package is named `usage_common` rather than `common` because the `uvx usage-cli` entry point installs top-level packages into a shared `site-packages`, where `common` is about the most collision-prone name available. No compatibility shims were left behind — every import in the repository was updated in one pass, `pyproject.toml` dropped the eight `py-modules` entries and added the two packages, and `setup_app.py` followed. Behavior is unchanged.