Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

fix(antigravity): run Google's agy via `agy acp` on every OS (CHOO-4114)

switch-bug-fixer330da9e751a4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14f1c0cac..5742ce2e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2536,6 +2536,13 @@ version of their own to them without also giving them a release of their own.
agent"; it was the only place Console showed that name.
#### Fixed
+- **Antigravity runs Google's own `agy` CLI, on Windows too.** Switch Console
+ finds `agy` (including `%LOCALAPPDATA%\agy\bin` on Windows), installs it with
+ Google's installers, runs sessions with `agy acp`, and checks the sign-in you
+ made with `agy acp --login` or a `GEMINI_API_KEY`, instead of a separate
+ Antigravity ACP profile that a Google sign-in never reached. Antigravity's
+ questions now reach you, too. A machine that only has the older
+ `antigravity-acp` runtime keeps using it until `agy` is installed.
- **Console no longer opens to a blank window on a database a newer build
has changed.** Stable and Canary share one database, so after Canary added a
migration, an older build found tables it was not written for, applied
diff --git a/console/AGENTS.md b/console/AGENTS.md
index cb0ef4470..5f813cb4e 100644
--- a/console/AGENTS.md
+++ b/console/AGENTS.md
@@ -9,7 +9,7 @@ Switch Console is a cross-platform, local-first Electron app for orchestrating m
coding agents in parallel. Each agent runs in its own session in its location's directory
(there are no Git worktrees). An agent runs either locally or — when configured remote — on an
SSH host — through a persistent SDK host. The supported providers are Claude Code,
-Codex, OpenCode, Antigravity ACP and Cursor. Local and SSH sessions use the same
+Codex, OpenCode, Antigravity and Cursor. Local and SSH sessions use the same
adapters, durable commands and transcript recovery. See [SDK sessions](docs/sdk-sessions.md).
## The name: display vs identity (CHOO-2008)
diff --git a/console/README.md b/console/README.md
index f98a730fb..7bbac4dfb 100644
--- a/console/README.md
+++ b/console/README.md
@@ -5,7 +5,7 @@ coding-agent sessions that participate in [Agent Switch](../README.md) — which
rooms an agent belongs to, its configuration (working directory, identity),
and the scheduling that starts and drives its sessions.
-Supported providers: Claude Code, Codex, OpenCode, Antigravity ACP and Cursor.
+Supported providers: Claude Code, Codex, OpenCode, Antigravity and Cursor.
Local and SSH sessions use the same persistent SDK host. See
[SDK sessions](docs/sdk-sessions.md) for recovery, capabilities and prerequisites.
diff --git a/console/apps/switch-console-desktop/src/main/core/agent-types/controller.test.ts b/console/apps/switch-console-desktop/src/main/core/agent-types/controller.test.ts
index 2f92ff06e..07d1f9af7 100644
--- a/console/apps/switch-console-desktop/src/main/core/agent-types/controller.test.ts
+++ b/console/apps/switch-console-desktop/src/main/core/agent-types/controller.test.ts
@@ -25,7 +25,7 @@ it('offers remote agent types whose CLI is installed on the host', async () => {
expect(statuses).toContainEqual({
agentId: 'antigravity',
available: false,
- blockedReason: 'Install Antigravity ACP on example-host.',
+ blockedReason: 'Install Antigravity CLI (agy) on example-host.',
blockedKind: 'not-installed',
});
expect(statuses).toContainEqual({
diff --git a/console/apps/switch-console-desktop/src/main/core/managed-agents/controller.ts b/console/apps/switch-console-desktop/src/main/core/managed-agents/controller.ts
index 6fab62148..4c0ae8740 100644
--- a/console/apps/switch-console-desktop/src/main/core/managed-agents/controller.ts
+++ b/console/apps/switch-console-desktop/src/main/core/managed-agents/controller.ts
@@ -412,7 +412,11 @@ async function loginToGive(
'already signed in, its login is likely in the OS keyring, which cannot be given to ' +
'another machine: unless your organization enforces the keyring, set ' +
'cli_auth_credentials_store = "file" in the Codex config.toml and sign in again.'
- : `This computer is not signed in to ${provider}. Sign in here first.`
+ : provider === 'antigravity'
+ ? 'This computer has no Antigravity sign-in to give. Google’s agy keeps its sign-in ' +
+ 'in the OS keychain, which cannot be given to another machine: sign in there with ' +
+ 'agy acp --login instead.'
+ : `This computer is not signed in to ${provider}. Sign in here first.`
);
return { kind: 'auth-json', credential };
}
diff --git a/console/apps/switch-console-desktop/src/main/core/providers/controller.ts b/console/apps/switch-console-desktop/src/main/core/providers/controller.ts
index 5eb6431d2..79b21d7f9 100644
--- a/console/apps/switch-console-desktop/src/main/core/providers/controller.ts
+++ b/console/apps/switch-console-desktop/src/main/core/providers/controller.ts
@@ -6,7 +6,7 @@ import type {
InstallOverride,
} from '@switch-console/core/deps/runtime';
import { reportedCliAction } from '@main/core/telemetry/cli-action';
-import { ensureUserBinDirsInPath } from '@main/utils/userEnv';
+import { ensureUserBinDirsInPath, ensureWindowsUserBinDirsInPath } from '@main/utils/userEnv';
import type { ProviderCustomConfig } from '@shared/core/app-settings';
import {
type AgentProviderDefinition,
@@ -155,7 +155,10 @@ export const providersController = createRPCController({
probeAll: async (connectionId?: string, options?: DependencyProbeOptions) => {
// A CLI installed since start, by hand or by its own installer, is often in
// ~/.local/bin, which this computer's controller always looks in.
- if (!connectionId) ensureUserBinDirsInPath();
+ if (!connectionId) {
+ ensureUserBinDirsInPath();
+ if (process.platform === 'win32') ensureWindowsUserBinDirsInPath();
+ }
const mgr = await getDependencyManager(connectionId);
return mgr.probeAll(options);
},
diff --git a/console/apps/switch-console-desktop/src/main/utils/userEnv.test.ts b/console/apps/switch-console-desktop/src/main/utils/userEnv.test.ts
index 3e812fbc1..d64d5bb13 100644
--- a/console/apps/switch-console-desktop/src/main/utils/userEnv.test.ts
+++ b/console/apps/switch-console-desktop/src/main/utils/userEnv.test.ts
@@ -9,8 +9,12 @@ vi.mock('node:child_process', () => ({
spawnSync: spawnSyncMock,
}));
-const { ensureUserBinDirsInPath, ensureWindowsNpmGlobalBinInPath, resolveUserEnv } =
- await import('./userEnv');
+const {
+ ensureUserBinDirsInPath,
+ ensureWindowsNpmGlobalBinInPath,
+ ensureWindowsUserBinDirsInPath,
+ resolveUserEnv,
+} = await import('./userEnv');
const originalPath = process.env.PATH;
@@ -65,6 +69,27 @@ describe('ensureWindowsNpmGlobalBinInPath', () => {
});
});
+describe('ensureWindowsUserBinDirsInPath', () => {
+ it('prepends the folder Google’s agy installer writes to, once', () => {
+ const env: NodeJS.ProcessEnv = {
+ localappdata: 'C:\\Users\\test\\AppData\\Local',
+ Path: 'C:\\Windows\\System32',
+ };
+
+ expect(ensureWindowsUserBinDirsInPath(env)).toEqual([
+ 'C:\\Users\\test\\AppData\\Local\\agy\\bin',
+ ]);
+ expect(env.Path).toBe('C:\\Users\\test\\AppData\\Local\\agy\\bin;C:\\Windows\\System32');
+ expect(ensureWindowsUserBinDirsInPath(env)).toEqual([]);
+ });
+
+ it('adds nothing without LOCALAPPDATA', () => {
+ const env: NodeJS.ProcessEnv = { Path: 'C:\\Windows\\System32' };
+ expect(ensureWindowsUserBinDirsInPath(env)).toEqual([]);
+ expect(env.Path).toBe('C:\\Windows\\System32');
+ });
+});
+
describe('resolveUserEnv (AppImage env scrub)', () => {
const SCRUBBED_KEYS = [
'APPIMAGE',
diff --git a/console/apps/switch-console-desktop/src/main/utils/userEnv.ts b/console/apps/switch-console-desktop/src/main/utils/userEnv.ts
index 14389f2dd..6fefbe9cb 100644
--- a/console/apps/switch-console-desktop/src/main/utils/userEnv.ts
+++ b/console/apps/switch-console-desktop/src/main/utils/userEnv.ts
@@ -97,6 +97,19 @@ export function ensureWindowsNpmGlobalBinInPath(
return prependWindowsPathEntry(env, npmPath) ? npmPath : null;
}
+/**
+ * Adds the folders Windows provider installers write CLIs to without telling
+ * a running app: Google's Antigravity installer puts `agy.exe` in
+ * `%LOCALAPPDATA%\agy\bin` and adds it to the user's PATH, which an app
+ * started before the install does not see.
+ */
+export function ensureWindowsUserBinDirsInPath(env: NodeJS.ProcessEnv = process.env): string[] {
+ const localAppData = getWindowsEnvValue(env, 'LOCALAPPDATA');
+ if (!localAppData) return [];
+ const agyBin = path.win32.join(localAppData, 'agy', 'bin');
+ return prependWindowsPathEntry(env, agyBin) ? [agyBin] : [];
+}
+
/**
* Spawns `$SHELL -ilc 'env'` with a 5 s timeout. On any error (timeout,
* missing shell, restricted environment) the function logs a warning and
@@ -110,6 +123,7 @@ export async function resolveUserEnv(): Promise<void> {
if (process.platform === 'win32') {
// Windows PATH is managed differently; no login-shell capture needed.
ensureWindowsNpmGlobalBinInPath();
+ ensureWindowsUserBinDirsInPath();
return;
}
diff --git a/console/docs/sdk-sessions.md b/console/docs/sdk-sessions.md
index 3b643fa69..aa049f7d4 100644
--- a/console/docs/sdk-sessions.md
+++ b/console/docs/sdk-sessions.md
@@ -1,7 +1,7 @@
# SDK sessions
Console uses a shared SDK host implementation for Claude Code, Codex, OpenCode,
-Antigravity ACP and Cursor. Local sessions and sessions reached through SSH run
+Antigravity and Cursor. Local sessions and sessions reached through SSH run
the same host code, but not in the same process tree: an SSH session's host is
deployed to the remote machine and detached from Console, while a local
session's host is supervised by Console itself. SSH, ProxyCommand and ProxyJump
@@ -241,14 +241,14 @@ the native thread setting. Choose an explicit effort to replace it. Claude
Compaction uses a native operation: Claude's `/compact` with a completed compaction
boundary, Codex's `thread/compact/start` with turn completion, or OpenCode's
`session.summarize` with native busy/idle completion. Console shows progress and the
-outcome. A timeout or interrupted completion remains unknown. The Antigravity ACP adapter does not expose compaction. The installed Cursor ACP command catalog also advertises no compaction operation. Neither receives a substitute summarization prompt.
+outcome. A timeout or interrupted completion remains unknown. The Antigravity adapter does not expose compaction. The installed Cursor ACP command catalog also advertises no compaction operation. Neither receives a substitute summarization prompt.
| Provider | Reset | Model selection | Native compaction | Attachments |
| --- | --- | --- | --- | --- |
| Claude Code | Yes | Native catalog and effort | When `/compact` is advertised | Images as bytes; other files staged |
| Codex | Yes | Native catalog and reasoning effort | App-server compaction | Local images and staged file mentions |
| OpenCode | Yes | Connected models and native variants | Native session compaction | Staged file URLs |
-| Antigravity ACP | Yes | Native ACP model catalog | Unavailable | Images as bytes; embedded file resources |
+| Antigravity (`agy acp`) | Yes | Native ACP model catalog | Unavailable | Images as bytes; embedded file resources |
| Cursor | Yes | ACP model catalog | Unavailable | Images as bytes; staged file references |
Controls depend on the connected provider's reported support. OpenCode models
@@ -283,12 +283,19 @@ workspace permissions in Codex and restart the host before using file tools.
## Capability and deployment limits
-Antigravity uses Google's standalone ACP runtime, installed as `antigravity-acp`.
-It requires a separate sign-in with `antigravity-acp --login` on the execution
-host; an existing `agy` login is not reused. The runtime supports Apple Silicon
-macOS and Linux x64/ARM64. Approvals, offered-answer questions and cancellation
-use ACP. Saved conversations from the older CLI runtime cannot be resumed by ACP;
-reset the conversation to start fresh while preserving its transcript.
+Antigravity runs Google's Antigravity CLI, `agy`, as `agy acp` on macOS, Linux
+and Windows. Install it with Google's installer (`curl -fsSL
+https://antigravity.google/cli/install.sh | bash`, or on Windows `irm
+https://antigravity.google/cli/install.ps1 | iex`, which puts `agy.exe` in
+`%LOCALAPPDATA%\agy\bin`). It uses the person's own `agy` sign-in: sign in with
+`agy acp --login` on the execution host, or set `GEMINI_API_KEY`. The sign-in
+check asks `agy acp` for its sessions, which it refuses while signed out, and
+never signs in itself. Approvals and cancellation use ACP; questions arrive as
+ACP form elicitations. A machine that only has the `antigravity-acp` runtime
+Switch Console used to install keeps using it, with its own `antigravity-acp
+--login`, until `agy` is installed. Conversations saved by that runtime, or by
+the older CLI runtime, cannot be resumed by `agy`; reset the conversation to
+start fresh while preserving its transcript.
Other capability limits remain explicit
in the session contract. Terminal sessions (tmux/PTY) were removed; SDK adapters
are the only session runtime. Lifecycle scripts use noninteractive commands.
diff --git a/console/packages/agent-controller/README.md b/console/packages/agent-controller/README.md
index d0799e7b3..a54d29682 100644
--- a/console/packages/agent-controller/README.md
+++ b/console/packages/agent-controller/README.md
@@ -37,7 +37,7 @@ relay accepts.
- Node 22.13 or later. The store uses the built-in `node:sqlite`.
- Each provider CLI the agents use, installed on `PATH` and signed in as the user
the controller runs as (`claude`, `codex`, `opencode`, `agent`/`cursor-agent`,
- `antigravity-acp`), or its API key in the `--env-file` the controller runs with.
+ `agy`), or its API key in the `--env-file` the controller runs with.
- A Switch server with the `agent_management` feature flag on
(`FEATURE_FLAGS_ENABLED=agent_management`). Behind a proxy or ingress,
`/v1` must reach switch-core (the Helm chart routes it).
diff --git a/console/packages/agent-controller/src/login-path.test.ts b/console/packages/agent-controller/src/login-path.test.ts
index 8faca3b3a..9317e95ab 100644
--- a/console/packages/agent-controller/src/login-path.test.ts
+++ b/console/packages/agent-controller/src/login-path.test.ts
@@ -2,7 +2,7 @@ import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { delimiter, join } from 'node:path';
import { afterEach, describe, expect, it } from 'vitest';
-import { loginShellPath, withUserBinDirs } from './login-path';
+import { loginShellPath, withUserBinDirs, withWindowsUserBinDirs } from './login-path';
const dirs: string[] = [];
@@ -73,3 +73,18 @@ describe('withUserBinDirs', () => {
expect(withUserBinDirs(already, home)).toBe(already);
});
});
+
+describe('withWindowsUserBinDirs', () => {
+ it('adds the folder Google’s agy installer writes to, once, after the PATH', () => {
+ const local = 'C:\\Users\\u\\AppData\\Local';
+ const agy = 'C:\\Users\\u\\AppData\\Local\\agy\\bin';
+ expect(withWindowsUserBinDirs('C:\\Windows\\System32', local)).toBe(
+ `C:\\Windows\\System32;${agy}`
+ );
+ const already = `${agy.toUpperCase()};C:\\Windows\\System32`;
+ expect(withWindowsUserBinDirs(already, local)).toBe(already);
+ expect(withWindowsUserBinDirs('C:\\Windows\\System32', undefined)).toBe(
+ 'C:\\Windows\\System32'
+ );
+ });
+});
diff --git a/console/packages/agent-controller/src/login-path.ts b/console/packages/agent-controller/src/login-path.ts
index 65a06b021..e80be2ac4 100644
--- a/console/packages/agent-controller/src/login-path.ts
+++ b/console/packages/agent-controller/src/login-path.ts
@@ -1,6 +1,6 @@
import { spawn } from 'node:child_process';
import { statSync } from 'node:fs';
-import { delimiter, join } from 'node:path';
+import { delimiter, join, win32 } from 'node:path';
const MARKER = '__SWITCH_LOGIN_PATH__';
@@ -95,6 +95,20 @@ export function withUserBinDirs(path: string, home: string): string {
return [...entries, ...additions].join(delimiter);
}
+/**
+ * A Windows `path` with the folders provider installers put CLIs in that it
+ * lacks, added after it: Google's Antigravity installer writes `agy.exe` to
+ * `%LOCALAPPDATA%\agy\bin` and adds that to the user's PATH, which a
+ * controller started before the install does not see.
+ */
+export function withWindowsUserBinDirs(path: string, localAppData: string | undefined): string {
+ const entries = path.split(win32.delimiter).filter(Boolean);
+ if (!localAppData) return entries.join(win32.delimiter);
+ const agyBin = win32.join(localAppData, 'agy', 'bin');
+ const present = entries.some((entry) => entry.toLowerCase() === agyBin.toLowerCase());
+ return [...entries, ...(present ? [] : [agyBin])].join(win32.delimiter);
+}
+
function isDirectory(path: string): boolean {
try {
return statSync(path).isDirectory();
diff --git a/console/packages/agent-controller/src/main.ts b/console/packages/agent-controller/src/main.ts
index db3a723a8..0902fe6dd 100644
--- a/console/packages/agent-controller/src/main.ts
+++ b/console/packages/agent-controller/src/main.ts
@@ -47,7 +47,7 @@ import {
resolveSharedHostBundle,
} from './handover';
import { createLogger, errorMessage, type Logger } from './log';
-import { loginShellPath, withUserBinDirs } from './login-path';
+import { loginShellPath, withUserBinDirs, withWindowsUserBinDirs } from './login-path';
import { dataLayout, ensureDataDir, resolveDataDir, serverWorkspacesDir } from './paths';
import { ProviderRechecks } from './provider-rechecks';
import { readProviderSeed, writeProviderSeed } from './provider-seed';
@@ -397,7 +397,10 @@ async function setInfoCommand(args: string[]): Promise<number> {
*/
function pathRefresher(log: Logger): () => Promise<void> {
return async () => {
- if (process.platform === 'win32') return;
+ if (process.platform === 'win32') {
+ process.env.PATH = withWindowsUserBinDirs(process.env.PATH ?? '', process.env.LOCALAPPDATA);
+ return;
+ }
const shell = process.env.SHELL ?? (process.platform === 'darwin' ? '/bin/zsh' : '/bin/bash');
const path = await loginShellPath(shell, process.env.PATH ?? '');
if (path === null)
diff --git a/console/packages/agent-controller/src/status.test.ts b/console/packages/agent-controller/src/status.test.ts
index 3b34ea1ef..0f7eb5b5a 100644
--- a/console/packages/agent-controller/src/status.test.ts
+++ b/console/packages/agent-controller/src/status.test.ts
@@ -1,7 +1,11 @@
import { chmodSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { delimiter, join } from 'node:path';
-import { generateSealingKeyPair, sealProviderLogin } from '@switch-console/agent-providers';
+import {
+ generateSealingKeyPair,
+ providerUnsupportedReason,
+ sealProviderLogin,
+} from '@switch-console/agent-providers';
import type { ProviderReadiness } from '@switch-console/agent-providers';
import { vertexCredentialFixture, writeNodeCli } from '@switch-console/agent-providers/testing';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
@@ -659,6 +663,23 @@ describe('PathProviderLocator', () => {
expect(await locator.locate('codex')).toBeNull();
});
+ it('finds Google’s agy for Antigravity ahead of a legacy antigravity-acp, on every OS', async () => {
+ expect(providerUnsupportedReason('antigravity', 'win32')).toBeNull();
+ const legacy = await writeNodeCli(dir, 'antigravity-acp', 'console.log("1.1.1")');
+ const locator = new PathProviderLocator(() => dir, join(dir, 'probe-home'));
+ expect(await locator.locate('antigravity')).toEqual({
+ path: expect.stringMatching(new RegExp(`^${escape(legacy)}$`, 'i')),
+ version: '1.1.1',
+ versionProblem: null,
+ });
+ const agy = await writeNodeCli(dir, 'agy', 'console.log("1.5.1")');
+ expect(await locator.locate('antigravity')).toEqual({
+ path: expect.stringMatching(new RegExp(`^${escape(agy)}$`, 'i')),
+ version: '1.5.1',
+ versionProblem: null,
+ });
+ });
+
it('reads the version of a CLI that writes in its home first, with a home of its own', async () => {
const script = await writeNodeCli(
dir,
diff --git a/console/packages/agent-providers/README.md b/console/packages/agent-providers/README.md
index a55df5c4b..f9f731787 100644
--- a/console/packages/agent-providers/README.md
+++ b/console/packages/agent-providers/README.md
@@ -27,7 +27,7 @@ protocols. These five adapters are the only Console session runtime.
| `opencode` | `opencode serve` spawned per session, driven with `@opencode-ai/sdk` over HTTP + SSE | Sessions are server-side; permissions and questions are answerable over the API. One server per session because OpenCode stores MCP registrations per directory and Switch registers an MCP server per session. |
| `claude` | `@anthropic-ai/claude-agent-sdk` `query()` in streaming-input mode, one long-lived query per session | Mid-turn messages queue into the live loop; `canUseTool` carries both approvals and `AskUserQuestion`; sessions share the CLI's transcript files so `--resume` interoperates. |
| `codex` | `codex app-server` JSON-RPC over stdio | The Codex SDK wraps `codex exec`, which cannot answer approvals. app-server can, and supports `turn/steer`, `thread/resume` and `turn/interrupt`. |
-| `antigravity` | `antigravity-acp`, ACP over stdio, on the generic ACP adapter | Native sessions, resume, model selection through a `model` config option, MCP registration, approvals and questions. |
+| `antigravity` | `agy acp` (Google's Antigravity CLI), ACP over stdio, on the generic ACP adapter; a legacy `antigravity-acp` install still runs | Native sessions, resume, model selection, MCP registration, approvals, and questions as ACP form elicitations. |
| `cursor` | `agent acp`, ACP over stdio, on the generic ACP adapter | Native sessions, model catalogue, MCP registration and approvals, plus Cursor's question, plan, todo and task extensions. |
| any new ACP CLI | ACP over stdio, on the generic ACP adapter | Write hooks, not an adapter: see [Add an agent provider](../../docs/add-an-agent-provider.md). |
@@ -65,7 +65,8 @@ does not filter; use `pnpm exec vitest run <file>` for one provider.
| opencode | 1.18.27 | 10/10 | Auto-answers doom-loop and subagent asks in `full-access` with `once`, never `always` (OpenCode remembers `always` per directory). Config isolation only via `XDG_CONFIG_HOME`. |
| claude | 2.1.260 | 10/10 | `AskUserQuestion` is offered to a session **only while a `canUseTool` callback is registered** — in `default` and `bypassPermissions` alike — so the adapter registers one in every mode and filters the SDK's `CLAUDE_SDK_CAN_USE_TOOL_SHADOWED` warning rather than obeying it. A mid-turn message is queued after the running turn, not folded into it; the adapter keeps the turn open until every queued send is answered. |
| codex | 0.153.2 | 9/10 | `request_user_input` only works in Plan mode, so `user-input` is skipped. Subagents need `--enable multi_agent_v2`. `turn/steer` joins the running turn. |
-| antigravity (ACP) | antigravity-acp 1.1.1 | 9/10 (2026-10-11) | `subagent` is skipped: `invoke_subagent` runs past the 300 s deadline, on main's adapter as on the generic one. `mcp-registered` passes on the generic adapter and timed out on main's. |
+| antigravity (ACP) | agy 1.5.1 | 9/10 (2026-11-05) | `subagent` is skipped: it runs past the 300 s deadline, as it did on antigravity-acp 1.1.1. |
+| antigravity (legacy `antigravity-acp`) | antigravity-acp 1.1.1 | 9/10 (2026-10-11) | `subagent` is skipped: `invoke_subagent` runs past the 300 s deadline, on main's adapter as on the generic one. `mcp-registered` passes on the generic adapter and timed out on main's. |
| cursor (ACP) | 2026.10.01 | not recorded | The account used hit Cursor's usage limit, so no model turn ran. Set `CURSOR_API_KEY` in the shell to run the suite with a key; the test passes it through. |
| antigravity (retired `agy` adapter, kept for history) | 1.2.4 | 7/10 | Headless `agy` has no prompt channel at all: a tool that needs permission is auto-denied, so `approval-required` and `approval-declined` are skipped and the mode emits a `runtime.warning` at session start. `ask_question` is skipped by the CLI, so `user-input` is skipped. No steering — a mid-turn message queues as its own turn. No in-process cancel: an interrupt kills the process and the next turn respawns on `--conversation`. File tools run in the CLI's own scratch workspace unless `--add-dir <cwd>` is passed. Attachments are passed as file paths in the prompt text: the stream-json input accepts `text` blocks only and rejects `image`. Outside `full-access` a staged attachment is unreadable until its directory is passed as another `--add-dir`, which only takes effect at launch, so such a turn respawns first. A file the `download_attachment` Switch tool fetches lands under `~/.switch/sessions/<runtime pid>/media`, a directory named after a process the adapter never sees and created mid-turn, so outside `full-access` the session is given `~/.switch/sessions` at spawn and those downloads are readable without a respawn. |
@@ -102,9 +103,18 @@ naming a permanent or future policy are never offered.
prefix. The CLI and default model used for verification did not expose its
AskQuestion tool, so `user-input` is skipped in its conformance run.
-**Antigravity** runs in its own profile directory (`GEMINI_HOME`), set up for
-OAuth on first use. Its questions arrive as permission requests whose tool
-call id starts with `interaction_`. Native session ids are stored with an
-`acp:` prefix; a conversation saved by the retired `agy` runtime starts fresh.
-Its sign-in check reads `authMethods` from the handshake and never calls
-`authenticate`, which would open a browser.
+**Antigravity** runs Google's `agy` as `agy acp`, with the user's own profile
+and sign-in (the OS keychain), so the launch sets nothing up. `agy` signs
+itself in when it starts; Switch sends `authenticate` only with
+`gemini-api-key` when the session environment has `GEMINI_API_KEY`. The
+sign-in check asks for `session/list`, which a signed-out `agy` refuses with
+`Authentication required`, and never calls `authenticate` with a Google
+method, which would open a browser. Questions arrive as ACP form elicitations
+(`elicitation/create`), which the adapter announces it can answer. `agy`'s
+modes are `default`, `accept-edits` and `plan`: auto mode is `accept-edits`,
+and full access is `default` with every request approved by the adapter.
+A legacy `antigravity-acp` install still runs in its own profile directory
+(`GEMINI_HOME`) with its `auto_edit` and `yolo` modes, questions as permission
+requests whose tool call id starts with `interaction_`, and its old sign-in
+check. Native session ids are stored with an `acp:` prefix; a conversation
+saved by the retired CLI runtime starts fresh.
diff --git a/console/packages/agent-providers/src/acp/acp-adapter.ts b/console/packages/agent-providers/src/acp/acp-adapter.ts
index a4400c4b4..da0548159 100644
--- a/console/packages/agent-providers/src/acp/acp-adapter.ts
+++ b/console/packages/agent-providers/src/acp/acp-adapter.ts
@@ -18,7 +18,7 @@ import type {
UserInputAnswers,
UserInputQuestion,
} from '../events';
-import { readiness, type ProviderReadiness, type SignInCheckInput } from '../readiness';
+import { readiness, signInWith, type ProviderReadiness, type SignInCheckInput } from '../readiness';
import {
JsonRpcError,
noopLogger,
@@ -49,11 +49,18 @@ import {
export const ACP_CLIENT_INFO = { name: 'switch-console', version: '0.1.0' } as const;
/** The `initialize` request every ACP session and sign-in check opens with. */
-export async function acpInitialize(client: StdioJsonRpcClient): Promise<AcpInitializeResult> {
+export async function acpInitialize(
+ client: StdioJsonRpcClient,
+ hooks: Pick<AcpProviderHooks, 'clientCapabilities'>
+): Promise<AcpInitializeResult> {
return await client.request<AcpInitializeResult>('initialize', {
protocolVersion: 1,
clientInfo: ACP_CLIENT_INFO,
- clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false },
+ clientCapabilities: {
+ fs: { readTextFile: false, writeTextFile: false },
+ terminal: false,
+ ...hooks.clientCapabilities,
+ },
});
}
@@ -70,10 +77,14 @@ export async function checkAcpSignIn(
logger: noopLogger,
onExit: () => {},
});
- return await acpInitialize(client);
+ return await acpInitialize(client, hooks);
+ };
+ const request = async <T>(method: string, params: unknown): Promise<T> => {
+ if (!client) throw new Error(`${hooks.label} was asked ${method} before its handshake.`);
+ return await client.request<T>(method, params);
};
try {
- if (hooks.checkSignIn) return await hooks.checkSignIn({ ...input, handshake });
+ if (hooks.checkSignIn) return await hooks.checkSignIn({ ...input, handshake, request });
await handshake();
return readiness(
'unknown',
@@ -163,8 +174,9 @@ export class AcpAdapter implements ProviderAdapter {
input.sessionId,
prefix.legacyMessage
);
+ const binaryPath = this.options.binaryPath ?? hooks.defaultBinary;
const launch = await hooks.launch({
- binaryPath: this.options.binaryPath ?? hooks.defaultBinary,
+ binaryPath,
cwd,
env: input.env,
});
@@ -213,7 +225,7 @@ export class AcpAdapter implements ProviderAdapter {
});
this.emit(state, { type: 'session.state.changed', status: 'starting' });
try {
- const initialized = await acpInitialize(client);
+ const initialized = await acpInitialize(client, hooks);
const agent = initialized.agentCapabilities ?? {};
requireHttpMcp(hooks.label, input.mcpServers, agent.mcpCapabilities?.http);
state.prompt = {
@@ -226,7 +238,7 @@ export class AcpAdapter implements ProviderAdapter {
// Signing in belongs here: starting a session is work the user asked
// for, so a browser opening is an answer to something they did. Sign-in
// checks stop at the handshake above.
- const authMethodId = hooks.authMethodId?.(input.env);
+ const authMethodId = hooks.authMethodId?.(input.env, binaryPath);
if (authMethodId) await client.request('authenticate', { methodId: authMethodId });
const mcpServers = acpMcpServers(input.mcpServers, input.env);
let method = 'session/new';
@@ -255,7 +267,7 @@ export class AcpAdapter implements ProviderAdapter {
state.models = modelConfigOption(state.configOptions)
? modelsFromConfig(state.configOptions)
: modelsFromList(result.models);
- const mode = hooks.sessionMode?.(input.runtimeMode);
+ const mode = hooks.sessionMode?.(input.runtimeMode, result.modes);
if (mode)
await client.request('session/set_mode', { sessionId: state.nativeId, modeId: mode });
if (input.model) await this.setModel(state.id, input.model);
@@ -274,10 +286,14 @@ export class AcpAdapter implements ProviderAdapter {
'details' in cause.data
? String(cause.data.details)
: '';
+ const signIn =
+ cause instanceof JsonRpcError && cause.code === -32000 && /auth/i.test(cause.message)
+ ? `. ${signInWith(hooks.loginCommand)}`
+ : '';
throw new ProviderSessionError(
hooks.provider,
state.id,
- `Could not start ${hooks.label}: ${String(cause)}${details ? `: ${details}` : ''}${client.stderr ? `\n${client.stderr}` : ''}`,
+ `Could not start ${hooks.label}: ${String(cause)}${details ? `: ${details}` : ''}${signIn}${client.stderr ? `\n${client.stderr}` : ''}`,
{ cause }
);
}
diff --git a/console/packages/agent-providers/src/acp/hooks.ts b/console/packages/agent-providers/src/acp/hooks.ts
index b19706532..face35350 100644
--- a/console/packages/agent-providers/src/acp/hooks.ts
+++ b/console/packages/agent-providers/src/acp/hooks.ts
@@ -12,6 +12,7 @@ import type {
AcpInitializeResult,
AcpPermissionRequest,
AcpPromptCapabilities,
+ AcpSessionModes,
AcpToolCall,
} from './protocol';
@@ -110,23 +111,27 @@ export interface AcpProviderHooks {
* Whether the CLI is signed in, answered without signing it in: a check
* must never be what changes its answer. `handshake` runs the agent and
* returns its `initialize` answer. Without this hook the check runs the
- * handshake and reports the sign-in as unknown.
+ * handshake and reports the sign-in as unknown. `request` asks the same
+ * process something more after the handshake.
*/
checkSignIn?(input: AcpSignInInput): Promise<ProviderReadiness>;
/**
* `authenticate` method sent after `initialize` when a session starts with
* this environment, which may open a browser; undefined sends none (the
* session environment already signs it in, say). Omit for an agent that
- * never needs a sign-in call.
+ * never needs a sign-in call. `binaryPath` is the executable the session runs.
*/
- authMethodId?(env: Record<string, string>): string | undefined;
+ authMethodId?(env: Record<string, string>, binaryPath: string): string | undefined;
/**
* Prompt content the agent accepts whether or not it advertises it. What it
* advertises in `initialize` is always honoured as well.
*/
promptCapabilities?: AcpPromptCapabilities;
- /** The ACP mode to put a new session in for Switch's runtime mode. Omit to leave the agent's default. */
- sessionMode?(runtimeMode: RuntimeMode): string;
+ /**
+ * The ACP mode to put a new session in for Switch's runtime mode, given the
+ * modes the session advertised. Omit to leave the agent's default.
+ */
+ sessionMode?(runtimeMode: RuntimeMode, modes: AcpSessionModes | undefined): string;
/**
* Native session ids are stored with this prefix, telling them apart from
* ids an earlier, non-ACP runtime of the same provider stored. A resume id
@@ -145,12 +150,19 @@ export interface AcpProviderHooks {
context: AcpSessionContext,
request: AcpPermissionRequest
): Promise<unknown> | undefined;
+ /**
+ * Client capabilities announced in `initialize` beyond the protocol's own,
+ * for requests the provider's `extensions` answer (`elicitation`, say).
+ */
+ clientCapabilities?: Record<string, unknown>;
/** Register vendor-specific requests and notifications for a session. */
extensions?(context: AcpSessionContext, on: AcpExtensionRegistrar): void;
}
export interface AcpSignInInput extends SignInCheckInput {
handshake(): Promise<AcpInitializeResult>;
+ /** A request to the process `handshake` started; fails when it has not run. */
+ request<T>(method: string, params: unknown): Promise<T>;
}
export interface AcpAdapterOptions {
diff --git a/console/packages/agent-providers/src/antigravity/antigravity-adapter.test.ts b/console/packages/agent-providers/src/antigravity/antigravity-adapter.test.ts
index d210be326..0865172fd 100644
--- a/console/packages/agent-providers/src/antigravity/antigravity-adapter.test.ts
+++ b/console/packages/agent-providers/src/antigravity/antigravity-adapter.test.ts
@@ -11,9 +11,11 @@ vi.mock('node:fs/promises', async (original) => ({
}));
const servers: FakeAppServer[] = [];
/** What the fake agent declares in `initialize`. */
-const acp = { http: true };
+const acp = { http: true, signedOut: false };
+const spawned: Array<{ command: string; args: string[] }> = [];
vi.mock('node:child_process', () => ({
- spawn: () => {
+ spawn: (command: string, args: string[]) => {
+ spawned.push({ command, args });
const server = new FakeAppServer();
server.replyAlways('initialize', () => ({
agentCapabilities: {
@@ -22,12 +24,22 @@ vi.mock('node:child_process', () => ({
},
}));
server.replyAlways('authenticate', () => ({}));
- server.replyAlways('session/new', () => ({
- sessionId: 'native',
- configOptions: [
- { id: 'model', type: 'select', options: [{ value: 'model-a', name: 'Model A' }] },
- ],
- }));
+ server.on('message', (message: { id?: number; method?: string }) => {
+ if (message.method !== 'session/new' || message.id === undefined) return;
+ server.send(
+ acp.signedOut
+ ? { id: message.id, error: { code: -32000, message: 'Authentication required' } }
+ : {
+ id: message.id,
+ result: {
+ sessionId: 'native',
+ configOptions: [
+ { id: 'model', type: 'select', options: [{ value: 'model-a', name: 'Model A' }] },
+ ],
+ },
+ }
+ );
+ });
server.replyAlways('session/resume', () => ({}));
server.replyAlways('session/set_mode', () => ({}));
server.replyAlways('session/set_config_option', () => ({}));
@@ -35,20 +47,27 @@ vi.mock('node:child_process', () => ({
return server;
},
}));
-const { antigravityAcp, createAntigravityAdapter } = await import('./antigravity-adapter');
+const { antigravityAcp, createAntigravityAdapter, elicitationAnswer, elicitationQuestions } =
+ await import('./antigravity-adapter');
beforeEach(() => {
servers.length = 0;
+ spawned.length = 0;
+ acp.signedOut = false;
acp.http = true;
});
-async function setup(resume = false, switchRegistered = true) {
- const adapter = createAntigravityAdapter();
+async function setup(
+ resume = false,
+ switchRegistered = true,
+ { binaryPath, env = {} }: { binaryPath?: string; env?: Record<string, string> } = {}
+) {
+ const adapter = createAntigravityAdapter(binaryPath ? { binaryPath } : {});
const events: ProviderRuntimeEvent[] = [];
adapter.subscribe((e) => events.push(e));
const session = await adapter.startSession({
sessionId: 's',
cwd: '/work',
runtimeMode: 'approval-required',
- env: {},
+ env,
mcpServers: switchRegistered
? {
switch: {
@@ -234,20 +253,60 @@ it('serializes turns submitted synchronously by completion listeners', async ()
expect(events.at(-1)).toMatchObject({ type: 'session.state.changed', status: 'running' });
});
-it('authenticates once on the session process before creating the session', async () => {
+it('runs Google’s agy as `agy acp`, signed in by agy itself', async () => {
const { server } = await setup();
- expect(servers).toHaveLength(1);
+ expect(spawned).toEqual([{ command: 'agy', args: ['acp'] }]);
+ expect(server.received.slice(0, 2).map((m) => m.method)).toEqual(['initialize', 'session/new']);
+});
+it('signs agy in with the Gemini API key the session environment carries', async () => {
+ const { server } = await setup(false, true, { env: { GEMINI_API_KEY: 'placeholder' } });
expect(server.received.slice(0, 3).map((m) => m.method)).toEqual([
'initialize',
'authenticate',
'session/new',
]);
+ expect(server.received[1]?.params).toEqual({ methodId: 'gemini-api-key' });
+});
+it('authenticates a legacy antigravity-acp install once before creating the session', async () => {
+ const { server } = await setup(false, true, { binaryPath: '/home/u/.local/bin/antigravity-acp' });
+ expect(spawned).toEqual([{ command: '/home/u/.local/bin/antigravity-acp', args: [] }]);
+ expect(server.received.slice(0, 3).map((m) => m.method)).toEqual([
+ 'initialize',
+ 'authenticate',
+ 'session/new',
+ ]);
+ expect(server.received[1]?.params).toEqual({ methodId: 'oauth-personal' });
+});
+it('picks the session mode among the modes agy advertises', () => {
+ const agy = {
+ availableModes: [{ id: 'default' }, { id: 'accept-edits' }, { id: 'plan' }],
+ };
+ expect(antigravityAcp.sessionMode?.('approval-required', agy)).toBe('default');
+ expect(antigravityAcp.sessionMode?.('auto-accept-edits', agy)).toBe('accept-edits');
+ expect(antigravityAcp.sessionMode?.('auto', agy)).toBe('accept-edits');
+ // Full access is the adapter approving every request, in agy's default mode.
+ expect(antigravityAcp.sessionMode?.('full-access', agy)).toBe('default');
});
-it('puts auto mode in auto-edit, Antigravity having no reviewer of its own', () => {
- expect(antigravityAcp.sessionMode?.('approval-required')).toBe('default');
- expect(antigravityAcp.sessionMode?.('auto-accept-edits')).toBe('auto_edit');
- expect(antigravityAcp.sessionMode?.('auto')).toBe('auto_edit');
- expect(antigravityAcp.sessionMode?.('full-access')).toBe('yolo');
+it('keeps the legacy runtime’s auto-edit and yolo modes', () => {
+ const legacy = { availableModes: [{ id: 'default' }, { id: 'auto_edit' }, { id: 'yolo' }] };
+ expect(antigravityAcp.sessionMode?.('approval-required', legacy)).toBe('default');
+ expect(antigravityAcp.sessionMode?.('auto-accept-edits', legacy)).toBe('auto_edit');
+ expect(antigravityAcp.sessionMode?.('auto', legacy)).toBe('auto_edit');
+ expect(antigravityAcp.sessionMode?.('full-access', legacy)).toBe('yolo');
+ expect(antigravityAcp.sessionMode?.('auto', undefined)).toBe('auto_edit');
+});
+it('tells a signed-out agy session how to sign in', async () => {
+ acp.signedOut = true;
+ await expect(
+ createAntigravityAdapter().startSession({
+ sessionId: 'signed-out',
+ cwd: '/work',
+ runtimeMode: 'approval-required',
+ env: {},
+ mcpServers: {},
+ connectorMcpServers: [],
+ })
+ ).rejects.toThrow('Sign in on the execution machine with agy acp --login.');
});
it('refuses legacy CLI conversation IDs before starting a process', async () => {
await expect(
@@ -297,6 +356,85 @@ it('answers native questions with the offered option ID', async () => {
});
});
+// What agy 1.5 sends for its ask_question tool, recorded from `agy acp`.
+const agyQuestion = {
+ sessionId: 'native',
+ toolCallId: 'call_1',
+ mode: 'form',
+ message: 'The agent has a question.',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ q1: {
+ type: 'string',
+ title: 'Which color?',
+ oneOf: [
+ { const: '1', title: 'red' },
+ { const: '2', title: 'green' },
+ { const: '3', title: 'blue' },
+ ],
+ },
+ q1_other: { type: 'string', title: 'Other', description: 'Optional free-form answer' },
+ },
+ },
+};
+it('announces form elicitation and answers agy questions through it', async () => {
+ const { adapter, server, events } = await setup();
+ expect(server.received[0]?.params).toMatchObject({
+ clientCapabilities: { elicitation: { form: {} } },
+ });
+ await adapter.sendTurn({ sessionId: 's', turnId: 't', text: 'question' });
+ server.send({ id: 98, method: 'elicitation/create', params: agyQuestion });
+ await flush();
+ const event = events.find((e) => e.type === 'user-input.requested');
+ if (!event || event.type !== 'user-input.requested') throw new Error('Missing question');
+ expect(event.questions).toEqual([
+ {
+ id: 'q1',
+ question: 'Which color?',
+ options: [
+ { value: '1', label: 'red' },
+ { value: '2', label: 'green' },
+ { value: '3', label: 'blue' },
+ ],
+ multiSelect: false,
+ allowCustomAnswer: false,
+ },
+ ]);
+ await adapter.respondToUserInput('s', event.requestId, { q1: '2' });
+ await flush();
+ expect(server.received.find((m) => m.id === 98)?.result).toEqual({
+ action: 'accept',
+ content: { q1: '2' },
+ });
+});
+it('answers several choices for an array field', () => {
+ const questions = elicitationQuestions({
+ requestedSchema: {
+ properties: {
+ q1: { type: 'array', title: 'Which?', items: { anyOf: [{ const: 'a' }, { const: 'b' }] } },
+ },
+ },
+ });
+ expect(questions[0]).toMatchObject({
+ multiSelect: true,
+ options: [{ value: 'a' }, { value: 'b' }],
+ });
+ expect(elicitationAnswer(questions, [{ questionId: 'q1', values: ['a', 'b'] }])).toEqual({
+ action: 'accept',
+ content: { q1: ['a', 'b'] },
+ });
+});
+it('cancels an elicitation the turn ends before answering', async () => {
+ const { adapter, server } = await setup();
+ await adapter.sendTurn({ sessionId: 's', turnId: 't', text: 'question' });
+ server.send({ id: 97, method: 'elicitation/create', params: agyQuestion });
+ await flush();
+ await adapter.interruptTurn('s');
+ await flush();
+ expect(server.received.find((m) => m.id === 97)?.result).toEqual({ action: 'cancel' });
+});
+
it('auto-approves Switch MCP calls with bypass off using provider metadata', async () => {
const { adapter, events, server } = await setup();
await adapter.sendTurn({ sessionId: 's', turnId: 't', text: 'connect' });
diff --git a/console/packages/agent-providers/src/antigravity/antigravity-adapter.ts b/console/packages/agent-providers/src/antigravity/antigravity-adapter.ts
index 406552cd9..7850a6678 100644
--- a/console/packages/agent-providers/src/antigravity/antigravity-adapter.ts
+++ b/console/packages/agent-providers/src/antigravity/antigravity-adapter.ts
@@ -1,18 +1,126 @@
import { createAcpAdapter, type AcpAdapter } from '../acp/acp-adapter';
-import type { AcpAdapterOptions, AcpProviderHooks } from '../acp/hooks';
+import type { AcpAdapterOptions, AcpProviderHooks, AcpSelectedAnswer } from '../acp/hooks';
+import { ACP_CANCELLED, type AcpSessionModes } from '../acp/protocol';
+import type { RuntimeMode } from '../adapter';
+import type { UserInputQuestion } from '../events';
import { readiness } from '../readiness';
import {
+ AGY_LOGIN,
ANTIGRAVITY_SIGN_IN,
+ LEGACY_ANTIGRAVITY_SIGN_IN,
antigravityLaunch,
antigravityProfile,
antigravitySignedIn,
+ isLegacyAntigravityRuntime,
} from './runtime';
-/** Antigravity's `antigravity-acp`, whose questions arrive as permission requests. */
+const SIGNED_OUT = /sign in|auth required|authentication required|unauthenticated|not logged in/i;
+
+/**
+ * The modes to try for each runtime mode, best first. `agy acp` offers
+ * `default`, `accept-edits` and `plan`; the retired `antigravity-acp` offered
+ * `auto_edit` and `yolo`. Full access needs no mode of its own: the adapter
+ * approves every request a full-access session receives.
+ */
+const MODE_PREFERENCES: Record<RuntimeMode, readonly string[]> = {
+ 'full-access': ['yolo', 'default'],
+ 'auto-accept-edits': ['auto_edit', 'accept-edits', 'default'],
+ auto: ['auto_edit', 'accept-edits', 'default'],
+ 'approval-required': ['default'],
+};
+
+/** The session mode for `runtimeMode` among those the session advertised. */
+export function antigravitySessionMode(
+ runtimeMode: RuntimeMode,
+ modes: AcpSessionModes | undefined
+): string {
+ const preferences = MODE_PREFERENCES[runtimeMode];
+ if (!modes?.availableModes.length) return preferences[0]!;
+ return (
+ preferences.find((id) => modes.availableModes.some((mode) => mode.id === id)) ??
+ preferences.at(-1)!
+ );
+}
+
+interface ElicitationChoice {
+ const: string | number;
+ title?: string;
+}
+interface ElicitationProperty {
+ type?: string;
+ title?: string;
+ description?: string;
+ enum?: Array<string | number>;
+ oneOf?: ElicitationChoice[];
+ anyOf?: ElicitationChoice[];
+ items?: ElicitationProperty;
+}
+/** `elicitation/create`, which `agy acp` sends for its `ask_question` tool. */
+export interface AcpElicitationRequest {
+ sessionId?: string;
+ toolCallId?: string;
+ mode?: string;
+ message?: string;
+ requestedSchema?: { properties?: Record<string, ElicitationProperty> };
+}
+
+function choices(property: ElicitationProperty | undefined): UserInputQuestion['options'] {
+ const offered = property?.oneOf ?? property?.anyOf;
+ if (offered)
+ return offered.map((choice) => ({
+ value: String(choice.const),
+ label: choice.title ?? String(choice.const),
+ }));
+ return (property?.enum ?? []).map((value) => ({ value: String(value), label: String(value) }));
+}
+
+/**
+ * The questions a form elicitation asks: each field with offered answers, one
+ * of them or (an array field) several. A free-text field, such as the
+ * optional "Other" agy adds beside each question, is left unanswered.
+ */
+export function elicitationQuestions(request: AcpElicitationRequest): UserInputQuestion[] {
+ if (request.mode !== undefined && request.mode !== 'form') return [];
+ return Object.entries(request.requestedSchema?.properties ?? {}).flatMap(([id, property]) => {
+ const multiSelect = property.type === 'array';
+ const options = choices(multiSelect ? property.items : property);
+ if (!options.length) return [];
+ return [
+ {
+ id,
+ question: property.title ?? property.description ?? request.message ?? 'Choose an option.',
+ options,
+ multiSelect,
+ allowCustomAnswer: false,
+ },
+ ];
+ });
+}
+
+/** The elicitation result for the answers chosen. */
+export function elicitationAnswer(
+ questions: UserInputQuestion[],
+ selected: AcpSelectedAnswer[]
+): { action: 'accept'; content: Record<string, string | string[]> } {
+ return {
+ action: 'accept',
+ content: Object.fromEntries(
+ selected.map(({ questionId, values }) => [
+ questionId,
+ questions.find((question) => question.id === questionId)?.multiSelect ? values : values[0]!,
+ ])
+ ),
+ };
+}
+
+/**
+ * Antigravity over ACP: Google's `agy acp`, or a legacy `antigravity-acp`
+ * install. Questions arrive as permission requests.
+ */
export const antigravityAcp: AcpProviderHooks = {
provider: 'antigravity',
label: 'Antigravity',
- defaultBinary: 'antigravity-acp',
+ defaultBinary: 'agy',
capabilities: {
modelSwitchInSession: true,
steering: false,
@@ -21,44 +129,50 @@ export const antigravityAcp: AcpProviderHooks = {
userInput: true,
},
launch: antigravityLaunch,
- loginCommand: 'antigravity-acp --login',
- unsupportedPlatforms: {
- win32: 'Antigravity ACP has no Windows build, so it cannot run on Windows.',
- },
- // `authMethods` is the agent's own answer: the sign-ins it still wants.
- // Calling `authenticate` here would not test the sign-in but perform it,
- // opening a browser.
- // 1.3 lists every method whether or not one is in use, so an outstanding
- // method is only signed out when the profile holds no token either.
- checkSignIn: async ({ handshake, env }) => {
+ loginCommand: AGY_LOGIN,
+ // A check must never sign in: `authenticate` with Google's methods opens a
+ // browser. `agy` signs itself in from the user's keychain when it starts,
+ // and refuses `session/list` with "Authentication required" when it could
+ // not, so that request answers the question without changing anything.
+ checkSignIn: async ({ binaryPath, env, handshake, request }) => {
try {
+ if (!isLegacyAntigravityRuntime(binaryPath)) {
+ await handshake();
+ const method = antigravityAcp.authMethodId?.(env, binaryPath);
+ if (method) await request('authenticate', { methodId: method });
+ await request('session/list', {});
+ return readiness('authenticated', 'Signed in to Antigravity.');
+ }
+ // Antigravity ACP 1.3 lists every method whether or not one is in use,
+ // so an outstanding method is only signed out when the profile holds no
+ // token either.
return !(await handshake()).authMethods?.length ||
(await antigravitySignedIn(antigravityProfile(env)))
? readiness('authenticated', 'Signed in to Antigravity ACP.')
- : readiness('unauthenticated', ANTIGRAVITY_SIGN_IN);
+ : readiness('unauthenticated', LEGACY_ANTIGRAVITY_SIGN_IN);
} catch (error) {
- if (/sign in|auth required|unauthenticated/i.test(String(error)))
- return readiness('unauthenticated', ANTIGRAVITY_SIGN_IN);
+ if (SIGNED_OUT.test(String(error)))
+ return readiness(
+ 'unauthenticated',
+ isLegacyAntigravityRuntime(binaryPath) ? LEGACY_ANTIGRAVITY_SIGN_IN : ANTIGRAVITY_SIGN_IN
+ );
throw error;
}
},
- // Opens a browser when the profile holds no usable token, which is why
- // only a session start sends it and the sign-in check never does.
- authMethodId: () => 'oauth-personal',
+ // `agy` needs no call when it signed itself in from the keychain; an API
+ // key in the environment is only used once it is chosen. The legacy runtime
+ // opens a browser when its profile holds no usable token, which is why only
+ // a session start sends it.
+ authMethodId: (env, binaryPath) =>
+ isLegacyAntigravityRuntime(binaryPath)
+ ? 'oauth-personal'
+ : env.GEMINI_API_KEY
+ ? 'gemini-api-key'
+ : undefined,
promptCapabilities: { image: true, audio: true, embeddedContext: true },
// Antigravity has no reviewer of its own, so auto mode is its auto-edit
// mode: edits run, commands and connector calls still ask.
- sessionMode: (runtimeMode) => {
- switch (runtimeMode) {
- case 'full-access':
- return 'yolo';
- case 'auto-accept-edits':
- case 'auto':
- return 'auto_edit';
- case 'approval-required':
- return 'default';
- }
- },
+ sessionMode: antigravitySessionMode,
nativeSessionIdPrefix: {
prefix: 'acp:',
legacyMessage:
@@ -72,6 +186,19 @@ export const antigravityAcp: AcpProviderHooks = {
? meta.mcp.server
: undefined;
},
+ // `agy acp` asks its questions as form elicitations when the client says
+ // it can answer them; otherwise it ends the turn on an unanswered question.
+ clientCapabilities: { elicitation: { form: {} } },
+ extensions: (context, on) => {
+ on.request('elicitation/create', async (params) => {
+ const questions = elicitationQuestions(params as AcpElicitationRequest);
+ if (!questions.length) return { action: 'decline' };
+ const result = await context.askQuestions(questions, (selected) =>
+ elicitationAnswer(questions, selected)
+ );
+ return result === ACP_CANCELLED ? { action: 'cancel' } : result;
+ });
+ },
permission: (context, { toolCall, options }) => {
if (!toolCall.toolCallId.startsWith('interaction_')) return undefined;
if (!options.length) return Promise.resolve({ outcome: { outcome: 'cancelled' } });
diff --git a/console/packages/agent-providers/src/antigravity/antigravity.integration.test.ts b/console/packages/agent-providers/src/antigravity/antigravity.integration.test.ts
index ae382a476..710c9a63e 100644
--- a/console/packages/agent-providers/src/antigravity/antigravity.integration.test.ts
+++ b/console/packages/agent-providers/src/antigravity/antigravity.integration.test.ts
@@ -5,15 +5,18 @@ import { createAntigravityAdapter } from './antigravity-adapter';
describeConformance('antigravity', {
createAdapter: async () => createAntigravityAdapter(),
unavailableReason: async () => {
- const probe = spawnSync('antigravity-acp', ['--version'], { encoding: 'utf8' });
- return probe.error || probe.status !== 0 ? 'the antigravity-acp binary is not on PATH' : null;
+ const probe = spawnSync('agy', ['--version'], { encoding: 'utf8' });
+ return probe.error || probe.status !== 0 ? 'the agy binary is not on PATH' : null;
},
// `invoke_subagent` runs a whole nested conversation, which can outlast the
// default deadline on a slow day.
timeoutMs: 300_000,
skip: {
subagent:
- 'antigravity-acp 1.1.1 runs invoke_subagent past the 300 s deadline, on main and on the generic ACP adapter alike (2026-10-11).',
+ 'Neither antigravity-acp 1.1.1 (2026-10-11) nor agy 1.5.1 (2026-11-05) finishes a subagent within the 300 s deadline.',
},
mcpServers: { echo: echoMcpServerSpec() },
+ // agy signs itself in from the user's keychain; a key in the environment is
+ // how a machine without one runs the suite.
+ ...(process.env.GEMINI_API_KEY ? { env: { GEMINI_API_KEY: process.env.GEMINI_API_KEY } } : {}),
});
diff --git a/console/packages/agent-providers/src/antigravity/runtime.test.ts b/console/packages/agent-providers/src/antigravity/runtime.test.ts
index 16ba5f714..9b78b4b28 100644
--- a/console/packages/agent-providers/src/antigravity/runtime.test.ts
+++ b/console/packages/agent-providers/src/antigravity/runtime.test.ts
@@ -2,20 +2,52 @@ import { mkdtemp, readFile, rm, writeFile, mkdir } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { afterEach, expect, it } from 'vitest';
-import { antigravityLaunch, antigravityProfile, antigravitySignedIn } from './runtime';
+import {
+ antigravityLaunch,
+ antigravityProfile,
+ antigravitySignedIn,
+ isLegacyAntigravityRuntime,
+} from './runtime';
const roots: string[] = [];
afterEach(async () => {
await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true })));
});
+it('runs agy as `agy acp` in the user’s own profile, on every OS', async () => {
+ for (const binaryPath of [
+ 'agy',
+ '/home/u/.local/bin/agy',
+ '/Users/u/.local/bin/agy',
+ 'C:\\Users\\u\\AppData\\Local\\agy\\bin\\agy.exe',
+ ]) {
+ const launch = await antigravityLaunch({
+ binaryPath,
+ cwd: '/work',
+ env: { HOME: '/home/u', PATH: '/usr/bin' },
+ });
+ expect(launch).toEqual({
+ command: binaryPath,
+ args: ['acp'],
+ env: { HOME: '/home/u', PATH: '/usr/bin', BROWSER: 'false' },
+ });
+ }
+});
+
+it('tells a legacy wrapper install from Google’s agy', () => {
+ expect(isLegacyAntigravityRuntime('/home/u/.local/bin/antigravity-acp')).toBe(true);
+ expect(isLegacyAntigravityRuntime('/opt/acp/agy_acp_server.par')).toBe(true);
+ expect(isLegacyAntigravityRuntime('C:\\Users\\u\\AppData\\Local\\agy\\bin\\agy.exe')).toBe(false);
+ expect(isLegacyAntigravityRuntime('agy')).toBe(false);
+});
+
it('records the auth type where every Antigravity ACP version reads it, keeping one already there', async () => {
const profile = await mkdtemp(join(tmpdir(), 'antigravity-profile-'));
roots.push(profile);
await mkdir(join(profile, 'antigravity-acp'), { recursive: true });
await writeFile(join(profile, 'antigravity-acp', 'settings.json'), '{"auth":{"type":"kept"}}');
await antigravityLaunch({
- binaryPath: '/bin/true',
+ binaryPath: '/home/u/.local/bin/antigravity-acp',
cwd: profile,
env: { GEMINI_HOME: profile, PATH: '/usr/bin:/bin' },
});
diff --git a/console/packages/agent-providers/src/antigravity/runtime.ts b/console/packages/agent-providers/src/antigravity/runtime.ts
index 9660b664c..97ada9c63 100644
--- a/console/packages/agent-providers/src/antigravity/runtime.ts
+++ b/console/packages/agent-providers/src/antigravity/runtime.ts
@@ -3,10 +3,27 @@ import { homedir } from 'node:os';
import { basename, dirname, join, isAbsolute } from 'node:path';
import type { AcpLaunch, AcpLaunchInput } from '../acp/hooks';
-export const ANTIGRAVITY_SIGN_IN =
- 'Sign in to Antigravity ACP on the execution host with antigravity-acp --login. The ACP runtime has a separate login from agy.';
+/** The command that signs Google's Antigravity CLI in for its ACP server. */
+export const AGY_LOGIN = 'agy acp --login';
-/** The Gemini home an Antigravity ACP server runs with: its sign-in and settings live under it. */
+export const ANTIGRAVITY_SIGN_IN = `Sign in to Antigravity on the execution host with ${AGY_LOGIN}, or set GEMINI_API_KEY.`;
+
+/** How a retired Switch wrapper install is signed in: it keeps a profile of its own. */
+export const LEGACY_ANTIGRAVITY_SIGN_IN =
+ 'Sign in to Antigravity ACP on the execution host with antigravity-acp --login, or install Google’s agy CLI and sign in with agy acp --login.';
+
+/**
+ * Whether `binaryPath` is the ACP runtime Switch Console used to install
+ * (`antigravity-acp`, the launcher around Google's `agy_acp_server.par`)
+ * rather than Google's own `agy` CLI. Those installs keep working, in their
+ * own profile, until the machine has `agy`.
+ */
+export function isLegacyAntigravityRuntime(binaryPath: string): boolean {
+ const name = basename(binaryPath.replaceAll('\\', '/')).toLowerCase();
+ return name.startsWith('antigravity-acp') || name.startsWith('agy_acp_server');
+}
+
+/** The Gemini home a legacy Antigravity ACP server runs with: its sign-in and settings live under it. */
export function antigravityProfile(env: Record<string, string>): string {
return (
env.GEMINI_HOME || join(env.HOME || homedir(), '.local', 'state', 'switch', 'antigravity-acp')
@@ -14,7 +31,7 @@ export function antigravityProfile(env: Record<string, string>): string {
}
/**
- * Whether the profile holds a consumer sign-in: the token file `--login`
+ * Whether a legacy profile holds a consumer sign-in: the token file `--login`
* writes, with a refresh token in it. Antigravity ACP 1.3 lists every sign-in
* method in `initialize` whether or not one is in use, so the handshake no
* longer says; the token itself is checked when a session signs in with it.
@@ -36,14 +53,18 @@ export async function antigravitySignedIn(profile: string): Promise<boolean> {
}
/**
- * How `antigravity-acp` runs: in its own profile directory, set up for OAuth
- * on first use, and killed when it prints a sign-in link instead of answering.
+ * How Antigravity runs. Google's `agy` serves ACP as `agy acp`, with the
+ * user's own profile and sign-in, so nothing is set up for it. A legacy
+ * `antigravity-acp` runs in its own profile directory, set up for OAuth on
+ * first use, and is killed when it prints a sign-in link instead of answering.
*/
export async function antigravityLaunch(input: AcpLaunchInput): Promise<AcpLaunch> {
- if (['agy', 'antigravity'].includes(basename(input.binaryPath)))
- throw new Error(
- 'The selected executable is the old Antigravity CLI. Install and select antigravity-acp in provider setup.'
- );
+ if (!isLegacyAntigravityRuntime(input.binaryPath))
+ return {
+ command: input.binaryPath,
+ args: ['acp'],
+ env: { ...input.env, BROWSER: 'false' },
+ };
const profile = antigravityProfile(input.env);
// Antigravity ACP up to 1.1 reads its settings at the profile's root; 1.3
// reads them beside its token, in `antigravity-acp/`. Without the auth type
@@ -74,7 +95,7 @@ export async function antigravityLaunch(input: AcpLaunchInput): Promise<AcpLaunc
},
rejectOutputLine: (line) =>
line.includes('Open the following link to authenticate the ACP server:')
- ? ANTIGRAVITY_SIGN_IN
+ ? LEGACY_ANTIGRAVITY_SIGN_IN
: undefined,
};
}
diff --git a/console/packages/agent-providers/src/cursor/cursor-adapter.test.ts b/console/packages/agent-providers/src/cursor/cursor-adapter.test.ts
index 507d53f1a..6b919f1f7 100644
--- a/console/packages/agent-providers/src/cursor/cursor-adapter.test.ts
+++ b/console/packages/agent-providers/src/cursor/cursor-adapter.test.ts
@@ -55,7 +55,7 @@ const flush = () => new Promise((resolve) => setImmediate(resolve));
it('keeps Cursor in its agent workflow in every runtime mode, auto included', () => {
for (const mode of ['approval-required', 'auto-accept-edits', 'auto', 'full-access'] as const)
- expect(cursorAcp.sessionMode?.(mode)).toBe('agent');
+ expect(cursorAcp.sessionMode?.(mode, undefined)).toBe('agent');
});
it('signs in with cursor_login only when it was given no API key', async () => {
diff --git a/console/packages/agent-providers/src/host/provider-readiness.protocol.test.ts b/console/packages/agent-providers/src/host/provider-readiness.protocol.test.ts
index 560fdbb1b..b59871a4e 100644
--- a/console/packages/agent-providers/src/host/provider-readiness.protocol.test.ts
+++ b/console/packages/agent-providers/src/host/provider-readiness.protocol.test.ts
@@ -64,21 +64,56 @@ it('does not classify a transport failure as missing credentials', async () => {
// which does not test the sign-in, it performs it, opening a browser. It then
// reported success whether or not anything had happened. Asking a question must
// not be the thing that changes the answer.
-it('answers Antigravity sign-in from the handshake, without signing in', async () => {
+const agy = { ...input, binaryPath: 'agy', provider: 'antigravity' };
+it('asks agy for its sessions, which it refuses when signed out, without signing in', async () => {
+ mock.request
+ .mockResolvedValueOnce({ authMethods: [{ id: 'oauth-personal' }] })
+ .mockResolvedValueOnce({ sessions: [] });
+ const result = await checkProviderReadiness(agy);
+ expect(result.status).toBe('authenticated');
+ expect(mock.request.mock.calls.map((call) => call[0])).toEqual(['initialize', 'session/list']);
+ expect(mock.dispose).toHaveBeenCalledOnce();
+});
+it('reports a signed-out agy as unauthenticated, pointing at agy acp --login', async () => {
+ mock.request
+ .mockResolvedValueOnce({ authMethods: [{ id: 'oauth-personal' }] })
+ .mockRejectedValueOnce(new JsonRpcError(-32000, 'Authentication required'));
+ const result = await checkProviderReadiness(agy);
+ expect(result.status).toBe('unauthenticated');
+ expect(result.message).toContain('agy acp --login');
+ expect(mock.request.mock.calls.map((call) => call[0])).not.toContain('authenticate');
+ expect(mock.dispose).toHaveBeenCalledOnce();
+});
+it('checks agy with the Gemini API key the environment carries', async () => {
+ mock.request
+ .mockResolvedValueOnce({})
+ .mockResolvedValueOnce({})
+ .mockResolvedValueOnce({ sessions: [] });
+ const result = await checkProviderReadiness({ ...agy, env: { GEMINI_API_KEY: 'placeholder' } });
+ expect(result.status).toBe('authenticated');
+ expect(mock.request.mock.calls).toEqual([
+ ['initialize', expect.anything()],
+ ['authenticate', { methodId: 'gemini-api-key' }],
+ ['session/list', {}],
+ ]);
+});
+// A legacy `antigravity-acp` install keeps its own profile and is checked as before.
+const legacy = { ...input, binaryPath: '/home/u/.local/bin/antigravity-acp' };
+it('answers legacy Antigravity ACP sign-in from the handshake, without signing in', async () => {
mock.request.mockResolvedValueOnce({ authMethods: [] });
- const result = await checkProviderReadiness({ ...input, provider: 'antigravity' });
+ const result = await checkProviderReadiness({ ...legacy, provider: 'antigravity' });
expect(result.status).toBe('authenticated');
expect(mock.request.mock.calls.map((call) => call[0])).toEqual(['initialize']);
expect(mock.dispose).toHaveBeenCalledOnce();
});
-it('never calls authenticate, whatever the agent reports', async () => {
+it('never calls authenticate on a legacy install, whatever it reports', async () => {
mock.request.mockResolvedValueOnce({ authMethods: [{ id: 'oauth-personal' }] });
- await checkProviderReadiness({ ...input, provider: 'antigravity' });
+ await checkProviderReadiness({ ...legacy, provider: 'antigravity' });
expect(mock.request.mock.calls.map((call) => call[0])).not.toContain('authenticate');
});
-it('reports an outstanding Antigravity sign-in as unauthenticated', async () => {
+it('reports an outstanding legacy sign-in as unauthenticated', async () => {
mock.request.mockResolvedValueOnce({ authMethods: [{ id: 'oauth-personal' }] });
- const result = await checkProviderReadiness({ ...input, provider: 'antigravity' });
+ const result = await checkProviderReadiness({ ...legacy, provider: 'antigravity' });
expect(result.status).toBe('unauthenticated');
expect(result.message).toContain('antigravity-acp --login');
expect(mock.dispose).toHaveBeenCalledOnce();
@@ -89,7 +124,7 @@ it('counts the token --login wrote as signed in when the handshake lists methods
mock.request.mockResolvedValueOnce({ authMethods: [{ id: 'oauth-personal' }] });
mock.token = '{"access_token":"a","refresh_token":"r"}';
const result = await checkProviderReadiness({
- ...input,
+ ...legacy,
provider: 'antigravity',
env: { GEMINI_HOME: '/profile' },
});
@@ -97,9 +132,9 @@ it('counts the token --login wrote as signed in when the handshake lists methods
expect(mock.request.mock.calls.map((call) => call[0])).toEqual(['initialize']);
});
// An agent that says nothing about auth is not an agent asking to be signed in.
-it('treats a handshake with no authMethods as nothing outstanding', async () => {
+it('treats a legacy handshake with no authMethods as nothing outstanding', async () => {
mock.request.mockResolvedValueOnce({});
- expect((await checkProviderReadiness({ ...input, provider: 'antigravity' })).status).toBe(
+ expect((await checkProviderReadiness({ ...legacy, provider: 'antigravity' })).status).toBe(
'authenticated'
);
});
diff --git a/console/packages/plugins/src/agents/impl/antigravity/index.test.ts b/console/packages/plugins/src/agents/impl/antigravity/index.test.ts
new file mode 100644
index 000000000..de7f09727
--- /dev/null
+++ b/console/packages/plugins/src/agents/impl/antigravity/index.test.ts
@@ -0,0 +1,31 @@
+import { describe, expect, it } from 'vitest';
+import { AGY_INSTALL_UNIX, AGY_INSTALL_WINDOWS, plugin } from './index';
+
+const dependency = plugin.capabilities.hostDependency;
+
+describe('Antigravity host dependency', () => {
+ it('looks for Google’s agy first and still finds a legacy antigravity-acp install', () => {
+ expect(dependency.binaryNames).toEqual(['agy', 'antigravity-acp']);
+ expect(dependency.versionArgs ?? ['--version']).toEqual(['--version']);
+ });
+
+ it.each([
+ ['macos', AGY_INSTALL_UNIX],
+ ['linux', AGY_INSTALL_UNIX],
+ ['windows', AGY_INSTALL_WINDOWS],
+ ] as const)('installs agy with Google’s installer on %s', (platform, command) => {
+ const options = dependency.installCommands[platform] ?? [];
+ expect((options.find((option) => option.recommended) ?? options[0])?.command).toBe(command);
+ });
+
+ it('runs the Windows installer through PowerShell from either shell', () => {
+ expect(AGY_INSTALL_WINDOWS).toContain('https://antigravity.google/cli/install.ps1');
+ // The install runner's shell may be cmd.exe or PowerShell; each would
+ // expand one of these before PowerShell saw the command.
+ expect(AGY_INSTALL_WINDOWS).not.toMatch(/[$%]/);
+ });
+
+ it('updates agy with its own update command', () => {
+ expect(dependency.updates).toMatchObject({ update: { kind: 'cli', args: ['update'] } });
+ });
+});
diff --git a/console/packages/plugins/src/agents/impl/antigravity/index.ts b/console/packages/plugins/src/agents/impl/antigravity/index.ts
index db80ebb5e..63d98dea0 100644
--- a/console/packages/plugins/src/agents/impl/antigravity/index.ts
+++ b/console/packages/plugins/src/agents/impl/antigravity/index.ts
@@ -1,15 +1,26 @@
import { definePlugin, registerPluginBehavior } from '@switch-console/core/agents/plugins';
import { icon } from './icon';
-import { ANTIGRAVITY_INSTALL_COMMAND } from './install';
+
+/** Google's installers for the Antigravity CLI, `agy`, which serves ACP as `agy acp`. */
+export const AGY_INSTALL_UNIX = 'curl -fsSL https://antigravity.google/cli/install.sh | bash';
+/**
+ * Written without `$` or `%`: the install runner's shell may be PowerShell or
+ * cmd.exe, and each would expand one of them before `powershell -c` ran. It
+ * installs `agy.exe` into `%LOCALAPPDATA%\agy\bin`.
+ */
+export const AGY_INSTALL_WINDOWS =
+ 'powershell -ExecutionPolicy ByPass -c "irm https://antigravity.google/cli/install.ps1 | iex"';
+export const AGY_INSTALL_WINDOWS_CMD =
+ 'curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd';
export const plugin = definePlugin(
{
id: 'antigravity',
name: 'Antigravity',
description:
- 'Google Antigravity ACP with native authentication, approvals and persistent conversations.',
- websiteUrl: 'https://github.com/agentclientprotocol/registry/tree/main/antigravity-acp',
- cliLabel: 'Antigravity ACP',
+ 'Google Antigravity CLI over ACP, with its own sign-in, approvals and persistent conversations.',
+ websiteUrl: 'https://antigravity.google/docs/ide/extensions/acp/',
+ cliLabel: 'Antigravity CLI (agy)',
sessionStartMaySignIn: true,
},
{
@@ -21,19 +32,20 @@ export const plugin = definePlugin(
},
hostDependency: {
id: 'antigravity',
- binaryNames: ['antigravity-acp'],
+ // `agy` first; `antigravity-acp` is the runtime Switch Console installed
+ // before Google's CLI served ACP, still run where it is all there is.
+ binaryNames: ['agy', 'antigravity-acp'],
+ installDocs: 'https://antigravity.google/docs/install?tab=cli',
installCommands: {
- macos: [
- {
- method: 'curl',
- command: ANTIGRAVITY_INSTALL_COMMAND,
- },
- ],
- linux: [
+ macos: [{ method: 'curl', command: AGY_INSTALL_UNIX, recommended: true }],
+ linux: [{ method: 'curl', command: AGY_INSTALL_UNIX, recommended: true }],
+ windows: [
{
- method: 'curl',
- command: ANTIGRAVITY_INSTALL_COMMAND,
+ method: 'powershell',
+ command: AGY_INSTALL_WINDOWS,
+ recommended: true,
},
+ { method: 'curl', label: 'Command Prompt', command: AGY_INSTALL_WINDOWS_CMD },
],
},
updates: {
@@ -42,7 +54,8 @@ export const plugin = definePlugin(
kind: 'none',
},
update: {
- kind: 'package-manager',
+ kind: 'cli',
+ args: ['update'],
},
},
},
diff --git a/console/packages/plugins/src/agents/impl/antigravity/install.ts b/console/packages/plugins/src/agents/impl/antigravity/install.ts
deleted file mode 100644
index cd52b2ab8..000000000
--- a/console/packages/plugins/src/agents/impl/antigravity/install.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const ANTIGRAVITY_INSTALL_COMMAND =
- 'curl -fsSL https://raw.githubusercontent.com/sandbox-quantum/switch/ddcf691068eb535795cd3a4cc82641792c9d8034/scripts/install-antigravity-acp.sh | bash';
diff --git a/console/packages/plugins/src/agents/impl/antigravity/launcher.test.ts b/console/packages/plugins/src/agents/impl/antigravity/launcher.test.ts
index 6b3b7450f..3ebe9d1dd 100644
--- a/console/packages/plugins/src/agents/impl/antigravity/launcher.test.ts
+++ b/console/packages/plugins/src/agents/impl/antigravity/launcher.test.ts
@@ -4,7 +4,6 @@ import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { promisify } from 'node:util';
import { afterEach, expect, it } from 'vitest';
-import { ANTIGRAVITY_INSTALL_COMMAND } from './install';
import { ANTIGRAVITY_LAUNCHER } from './launcher';
const exec = promisify(execFile);
const homes: string[] = [];
@@ -21,7 +20,6 @@ it('checks the installed version without launching the native runtime', async ()
});
expect(result.stdout.trim()).toBe('1.1.1');
expect(await readdir(home)).toEqual(['launcher.cjs']);
- await exec('/bin/sh', ['-n', '-c', ANTIGRAVITY_INSTALL_COMMAND]);
});
it('authenticates explicitly over ACP and removes the native extraction directory', async () => {
const home = await mkdtemp(join(tmpdir(), 'acp-launcher-'));
diff --git a/core/switch_core/providers/registry.py b/core/switch_core/providers/registry.py
index 9ec21faae..0379089bb 100644
--- a/core/switch_core/providers/registry.py
+++ b/core/switch_core/providers/registry.py
@@ -121,7 +121,7 @@ AGENT_PROVIDERS: tuple[AgentProvider, ...] = (
AgentProvider(
id="antigravity",
label="Antigravity",
- sign_in_command="antigravity-acp --login",
+ sign_in_command="agy acp --login",
connector_type="Antigravity CLI",
tools=(
ToolSpec(name="run_command", description="Executes shell commands"),
diff --git a/core/tests/switch_core/delivery/test_offline_owner_reply.py b/core/tests/switch_core/delivery/test_offline_owner_reply.py
index a149c0d8d..66843beab 100644
--- a/core/tests/switch_core/delivery/test_offline_owner_reply.py
+++ b/core/tests/switch_core/delivery/test_offline_owner_reply.py
@@ -199,7 +199,7 @@ class TestUnavailableReplyRouting:
"claude-code": "claude auth login",
"codex": "codex login",
"opencode": "opencode auth login",
- "antigravity": "antigravity-acp --login",
+ "antigravity": "agy acp --login",
"cursor": "agent login",
}
for agent_type, command in sign_in.items():
diff --git a/core/tests/switch_core/providers/test_provider_registry.py b/core/tests/switch_core/providers/test_provider_registry.py
index 7a5a9a15c..11d47ae9e 100644
--- a/core/tests/switch_core/providers/test_provider_registry.py
+++ b/core/tests/switch_core/providers/test_provider_registry.py
@@ -83,7 +83,7 @@ _CONSOLE_SIGN_IN = {
"claude": ("claude/sign-in.ts", r"CLAUDE_LOGIN = '([^']+)'"),
"codex": ("codex/sign-in.ts", r"CODEX_LOGIN = '([^']+)'"),
"opencode": ("opencode/sign-in.ts", r"OPENCODE_LOGIN = '([^']+)'"),
- "antigravity": ("antigravity/antigravity-adapter.ts", r"loginCommand: '([^']+)'"),
+ "antigravity": ("antigravity/runtime.ts", r"AGY_LOGIN = '([^']+)'"),
"cursor": ("cursor/cursor-adapter.ts", r"CURSOR_LOGIN = '([^']+)'"),
}
diff --git a/docs/design/console-onboarding-v1.md b/docs/design/console-onboarding-v1.md
index 1bd1954d0..3386fa0f8 100644
--- a/docs/design/console-onboarding-v1.md
+++ b/docs/design/console-onboarding-v1.md
@@ -200,7 +200,7 @@ This PR changes:
found without a restart.
3. **Run the sign-in for the user.** Console runs the provider's own sign-in
command (`claude auth login`, `codex login`, `opencode auth login`,
- `agent login`, `antigravity-acp --login`) in a visible terminal panel
+ `agent login`, `agy acp --login`) in a visible terminal panel
inside onboarding. Most of these open the provider's page in the default
browser. When the command exits, Console asks the controller to re-check.
4. **One source of truth.** The provider step, the "Start with…" buttons and