From 5ebdda7b963bde148ef7826a205fc24c49bb5548 Mon Sep 17 00:00:00 2001 From: rdh073 Date: Sun, 31 May 2026 04:48:07 +0700 Subject: [PATCH] feat: add Google Antigravity CLI (agy) as a supported agent --- README.md | 4 ++-- __tests__/agentLaunch.test.ts | 8 ++++++++ docs/public/agents/antigravity.svg | 1 + docs/src/content/agents.js | 2 +- docs/src/content/introduction.js | 4 ++++ src/utils/agentLaunch.ts | 25 +++++++++++++++++++++++++ src/utils/paneAttentionHeuristics.ts | 1 + 7 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 docs/public/agents/antigravity.svg diff --git a/README.md b/README.md index 0d563b5..f231da5 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Press `n` to create a new pane, type a prompt, pick one or more agents (or none dmux creates a tmux pane for each task. Every pane gets its own git worktree and branch so agents work in complete isolation. When a task is done, open the pane menu with `m` and choose Merge to bring it back into your main branch, or Create GitHub PR to push the branch and file a pull request. - **Worktree isolation** — each pane is a full working copy, no conflicts between agents -- **Agent support** — Claude Code, Codex, OpenCode, Cline CLI, Gemini CLI, Qwen CLI, Amp CLI, pi CLI, Cursor CLI, Copilot CLI, and Crush CLI +- **Agent support** — Claude Code, Codex, OpenCode, Cline CLI, Gemini CLI, Qwen CLI, Amp CLI, pi CLI, Cursor CLI, Copilot CLI, Crush CLI, and Antigravity CLI - **Goal launches** — optionally start supported agents in goal mode from the initial prompt - **Multi-select launches** — choose any combination of enabled agents per prompt - **AI naming** — branches and commit messages generated automatically @@ -87,7 +87,7 @@ dmux can use default branch behavior or let you override branch details when cre - tmux 3.0+ - Node.js 18+ - Git 2.20+ -- At least one supported agent CLI (for example [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), [Grok Build](https://docs.x.ai/build/overview), [OpenCode](https://github.com/opencode-ai/opencode), [Cline CLI](https://docs.cline.bot/cline-cli/getting-started), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Qwen CLI](https://github.com/QwenLM/qwen-code), [Amp CLI](https://ampcode.com/manual), [pi CLI](https://www.npmjs.com/package/@mariozechner/pi-coding-agent), [Cursor CLI](https://docs.cursor.com/en/cli/overview), [Copilot CLI](https://github.com/github/copilot-cli), [Crush CLI](https://github.com/charmbracelet/crush)) +- At least one supported agent CLI (for example [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), [Grok Build](https://docs.x.ai/build/overview), [OpenCode](https://github.com/opencode-ai/opencode), [Cline CLI](https://docs.cline.bot/cline-cli/getting-started), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Qwen CLI](https://github.com/QwenLM/qwen-code), [Amp CLI](https://ampcode.com/manual), [pi CLI](https://www.npmjs.com/package/@mariozechner/pi-coding-agent), [Cursor CLI](https://docs.cursor.com/en/cli/overview), [Copilot CLI](https://github.com/github/copilot-cli), [Crush CLI](https://github.com/charmbracelet/crush), [Antigravity CLI](https://github.com/google-antigravity/antigravity-cli)) - [OpenRouter API key](https://openrouter.ai/) (optional, for AI branch names and commit messages) ## Documentation diff --git a/__tests__/agentLaunch.test.ts b/__tests__/agentLaunch.test.ts index b268463..035a281 100644 --- a/__tests__/agentLaunch.test.ts +++ b/__tests__/agentLaunch.test.ts @@ -34,6 +34,7 @@ describe('agent launch utils', () => { expect(getAgentSlugSuffix('codex')).toBe('codex'); expect(getAgentSlugSuffix('grok')).toBe('grok-build'); expect(getAgentSlugSuffix('gemini')).toBe('gemini'); + expect(getAgentSlugSuffix('antigravity')).toBe('antigravity'); }); it('returns default-enabled registry agents', () => { @@ -243,6 +244,13 @@ describe('command builders', () => { expect(getSendKeysReadyDelayMs('grok')).toBe(1600); }); + it('uses Antigravity interactive prompt mode for initial prompts', () => { + expect(getPromptTransport('antigravity')).toBe('option'); + expect(buildInitialPromptCommand('antigravity', '"fix it"', 'bypassPermissions')).toBe( + 'agy --dangerously-skip-permissions --prompt-interactive "fix it"' + ); + }); + it('builds grok resume command scoped to the current directory', () => { expect(buildResumeCommand('grok', 'bypassPermissions')).toBe( 'grok --continue --always-approve' diff --git a/docs/public/agents/antigravity.svg b/docs/public/agents/antigravity.svg new file mode 100644 index 0000000..c2d689e --- /dev/null +++ b/docs/public/agents/antigravity.svg @@ -0,0 +1 @@ + diff --git a/docs/src/content/agents.js b/docs/src/content/agents.js index 193c961..5af0738 100644 --- a/docs/src/content/agents.js +++ b/docs/src/content/agents.js @@ -3,7 +3,7 @@ export const meta = { title: 'Agents' }; export function render() { return `

Agents

-

dmux supports 12 AI coding agents. Each agent is automatically detected if its CLI is installed and available in your PATH.

+

dmux supports 13 AI coding agents. Each agent is automatically detected if its CLI is installed and available in your PATH.

Agent Detection

dmux automatically detects installed agents by searching:

diff --git a/docs/src/content/introduction.js b/docs/src/content/introduction.js index 9e75a9c..0fc1499 100644 --- a/docs/src/content/introduction.js +++ b/docs/src/content/introduction.js @@ -55,6 +55,10 @@ export function render() { Crush + + + Antigravity +
diff --git a/src/utils/agentLaunch.ts b/src/utils/agentLaunch.ts index f1fa012..b57e7a8 100644 --- a/src/utils/agentLaunch.ts +++ b/src/utils/agentLaunch.ts @@ -24,6 +24,7 @@ export const AGENT_IDS = [ 'cursor', 'copilot', 'crush', + 'antigravity', ] as const; export type AgentName = typeof AGENT_IDS[number]; @@ -351,6 +352,30 @@ export const AGENT_REGISTRY: Readonly> = { }, defaultEnabled: false, }, + antigravity: { + id: 'antigravity', + name: 'Antigravity CLI', + shortLabel: 'ag', + description: 'Google Antigravity CLI', + slugSuffix: 'antigravity', + installTestCommand: 'command -v agy 2>/dev/null || which agy 2>/dev/null', + commonPaths: [ + ...homePath('.antigravity/bin/agy'), + '/usr/local/bin/agy', + '/opt/homebrew/bin/agy', + ...homePath('.local/bin/agy'), + ...homePath('bin/agy'), + ...homePath('.npm-global/bin/agy'), + ], + promptCommand: 'agy', + promptTransport: 'option', + promptOption: '--prompt-interactive', + permissionFlags: { + bypassPermissions: '--dangerously-skip-permissions', + }, + defaultEnabled: false, + resumeCommandTemplate: 'agy --continue{permissions}', + }, }; for (const agentId of AGENT_IDS) { diff --git a/src/utils/paneAttentionHeuristics.ts b/src/utils/paneAttentionHeuristics.ts index 7cce8c6..1c54434 100644 --- a/src/utils/paneAttentionHeuristics.ts +++ b/src/utils/paneAttentionHeuristics.ts @@ -237,6 +237,7 @@ export function hasAgentWorkingIndicators(content: string, agent?: AgentName): b case 'amp': case 'pi': case 'crush': + case 'antigravity': return lines.some((line) => progressWordPattern.test(line)); default: return lines.some((line) => progressWordPattern.test(line));