Repository navigation
Add Antigravity usage reporting through the CLI quota interface - #11989
steph4n-gh wants to merge 9 commits into
Conversation
Add the omarchy-agent-usage-antigravity collector to monitor Google Antigravity usage alongside Claude, Codex, and Fireworks in the native agents bar panel. Authoritative subscription tier and quota limits (rolling 5-hour session, weekly limits, and scoped 3P model allowances) are probed from the Google Cloud Code API via Secret Service keyring credentials with rolling local history estimation as fallback. Also teach the agents panel to watch ~/.config/omarchy/defaults/agent so the panel selects the user's default agent on launch.
Automated AI review
Verified: the collector plugs into the agents plugin as intended. The main issue is what the panel shows when the live quota call does not succeed: failures are silent, and invented limits and a guessed plan are shown as if they were account data. Failed quota calls are silent and show estimated limits as real onesWhen the user is signed in, Instead, when no cached window is still open, the collector emits Synthetic runs (stub
Related details:
Impact: after a token expires or the network drops, the panel keeps showing plausible-looking meters and a cached or guessed ("Pro") plan with no hint that they are estimated or stale. The agents README promises that "Auth and endpoint problems replace the plan line and repeat in a card" ( Suggested change: set An alternative that avoids reading credentials at all: agy 1.1.11 added Scoped Claude/GPT limits disappear if that group comes first
A bucket without Impact: third-party allowance usage can silently vanish from the panel, depending only on response order. Suggested change: select the Gemini group by name first and treat every other group as scoped; treat a missing Daily stats use UTC dates while the panel uses local dates
Impact: for users away from UTC, today's prompts and tokens land on the wrong day for part of every day. Suggested change: use local dates ( Token counts can double-count and invent a model rowIn
It is also unverified whether agy transcripts carry per-step Impact: token totals and per-model rows can be inflated or attributed to a model that was not used. Suggested change: count only model steps that carry Unverified quota request shapeBoth Cloud Code POSTs send Impact: if the premise holds, Antigravity limits are empty or wrong for real accounts even when the probe succeeds, with no status shown. Suggested change: send the Smaller notes
Optional test improvement: in a mutation run against the three changed or new test files, these mutants all survived: the live probe is never called, the probed tier is ignored, the rate-limit status is never set, the 5-hour estimate never counts a prompt, the panel never selects the default agent, and Overlapping open PRs
Review informationTest scope: source review of head AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
|
Thank you! Brought in with your authorship in #14039 as the |
Add Antigravity quota and local activity reporting to the agents panel. The collector reads
agy -p "/usage" --output-format json, after requiring CLI 1.1.11 or newer, so Antigravity handles authentication, token refresh and quota requests through its read-only interface. Older or unrecognized versions never receive the slash command, and passive scans do not invoke Omarchy's installer wrapper.Session, weekly and Claude/GPT allowances, including unused windows, come from the returned quota windows, independent of group order. Failed checks show actionable status; network failures request an early retry. Quotas and errors are never cached because the CLI response provides no account identity: every refresh checks the current sign-in, and failures leave the meters empty. The shared usage writer assigns request order before collecting and atomically publishes that sequence with the data, so older overlapping requests cannot overwrite newer valid records. A crashed collector or malformed response does not suppress another valid in-flight result, and locks are released during network calls. There are no prompt-based quota estimates or guessed plans.
Local prompts and sessions use local calendar dates and the observed CLI transcript, history and summary formats. Prompt events are merged individually using matching complete request text and nearby timestamps, excluding surrounding transcript metadata, retaining distinct events from partially overlapping logs. Antigravity's saved transcripts do not include token counts or model IDs, and
/usagedoes not include a plan, so those values are not invented. Optional tier labels remain configurable throughAGY_TIERorantigravity.json;AGY_DIRisolates custom app roots and caches.Includes icons, provider defaults, user documentation, a sanitized CLI response fixture and regression coverage. Updated to current
quattro, retaining its shared subscriptions page and provider ordering; the old default-tab change no longer applies.Validation:
git diff --checkpass../test/clireaches an existing upstream VS Code theme assertion failure: the test expects a symlink whileomarchy-theme-set-vscodenow writes a regular file. Reproduced on a clean checkout of base commit821ae589; both files are unchanged from the base branch.