Add Antigravity CLI provider#477
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new bundled antigravity-cli provider plugin to track Google Antigravity CLI (agy) quota usage via Cloud Code quota endpoints, along with documentation updates and a small macOS keychain host API enhancement to support account-scoped lookups.
Changes:
- Add
plugins/antigravity-clibundled plugin (manifest, implementation, icon) plus Vitest coverage. - Add user-facing documentation for setup/data sources and link it from the main README.
- Extend
host.keychain.readGenericPassword(service, account?)to support explicit account scoping, and document the new signature.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src-tauri/src/plugin_engine/host_api.rs |
Adds optional account parameter to readGenericPassword and scopes the security find-generic-password call accordingly. |
README.md |
Adds Antigravity CLI to the supported providers list. |
plugins/antigravity-cli/README.md |
Documents plugin-specific setup/auth expectations and data sources. |
plugins/antigravity-cli/plugin.test.js |
Adds unit tests for keychain token parsing and quota parsing/fallback behaviors. |
plugins/antigravity-cli/plugin.json |
Adds plugin manifest (id/name/icon/overview lines). |
plugins/antigravity-cli/plugin.js |
Implements keychain token extraction + quota endpoint querying and mapping to overview lines. |
plugins/antigravity-cli/icon.svg |
Adds provider icon asset. |
docs/providers/antigravity-cli.md |
Adds provider documentation page. |
docs/plugins/api.md |
Updates keychain API docs to include the optional account parameter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var resp = request({ | ||
| method: "POST", | ||
| url: url, | ||
| headers: { | ||
| Authorization: "Bearer " + token, | ||
| Accept: "application/json", | ||
| "Content-Type": "application/json", | ||
| "User-Agent": "agy", | ||
| }, | ||
| bodyText: JSON.stringify(body || {}), | ||
| timeoutMs: 15000, | ||
| }) | ||
| if (ctx.util.isAuthStatus(resp.status)) { | ||
| throw LOGIN_MESSAGE | ||
| } | ||
| if (resp.status < 200 || resp.status >= 300) { | ||
| throw "Antigravity CLI quota request failed (HTTP " + String(resp.status) + "). Try again later." | ||
| } | ||
| var data = ctx.util.tryParseJson(resp.bodyText) | ||
| return data && typeof data === "object" ? data : null |
There was a problem hiding this comment.
1 issue found across 9 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@copilot check latest commit |
|
Thank you @zabrodsk - I don't use Antigravity. Could you explain how this is different from the existing plugin? They renamed the CLI |
|
Yeah, the naming is confusing. This PR is for the new Antigravity CLI, the The CLI seems to work more like a terminal client: it stores its own state under My understanding is that Gemini CLI is transitioning toward So short version: existing The reason I kept it separate is that the data path is totally different. The existing Antigravity provider is app/IDE-oriented: it looks for a |
|
I feel like we should consolidate everything into one Antigravity and use IDE -> App -> CLI fallbacks to gather the data since they share the same quota. |
Summary
antigravity-clibundled provider for Google Antigravity CLI (agy)gemini, accountantigravity, with raw, JSON, andgo-keyring-base64:token supportreadGenericPassword(service, account?)host API docs and implementation for explicit account lookupTesting
bun run test plugins/antigravity-cli/plugin.test.jsbun run test pluginsNotes
cargo/rustcare not installed in this shell, so I could not run a local Rust compile/test for the host API change.Summary by cubic
Adds the
antigravity-cliprovider to track Google Antigravity CLI (agy) Cloud Code quotas for Gemini Pro, Gemini Flash, and Claude. Extends the macOS keychain host API to support account-scoped reads, and hardens auth and request handling.New Features
antigravity-cliprovider callingloadCodeAssist,fetchAvailableModels, andretrieveUserQuota; maps model pools to Gemini Pro, Gemini Flash, and Claude; merges buckets by the lowest remaining.gemini, accountantigravity; supports raw tokens, JSON, andgo-keyring-base64:; no fallback to service-wide creds; only reads non-secret CLI context~/.gemini/antigravity-cli/and ignores legacy Gemini OAuth files.host.keychain.readGenericPassword(service, account?)with account-level lookup and updated docs; added plugin docs, icon, and tests.Bug Fixes
agylogin message, and clearer network/HTTP/invalid JSON errors.retrieveUserQuotawhenfetchAvailableModelslacks quotas; shows a "No quota data" badge when none are available.Written for commit 942ee60. Summary will update on new commits. Review in cubic