Repository navigation
feat(antigravity): populate account email and plan on authStatus, login, and accountUsage - #1054
Conversation
…in, and accountUsage
|
CHANGES @ e4689bb This follows the credential rule in #1052 well: the token file is only read, the keychain is never touched, nothing is written or refreshed, one persisted method gets one One correctness gap before approval:
Not blocking:
|
|
GO @ b81b08a The stale-file case is settled from the binary: agy 1.5.13 reads the keyring first and only purges the plain file best effort, so the file is authoritative only where no keyring can shadow it. Reading it only on Linux with Secret Service proved unreachable, and failing closed when the D-Bus probe cannot prove absence, means OAR omits an email rather than showing a wrong one. The probe asks the bus daemon only and never touches the keyring. The plan cache (5 minutes, cleared on login and logout) and the doc update cover the non-blocking notes. Consequence worth stating to hosts, already in antigravity.md: the email appears on headless Linux machines (most Raft computers) and is omitted on macOS, Windows and Linux desktops with a keyring. The plan name appears everywhere it is reported.
|
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_89b2b4088177a663c603b0e57fd3b7b0"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.125.0 ### Behavior changes hosts should know - **Session MCP credentials are refused where isolation is not verified** (#1047). Pi RPC, both Cursor placements and Devin now refuse an MCP server entry with a nonempty environment or HTTP header map. Claude declares the same refusal on Windows, and on POSIX rejects the open if it cannot create the private FIFO. Credential-free entries still attach. Hosts should read the installed MCP refusal declarations before passing a managed server with a token. - **Claude refuses host `--settings` when OAR supplies a settings object** (#1041). Claude keeps only one of two settings sources, so a host value would silently replace OAR's (or the reverse). Host-only file paths and inline JSON still pass when OAR emits no settings. - **Codex and Pi keep the user's configured instructions when a host appends** (#1050, #1056). Codex keeps `developer_instructions`. `appendSystemPrompt` now appends after them instead of replacing them, on new sessions, cold resume and fork. Pi SDK and Pi RPC do the same with the user's `APPEND_SYSTEM.md`: the selected file (a trusted project's `.pi/APPEND_SYSTEM.md`, else the global one) comes first and the host text after it, and an empty append leaves it intact. - **Claude update and upgrade no longer guess a native install** (#1037). A layout OAR cannot identify reports `unmanaged_installation`, and a Linux system package (apt, dnf, apk, pacman, found by a read-only ownership query) reports `package_manager`. `upgrade` refuses both instead of running `claude update`. Windows native `%USERPROFILE%\.local\bin\claude.exe` is still recognized. - **OpenCode prompt options work with a host `OPENCODE_CONFIG_CONTENT`** (#1051). OAR edits only the fields it owns in the host's inline JSON, appends its instructions file after the host's, and refuses only when both set the same prompt field, naming it. A native `debug` check confirms the result before launch. - **Antigravity reports the account plan, and the email where it can read it safely** (#1054). `authStatus`, login and `accountUsage` now carry the plan name (for example "Google AI Ultra") from the same ACP `authenticate` reply agy's own client gets, cached for five minutes and cleared on login or logout. The account email comes from agy's plain token file only on Linux when no Secret Service keyring is present, since otherwise that file may not be the active login. OAR never writes or refreshes agy's credentials, following the new design rule on stored credentials (#1052). ### Fixes - **Qoder and other stream-json runtimes: native notification turns are admitted** (#1048). A root turn that the runtime starts itself (for example when a background tool finishes) now shows as running in `status()`, and steering is accepted during it instead of being refused with `no_active_turn`. - **Shared ACP: a lease's credential redactor is registered before initialization** (#1042), so a lease that falls back to an isolated process is covered from the first byte. - **Unexpected session process exits carry the native diagnostic** (#1053). Every runtime now reports why its process exited (exit code or signal plus a redacted stderr tail) in the session exit reason, and a planned stop is no longer reported as a failure. Shared ACP processes send stderr only to the process diagnostic, not to each lease. - **sea-trial keeps native startup failures** (#1049): a failed open records `session_open_failed` with exit code or signal and a redacted stderr tail. ### Docs - Design rule for using a runtime's stored credentials (#1052): reads are free, requests only where the native client makes the same one, never write the store, keychains decided separately, private formats only feed answers that fail closed. Model request spec for Claude and Pi (#1039), Qwen native memory caveats (#1046), Codex thread instructions across compaction and reopen (#1044), ACP shared admission experiment links (#1027). ### Harbor (repo tooling, not published) - Idle large sessions are recycled with a handoff, daily token cap per agent (#1043); QA operations, contract checks, and deliveries that survive a restart (#1045). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
|
New failure in post-merge full tests: workflow Newly failing:
It could be any of PR 1037, PR 1039, PR 1046, PR 1047, PR 1048, PR 1049, PR 1050, PR 1051 and 5 more. Please fix. See logs: |
Summary
Populate Antigravity's
AuthStatus.account(emailandplan),LoginResult.account,AuthStatus.lastAccount/AccountUsageSnapshot.lastAccount, andAccountUsageSnapshot.plan/AccountUsageSnapshot.emailwithout opening a model session, spending quota, popping up a browser, or writing/refreshing credentials.[env]+[sym]agy1.5.13,packages/oar/src/runtimes/antigravity/account.ts):agy modelsconfirms a sign-in, read the single persisted OAuthmethodId(oauth-personaloroauth-business) from non-credentialcache/acp-auth-state.json. If missing or non-OAuth, omitplanwithout spawningagy acp.agy acpprocess (no--process-per-session, nosession/new, zero model quota), verifyinitialize.agentCapabilities._meta.antigravity.tier === trueand thatauthMethodsincludes the persistedmethodId, then callauthenticate({ methodId })once and read_meta.antigravity.tier.name.agy modelslogin confirmation + exact persisted method match + 5 s short deadline (bounded by remaining caller deadline, killing the child process on timeout) + defense-in-depth child env (SSH_CONNECTION=1,DISPLAYandWAYLAND_DISPLAYcleared), matchingagy 1.5.13google3/third_party/jetski/cli/acp/auth/auth.browserUnavailableReason([sym]+[env]).[sym]+[env]agy1.5.13):authenticateOAuthPersonal->trySilentConsumer->fetchTier->newCodeAssistTierFetcher.func1calls onlyGetUserTierandGetLoadCodeAssistResponse(noSaveUserTier; the only caller ofCLIAuthProvider.SaveUserTierin the binary isServerBackend.SelectLicense). Livestraceandstatconfirmedantigravity-oauth-tokenis openedO_RDONLYonly afteragy models.[env]+[sym]agy1.5.13,packages/oar/src/runtimes/antigravity/account.ts):<home>/.gemini/antigravity-cli/antigravity-oauth-token(respectingHOME/USERPROFILEandGEMINI_HOMEdefault-state rules consistent withaccountUsage): readsid_token_email(StoredToken.IDTokenEmail) with fallback to decoding only the unverified JWT payloademailofid_token.compositeTokenStorageviago_keyring), never writes or refreshes credentials, never makes network calls with tokens, and never includes token values in errors, logs, or outputs. On keyring-only hosts,emailis cleanly omitted.agy modelsreportslogged_outwhile a plain token file remains on disk, its email populateslastAccountonauthStatusandaccountUsage(reauth_required).packages/oar/src/runtimes/antigravity/auth-status.ts,auth.ts,account-usage.ts):readAntigravityAuthStatus/antigravityAuthStatusintoauth-status.ts(re-exported fromauth.ts).antigravityAccountUsagereusesreadAntigravityAuthStatus(..., { includeAccount: true })directly soplanandemailcome from the same single status check without spawning a secondagy acp.skills.tsandlogout.tskeepincludeAccountoff.tests/antigravity/antigravity-plan.test.ts,tests/antigravity/agy-1.5.13-authenticate.json,docs/runtimes/antigravity.md):agy 1.5.13initialize+authenticateresponses with all account identifiers removed.id_token_emailand unverified JWTid_tokenpayload decoding,SSH_CONNECTION/display env guard, single-method invocation, singleagy acpreuse inaccountUsage,lastAccountonlogged_out/reauth_required, omission when missing/unsupported/refused, short-timeout child kill, and zero token leakage.HOME/USERPROFILEin existing Antigravity login and usage unit tests so they do not depend on a developer machine's~/.gemini/.docs/runtimes/antigravity.md.Verification
agy 1.5.13([env]):agy modelsalone: 1006 msantigravityRuntime.authStatus: 2047 ms (returnedaccount.emailandaccount.plan: "Google AI Ultra", zero browser launch, zero quota)antigravityRuntime.accountUsage: 3856 ms (returnedemailandplan: "Google AI Ultra", reusing the single status read)CI=1 pnpm run checkpassed locally (577 test files / 5,472 tests + 19 mock sea-trial cases).