Add Antigravity CLI provider#477
Open
zabrodsk wants to merge 2 commits into
Open
Conversation
Contributor
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.
Comment on lines
+120
to
+139
| 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 |
Contributor
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
Author
|
@copilot check latest commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Add 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 for CLI auth and hardens request handling with timeouts, auth checks, and clear errors.New Features
antigravity-cliprovider that callsloadCodeAssist,fetchAvailableModels, andretrieveUserQuota; maps model pools to Gemini Pro, Gemini Flash, and Claude (merges multiple buckets by the lowest remaining).gemini, accountantigravity; supports raw tokens, JSON payloads, andgo-keyring-base64:values; only reads non-secret CLI context~/.gemini/antigravity-cli/(does not touch 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 error messages.retrieveUserQuotawhenfetchAvailableModelslacks quotas; shows a "No quota data" badge when none are available.Written for commit 6a7b5b5. Summary will update on new commits. Review in cubic