百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AntiGravity-AutoAccept

> 编程语言
开源

AntiGravity Auto, 确实有效且安全

382 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

AntiGravity Auto, 确实有效且安全

AntiGravity AutoAccept

Automatically accept agent steps, terminal commands, file edits, and permission prompts in Antigravity — Google's AI coding assistant.


Swarm Mode Pro — Multi-Agent Auto-Accept

Run unlimited background agents completely hands-free.

Antigravity's Agent Manager can only interact with the active conversation. Background agents sit idle until you manually click through each one. Swarm Mode solves this — it automatically navigates between all your pending Agent Manager conversations via CDP, clicking Accept/Run/Allow across every agent.

Start 5 agents. Minimize the window. Walk away. Swarm handles everything.

Price $9/mo (with free trial)
Get Pro Start Free Trial →

Full Swarm Mode Guide → — Setup, activation, usage, and FAQ.

Telegram Remote Control

Control your agents from your phone.

Pair your IDE with Telegram to send prompts, receive responses with screenshots, and manage all your agent windows remotely.

Command Description
/list Show & select active agents
/peek Screenshot your live IDE
/pause Pause AutoAccept + Swarm
/resume Resume everything
/stop Emergency stop all agents
/status Check IDE connection
/help Show all commands
/disconnect Unpair from this IDE

Telegram Setup Guide → — Pairing, commands, and architecture.


What it does

When the Antigravity agent proposes file edits, terminal commands, or asks for tool permissions, this extension auto-accepts them so you don't have to click every button manually.

Two strategies, zero interference:

Strategy What it handles How
VS Code Commands (500ms) Agent steps, terminal commands Calls Antigravity's native accept commands
CDP + MutationObserver (event-driven) Run, Accept, Always Allow, Continue One-shot script injected once, reacts instantly to DOM changes

Setup

1. Enable Debug Mode (Required)

The extension needs Chrome DevTools Protocol to click permission buttons. Launch Antigravity with:

--remote-debugging-port=9333

Why port 9333? Antigravity's built-in Browser Control (Chrome button in the toolbar) uses port 9222 by default. Using the same port causes an EADDRINUSE conflict on macOS/Linux. Port 9333 avoids this entirely. (Thanks to u/unlike_a_boss for discovering this!)

Windows

Automatic: On first launch, the extension detects if the port is closed and shows "Auto-Fix Shortcut" — click it to automatically patch your .lnk shortcut.

Manual: Right-click your Antigravity shortcut → Properties → append to Target:

--remote-debugging-port=9333

macOS

Option 1 — Automator App (recommended):

  1. Open Automator → New Document → Application
  2. Search for "Run Shell Script" in the library
  3. Paste: open -a "Antigravity" --args --remote-debugging-port=9333
  4. Save as "AntiGravity Launcher" to Desktop or Applications

Option 2 — Terminal alias (add to ~/.zshrc):

bash
alias antigravity='open -a "Antigravity" --args --remote-debugging-port=9333'

Note: The app name must match exactly. Check with ls /Applications/ | grep -i anti

Option 3 — Direct Electron binary (if open -a doesn't pass args correctly):

bash
alias antigravity='/Applications/Antigravity.app/Contents/MacOS/Electron --remote-debugging-port=9333 & disown'

(Thanks to @aangelinsf)

Linux

Option 1 — Edit the .desktop file:

bash
# Find it:
find /usr/share/applications ~/.local/share/applications -name "*ntigravity*" 2>/dev/null

# Edit the Exec line:
Exec=/path/to/antigravity --remote-debugging-port=9333 %F

Option 2 — Shell alias (add to ~/.bashrc or ~/.zshrc):

bash
alias antigravity='antigravity --remote-debugging-port=9333'

Option 3 — Wrapper script:

bash
#!/bin/bash
/opt/Antigravity/antigravity --remote-debugging-port=9333 "$@"

2. Install the Extension

From VSIX (recommended):

  1. Download the latest .vsix from Releases
  2. In Antigravity: Ctrl+Shift+P → Extensions: Install from VSIX
  3. Select the downloaded file
  4. Reload Window

Manual:

  1. Copy the src/ directory, package.json, and package-lock.json to:
    ~/.antigravity/extensions/YazanBaker.antigravity-autoaccept-3.27.29/
  2. Run npm install in that directory (installs ws dependency)
  3. Reload Window

Usage

  • Toggle: Click ⚡ Auto: ON / ✕ Auto: OFF in the status bar
  • Or: Ctrl+Shift+P → AntiGravity AutoAccept: Toggle ON/OFF
  • Dashboard: Click `` in the status bar to see CDP status, active sessions, and activity log
  • Logs: Output panel → AntiGravity AutoAccept

Multi-Agent Workflow

⚠️ Agent Manager Limitation

Antigravity's Agent Manager uses a single shared webview — only the active conversation's DOM is rendered. Background conversations are completely unmounted. Both the VS Code Commands API and CDP can only reach the currently visible conversation.

We verified this by decompiling Antigravity's source code: their accept command handlers are hardcoded to vscode.window.activeTerminal with zero arguments — there is no way to target a specific conversation.

This is an Antigravity architectural limitation, not an extension bug. It would require Antigravity to implement a cross-conversation accept command (e.g. antigravity.agent.acceptAll).

Workaround: Duplicate Workspace

To run multiple agents with auto-accept on all of them:

  1. Click File → Duplicate Workspace
  2. This opens a second Antigravity window connected to the same project
  3. Start a chat in Window 1 and another chat in Window 2
  4. Each window has its own webview — the extension auto-clicks buttons in both windows simultaneously

Settings

Setting Default Scope Description
autoAcceptV2.pollInterval 500 window Polling interval in ms
autoAcceptV2.customButtonTexts [] application Extra button texts for i18n or custom prompts
autoAcceptV2.cdpPort 9333 machine CDP port (default avoids conflict with AG Browser Control on 9222)
autoAcceptV2.autoAcceptFileEdits true window Auto-accept file edit changes (disable to review diffs manually)
autoAcceptV2.blockedCommands [] application Commands to NEVER auto-run (e.g. rm, git push, npm publish)
autoAcceptV2.allowedCommands [] application If set, ONLY these commands will auto-run (whitelist mode)

Tip: Settings are hot-reloaded — changes take effect immediately without restarting.

How it Works

Persistent CDP + MutationObserver (v3.0.0+)

The extension maintains a persistent browser-level WebSocket connection to Chromium's DevTools Protocol. Instead of polling every 1.5s, it injects a MutationObserver payload once per target. The observer reacts instantly when React mounts new button elements, with 100ms leading-edge throttle to prevent CPU spikes during streaming output. The extension uses a whitelist-only target filter — it only attaches to vscode-webview:// targets and automatically yields the CDP port when the AG browser sub-agent is detected, preventing ArrayBuffer conflicts.

Single-Pass DOM Scanner (v3.1.0)

The button scanner walks the DOM tree exactly once per cycle, checking all keywords simultaneously against each node. This is O(D) instead of the previous O(N×D) which could cause UI freezes with many keywords. Priority-aware matching ensures Run always beats Accept, which always beats Allow, regardless of DOM order.

Webview Guard

Antigravity's agent panel runs in an isolated Chromium process (OOPIF). The injected script uses a deferred isAgentPanel() check inside scanAndClick() — verifying .react-app-container existence dynamically on each scan rather than at injection time. This avoids a race condition where the DOM is unhydrated on targetCreated.

Heartbeat Self-Healing (v3.2.0)

The CDP connection validates existing sessions every heartbeat cycle (10s). If a session's MutationObserver is dead (execution context cleared by webview navigation or React hot-reload), it automatically re-injects the observer — no reconnection needed. Sessions unreachable 3 times consecutively are cleanly detached and pruned. The heartbeat also handles target discovery (replacing the removed Target.setDiscoverTargets subscription to avoid CDP conflicts with the AG browser sub-agent). (Fixes the "stops clicking after ~1 hour" bug and the "Cannot freeze array buffer views" crash.)

Expand Button Loop Prevention (v3.5.1)

Expand-type buttons (e.g. browser preview "Expand") use a click-once-per-session rule: once clicked, they are permanently suppressed for that CDP session via an expandedOnce Set. This prevents the infinite overlay re-open loop where closing the expanded panel triggers a re-click. The state resets naturally when a new agent conversation starts.

Button Detection

Inside the agent panel, a TreeWalker searches for buttons by text content using startsWith matching with word-boundary checks to prevent false positives (e.g. accept-test.js won't match accept):

Priority Text Matches
1 run "Run Alt+d" button ✅ (not "Always run ^" dropdown)
2 accept Accept button
3 always allow Permission prompts
4 allow this conversation Conversation-scoped permissions
5 allow Permission prompts
6 retry Retry prompts
7 continue Agent invocation limit resume

Command Filtering (v3.1.0)

Blocked and allowed command lists use word-boundary matching against the code block above a Run button. For example, blocking rm will block rm -rf /tmp but NOT yarn format or npm run build.

Recommended Blocked Commands

The dashboard includes a ** Load Safety Presets** button that bulk-imports 50+ destructive command patterns covering filesystem wipers, disk formatters, database drops, force-pushes, and fork bombs.

One-click: Open the Dashboard (`` in status bar) → click ** Load Recommended Safety Presets**.

Bulk paste: The blocked/allowed inputs now support comma-separated values — paste a list and hit Enter.

Manual: Copy to settings.json

Add this to your settings.json (Ctrl+Shift+P → Preferences: Open User Settings (JSON)):

…

CDP Auto-Fix

On activation, the extension checks if port 9333 is open (with 9222 fallback). If not, it shows a notification with:

  • Auto-Fix Shortcut (Windows) — patches .lnk shortcuts on Desktop, Start Menu, and Taskbar
  • Manual Guide — links to this README

Troubleshooting

Bot stops working after a few hours

Cause: Either (a) Antigravity silently restarts its Electron process (auto-updates, memory pressure, or extension host crash) and the new process doesn't have --remote-debugging-port=9333, or (b) the webview's execution context was cleared by a navigation/hot-reload (fixed in v3.2.0 with heartbeat self-healing).

Fix: Update to v3.2.0+ — the heartbeat now auto-detects and re-injects dead observers. If it still doesn't work, close all Antigravity windows completely, then reopen from your patched shortcut.

Bot is ON but not clicking anything

  1. Toggle OFF → ON — click the status bar icon twice to restart polling
  2. Check the debug port — visit http://127.0.0.1:9333/json/list in a browser. If it refuses, the debug port is dead (see above)
  3. Check Output logs — `Ctrl+Shift

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言