Repository navigation
fix(antigravity): read the local language server for its own account - #108
Merged
Merged
Conversation
…er RPC Query the running local Antigravity language_server Connect-RPC endpoint when available so multi-group pools (including Gemini 4 Argon) and their reset countdowns stay synchronized with the IDE. Signed-off-by: dotredstone <[email protected]>
The local fast path ran inside antigravity_fetch_account, so every account (each IDE install and the agy CLI) received the running app's quota, shown under the wrong email. It also found the server with pgrep -f, which matches any process that merely mentions the path in its arguments, and read the CSRF token from whichever came first. Collect the local answer once per refresh instead. The server is found by its executable, only loopback listeners are tried, and each answer is stored under the email GetUserStatus reports, so an account uses it only when the emails match and every other account keeps the cloud endpoint. --csrf_token=VALUE is read too, the token stays in a curl config pipe, and ANTIGRAVITY_NO_LOCAL_RPC=1 turns the path off. A bucket that reports a reset but no remaining fraction is used up (protobuf JSON omits a zero), so it now reads 100% instead of being dropped, and a fraction nested under remaining is accepted. The account window aside kept the countdown but dropped the server's own description in used mode on every account row; the description is back and the countdown follows a bare percentage only. Signed-off-by: Bernardo Pinto Gomes <[email protected]>
Signed-off-by: Bernardo Pinto Gomes <[email protected]>
This was referenced Nov 8, 2026
antigravity_email_from_idtoken appended padding with printf '=%.0s' over seq 1 $pad. With pad 0 seq prints nothing and printf still runs its format once, so a payload that needed no padding gained a stray =. GNU base64 prints the data before complaining, but uutils coreutils (Ubuntu 26.04) prints nothing, so the account lost its email. Append exactly pad characters instead, and test every padding length against a strict decoder. Signed-off-by: Bernardo Pinto Gomes <[email protected]>
gtheys
pushed a commit
to gtheys/AiOverviewControl
that referenced
this pull request
Nov 12, 2026
Generated with scripts/render-contributors. The contributors API lists alvorithm already but lags behind on DotRedstone, whose commits from bernardopg#108 and bernardopg#109 resolve to the account; that login was passed as a one-off pinned entry for this run. The grid is append-only, so later renders keep both entries without a change to PINNED. Signed-off-by: Bernardo Pinto Gomes <[email protected]>
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
Split out of #101: keeps @DotRedstone's commit (local language server fast path, Gemini 4 Argon label, Chinese window names, reset countdown), with one follow-up commit on top.
While the Antigravity app runs, its local language server answers
RetrieveUserQuotaSummaryover loopback Connect-RPC. I verified this against the running app: the server returns the Gemini Models pool, whilev1internal:retrieveUserQuotaSummaryon the cloud endpoint returned only "Claude and GPT models" for the same account.fix(antigravity): match the local language server to its own account fixes the following in the original fast path:
Wrong account. The fast path ran inside
antigravity_fetch_account, so every account (each IDE install and theagyCLI) received the running app's quota under its own email. The local answer is now collected once per refresh and stored under the email thatGetUserStatusreports (userStatus.email, confirmed live). An account uses it only when the emails match; every other account keeps the cloud endpoint. Live run with two signed-in accounts: the app's account read Gemini + Claude from the local server, and the IDE's account kept its own cloud numbers. With the original commit, both would have shown the app account's data.Wrong process.
pgrep -f "resources/bin/language_server"matches any process that merely mentions the path in its arguments; on my machine it matched a shell. The server is now found withpgrep -x language_server, checked by itsexepath.Narrower surface. Only
127.0.0.1/[::1]listeners are tried (at most 6), with--proto =httpsand a 2 s timeout.--csrf_token=VALUEis read as well as--csrf_token VALUE. The token stays in acurl --configpipe.ANTIGRAVITY_NO_LOCAL_RPC=1turns the path off, and a retargetedANTIGRAVITY_API_BASE_URLskips it.Omitted fraction. Protobuf JSON omits a zero, so a bucket that reports a reset but no
remainingFractionis used up. It now reads 100% instead of being dropped, and a fraction nested underremainingis accepted. The legacy family path already treated a missing fraction as 0.Dashboard regression. The account window
asidechange dropped the server's own description in used mode. The description is back; the countdown follows a bare percentage only.Email lost with uutils coreutils (pre-existing).
antigravity_email_from_idtokenappended padding withprintf '=%.0s' $(seq 1 "$pad"). Withpad=0this still printed one=, and the uutilsbase64on theubuntu-26.04runner (unlike GNU) then returned nothing, so the account showed "Antigravity account". The function now appends exactlypadcharacters, and a strict-decoder shim tests every padding length; that test fails without the fix.Tests:
tests/test-cov-b-antigravity.shcovers email matching (case-insensitive), a mismatched email that keeps the cloud answer, the opt-out, the=token form, a decoy process, non-loopback and foreign ports, the token kept off argv and output, nested and omitted fractions, group order, and that a pinned test DB never probes local servers.tests/test-widget-runtime.shchecks the threeasidecases.Docs:
configuration.md,providers.md,troubleshooting.mdandsecurity.md(the loopback CSRF and TLS exception).Related issues
Part of #101.
Type of change
Checklist
plugin.json.versionandCHANGELOG.mdare consistent (not release-bearing;## Unreleasedbullet)i18n/en.jsonkeys have translations in every localegit commit -s) under the DCOLocal gates:
check-metadata,check-changelog,check-dco,bash -n,shellcheck -S warning,qmllint,actionlint,gitleaks, everytests/test-*.sh(including the native widget runtime on Wayland), andAIOC_COVERAGE_MIN=95 scripts/coverage.