Repository navigation
feat(acp): Antigravity in the Chat UI over its ACP server - #28595
Conversation
|
Antigravity previously opened only as a terminal agent. This PR adds it to experimental Chat UI through Google's separate chat server. Review found that an existing terminal Command could launch the wrong program, and a host without a pinned server build could offer a chat that failed at startup. The fixes let chats ignore that terminal setting while keeping the existing server lookup, and apply the same execution-host check to new chats and saved-chat restarts. Saved conversations remain readable on an unsupported host. A test-only correction also asserts the intended Linux launch argument before comparing the existing snapshots. Three review rounds finished with no new finding in round 3 and an architecture verdict to keep the design. Latest-head CI passed, including all five Node test shards, static analysis/typecheck, both packaging jobs, guards and the final test-selection check. Locally, 65 targeted tests passed, including all 49 launch cases; Node/web typechecks and code-quality checks passed. The final test-only correction also passed all 49 cases and gated Node typecheck. Pre-push checks ran; the local Bun version mismatch and a machine-queue timeout were recorded, with the missing Node compiler evidence completed afterward. On M4Air, hidden-window checks compared main with the identical reviewed production code: choosing Antigravity changed from a selected terminal to a selected Chat tab, preserving the existing Claude tab. A real first installation downloaded pinned server 1.3.0; sending Custom default-tab/setup seeding was not exercised live: the hidden-window New Workspace action stalled in the driver. Source parity was verified; it follows the same setup/default/issue handoff as other chat agents. Windows UI QA was blocked, because the rig hit its console-allocation limit and its fallback agent override was unsupported; refusal is verified by source/tests, not a rendered Windows run. Signed-in, floating-window and Linux cold-start behavior remain untested live. Deferred to separate work: offering managed chat without an installed terminal CLI; shared runtime single-flight installation and damaged-folder repair; generic floating-workspace activation handling. Native sign-in remains in the later sign-in PRs. Linux's roughly 1 GiB extraction has a 120-second budget, but slow-disk behavior was not measured. No merge or synchronization with main was performed. |
eeecb2d to
e73668c
Compare
7e7d134 to
7ebb0e6
Compare
411d720 to
f05f141
Compare
7ebb0e6 to
e6dddea
Compare
f05f141 to
a341356
Compare
440b90c to
4a5db36
Compare
|
QA screenshots for the explicit Antigravity install (M4Air, dev build of 4a5db36, throwaway profile, CDP only). New Antigravity chat is blocked until installed (111.5 MB download) Downloading, started from the chat, shown in the chat and in Settings > Chat > Providers Cancelled from Settings → both surfaces show "Installation cancelled." + Retry. "Cancelling…" with the button disabled rendered in both at once, but only for ~50 ms (MutationObserver log: click → settled in 216 ms), too brief to screenshot. Installed: Settings shows Installed. + Reinstall, no Remove control. The chat gets its composer back (8.3 s from Retry, ~13 MB/s). "hello" with nobody signed in shows the sign-in notice, not install text. The chat stays usable during Reinstall. Unreachable proxy: Retry is offered, but the error is the raw |
a341356 to
5b1bd65
Compare
4a5db36 to
e15c614
Compare
5b1bd65 to
f9b8f4c
Compare
e15c614 to
e10a8d3
Compare
f9b8f4c to
4abb999
Compare
e10a8d3 to
5fc77e8
Compare
4abb999 to
85ab473
Compare
f95fef4 to
9d3ee05
Compare
85ab473 to
2162aaa
Compare
9d3ee05 to
52d774d
Compare
2162aaa to
e6d2b82
Compare
52d774d to
de5a9bd
Compare
5abca6a to
f0862ad
Compare
5707583 to
2d88838
Compare
f0862ad to
a4510cc
Compare
49fe731 to
d57b9b2
Compare
With the experimental chat setting on, Antigravity chats run Google's Antigravity ACP server, which Orca installs only when the person clicks Install: a pinned 1.3.0 release whose archive and both executables are verified by hash and size (macOS arm64/x64, Linux x64/arm64). A start never downloads it. Each host keeps one private sign-in folder for these chats under Orca's data folder, made owner-only before every start; the server keeps its sign-in there as a file. A chat signs in with the server's Google method through the existing auth-required retry; with no saved sign-in the server's sign-in prompt ends the chat signed out. The Agent Permissions setting maps to the server's own mode, and a question the server asks shows as a question that takes one of its choices, never auto-answered. A chat reopens its session with session/resume.
…per chat Each mode maps to the server's own (default, auto_edit, yolo). No Approve for me: the server has no automatic reviewer. Accept edits gets its own description, since auto_edit approves file edit tools only.
…its download size The Antigravity chat server installs only when the person clicks Install. Besides the chat's own Install card, Settings > Chat gains a Providers section and the Antigravity accounts section gains the same install row for its host (never a WSL distro), both following the host's install status. A host now reports its pinned release's download size, so an idle row reads "111.5 MB download." instead of "Not installed.".
…w Always warning, and an install that proves the server runs - A command's line and output now show in Orca's command row: the dialect maps the server's command_line/combinedOutput/exitCode to the shared shape and drops its duplicate output copy. - The server's own /logout is hidden from the command list, and a message that is only /logout is refused before it is sent: it would sign out every Antigravity chat on this host outside Orca's sign-in gate. Dialects can now name withheld commands; the refusal has its own plain sentence. - The server's prompt-injection warning on "Allow Always (risky)" is shown on the approval card. - Install starts the unpacked server once under a throwaway home, asks initialize only, and keeps the copy only if it answers as the pinned release and its process is proven stopped. - The server runs with PYTHONUNBUFFERED=1; its environment lives beside its runtime. - The permission mode option is found by its category, so the spec no longer names it.
… Orca's connection speaks
…limit Main's file already sat at the limit, so the account-home services pass inline instead of through a variable.
a4510cc to
62784fe
Compare
…ission launches Main now starts ACP chats without full access and applies the chat's own mode after start, as the Grok and OpenCode snapshots already record.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
Brings in 10 more upstream commits, including stablyai#28595 (Antigravity chats over Google's Antigravity ACP server). That server only has builds for macOS and Linux, so on Windows the fork's agy transcript chat stays the Antigravity chat. Adaptations: - The launch pre-flight leaves out a registered agent whose managed program has no build for this host, so Antigravity on Windows launches as a terminal from the start: its early tab is published again and the transcript chat view applies, instead of a structured attempt that the host then refuses. - The transcript chat view follows the per-agent chat switch upstream added to Settings > Chat > Providers (isNativeChatDefaultFor), not only the global Chat UI switch. Conflicts: the Codex adapter keeps both readPromptSuggestion (fork) and heldSends (upstream); subscriber delivery uses upstream's deliveryPort with the fork's prompt-suggestion checkpoint. structured-session-create-support shares one hostUnsupported refusal helper to stay under max-lines once formatted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>










ELI5
People asked when Orca's Chat UI will support Google's Antigravity agent. Antigravity chats need Google's separate Antigravity chat server, a download of 111.5 to 333.7 MB depending on the machine. An earlier version of this stack downloaded it silently the first time a chat started: about 18 seconds of "Working for Ns" with no progress and no Cancel, and every extra chat opened started another download.
Now nothing downloads until you click Install. A new Antigravity chat shows an Install card in place of its message box, with the download size, then progress and Cancel. The same Install row sits in Antigravity's row of Settings > Chat > Providers and in the Antigravity section of Accounts. Starting a chat never downloads anything.
This PR is the one that adds Antigravity to Chat UI. Pick Antigravity like any other chat agent. Once the server is installed, chats work like Grok or OpenCode chats: streaming replies, tool rows, a per-chat permission picker (Ask, Accept edits, Full access), and Antigravity's questions shown as questions you answer. Signing in comes in #28650 and #28705. Until they land, a chat says it is not signed in.
What Changed
This revision (moving to the common pattern; each item is problem, then what changes):
Two "Providers" sections in Settings > Chat. Main gained its own Providers list (feat(native-chat): choose which agents open as a chat #29071: each chat agent with a switch for opening it as a chat), and this PR added a second Providers section holding only Antigravity's install row. Rebased onto main, the install row now sits inside Antigravity's row of that one list, and the separate section is gone. The Accounts section keeps its install row and its sentence about the separate server.
Command rows showed a raw blob. The server reports a command's result with its own field names (
command_line,combinedOutput,exitCode) and no text blocks, so each command row showed the result as JSON with the output twice and no command line. Antigravity's protocol adapter now maps those fields to Orca's command row: the command line, its output once, and its exit code./logoutin one chat signed out every Antigravity chat on the host. The server offers its own/logout, which clears the sign-in all of this host's Antigravity chats share, outside the pause that protects sign-in changes (feat(acp): pause an agent's chat starts while its shared sign-in changes #28649); another running server could then save its old sign-in back. Until Orca has its own sign-out,/logoutis hidden from the chat's command list, and a message that is only/logoutis refused before it is sent: "This command isn't available in Antigravity chats, so it was not sent."The server's warning on "Allow Always (risky)" was dropped. For shell and web approvals the server attaches a prompt-injection warning to that choice; it is now shown on the approval card above the choices.
"Installed" could show for a server this host can't run. Antigravity now provides the start check feat(acp): a managed runtime installs only when asked, with progress and cancel #29023 runs before publishing: it starts the unpacked server once under a throwaway home folder, asks only
initialize(never signs in), and keeps the copy only if it answers asantigravity-acpversion 1.3.0 with session load and resume, sign-out support and Google sign-in, and its process is then proven stopped. It times out after 90 seconds, and the throwaway folder (including the server's roughly 1 GB self-unpack) is deleted afterwards.The download size read "111.5 MB download." It now reads in whole MB, as the common pattern shows it: "112 MB download." on Apple silicon.
The server runs with
PYTHONUNBUFFERED=1, as the common pattern sets it, so its output is never held back in a buffer. Its environment rules now live beside its runtime, shared by chat starts and the start check.The spec no longer names its mode option's id; feat(acp): an agent can run each chat's own permission mode itself #28455 finds it by category.
Before: Antigravity could only run as the
agyterminal agent. Picking it with Chat UI on opened a terminal.After (behind Chat UI's experimental setting): Antigravity is a Chat UI agent on Orca's existing Agent Client Protocol (ACP) chat engine.
agy_acp_server.par), a separate program fromagy, which has no ACP mode. Version 1.3.0 is pinned for macOS (Apple silicon 111.5 MB, Intel 117.2 MB) and Linux (x64 333.7 MB, arm64 321.7 MB). Google publishes no checksums, so Orca stores the size and SHA-256 of each archive and of both executables in it.agy, not this server. A copy of the server already on PATH is used only when its helper program sits beside it and Orca has none installed.agyCLI is installed, because its chats don't use that CLI), and the Antigravity section of Accounts (for that host, when Chat UI is on, not for a WSL distro). Before installing, the row reads "{size} MB download." from the host's archive size, in whole MB, e.g. "112 MB download." on Apple silicon. During the download it shows progress and Cancel.antigravity-chatin Orca's data folder, where the server stores its own sign-in. Orca makes it owner-only before every start and never reads what is inside. Inherited Google API keys and settings (GEMINI_API_KEY,GOOGLE_*,GCLOUD_PROJECT,CLOUDSDK_CORE_PROJECT,ANTIGRAVITY_HARNESS_PATH, otherAGY_ACP_*) are not passed to the server. The server is told to keep its sign-in in that folder rather than the keychain entry every copy on the machine shares, never to open a browser itself, and not to buffer its output.default,auto_edit,yolo) through feat(acp): an agent can run each chat's own permission mode itself #28455. There is no "Approve for me", since Antigravity has no automatic reviewer. A change mid-chat applies from the next message. Accept edits approves file edits only, and the picker says so: "Approves file edits; asks for the rest".session/resume, becausesession/loadreplays the whole conversation, which the chat already holds.New optional launch-spec fields used here:
ignoreAgentCommandSetting,resumePreference, and an accountpreparestep that runs before every start (never on reads).The host's install status gains an optional
downloadBytes, the pinned archive size. Older clients ignore it. A new client talking to a host without it shows "Not installed." as before.Antigravity's protocol adapter gains a tool-update mapping (the hook OpenCode's and OMP's adapters already use), and adapters can now name commands a chat withholds; the refusal has its own plain sentence in all six languages.
Why
Google ships Antigravity's chat support only as this ACP server, so this reuses Orca's existing ACP engine instead of adding a second one. Letting the server run its own sign-in (next PRs) keeps Orca independent of Google's internal login formats. Mapping the picker onto the server's own modes keeps the server's own rules about what is an edit.
Linked Issue
N/A (maintainer). User request: when will Chat UI support the Antigravity CLI.
Visual Proof
This head (
75dc90dcb7b, rebased onto main; M4Air, dev build, throwaway profile, hidden window driven over the Chrome DevTools Protocol (CDP) only, download throttled to about 1 MB/s so Cancel lands mid-download; driven by a non-Claude QA driver). Result: Settings > Chat has one Providers list; Antigravity's row shows its install row in place of the CLI line; Install, Cancel and Retry from that row reach the chat and Accounts live; the "Open Antigravity as a chat" switch saves.Providers list, idle (Antigravity's row: "112 MB download." and Install):
Downloading from the Providers row, followed live by the chat:
Cancelled from the Providers row ("Installation cancelled." and Retry in every surface):
Installed (about 80 s from Retry at 1 MB/s): the row reads "Installed." with Reinstall, and the chat gets its message box:
Accounts > Antigravity keeps its own install row and the sentence about the separate server:
A new chat before install shows the install card in place of the message box (the "Start a chat" line above it is replaced by #30001):
Not covered by this round: removing the runtime (it arrives in #29139/#29140), and the start check, command rows,
/logoutrefusal and "Allow Always" warning (no signed-in account in QA, by rule). A Settings search for "antigravity" finds Accounts > Antigravity, not the Providers row, because main's Providers search entry names no agents; that is main's design for every agent and is left as is.Earlier build, signed out: "hello" with nobody signed in shows the sign-in notice, not install text:
Picker, main versus this PR (an earlier hidden-window CDP comparison on M4Air: main
294927e097versus8cd32680e1b, isolated data, Chat UI on, and the same deliberately invalid terminal Command setting): Antigravity sits alongside the existing agents.Before: selecting Antigravity opens and selects a terminal, and the scratch Command fails as expected. The absolute scratch path is covered with solid black boxes for privacy; the rest of the capture is unchanged.
After, earlier build: selecting Antigravity opens a Chat tab despite that terminal setting. That build still downloaded the server on start, which this head no longer does. Sending
hellosettled promptly with one signed-out notice, no browser link, and no second "agent exited" error.Setup and default-tab limitation: the hidden-window New Workspace action stalled in the QA driver, so custom default-tab and setup seeding was not exercised live. Reading the source shows the same setup, default-tab and issue handoff as other Chat UI agents, with the chat appended and selected. The image below shows only the workspace the backend created; it does not prove seeded tabs or their order.
Not exercised live: the per-chat permission picker, a signed-in chat, this revision's changes (listed above), floating windows, Linux cold start, and Windows. Windows QA was blocked before launch by the rig's console-allocation limit; the Windows refusal is covered by source and tests only.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
A recorded real Antigravity exchange (scrubbed, 11 lines) replayed through the real chat adapter: sign-in retry,
defaultmode set, a question answered with one of its own choices, the turn completing. Without this PR's question handling it shows an approval card instead.Permission picker through the real chat host: a chat switched to Accept edits starts the server in
auto_edit; switched to Full access mid-chat, the next message runs on a server started inyolo.Launch contract: the private folder is used and made owner-only, inherited Google keys are removed, file storage is forced, and the terminal Command setting is ignored.
The launch-parity snapshot gains Antigravity cases, generated by the existing coverage check. Existing cases change only in session-id numbering.
The install row's label table gains the size line ("112 MB download.").
Start check: a stand-in server answering with the pinned server's recorded
initializepasses for version 1.3.0 and fails Install for any other version (skipped on Windows, where Antigravity isn't offered).The launch-parity snapshot gains
PYTHONUNBUFFERED=1.Archive and member sizes were read from each pinned archive's zip directory with HTTP range reads, matching the pinned URLs.
pnpm tc:node,pnpm tc:web, 453 test files and the code-quality gate passed before the restack onto the install PRs. PR CI covers the current head.Review
Agent skill upstream boundary
QA, round 2 (M4Air, 10-16, build of
2efa3308959before this revision's last fixes; Grok drove the hidden window over the Chrome DevTools Protocol only)/logoutwere not exercisable: QA never signs in to Google.Notes
/logoutis withheld in chats until Orca has a sign-out (see the differences below).Differences from the common pattern
trueis not a command there, so the server would open a real browser), the.exeprogram names, a case-insensitive environment scrub, the temp folder's path length, each member's checksum, and process-tree and locked-file handling./logoutis hidden from the command list and refused, which is Orca-only; the common pattern intercepts a/logoutmessage and runs its own sign-out, which stops the chats first. Follow-up: the sign-out change (feat(antigravity): sign Antigravity chats in with the server's own Google sign-in #28650 and feat(settings): sign Antigravity chats in from Accounts #28705 list it), after which/logoutis routed to it.initialize, so a server answering version 2 fails the start check, where the common pattern also accepts 2. The pinned 1.3.0 server answers 1, and Orca runs no other build./compact. A strings dump of the pinned 1.3.0 server listsplanas its only built-in command, so a/compactwould reach the model as plain text; the common pattern does send it, and neither side has checked it against a signed-in server. Follow-up: try/compactin a signed-in 1.3.0 chat and turn it on if the server compacts.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)