Skip to content

feat(antigravity): sign Antigravity chats in with the server's own Google sign-in - #28650

Merged
brennanb2025 merged 19 commits into
mainfrom
brennanb2025/agy-chat-5b1b-signin-service
Oct 18, 2026
Merged

brennanb2025 merged 19 commits into
mainfrom
brennanb2025/agy-chat-5b1b-signin-service

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​647 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​637
Prod 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1049 $\color{#cf222e}{\Huge{\mathbf{−}}}$​136 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​913

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

  • One client owns a sign-in until all of its work has stopped. Starting again from that client returns its running sign-in; other clients see that sign-in is busy without receiving its link or controls. Cancel waits for cleanup, and new starts are refused during teardown. The five-minute deadline starts when sign-in is accepted.
  • The installed server handles Google's sign-in and saves it in the same private account folder used by chats. Nothing downloads here. New agent starts are refused while credentials change. Running Antigravity processes are stopped first; their conversations remain available.
  • A browser on another computer can finish by pasting Google's final redirect address. Orca checks the address, return path, state and Google response, then sends it once to this host's local listener. Ending sign-in also stops that request.
  • Host authentication starts as unknown and changes only when the server answers. Successful session startup reports signed in; a sign-in request or authentication refusal, including during a later chat message, reports signed out. File existence is no longer treated as proof of sign-in.
  • The browser helper is checked before every server start. Sign-in links are read through the existing output framing, validated before delivery and withheld from diagnostics. A second distinct link fails the flow. Invalid error-output markers are ignored; invalid declared prompts on standard output fail safely.
  • Verification opens a temporary chat session. Its saved files are removed only after the server is proven stopped, and only when the session identifier and metadata prove they belong to this sign-in's unique temporary folder. An unproven process stays owned and is retried before the next chat or sign-in.
  • Subscribers receive an initial snapshot and subsequent changes. Errors use plain sentences with an action to take; captured sign-in links are never logged.

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

  • Intended — helper-only Node mode. The existing process supervisor removes Node mode from the server environment so it cannot affect the agent's tools. The browser helper sets it inside its own command instead. Evidence: helper command and supervisor environment.
  • Intended — existing execution-host process ownership and caller identity. The host's launch gate and exact-process owner supply exit evidence; the transport supplies a stable desktop, command-line or paired-device identity. This supports SSH and multiple clients without treating lost contact as process exit or running a remote host's work on the client. Evidence: host placement and caller check and transport-proven caller keys.
  • Intended — macOS/Linux only. Those are the platforms with verified server builds today; this PR preserves that admission check. Evidence: verified platform pins and admission.
  • Temporary — Antigravity model discovery. Verification starts a session but does not publish its model catalog; this named follow-up will align verification and model publication.
  • Temporary — Antigravity sign-out. Sign-out remains the named follow-up; the chat command is withheld in the meantime (feat(acp): Antigravity in the Chat UI over its ACP server #28595).
  • Temporary — Windows pin. This named follow-up must supply and verify a server build and its browser helper before Windows sign-in is offered.
  • 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). This recovery will apply to every agent; there is no follow-up PR yet. Busy-chat stopping and the user’s Stop retain their existing behavior in this PR.

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.

Antigravity chat sign-in row before installing the runtime

Installed Antigravity runtime: Orca rejects an invalid pasted sign-in address

Installed Antigravity runtime: sign-in cancelled without completing login

Testing

  • Added coverage for same-chunk authentication-answer order, accepted verification-session receipts, a declared stdout prompt over 16 MiB, the real Python browser-command parser with a colon/space/apostrophe executable path, and quiet expiry. The service fixture mocks helper preflight so native Windows does not enter POSIX code.
  • All 67 tests across six explicitly named host fixture files passed on admitted M4Air at 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 on 21b0c5eecb517d7ccb66dbf1d41b5fc49f10b4fc; all 34 current checks completed with zero pending or failed.
  • No local heavy checks, installation, Electron build or real Google sign-in. The ordinary commit used no bypass flags; generated pre-commit hooks were absent, so no hook check is claimed.
  • Sign-in flow QA is covered at the stack top with adapted feat(settings): sign Antigravity chats in from Accounts #28705. Real installed-runtime capture, invalid-paste feedback, quiet cancellation and runtime removal passed on adapted stack 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 be0dea3a2ab is 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

  • Not applicable: no upstream skill-installer source is copied or translated.

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

  • Explained the user-facing before/after, mechanism and alternatives.
  • Cross-platform, SSH and mixed-version behavior considered.
  • Automated regression coverage and full PR CI on the stated head.
  • Review loop and source readiness complete; final automated readiness confirmation is recorded in the status comment.
  • Sign-in flow QA covered at the stack top on the adapted UI.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 2a85488 to 460f09b Compare October 14, 2026 08:33
@brennanb2025

brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

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 21b0c5eecb517d7ccb66dbf1d41b5fc49f10b4fc. Independent correctness, architecture, contract, readiness and resource reviews are settled. The final narrow audit found no remaining production blocker.

Fixed:

  • Authentication answers settle with their typed responses, preserving the latest answer and the accepted verification-session receipt for cleanup.
  • An oversized declared stdout sign-in prompt fails promptly without delivering a partial link.
  • The native Windows service fixture avoids real POSIX helper preflight.
  • Browser-helper paths containing a colon survive Python’s command parsing.
  • Expected cancellation and expiry stay quiet; unexpected or unproven cleanup failures retain diagnostics.

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 7666ec194643; this final commit changes only seven launch-command snapshot expectations, and every production file is independently verified byte-identical. Production size from service rebuild base be0dea3a2ab: +595/−259, net +336; tests +402/−83, net +319. Normal commits used no bypass flags; generated local pre-commit hooks were absent, so CI supplies the static-check evidence.

Sign-in flow QA is covered at the stack top, using adapted #28705 at 3f8264d35b644a461ac3ebbb40ba307263869d1c, whose host production matches this head. Actual pinned-runtime installation, real sign-in-link capture, invalid-paste feedback, quiet cancellation and removal passed. Browser opening was stubbed; Google login was not completed. Successful account verification after a real login and live SSH were not exercised. No standalone host Electron QA is claimed.

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.

Antigravity chat sign-in row before installing the runtime

Installed Antigravity runtime: Orca rejects an invalid pasted sign-in address

Installed Antigravity runtime: sign-in cancelled without completing login

The three judgment points are authentication settlement, oversized output, and the temporary busy-chat behavior.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from 4159587 to ca8e56c Compare October 14, 2026 18:29
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 460f09b to 7bbc3dc Compare October 14, 2026 18:29
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from ca8e56c to ee10e46 Compare October 15, 2026 10:49
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 7bbc3dc to 2a71622 Compare October 15, 2026 10:52
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from ee10e46 to 4b39783 Compare October 15, 2026 13:34
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 2a71622 to 4e080e4 Compare October 15, 2026 13:34
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from 4b39783 to fc33561 Compare October 15, 2026 13:40
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 4e080e4 to 73ad5b8 Compare October 15, 2026 13:40
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from fc33561 to 818bcd7 Compare October 15, 2026 13:57
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 73ad5b8 to 521d054 Compare October 15, 2026 13:57
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from 818bcd7 to 7d8ef22 Compare October 15, 2026 14:24
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 521d054 to 149e553 Compare October 15, 2026 14:25
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from 7d8ef22 to 04764b5 Compare October 15, 2026 14:49
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch 2 times, most recently from 3acde30 to fd703ab Compare October 15, 2026 14:51
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from daefbcf to 064c106 Compare October 15, 2026 15:08
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from fd703ab to 8c704a6 Compare October 15, 2026 15:08
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from 064c106 to bebf41f Compare October 15, 2026 16:03
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 8c704a6 to b463864 Compare October 15, 2026 16:03
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from bebf41f to a6c8f1b Compare October 15, 2026 16:30
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from b463864 to 38c6b05 Compare October 15, 2026 16:30
@brennanb2025
brennanb2025 marked this pull request as ready for review October 15, 2026 17:09
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 38c6b05 to b8a0d12 Compare October 15, 2026 19:57
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch from a6c8f1b to 42e9190 Compare October 15, 2026 19:57
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1a-credential-fence branch 2 times, most recently from a0e0094 to e62721d Compare October 17, 2026 19:49
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agy-chat-5b1a-credential-fence to main October 17, 2026 20:17
…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.
…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.
…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.
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from a0f4aba to be0dea3 Compare October 17, 2026 20:19
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b1439de-31b5-4b0b-ac2d-ce21ab07a5ec
📥 Commits

Reviewing files that changed from the base of the PR and between e902a58 and 21b0c5e.

⛔ Files ignored due to path filters: 1
  • src/main/runtime/__snapshots__/structured-agent-launch-parity.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing: 9
  • src/main/acp/acp-agent-connection.test.ts
  • src/main/acp/acp-agent-connection.ts
  • src/main/acp/acp-json-rpc-peer.ts
  • src/main/acp/acp-response-settlement.ts
  • src/main/acp/acp-session-runtime.ts
  • src/main/antigravity/antigravity-browser-helper.test.ts
  • src/main/antigravity/antigravity-browser-helper.ts
  • src/main/antigravity/antigravity-chat-sign-in.test.ts
  • src/main/antigravity/antigravity-chat-sign-in.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change adds a host-level Antigravity chat sign-in flow. ACP connections detect sign-in prompts and links, and the flow validates Google sign-in URLs and callbacks before delivering callbacks to the local listener. Runtime RPC methods start, cancel, and complete flows and stream status updates. Shared types, parameter schemas, and a runtime capability describe the sign-in API. Tests cover sign-in transitions, ownership, invalid URLs, launch failures, and unconfirmed connection closure.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 21b0c

This change adds a host-side Antigravity chat sign-in flow with ownership checks, cancellation and cleanup. No actionable merge-blocking risk was identified in the supplied context.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 80.56% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 29 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely identifies the main change: server-side Google sign-in for Antigravity chats.
Description check Passed The description includes the required sections and provides clear user impact, implementation details, rationale, issue handling, visual proof, testing results, review notes, platform considerations, …
Full details: Description check

Explanation

The description includes the required sections and provides clear user impact, implementation details, rationale, issue handling, visual proof, testing results, review notes, platform considerations, and checklist status. The maintainer exception explains why no linked issue is provided, and the host-only scope explains the lack of standalone UI controls.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…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.
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant