Repository navigation
feat(antigravity): sign Antigravity chats in with the server's own Google sign-in - #28650
Conversation
2a85488 to
460f09b
Compare
|
Antigravity chats could ask for Google sign-in, but Orca had no host service to complete it. This PR supplies an owner-scoped browser-link/paste flow on the machine running the chats and verifies the account with a temporary session. The Settings integration is #28705. Full review complete on Fixed:
Temporary — sign-in while a chat is busy: unsent images and commands are rejected as on an app restart; the common pattern holds them until Resume. Follow-up: send-lifecycle Stage B (recovery of unsent messages), for every agent; no PR yet. Busy-chat sign-in retains the earlier behavior. The low-impact empty temporary-directory allocation nit remains deferred. The description names the other temporary follow-ups and evidences the intended differences. Verification: the full PR workflow and aggregate gate passed on this exact head, with all 34 current checks complete and none pending or failed. All 67 tests in six named fixture files passed on M4Air at Sign-in flow QA is covered at the stack top, using adapted #28705 at For Brennan's review Main has no matching host sign-in flow. These full-window screenshots show the adapted stack before runtime installation, invalid-paste feedback and cancellation; they are not a main/branch comparison. The three judgment points are authentication settlement, oversized output, and the temporary busy-chat behavior. |
4159587 to
ca8e56c
Compare
460f09b to
7bbc3dc
Compare
ca8e56c to
ee10e46
Compare
7bbc3dc to
2a71622
Compare
ee10e46 to
4b39783
Compare
2a71622 to
4e080e4
Compare
4b39783 to
fc33561
Compare
4e080e4 to
73ad5b8
Compare
fc33561 to
818bcd7
Compare
73ad5b8 to
521d054
Compare
818bcd7 to
7d8ef22
Compare
521d054 to
149e553
Compare
7d8ef22 to
04764b5
Compare
3acde30 to
fd703ab
Compare
daefbcf to
064c106
Compare
fd703ab to
8c704a6
Compare
064c106 to
bebf41f
Compare
8c704a6 to
b463864
Compare
bebf41f to
a6c8f1b
Compare
b463864 to
38c6b05
Compare
38c6b05 to
b8a0d12
Compare
a6c8f1b to
42e9190
Compare
a0e0094 to
e62721d
Compare
…ver's own Google sign-in
Start spawns the Antigravity ACP server exactly as a chat start would (pinned
runtime, private temp, owner-only chat folder), behind the launch gate that
first stops this host's running Antigravity chats, and asks it to authenticate
with oauth-personal. A host without a pinned server build refuses Start, as it
refuses chats. The server's sign-in line now yields its link (validated as
Google's sign-in page back to a loopback port here) instead of ending the
connection signed out. Link long-polls the flow's state (25 s, early on change),
Cancel ends it, a new Start replaces it, and it expires after 300 s. All run on
the execution host behind accounts.antigravity-chat-sign-in.v1 and need
accounts-admin. List reports chatSignIn {saved, signingIn}; saved is a stat of
the server's own token file, which Orca never reads.
…s flow on the shared revisioned state Sign-in resolves the server exactly as a chat start does and fails with the not-installed reason when no copy is found, instead of downloading one. Its flow state is a RevisionedState, the same publish-and-wait primitive the runtime installer uses; replacement, close proof and the Link wire are unchanged.
…so a client that comes back can follow and cancel it chatSignIn gains an optional flowId while a sign-in runs. Before, a sign-in nobody watched held the chats' fence for up to 5 minutes and no client could see or cancel it.
…n, as they follow an install
…ion so the module parses
…res read as plain sentences accounts.antigravityChatSignInSubscribe (no params) sends the full sign-in status as a snapshot on subscribe, then one frame per state revision, and closes with the transport. It replaces the accounts.antigravityChatSignInStatus long-poll, its long-wait lane and the bounded revision wait, as the install status already did. A failed sign-in now tells the person what happened in plain words (no subscription, account not eligible, not approved, not installed, or a generic retry) and logs the raw error instead of showing it. Stopping the running chats before a sign-in waits for every close to settle before it reports, so the fence never lifts while a close is still running.
When the browser runs on another computer than the host (SSH or a paired remote host), Google's last page points at a port on the host that the browser cannot reach, so the sign-in never finished. accounts.antigravityChatSignInComplete takes that pasted address, checks it is Google's answer to this flow's own link (same loopback origin and path, one matching state, one code or error, no userinfo or fragment, a Google issuer if any), and sends it once to the server's listener on the host with a single direct GET. The flow shows a new verifying phase while the server finishes, and refuses a second paste.
…hat sent right after it is not refused
…ared helper, keeping the session create support within its line limit Main's file already sits at the limit, and the runtime method only forwarded to the helper.
a0f4aba to
be0dea3
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
…g with it Every bad address used to get one sentence. It now gets the specific one: too long, not a complete address, not this sign-in's, not exactly one Google answer, or not from Google. The checks themselves are unchanged.
…gs to the client that started it The host's chat sign-in status was a check that the server's sign-in file existed, which says nothing about whether the sign-in still works. The link came only from one printed line, a new Start from any device silently replaced a running sign-in, and a second link replaced the first. - The server's BROWSER is now a one-line helper run by Orca's own executable in Node mode, which prints the link on error output; it is checked before every server start, and the printed line is still read, on standard output as well as error output. No browser opens on the host, Windows included. - A sign-in belongs to the client that started it. Others see it in progress without its link and cannot start, cancel or complete it; it ends on its own after five minutes. - After Google answers, a session on the same server must start before the sign-in reads as signed in. - The host's status is the server's latest answer: signed in when a chat session or the sign-in's session starts, signed out when a chat hits the sign-in prompt or is refused for sign-in, and unknown until then. Nothing is read from the sign-in file and nothing is saved. - A second, different sign-in link fails the sign-in.
…lper as the server's browser
…eads only whole, valid sign-in lines Problems in the previous round: a sign-in could read as finished while its server or pasted-address request still ran, a server refusing a sign-in after a chat started left the host shown as signed in, the checking session stayed saved in the server's own store, and a broken sign-in line could count as the server asking to sign in. - The browser helper is POSIX only, with Node mode set inside the BROWSER command; Antigravity chats are not offered on Windows. - Sign-in lines are read by source: standard output carries the printed line, error output the printed line and the helper's. Only a whole, valid link is an answer; a malformed one on error output is dropped, and on standard output it ends the server. Standard output goes through the protocol's own line reader, including a last unterminated line, and error output keeps a whole link while its diagnostic tail stays small. - Any request the server refuses for sign-in marks the host signed out. - A sign-in is the host's one operation from Start until its work has unwound; a Start before then is refused, and Cancel or expiry also stops a pasted address on its way to the server. - A different second link fails the sign-in at any point, including while it is being checked. - The checking session's saved conversation is removed once the server is proven gone, only when its metadata names the sign-in's own folder. - A pasted address is checked for length before it is trimmed.



ELI5
Antigravity chats could report that Google sign-in was needed, but Orca had no way to complete it. This adds the host service that runs Google's own sign-in on the machine running the chats, captures its browser link, and checks that the account can start a chat. The Settings button is in #28705; this host-only PR adds no screen controls.
What Changed
Why
The common pattern keeps the sign-in operation alive through cancellation and cleanup, checks the server's answer instead of guessing from saved files, and disposes of the verification session. Using the existing launch preparation, process owner and caller identity gives local and remote hosts the same ownership guarantees without another process registry or saved status field.
Differences from the common pattern
Linked Issue
N/A (maintainer; part of the Antigravity Chat stack). Settings integration is #28705.
Visual Proof
Sign-in flow QA is covered at the stack top, with #28705 adapted to this service at
3f8264d35b644a461ac3ebbb40ba307263869d1c. Its host production files match this final head byte for byte; the final commit only updates seven launch-command snapshots. Real runtime install, link capture, invalid paste, cancellation and removal passed on M4Air. Browser opening was stubbed and Google login was not completed. These are stack-top screenshots before installation, during invalid paste and after cancellation; main has no host sign-in operation for a matching flow comparison.Testing
7666ec194643(Node 24.19.0, one worker); the final head changes only seven snapshot expectations, with all production files independently verified byte-identical. The full PR workflow, including its aggregate gate, passed on21b0c5eecb517d7ccb66dbf1d41b5fc49f10b4fc; all 34 current checks completed with zero pending or failed.3f8264d35b644a461ac3ebbb40ba307263869d1c. No standalone host Electron QA or completed Google login is claimed. UI-specific acceptance remains with feat(settings): sign Antigravity chats in from Accounts #28705.Review
Full path: authentication, process lifetime, saved verification files and host calls. Cumulative round 3 found authentication-answer ordering, oversized stdout and a native Windows fixture problem. This head implements their fixes, plus colon-path helper handling and quiet cancellation/expiry. The fresh round-5 adversarial source audit, readiness checklist and dedicated resource scan are complete on this exact head with no remaining production blocker. Three test-only expectation/timing findings are corrected and the six named fixtures pass. Stack-top host QA is accepted complete by the lane owner. The full PR workflow and aggregate gate passed on the final head. No open review blocker remains; the existing status comment records the final result. The one status comment tracks verification.
The complete formatted change from service rebuild base
be0dea3a2abis production +595/−259, net +336; tests +402/−83, net +319. Both fit the approved limits. The broader private queue-holding candidate was discarded. Busy-chat sign-in, shared Stop, send holding and queue selection retain the existing behavior; the named all-agent recovery follow-up owns that temporary difference. No new saved field, failure cause or wire operation.Agent skill upstream boundary
Notes
No new sign-in controls or default changes. Older hosts retain their launch path; callers must check the existing sign-in capability before using these unreleased calls. PR author: @BrennanKB5.
Checklist