[antigravity] Add keychain auth for agy CLI; stop bundle overwriting user plugins on restart#514
Open
yesvus wants to merge 3 commits into
Open
Conversation
…user plugins on restart
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds keychain-based OAuth token discovery for the Antigravity plugin (to support Antigravity CLI / Gemini CLI auth), plus expands tests and tweaks file-copy behavior to avoid overwriting existing files.
Changes:
- Add keychain token loading/parsing (including go-keyring base64 envelope) and integrate it into probe flow with refresh-token fallback.
- Add extensive Jest coverage for keychain token formats, precedence rules, and refresh flows.
- Update recursive copy to skip copying files that already exist at the destination.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src-tauri/src/plugin_engine/mod.rs | Changes recursive copy behavior to skip existing destination files. |
| plugins/antigravity/plugin.js | Implements keychain token discovery/parsing and plugs it into probe + refresh logic. |
| plugins/antigravity/plugin.test.js | Adds test cases covering keychain auth formats and precedence/refresh behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+103
to
+105
| if dst_path.exists() { | ||
| continue; | ||
| } |
Comment on lines
+507
to
+517
| if (expirySeconds === null) { | ||
| if (parsed.expiresAt != null) { | ||
| expirySeconds = Math.floor(Number(parsed.expiresAt) / 1000) | ||
| } else if (parsed.expiresAtMs != null) { | ||
| expirySeconds = Math.floor(Number(parsed.expiresAtMs) / 1000) | ||
| } else if (parsed.expirySeconds != null) { | ||
| expirySeconds = Number(parsed.expirySeconds) | ||
| } else if (parsed.expiry_seconds != null) { | ||
| expirySeconds = Number(parsed.expiry_seconds) | ||
| } | ||
| } |
|
|
||
| function decodeGoKeyringValue(raw, ctx) { | ||
| if (typeof raw !== "string") return null | ||
| var trimmed = raw.replace(/^\s+|\s+$/g, "") |
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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 by cubic
Adds keychain-based auth for the Antigravity/Gemini CLI so the plugin can use tokens from the OS keychain when LS/DB are unavailable. Also prevents app restarts from overwriting user-installed plugins.
New Features
Bug Fixes
src-taurito avoid overwriting user plugins.Written for commit 8c5e839. Summary will update on new commits. Review in cubic