Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
feat(open-knowledge): add Antigravity (agy) as ok init + handoff target (#2578)
mike-inkeep10cdd4af77db
diff --git a/.changeset/antigravity-integration.md b/.changeset/antigravity-integration.mdnew file mode 100644index 000000000..85ba407e5--- /dev/null+++ b/.changeset/antigravity-integration.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": minor+---++First-class support for Google Antigravity — the agentic IDE and the `agy` terminal agent (the Gemini CLI's successor). `ok init` now registers the OpenKnowledge MCP server for Antigravity, writing the standard `mcpServers` entry (the same resilient launcher every other editor gets) into Antigravity's single user-global config at `~/.gemini/config/mcp_config.json`, shared by the IDE and `agy` alike. Antigravity has no project-scoped MCP config, so — like Claude Desktop and OpenClaw — it registers once at user scope, gated on the `~/.gemini/` home existing so a config is never written for a tool that isn't installed. It also appears in the macOS desktop app's consent dialog and is healed by the startup repair/reclaim sweeps.++Antigravity also joins the docked-terminal launch registry: the OpenKnowledge desktop app's "Open in Antigravity" action launches `agy '<prompt>'` in the docked terminal, scoped to the current doc, folder, or project. The row appears only when `agy` is detected on your `PATH`. A new integrations docs page covers MCP setup and the `agy` CLI.diff --git a/docs/content/get-started/quickstart.mdx b/docs/content/get-started/quickstart.mdxindex b00b8b188..40550ba9b 100644--- a/docs/content/get-started/quickstart.mdx+++ b/docs/content/get-started/quickstart.mdx@@ -122,7 +122,7 @@ Install the CLI from npm, initialize a project, and start the editor in your bronpm install -g @inkeep/open-knowledge# Create (or enter) a project folder, then initialize a knowledge base.-# `ok init` scaffolds .ok/ and wires up Claude Code, Claude Desktop, Cursor, Codex, OpenCode, OpenClaw, and Pi.+# `ok init` scaffolds .ok/ and wires up Claude Code, Claude Desktop, Cursor, Codex, OpenCode, OpenClaw, Pi, and Antigravity.mkdir my-knowledge-base && cd my-knowledge-baseok initdiff --git a/docs/content/integrations/antigravity.mdx b/docs/content/integrations/antigravity.mdxnew file mode 100644index 000000000..4f685a3c9--- /dev/null+++ b/docs/content/integrations/antigravity.mdx@@ -0,0 +1,80 @@+---+title: Antigravity+description: Use OpenKnowledge with Google Antigravity — the agentic IDE and the agy terminal agent — over MCP.+icon: custom/Antigravity+---++[Antigravity](https://antigravity.google) is Google's agentic development platform: an IDE and the `agy` terminal agent (the successor to the Gemini CLI). Both connect to MCP servers. Once OpenKnowledge is registered as one, Antigravity can read, search, and write your knowledge base through OK's tools — with full attribution, link-awareness, conflict-awareness, and a live browser preview. Inside an OK project, work markdown through those tools rather than native file access, so every edit stays attributed and previewable.++## Install++<McpInstall editor="Antigravity">+ <p>+ After <code>ok init</code> writes the config, restart Antigravity (or reload MCP servers from+ the agent panel) so it picks up the entry. The IDE and the <code>agy</code> CLI share one+ config file, so a single <code>ok init</code> wires up both.+ </p>+</McpInstall>++`ok init` writes the OpenKnowledge server into `~/.gemini/config/mcp_config.json` under `mcpServers`, using the same resilient launcher every other editor gets — it finds `ok` whether you installed the desktop app or the npm CLI, so there's no PATH to configure.++<Callout type="info">+ Antigravity has **one shared, user-global MCP config** — `~/.gemini/config/mcp_config.json`, read by the IDE, the app, and `agy` alike (the `.gemini` directory is inherited from the Gemini CLI lineage, not `~/.antigravity`). There is no per-project MCP config; per project you can only choose which globally-registered servers an agent may use. So OpenKnowledge registers once, globally, the same way it does for Claude Desktop. Each OK tool call takes a `cwd` argument to target a specific knowledge base, so one registration serves every project you open.+</Callout>++## Verify++Open a project with Antigravity — the IDE or an `agy` session in the project directory — and ask:++<VerifyExec subject="Antigravity" />++If the agent doesn't see the tool, reload the MCP servers (the agent panel's **Manage MCP Servers** view, or restart `agy`) and check that OpenKnowledge is listed and enabled. The first tool call can take a moment on a fresh machine — the launcher may be installing the OpenKnowledge CLI via `npx`.++## Use the `agy` CLI++`agy` is Antigravity's terminal agent. Start it in a knowledge base and pass an opening prompt as the positional argument:++```bash+cd /path/to/your/knowledge-base+agy "Summarize the open questions across this project's specs."+```++The session stays open for follow-ups. From the **OpenKnowledge desktop app**, the "Open in Antigravity" action launches `agy` in the docked terminal, pre-filled with a prompt scoped to the doc, folder, or project you're on. The row appears only when `agy` is detected on your `PATH` (the installer drops it at `~/.local/bin/agy`).++## Initialize a knowledge base++`ok init` turns a folder into a knowledge base (and, on the same run, registers the MCP server above):++```bash+cd /path/to/your/knowledge-base && ok init+```++<Callout type="warn">+ **`ok init` resolves upward into an existing project.** Run inside a subdirectory of an existing OK project, `ok init` finds the *parent* project and refreshes that one — it does not create a nested project, and it writes no markdown in the subdirectory. To create a genuinely separate knowledge base, run `ok init` in a folder that sits **outside any existing `.ok` project tree**.+</Callout>++## Preview++Write and edit responses include a route-only preview path like `/#/notes/mcp-round-trip` — a route id, **not** a full URL. Call `preview_url` for the openable browser address, and don't screenshot the preview to confirm an edit (the tool response is the confirmation). See [MCP reference → Preview links](/docs/reference/mcp#preview-links) for the full semantics.++## Agent contract++The **OpenKnowledge skill** — the authoritative agent contract for tool use, grounding, and linking — is project-scoped, written for Claude, Cursor, Codex, and OpenCode. Antigravity reads skills only from its user-global `~/.gemini/skills` hub, with no project skill directory to receive it, so for Antigravity the contract is these two reminders:++- **Markdown is MCP-owned.** Inside an OK project, read and write `.md` / `.mdx` through OK's tools (`exec`, `search`, `write`, `edit`, `links`), not native shell or file tools — native access loses attribution and skips the frontmatter, backlinks, and history OK returns.+- **Discover before concluding the MCP is missing.** Not seeing `exec` in the initial tool list isn't the escape hatch; reload the MCP servers first.++For the complete tool surface, see the [MCP reference](/docs/reference/mcp).++## Troubleshooting++| Symptom | Cause | Fix |+| --- | --- | --- |+| `ok init` showed Antigravity as `config root missing; skipped` | `~/.gemini/` doesn't exist yet, so Antigravity wasn't detected | Launch Antigravity or run `agy` once (it creates the directory), then re-run `ok init` |+| `ok init` reported the config was `left unchanged` | OpenKnowledge declined to edit `~/.gemini/config/mcp_config.json` for the reason shown in parentheses | Fix what the reason names (invalid JSON, a duplicated server block), then re-run `ok init` |+| Antigravity doesn't see the `open-knowledge` tools | MCP servers not reloaded, or the agent's process predates the entry | Reload MCP servers (or restart `agy`), and confirm the server is enabled |+| "Open in Antigravity" row is missing in the desktop app | `agy` isn't on `PATH` | Install the Antigravity CLI (`~/.local/bin/agy`) and ensure that directory is on your `PATH` |+| `write` / `edit` -> "Hocuspocus server is not running" | OK server not started | Run `ok start` (or leave the desktop app running) and retry |+| Preview "doesn't open" | used the route-only `/#/…` path in a browser | Call `preview_url` for the full URL |++New to OpenKnowledge itself? Start with the [quickstart](/docs/get-started/quickstart) for `ok init` and `ok start`.diff --git a/docs/content/integrations/meta.json b/docs/content/integrations/meta.jsonindex 7448ec959..169216ec3 100644--- a/docs/content/integrations/meta.json+++ b/docs/content/integrations/meta.json@@ -1,5 +1,5 @@{"title": "Integrations","icon": "LuPlug",- "pages": ["claude-code", "cursor", "codex", "opencode", "pi", "openclaw"]+ "pages": ["claude-code", "cursor", "codex", "opencode", "pi", "openclaw", "antigravity"]}diff --git a/docs/content/reference/cli.mdx b/docs/content/reference/cli.mdxindex 45d7ed807..8d5676625 100644--- a/docs/content/reference/cli.mdx+++ b/docs/content/reference/cli.mdx@@ -22,7 +22,7 @@ npm install -g @inkeep/open-knowledge## Set up a project-Run `ok init` in any folder to turn it into an OpenKnowledge project. It scaffolds a `.ok/` directory and registers the OpenKnowledge MCP server with the AI editors it detects on your machine (Claude Code, Claude Desktop, Cursor, Codex, OpenCode, OpenClaw, Pi). It only ever adds its own entry — your other settings, comments, and formatting are left untouched.+Run `ok init` in any folder to turn it into an OpenKnowledge project. It scaffolds a `.ok/` directory and registers the OpenKnowledge MCP server with the AI editors it detects on your machine (Claude Code, Claude Desktop, Cursor, Codex, OpenCode, OpenClaw, Pi, Antigravity). It only ever adds its own entry — your other settings, comments, and formatting are left untouched.```bashcd my-projectdiff --git a/docs/content/reference/what-open-knowledge-writes.mdx b/docs/content/reference/what-open-knowledge-writes.mdxindex 176142f76..57f70e5e0 100644--- a/docs/content/reference/what-open-knowledge-writes.mdx+++ b/docs/content/reference/what-open-knowledge-writes.mdx@@ -88,7 +88,7 @@ When you initialize or open a project, the app scaffolds the same project files| `.claude/skills/`, `.cursor/skills/`, `.codex/skills/`, `.opencode/skills/`, `.pi/skills/` | Project-local "rich" OpenKnowledge skill (`SKILL.md`) for the same five editors | In-project, committed || `.ok/skill-targets.json` | Committed list of which editors receive skills, written when you customize the targets | In-project, committed || `.claude/launch.json` | Configures Claude Code's preview pane to open the editor (on a local UI port, `39848`) | In-project, committed |-| `~/.claude.json`, `~/Library/Application Support/Claude/claude_desktop_config.json`, `~/.cursor/mcp.json`, `~/.codex/config.toml`, `~/.config/opencode/opencode.json`, `~/.openclaw/openclaw.json` | User-level `open-knowledge` MCP registration, one per detected editor, so it's available in every project (`~/.openclaw/openclaw.json` only when `~/.openclaw/` exists) | Outside-project (editor config) |+| `~/.claude.json`, `~/Library/Application Support/Claude/claude_desktop_config.json`, `~/.cursor/mcp.json`, `~/.codex/config.toml`, `~/.config/opencode/opencode.json`, `~/.openclaw/openclaw.json`, `~/.gemini/config/mcp_config.json` | User-level `open-knowledge` MCP registration, one per detected editor, so it's available in every project (`~/.openclaw/openclaw.json` only when `~/.openclaw/` exists; `~/.gemini/config/mcp_config.json` is Antigravity's shared IDE + `agy` config, only when `~/.gemini/` exists) | Outside-project (editor config) |### While a project is open@@ -177,6 +177,7 @@ With `--scope user` or `both` (the default), `ok init` also registers the `open-| `~/.codex/config.toml` | Codex | Outside-project (editor config) || `~/.config/opencode/opencode.json` | OpenCode | Outside-project (editor config) || `~/.openclaw/openclaw.json` | OpenClaw (only when `~/.openclaw/` exists) | Outside-project (editor config) |+| `~/.gemini/config/mcp_config.json` | Antigravity (only when `~/.gemini/` exists) — shared by the IDE and the `agy` CLI | Outside-project (editor config) |Pi is the exception: it has no user-level MCP config (it has no MCP support at all), so its integration is only ever the project-scoped bridge extension above.diff --git a/docs/src/components/agent-icons.tsx b/docs/src/components/agent-icons.tsxindex 6dbdae505..040a53344 100644--- a/docs/src/components/agent-icons.tsx+++ b/docs/src/components/agent-icons.tsx@@ -1,3 +1,4 @@+import { AntigravityIcon } from '@/components/icons/antigravity';import { ClaudeIcon } from '@/components/icons/claude';import { CodexIcon } from '@/components/icons/codex';import { CursorIcon } from '@/components/icons/cursor';@@ -12,6 +13,7 @@ const AGENTS = [{ name: 'OpenCode', Icon: OpenCodeIcon },{ name: 'OpenClaw', Icon: OpenClawIcon },{ name: 'Pi', Icon: PiIcon },+ { name: 'Antigravity', Icon: AntigravityIcon },] as const;export function AgentIcons() {diff --git a/docs/src/components/icons/antigravity.tsx b/docs/src/components/icons/antigravity.tsxnew file mode 100644index 000000000..50f5ba554--- /dev/null+++ b/docs/src/components/icons/antigravity.tsx@@ -0,0 +1,31 @@+import type { SVGProps } from 'react';++// Antigravity brand mark, rendered monochrome via `currentColor` so it inherits+// the sidebar text color like every other nav brand icon. A simple geometric+// "upward" glyph (evoking anti-gravity) stands in for the official multi-color+// logo, which OK does not ship. The SVG markup is kept identical to the app-side+// icon at `packages/app/src/components/icons/antigravity.tsx` (the surrounding+// comment is tailored per context, matching the pi.tsx / opencode.tsx pattern).+export function AntigravityIcon(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ role="img"+ aria-label="Antigravity icon"+ xmlns="http://www.w3.org/2000/svg"+ width={24}+ height={24}+ fill="none"+ viewBox="0 0 24 24"+ {...props}+ >+ <title>Antigravity icon</title>+ <path+ fill="currentColor"+ fillRule="evenodd"+ clipRule="evenodd"+ d="M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z"+ />+ <path fill="currentColor" d="M12 9.6 15.6 17h-7.2L12 9.6Z" />+ </svg>+ );+}diff --git a/docs/src/components/icons/brand.ts b/docs/src/components/icons/brand.tsindex 563d8a5f3..3b01c9274 100644--- a/docs/src/components/icons/brand.ts+++ b/docs/src/components/icons/brand.ts@@ -1,4 +1,5 @@import type { ComponentType, SVGProps } from 'react';+import { AntigravityIcon } from './antigravity';import { ClaudeIcon } from './claude';import { CodexIcon } from './codex';import { CursorIcon } from './cursor';@@ -20,6 +21,7 @@ export const brandIcons = {OpenCode: OpenCodeIcon,OpenClaw: OpenClawIcon,Pi: PiIcon,+ Antigravity: AntigravityIcon,GitHub: GitHubIcon,Obsidian: ObsidianIcon,MCP: McpIcon,diff --git a/docs/src/components/overview-blocks.tsx b/docs/src/components/overview-blocks.tsxindex 2849ea311..1cfb57a80 100644--- a/docs/src/components/overview-blocks.tsx+++ b/docs/src/components/overview-blocks.tsx@@ -98,7 +98,7 @@ const PATHS: Path[] = [{href: '/docs/integrations/claude-code',title: 'Setting up an editor?',- desc: 'Use with Claude, Cursor, Codex, OpenCode, OpenClaw, or Pi.',+ desc: 'Use with Claude, Cursor, Codex, OpenCode, OpenClaw, Pi, or Antigravity.',},{href: '/docs/workflows/karpathy-llm-wiki',diff --git a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsxindex 0f394890d..7d60790c8 100644--- a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx@@ -34,6 +34,7 @@ import { t } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { useTheme } from 'next-themes';import type { CSSProperties, ReactNode, SVGProps } from 'react';+import { AntigravityIcon } from '@/components/icons/antigravity';import { ClaudeIcon } from '@/components/icons/claude';import { CodexBrandIcon } from '@/components/icons/codex';import { CursorIcon } from '@/components/icons/cursor';@@ -69,9 +70,10 @@ const TARGET_ICON_KEY: Record<TargetData['id'], string> = {codex: 'openai',cursor: 'cursor',// No `AGENT_ICON_COLORS` entry → renders monochrome (inherits the row's text- // color), which suits OpenCode's and Pi's monochrome brand marks.+ // color), which suits OpenCode's, Pi's, and Antigravity's monochrome brand marks.opencode: 'opencode',pi: 'pi',+ antigravity: 'antigravity',};export function TargetIcon({@@ -105,6 +107,8 @@ export function TargetIcon({if (id === 'opencode')return <OpenCodeIcon style={mergedStyle} className={mergedClass} {...props} />;if (id === 'pi') return <PiIcon style={mergedStyle} className={mergedClass} {...props} />;+ if (id === 'antigravity')+ return <AntigravityIcon style={mergedStyle} className={mergedClass} {...props} />;return null;}diff --git a/packages/app/src/components/icons/antigravity.tsx b/packages/app/src/components/icons/antigravity.tsxnew file mode 100644index 000000000..c6611e06d--- /dev/null+++ b/packages/app/src/components/icons/antigravity.tsx@@ -0,0 +1,30 @@+import type { SVGProps } from 'react';++// Antigravity brand mark. Rendered monochrome via `currentColor` so the+// dropdown row's color cascade (and the optional `--ok-brand-color` override in+// `TargetIcon`) tints it per theme, matching the OpenCode/Pi treatment. A+// simple geometric "upward" glyph (evoking anti-gravity) stands in for the+// official multi-color logo, which OK does not ship.+export function AntigravityIcon(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ role="img"+ aria-label="Antigravity icon"+ xmlns="http://www.w3.org/2000/svg"+ width={24}+ height={24}+ fill="none"+ viewBox="0 0 24 24"+ {...props}+ >+ <title>Antigravity icon</title>+ <path+ fill="currentColor"+ fillRule="evenodd"+ clipRule="evenodd"+ d="M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z"+ />+ <path fill="currentColor" d="M12 9.6 15.6 17h-7.2L12 9.6Z" />+ </svg>+ );+}diff --git a/packages/app/src/lib/handoff/dispatch.test.ts b/packages/app/src/lib/handoff/dispatch.test.tsindex c73c00a1b..65ada0533 100644--- a/packages/app/src/lib/handoff/dispatch.test.ts+++ b/packages/app/src/lib/handoff/dispatch.test.ts@@ -178,6 +178,7 @@ describe('dispatchHandoff — runtime exhaustiveness guard', () => {test.each(['opencode','pi',+ 'antigravity',] as const)('terminal-only target %s is refused by the deep-link dispatcher (defensive)', async (target) => {// No production caller routes terminal-only targets here (excluded from// VISIBLE_TARGETS); the case exists so a programmatic dispatch failsdiff --git a/packages/app/src/lib/handoff/dispatch.ts b/packages/app/src/lib/handoff/dispatch.tsindex 8e830f75f..b1a2a41bf 100644--- a/packages/app/src/lib/handoff/dispatch.ts+++ b/packages/app/src/lib/handoff/dispatch.ts@@ -133,6 +133,13 @@ export async function dispatchHandoff(reason: 'invalid-payload',detail: 'pi is terminal-only; launch via requestTerminalLaunch',};+ case 'antigravity':+ // Terminal-only target (`agy` CLI), same carve-out as opencode/pi above.+ return {+ ok: false,+ reason: 'invalid-payload',+ detail: 'antigravity is terminal-only; launch via requestTerminalLaunch',+ };default: {const _exhaustive: never = payload.target;return {diff --git a/packages/app/src/lib/handoff/targets.test.ts b/packages/app/src/lib/handoff/targets.test.tsindex b50194f0b..3fe9e1a24 100644--- a/packages/app/src/lib/handoff/targets.test.ts+++ b/packages/app/src/lib/handoff/targets.test.ts@@ -2,22 +2,24 @@ import { describe, expect, test } from 'bun:test';import { KNOWN_TARGETS, VISIBLE_TARGETS } from './targets.ts';describe('KNOWN_TARGETS', () => {- test('has exactly six targets (four GUI + terminal-only OpenCode and Pi)', () => {- expect(KNOWN_TARGETS.length).toBe(6);+ test('has exactly seven targets (four GUI + terminal-only OpenCode, Pi, Antigravity)', () => {+ expect(KNOWN_TARGETS.length).toBe(7);});test('ids cover the full HandoffTarget union', () => {const ids = new Set(KNOWN_TARGETS.map((t) => t.id));expect(ids).toEqual(- new Set(['claude-cowork', 'claude-code', 'codex', 'cursor', 'opencode', 'pi']),+ new Set(['claude-cowork', 'claude-code', 'codex', 'cursor', 'opencode', 'pi', 'antigravity']),);});- test('opencode and pi are terminal-only — no URL scheme', () => {+ test('opencode, pi, and antigravity are terminal-only — no URL scheme', () => {const opencode = KNOWN_TARGETS.find((t) => t.id === 'opencode');expect(opencode?.schemes).toEqual([]);const pi = KNOWN_TARGETS.find((t) => t.id === 'pi');expect(pi?.schemes).toEqual([]);+ const antigravity = KNOWN_TARGETS.find((t) => t.id === 'antigravity');+ expect(antigravity?.schemes).toEqual([]);});test('claude-cowork + claude-code share the claude: scheme (single install state)', () => {@@ -48,6 +50,7 @@ describe('KNOWN_TARGETS', () => {expect(byId.get('cursor')).toBe('Cursor');expect(byId.get('opencode')).toBe('OpenCode');expect(byId.get('pi')).toBe('Pi');+ expect(byId.get('antigravity')).toBe('Antigravity');});});@@ -62,12 +65,14 @@ describe('VISIBLE_TARGETS (UI render allow-list)', () => {expect(ids.has('claude-cowork')).toBe(false);});- test('hides the terminal-only opencode + pi targets from the GUI deep-link list', () => {- // OpenCode and Pi surface as terminal-CLI launch rows (TERMINAL_CLI_IDS),- // not GUI deep-link targets, so they must not appear in VISIBLE_TARGETS.+ test('hides the terminal-only opencode + pi + antigravity targets from the GUI deep-link list', () => {+ // OpenCode, Pi, and Antigravity surface as terminal-CLI launch rows+ // (TERMINAL_CLI_IDS), not GUI deep-link targets, so they must not appear in+ // VISIBLE_TARGETS.const ids = new Set(VISIBLE_TARGETS.map((t) => t.id));expect(ids.has('opencode')).toBe(false);expect(ids.has('pi')).toBe(false);+ expect(ids.has('antigravity')).toBe(false);});test('keeps the remaining three targets visible', () => {diff --git a/packages/app/src/lib/handoff/targets.ts b/packages/app/src/lib/handoff/targets.tsindex 3bf083b6f..5495b35a1 100644--- a/packages/app/src/lib/handoff/targets.ts+++ b/packages/app/src/lib/handoff/targets.ts@@ -72,6 +72,15 @@ export const KNOWN_TARGETS = [installUrl: 'https://pi.dev',tagline: 'Minimal open-source terminal coding agent, extensible in TypeScript.',},+ {+ // Terminal-only target, same carve-out as `opencode`/`pi` above. Reached+ // via the `agy` CLI launch row; the IDE/app are not deep-link targets.+ id: 'antigravity',+ displayName: 'Antigravity',+ schemes: [],+ installUrl: 'https://antigravity.google',+ tagline: "Google's agentic IDE + `agy` terminal agent.",+ },] as const satisfies ReadonlyArray<TargetData>;// UI-visibility allow-list. `claude-cowork` is intentionally absent: dispatch@@ -81,7 +90,12 @@ export const KNOWN_TARGETS = [// group, and the empty-state "Create with <agent>" composer.export const VISIBLE_TARGETS: ReadonlyArray<TargetData> = KNOWN_TARGETS.filter(// `claude-cowork`: dispatch-by-ID only, no render surface.- // `opencode` / `pi`: terminal-only — surfaced via the terminal-CLI rows, not- // the GUI deep-link target list, so they must not appear as dispatchable rows.- (target) => target.id !== 'claude-cowork' && target.id !== 'opencode' && target.id !== 'pi',+ // `opencode` / `pi` / `antigravity`: terminal-only — surfaced via the+ // terminal-CLI rows, not the GUI deep-link target list, so they must not+ // appear as dispatchable rows.+ (target) =>+ target.id !== 'claude-cowork' &&+ target.id !== 'opencode' &&+ target.id !== 'pi' &&+ target.id !== 'antigravity',);diff --git a/packages/app/tests/stress/fixtures/handoff-mocks.ts b/packages/app/tests/stress/fixtures/handoff-mocks.tsindex 937cdf27f..c9b8e8145 100644--- a/packages/app/tests/stress/fixtures/handoff-mocks.ts+++ b/packages/app/tests/stress/fixtures/handoff-mocks.ts@@ -591,6 +591,7 @@ export async function installHandoffMocks(page: Page, cfg: HandoffMockConfig): Popencode: true,cursor: true,pi: true,+ antigravity: true,}),rewireClaudeMcp: async () => ({ claude: 'present' as const, mcp: 'wired' as const }),},diff --git a/packages/cli/src/commands/editors.test.ts b/packages/cli/src/commands/editors.test.tsindex 7996350bb..4b6379663 100644--- a/packages/cli/src/commands/editors.test.ts+++ b/packages/cli/src/commands/editors.test.ts@@ -9,6 +9,7 @@ import {type EditorId,isEntryUpToDate,isOwnManagedEntry,+ resolveAntigravityConfigPath,resolveAppSupportPath,resolveClaudeCodeConfigPath,resolveClaudeDesktopConfigPath,@@ -199,6 +200,20 @@ describe('resolveOpenClawConfigPath', () => {});});+describe('resolveAntigravityConfigPath', () => {+ it('builds the shared ~/.gemini/config MCP path (home-relative on every platform)', () => {+ expect(resolveAntigravityConfigPath({ home: '/Users/alice', platformName: 'darwin' })).toBe(+ '/Users/alice/.gemini/config/mcp_config.json',+ );+ expect(resolveAntigravityConfigPath({ home: '/home/alice', platformName: 'linux' })).toBe(+ '/home/alice/.gemini/config/mcp_config.json',+ );+ expect(resolveAntigravityConfigPath({ home: 'C:\\Users\\alice', platformName: 'win32' })).toBe(+ 'C:\\Users\\alice\\.gemini\\config\\mcp_config.json',+ );+ });+});+describe('resolvePiAgentDirPath', () => {it('builds the default Pi agent dir under home', () => {expect(resolvePiAgentDirPath({ home: '/Users/alice', platformName: 'darwin', env: {} })).toBe(@@ -251,6 +266,25 @@ describe('EDITOR_TARGETS.openclaw', () => {});});+describe('EDITOR_TARGETS.antigravity', () => {+ it('writes the managed launcher to the shared ~/.gemini/config MCP file, detection-gated', () => {+ const t = EDITOR_TARGETS.antigravity;+ // Plain `mcpServers` JSON like Claude/Cursor, but user-global only (shared+ // by the IDE and the agy CLI) and gated on the ~/.gemini home existing.+ expect(t.format).toBe('json');+ expect(t.topLevelKey).toBe('mcpServers');+ expect(t.scope).toBe('global');+ expect(t.offerOnlyWhenDetected).toBe(true);+ expect(t.projectConfigPath).toBeUndefined();+ expect(t.configPath('', '/Users/alice')).toBe('/Users/alice/.gemini/config/mcp_config.json');+ expect(t.detectPath?.('', '/Users/alice')).toBe('/Users/alice/.gemini');+ expect(t.buildEntry('', { mode: 'published' })).toEqual({+ command: '/bin/sh',+ args: ['-l', '-c', CHAIN_V1],+ });+ });+});+describe('CHAIN_V1', () => {it('starts with the version sentinel', () => {expect(CHAIN_V1.startsWith(CHAIN_VERSION_SENTINEL)).toBe(true);@@ -353,8 +387,16 @@ describe('buildManagedServerEntry', () => {// surface. EDITOR_TARGETS[id].buildEntry is the canonical caller path// for both user-scope (`writeUserMcpConfigs`) and project-scope writes.// opencode is excluded — it uses buildOpenCodeEntry's array-command shape.- // openclaw belongs here: it reuses buildManagedServerEntry like the rest.- const editors: EditorId[] = ['claude', 'claude-desktop', 'cursor', 'codex', 'openclaw'];+ // openclaw + antigravity belong here: they reuse buildManagedServerEntry+ // like the rest (only their config envelope / location differs).+ const editors: EditorId[] = [+ 'claude',+ 'claude-desktop',+ 'cursor',+ 'codex',+ 'openclaw',+ 'antigravity',+ ];const baseline = buildManagedServerEntry({ mode: 'published' });for (const id of editors) {const target = resolveEditorTargets([id])[0];@@ -650,8 +692,16 @@ describe('buildManagedServerEntry (win32)', () => {});it('every editor target produces the byte-identical Windows entry', () => {- // openclaw belongs here: it reuses buildManagedServerEntry like the rest.- const editors: EditorId[] = ['claude', 'claude-desktop', 'cursor', 'codex', 'openclaw'];+ // openclaw + antigravity belong here: they reuse buildManagedServerEntry+ // like the rest (only their config envelope / location differs).+ const editors: EditorId[] = [+ 'claude',+ 'claude-desktop',+ 'cursor',+ 'codex',+ 'openclaw',+ 'antigravity',+ ];for (const id of editors) {const target = resolveEditorTargets([id])[0];const built = target.buildEntry('', { mode: 'published', platformName: 'win32' });diff --git a/packages/cli/src/commands/editors.ts b/packages/cli/src/commands/editors.tsindex 87663b2a2..0423afcf1 100644--- a/packages/cli/src/commands/editors.ts+++ b/packages/cli/src/commands/editors.ts@@ -624,6 +624,21 @@ export function resolvePiAgentDirPath(options: AppSupportOptions = {}): string {return env.PI_CODING_AGENT_DIR ?? pathApiForPlatform(platformName).join(home, '.pi', 'agent');}+/**+ * Antigravity (Google's agentic IDE + the `agy` CLI, successor to the retired+ * Gemini CLI) reads MCP servers from a SINGLE user-global file shared across+ * the IDE, the app, and `agy`: `~/.gemini/config/mcp_config.json`. There is no+ * project-scoped MCP config — per-project you can only filter which global+ * servers are allowed — so OK writes only this user-global file, the same+ * posture as Claude Desktop / OpenClaw. The `.gemini` home is inherited from+ * the Gemini CLI lineage (NOT `~/.antigravity`).+ */+export function resolveAntigravityConfigPath(options: AppSupportOptions = {}): string {+ const platformName = options.platformName ?? process.platform;+ const home = options.home ?? homedir();+ return pathApiForPlatform(platformName).join(home, '.gemini', 'config', 'mcp_config.json');+}+export interface EditorMcpTarget {id: EditorId;/** Human-friendly name for CLI output. */@@ -814,6 +829,27 @@ export const EDITOR_TARGETS: Record<EditorId, EditorMcpTarget> = {// `EDITOR_PROJECT_SKILL_ROOT.pi` and must match it.projectSkillPath: (cwd) => join(cwd, '.pi', 'skills', 'open-knowledge', 'SKILL.md'),},+ antigravity: {+ id: 'antigravity',+ label: EDITOR_LABELS.antigravity,+ configPath: (_cwd, home) => resolveAntigravityConfigPath({ home }),+ format: 'json',+ // Antigravity uses the standard `mcpServers` map with chain-shape+ // `{command, args}` entries — the same resilient launcher every other JSON+ // editor gets (`buildManagedServerEntry`), so a resolved OK server is+ // byte-identical; only the file location (`~/.gemini/config/mcp_config.json`)+ // differs. No project-scoped config: `scope: 'global'`, no projectConfigPath.+ topLevelKey: 'mcpServers',+ serverName: () => MCP_SERVER_NAME,+ buildEntry: (_cwd, options) => buildManagedServerEntry(options),+ scope: 'global',+ detectPath: (_cwd, home) => join(home ?? homedir(), '.gemini'),+ // Never write `~/.gemini/config/mcp_config.json` unless the Gemini/Antigravity+ // home exists — writing it for a tool that isn't installed is pointless+ // (nothing reads it). Gated on detection even under the consent flow's+ // skipAvailabilityCheck, exactly like OpenClaw.+ offerOnlyWhenDetected: true,+ },};/**diff --git a/packages/cli/src/commands/init.test.ts b/packages/cli/src/commands/init.test.tsindex 2c4b16eb7..03a96b9a9 100644--- a/packages/cli/src/commands/init.test.ts+++ b/packages/cli/src/commands/init.test.ts@@ -802,6 +802,9 @@ describe('runInit', () => {mkdirSync(dirname(opencodeConfigPath()), { recursive: true });mkdirSync(join(fakeHome, '.openclaw'), { recursive: true });mkdirSync(join(fakeHome, '.pi', 'agent'), { recursive: true });+ // Antigravity is `offerOnlyWhenDetected`, so its user-global write is+ // gated on the `~/.gemini` home existing even under the consent flow.+ mkdirSync(join(fakeHome, '.gemini'), { recursive: true });const result = await runInitForTest({ editors: [...ALL_EDITOR_IDS] });@@ -824,6 +827,12 @@ describe('runInit', () => {readFileSync(join(fakeHome, '.openclaw', 'openclaw.json'), 'utf-8'),);expect(openclawConfig.mcp.servers['open-knowledge']).toEqual(PUBLISHED_CHAIN_ENTRY);+ // Antigravity writes the standard `mcpServers` map at+ // `~/.gemini/config/mcp_config.json`.+ const antigravityConfig = JSON.parse(+ readFileSync(join(fakeHome, '.gemini', 'config', 'mcp_config.json'), 'utf-8'),+ );+ expect(antigravityConfig.mcpServers['open-knowledge']).toEqual(PUBLISHED_CHAIN_ENTRY);});it('overwrites across all targeted editors', async () => {@@ -2379,6 +2388,19 @@ describe('detectInstalledEditors', () => {expect(detected).not.toContain('cursor');});+ it('detects Antigravity when ~/.gemini exists', async () => {+ mkdirSync(join(fakeHome, '.gemini'), { recursive: true });+ const detected = detectInstalledEditors(testDir, fakeHome);+ expect(detected).toContain('antigravity');+ });++ it('does NOT detect Antigravity when ~/.gemini is absent', async () => {+ // `offerOnlyWhenDetected` makes this gate load-bearing: an over-broad+ // detectPath (e.g. ~/.config) would silently write the config for anyone.+ const detected = detectInstalledEditors(testDir, fakeHome);+ expect(detected).not.toContain('antigravity');+ });+it('detects Codex when ~/.codex/ exists', async () => {mkdirSync(dirname(codexConfigPath()), { recursive: true });const detected = detectInstalledEditors(testDir, fakeHome);@@ -2404,6 +2426,7 @@ describe('detectInstalledEditors', () => {mkdirSync(dirname(opencodeConfigPath()), { recursive: true });mkdirSync(join(fakeHome, '.openclaw'), { recursive: true });mkdirSync(join(fakeHome, '.pi', 'agent'), { recursive: true });+ mkdirSync(join(fakeHome, '.gemini'), { recursive: true });const detected = detectInstalledEditors(testDir, fakeHome);expect(detected).toEqual(expect.arrayContaining([...ALL_EDITOR_IDS]));expect(detected).toHaveLength(ALL_EDITOR_IDS.length);diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.tsindex 06418b60c..a60c37b6f 100644--- a/packages/cli/src/commands/init.ts+++ b/packages/cli/src/commands/init.ts@@ -1145,10 +1145,11 @@ export function writeEditorMcpConfig(// (configPathOverride set) — the project directory always exists by// definition.//- // `offerOnlyWhenDetected` editors (OpenClaw) are the exception: their config- // root must exist even under the consent bypass, so we never create a config- // for a global tool that isn't installed. Project-scope writes stay exempt —- // OpenClaw has no project config, so `configPathOverride` never applies to it.+ // `offerOnlyWhenDetected` editors (OpenClaw, Antigravity) are the exception:+ // their config root must exist even under the consent bypass, so we never+ // create a config for a global tool that isn't installed. Project-scope writes+ // stay exempt — neither has a project config, so `configPathOverride` never+ // applies to them.const enforceAvailability =!installOptions.skipAvailabilityCheck || target.offerOnlyWhenDetected === true;if (!configPathOverride && enforceAvailability && !isEditorTargetAvailable(target, cwd, home)) {diff --git a/packages/core/src/constants/editors.ts b/packages/core/src/constants/editors.tsindex ced14e976..551f39952 100644--- a/packages/core/src/constants/editors.ts+++ b/packages/core/src/constants/editors.ts@@ -13,7 +13,8 @@ export type EditorId =| 'codex'| 'opencode'| 'openclaw'- | 'pi';+ | 'pi'+ | 'antigravity';export const ALL_EDITOR_IDS = ['claude',@@ -23,6 +24,7 @@ export const ALL_EDITOR_IDS = ['opencode','openclaw','pi',+ 'antigravity',] as const satisfies readonly EditorId[];/**@@ -39,6 +41,7 @@ export const EDITOR_LABELS = {opencode: 'OpenCode',openclaw: 'OpenClaw',pi: 'Pi',+ antigravity: 'Antigravity',} as const satisfies Record<EditorId, string>;/**@@ -95,6 +98,11 @@ export const EDITOR_PROJECT_SKILL_ROOT = {// skill dirs are trust-gated in Pi: they load only after the user trusts// the folder.pi: '.pi/skills',+ // Antigravity (IDE + `agy` CLI) reads skills only from the user-global+ // `~/.gemini/skills` hub — there is no project-scoped skill dir OK writes.+ // Like OpenClaw, its integration is the user-global MCP config; OK ships no+ // per-project skill for it.+ antigravity: null,} as const satisfies Record<EditorId, string | null>;/** Editor ids that have a project skill surface (valid install-projection targets). */@@ -142,6 +150,7 @@ export const EDITOR_SETUP_DOC_SLUG = {opencode: 'opencode',openclaw: 'openclaw',pi: 'pi',+ antigravity: 'antigravity',} as const satisfies Record<EditorId, string>;/**@@ -168,4 +177,10 @@ export const EDITOR_PROJECT_CONFIG_PATH = {// (sharing-mode exclude, deinit, reclaim) must target, so it is the// project-config path. OK never reads or writes `.pi/settings.json`.pi: '.pi/extensions/open-knowledge.ts',+ // Antigravity has NO project-scoped MCP config — the IDE, app, and `agy` CLI+ // all share one user-global file at `~/.gemini/config/mcp_config.json`+ // (per-project you can only filter which global servers are allowed). So it+ // is never detected as "project-configured"; like Claude Desktop / OpenClaw,+ // OK writes only the user-global config.+ antigravity: null,} as const satisfies Record<EditorId, string | null>;diff --git a/packages/core/src/handoff/terminal-launch.test.ts b/packages/core/src/handoff/terminal-launch.test.tsindex 4a1b8a3a6..67b78c52a 100644--- a/packages/core/src/handoff/terminal-launch.test.ts+++ b/packages/core/src/handoff/terminal-launch.test.ts@@ -18,10 +18,17 @@ const OK_ALLOW = `["mcp__${MCP_SERVER_NAME}","Bash(ok open:*)"]`;const OK_DENY = `["mcp__${MCP_SERVER_NAME}__delete","mcp__${MCP_SERVER_NAME}__move","mcp__${MCP_SERVER_NAME}__share_link","mcp__${MCP_SERVER_NAME}__install"]`;describe('TERMINAL_CLI_IDS', () => {- it('lists the CLIs in auto-pick priority order (claude > codex > opencode > cursor > pi)', () => {+ it('lists the CLIs in auto-pick priority order (claude > codex > opencode > cursor > pi > antigravity)', () => {// The single constant drives both the visible launch-row order and the// default-CLI auto-pick, so display and defaulting can never disagree.- expect([...TERMINAL_CLI_IDS]).toEqual(['claude', 'codex', 'opencode', 'cursor', 'pi']);+ expect([...TERMINAL_CLI_IDS]).toEqual([+ 'claude',+ 'codex',+ 'opencode',+ 'cursor',+ 'pi',+ 'antigravity',+ ]);});});@@ -119,6 +126,8 @@ describe('buildCliLaunchCommand', () => {expect(buildCliLaunchCommand('opencode', 'hi')).toBe("opencode --prompt 'hi'\r");// Pi's positional IS the prompt — same shape as claude/codex/cursor.expect(buildCliLaunchCommand('pi', 'hi')).toBe("pi 'hi'\r");+ // Antigravity's CLI binary is `agy`; its positional IS the prompt too.+ expect(buildCliLaunchCommand('antigravity', 'hi')).toBe("agy 'hi'\r");});it('escapes the prompt identically for every CLI regardless of fixed args', () => {@@ -154,6 +163,8 @@ describe('buildCliLaunchArgString', () => {expect(buildCliLaunchArgString('codex', 'hi')).toBe("codex 'hi'");expect(buildCliLaunchArgString('cursor', 'hi')).toBe("cursor-agent 'hi'");expect(buildCliLaunchArgString('opencode', 'hi')).toBe("opencode --prompt 'hi'");+ expect(buildCliLaunchArgString('pi', 'hi')).toBe("pi 'hi'");+ expect(buildCliLaunchArgString('antigravity', 'hi')).toBe("agy 'hi'");});it('keeps an injection payload inert and contained in the prompt arg', () => {diff --git a/packages/core/src/handoff/terminal-launch.ts b/packages/core/src/handoff/terminal-launch.tsindex e8ba1a312..3d9895d4f 100644--- a/packages/core/src/handoff/terminal-launch.ts+++ b/packages/core/src/handoff/terminal-launch.ts@@ -44,7 +44,7 @@ export function shellSingleQuote(s: string): string {* one-shot variants: `codex exec` and `cursor-agent -p` both run-and-exit, so* the session wouldn't stay open for the user to continue in).*/-export type TerminalCli = 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi';+export type TerminalCli = 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi' | 'antigravity';export interface TerminalCliInfo {/** PATH binary launched in the PTY. Interpolated (alongside any opted-in@@ -196,6 +196,17 @@ export const TERMINAL_CLIS = {docsUrl: 'https://pi.dev',handoffTarget: 'pi',},+ antigravity: {+ // Antigravity's CLI binary is `agy`; its positional argument IS the+ // starting prompt (`agy '<prompt>'` opens the interactive session with it),+ // the same shape as claude/codex/cursor/pi — no promptFlag. (`agy -p` is+ // the non-interactive one-shot; the default interactive command keeps the+ // session open, matching the other CLIs.)+ bin: 'agy',+ displayName: 'Antigravity',+ docsUrl: 'https://antigravity.google/docs/cli-getting-started',+ handoffTarget: 'antigravity',+ },} as const satisfies Record<TerminalCli, TerminalCliInfo>;/**@@ -209,6 +220,7 @@ export const TERMINAL_CLI_IDS = ['opencode','cursor','pi',+ 'antigravity',] as const satisfies readonly TerminalCli[];export interface BuildCliLaunchOptions {diff --git a/packages/core/src/handoff/types.ts b/packages/core/src/handoff/types.tsindex 7ca747175..9403ee41f 100644--- a/packages/core/src/handoff/types.ts+++ b/packages/core/src/handoff/types.ts@@ -3,20 +3,21 @@* pure type surface consumable from Electron main, renderer, and server.*/-// `opencode` and `pi` are TERMINAL-ONLY targets: they have no URL scheme /-// GUI app, so they are carved out of the deep-link dispatch path (no `RECIPES`-// recipe, no `dispatch.ts` URL case, excluded from `VISIBLE_TARGETS`). They-// are members of the union only so they can reuse the shared brand-icon +-// display-name metadata that the terminal-CLI launch rows render. Reached-// exclusively via `requestTerminalLaunch` / `TERMINAL_CLIS`, never-// `dispatchHandoff`.+// `opencode`, `pi`, and `antigravity` are TERMINAL-ONLY targets: OK reaches+// them via the `agy`/`opencode`/`pi` CLI, not a URL scheme / GUI app, so they+// are carved out of the deep-link dispatch path (no `RECIPES` recipe, no+// `dispatch.ts` URL case, excluded from `VISIBLE_TARGETS`). They are members of+// the union only so they can reuse the shared brand-icon + display-name+// metadata that the terminal-CLI launch rows render. Reached exclusively via+// `requestTerminalLaunch` / `TERMINAL_CLIS`, never `dispatchHandoff`.export type HandoffTarget =| 'claude-cowork'| 'claude-code'| 'codex'| 'cursor'| 'opencode'- | 'pi';+ | 'pi'+ | 'antigravity';/*** Data carried from the UI to the URL builder. Minimal by construction: onlydiff --git a/packages/core/src/skill-targets/schema.ts b/packages/core/src/skill-targets/schema.tsindex bd612fdc0..9f76f46b8 100644--- a/packages/core/src/skill-targets/schema.ts+++ b/packages/core/src/skill-targets/schema.ts@@ -14,8 +14,8 @@* absent, OK falls back to the editors the project is already configured for.** Only editors with a project skill surface are valid targets- * (`claude` / `cursor` / `codex` / `opencode` / `pi`; Claude Desktop and- * OpenClaw read user-global skills only).+ * (`claude` / `cursor` / `codex` / `opencode` / `pi`; Claude Desktop, OpenClaw,+ * and Antigravity read user-global skills only).*/import { z } from 'zod';@@ -36,12 +36,14 @@ export const SKILL_TARGETS_SCHEMA_VERSION = 1;* single source `PROJECT_SKILL_EDITOR_IDS` (derived from `EDITOR_PROJECT_SKILL_ROOT`)* so the two can't drift. z.enum needs a literal tuple, which the derived array's* `.filter` widens to `EditorId`, so the cast restates the narrow literal shape:- * `Exclude<EditorId, 'claude-desktop' | 'openclaw'>` is exactly the set of- * editors WITH a project skill surface (`claude` / `cursor` / `codex` /- * `opencode` / `pi`). schema.test.ts asserts the cast stays value-equal to the- * derived list as a backstop.+ * `Exclude<EditorId, 'claude-desktop' | 'openclaw' | 'antigravity'>` is exactly+ * the set of editors WITH a project skill surface (`claude` / `cursor` /+ * `codex` / `opencode` / `pi`). claude-desktop, openclaw, and antigravity have+ * a null project skill root (user-global skills only), so they are excluded.+ * schema.test.ts asserts the cast stays value-equal to the derived list as a+ * backstop.*/-type ProjectSkillEditorId = Exclude<EditorId, 'claude-desktop' | 'openclaw'>;+type ProjectSkillEditorId = Exclude<EditorId, 'claude-desktop' | 'openclaw' | 'antigravity'>;export const SkillTargetEditorSchema = z.enum(// Double cast (through `unknown`): the derived array is typed `EditorId[]`,// which TS won't directly narrow to the literal tuple z.enum needs. Runtimediff --git a/packages/desktop/tests/integration/m1-smoke.test.ts b/packages/desktop/tests/integration/m1-smoke.test.tsindex 72753b075..ab0d5a8a3 100644--- a/packages/desktop/tests/integration/m1-smoke.test.ts+++ b/packages/desktop/tests/integration/m1-smoke.test.ts@@ -400,7 +400,7 @@ describe('M1 smoke', () => {typeName: 'EditorId',canonicalPath: editorsConstantPath,canonicalRe: /type\s+EditorId\s*=([^;]+);/,- expectedLiteralCount: 7,+ expectedLiteralCount: 8,inlineRe:/'claude'\s*\|\s*'claude-desktop'\s*\|\s*'cursor'\s*\|\s*'codex'\s*\|\s*'opencode'\s*\|\s*'openclaw'/,mirrors: [diff --git a/packages/desktop/tests/main/claude-readiness.test.ts b/packages/desktop/tests/main/claude-readiness.test.tsindex ca1b53ccf..d91429550 100644--- a/packages/desktop/tests/main/claude-readiness.test.ts+++ b/packages/desktop/tests/main/claude-readiness.test.ts@@ -310,6 +310,7 @@ describe('resolveCliInstalledMap', () => {opencode: null,cursor: 0,pi: 127,+ antigravity: 0,};expect(await resolveCliInstalledMap({ probe: (cli) => Promise.resolve(codes[cli]) })).toEqual({claude: true,@@ -317,6 +318,7 @@ describe('resolveCliInstalledMap', () => {opencode: false,cursor: true,pi: false,+ antigravity: true,});});@@ -324,7 +326,14 @@ describe('resolveCliInstalledMap', () => {const map = await resolveCliInstalledMap({probe: (cli) => (cli === 'codex' ? Promise.reject(new Error('boom')) : Promise.resolve(0)),});- expect(map).toEqual({ claude: true, codex: false, opencode: true, cursor: true, pi: true });+ expect(map).toEqual({+ claude: true,+ codex: false,+ opencode: true,+ cursor: true,+ pi: true,+ antigravity: true,+ });});test('returns exactly one entry per CLI in TERMINAL_CLI_IDS', async () => {diff --git a/packages/server/src/handoff-dispatch-api.ts b/packages/server/src/handoff-dispatch-api.tsindex a9bc00f00..9c7c59e1b 100644--- a/packages/server/src/handoff-dispatch-api.ts+++ b/packages/server/src/handoff-dispatch-api.ts@@ -140,19 +140,20 @@ const RECIPES = {binaryName: 'cursor',urlScheme: 'cursor:',},- // `opencode` and `pi` are intentionally absent: they are terminal-only- // targets with no URL scheme, dispatched via the terminal-CLI path- // (`requestTerminalLaunch`), never this deep-link endpoint. They are+ // `opencode`, `pi`, and `antigravity` are intentionally absent: they are+ // terminal-only targets with no URL scheme, dispatched via the terminal-CLI+ // path (`requestTerminalLaunch`), never this deep-link endpoint. They are// excluded from the exhaustiveness gate via `Exclude<…>` so the build does// not demand (nonexistent) URL recipes for them.-} as const satisfies Record<Exclude<HandoffTarget, 'opencode' | 'pi'>, Recipe>;+} as const satisfies Record<Exclude<HandoffTarget, 'opencode' | 'pi' | 'antigravity'>, Recipe>;// Narrowed to the URL-dispatchable subset: `RECIPES` omits the terminal-only-// `opencode` / `pi` targets, so its keys (and the parsed `target`) exclude-// them, keeping the `RECIPES[target]` lookup below exhaustive at the type level.+// `opencode` / `pi` / `antigravity` targets, so its keys (and the parsed+// `target`) exclude them, keeping the `RECIPES[target]` lookup below exhaustive+// at the type level.const TARGET_VALUES = Object.keys(RECIPES) as [- Exclude<HandoffTarget, 'opencode' | 'pi'>,- ...Exclude<HandoffTarget, 'opencode' | 'pi'>[],+ Exclude<HandoffTarget, 'opencode' | 'pi' | 'antigravity'>,+ ...Exclude<HandoffTarget, 'opencode' | 'pi' | 'antigravity'>[],];const HandoffRequestSchema = z.object({target: z.enum(TARGET_VALUES),