@dapidev/pi-antigravity-pure

Pure Google Antigravity provider for Pi with zero ambient MCP contamination, warm runtime, and first-class Windows support

Packages

Package details

extension

Install @dapidev/pi-antigravity-pure from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@dapidev/pi-antigravity-pure
Package
@dapidev/pi-antigravity-pure
Version
0.2.0
Published
Sep 17, 2026
Downloads
171/mo · 15/wk
Author
dapidev
License
MIT
Types
extension
Size
336.2 KB
Dependencies
3 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@dapidev/pi-antigravity-pure

A first-class, high-performance Pi provider for Google Antigravity models via the official Agent Client Protocol (ACP).

Designed to use Google Antigravity as a pure LLM inference provider with zero ambient MCP tool contamination, warm connection reuse, low RAM overhead, and reliable Windows support.


Key Features

  • Pure LLM Inference & Context Isolation: Automatically isolates the Antigravity ACP environment into a clean sandbox (~/.gemini/sandboxes/pi-acp). Ambient Antigravity MCP servers (chrome-devtools-mcp, notion-mcp-server, StitchMCP, etc.) are prevented from spawning, eliminating tool context pollution and reducing memory consumption from ~1.75 GB down to ~250 MB.
  • Warm Connection Architecture: Keeps a healthy, warm ACP connection alive across turn requests. Eliminates Windows cold-start latency and prevents request timeouts.
  • First-Class Windows Support: Eliminates browser suppression during OAuth authentication (windowsHide: false), allowing Google authorization popups to open directly in the browser.
  • Automatic PyInstaller Cleanup: Cleans up orphaned _MEI* temporary extraction folders on Windows startup and shutdown to prevent disk bloat.
  • Zero API Keys & Zero Google Cloud Setup: Authenticates directly through personal Google OAuth tied to your Antigravity subscription.
  • Dynamic Reasoning Effort: Collapses effort-qualified models into single entries (gemini-3.8-flash, gemini-3.1-pro, etc.); Pi's Shift+Tab selects thinking effort dynamically.
  • Loopback MCP Tool Bridge: Routes genuine Pi tools through an authenticated loopback MCP bridge without interfering with model reasoning.
  • Configurable Permission Modes: Supports persisted yolo (default, run without confirmation), auto-edit (auto-approve edits), and default (prompt before sensitive operations).

Installation

Install directly into Pi via npm:

pi install npm:@dapidev/pi-antigravity-pure

To run from source:

git clone https://github.com/dapidev/pi-antigravity-pure.git
cd pi-antigravity-pure
npm install
pi --no-extensions -e ./extensions/index.ts

Setup & Quickstart

  1. Launch Pi:
    pi
  2. Run /login in Pi.
  3. Select Sign in with an account → Google Antigravity (ACP).
  4. Complete the sign-in in your browser. Credentials are saved locally to ~/.gemini/antigravity-acp/.
  5. Run /model and select an antigravity-acp/* model (e.g. antigravity-acp/gemini-3.8-flash).
  6. (Optional) Press Shift+Tab to adjust the model's reasoning effort (low, medium, high).

Headless & SSH Environments

If running on a remote server without a graphical interface, the provider automatically provides a manual loopback capture flow:

  1. Pi prints the Google OAuth URL.
  2. Open the URL on your local machine and sign in.
  3. Copy the final redirected 127.0.0.1 callback URL from your browser address bar.
  4. Paste it back into Pi to complete authentication.

Slash Commands

/antigravity-acp setup                  # Run preflight checks and model discovery
/antigravity-acp status                 # View current ACP connection and runtime state
/antigravity-acp doctor                 # Diagnostics and compatibility check
/antigravity-acp doctor --verbose       # Deep inspection of ACP processes and sockets
/antigravity-acp permissions [mode]     # Set permission mode: yolo | auto-edit | default
/antigravity-acp quota                  # Inspect available model quotas
/antigravity-acp update                 # Check for official ACP binary updates
/antigravity-acp logout                 # Clear Antigravity credentials and cached sessions

Architecture & Isolation

Pi Coding Agent (TUI / Engine)
       │
       ▼ (Loopback MCP Bridge & SDK Client)
  @dapidev/pi-antigravity-pure
       │
       ▼ (Spawns supervisor with GEMINI_HOME sandbox)
  agy_acp_server.exe (Official Google ACP Server)
       │
       ├── Reads empty mcp_config.json (0 ambient MCP child processes)
       └── Reads ~/.gemini/antigravity-acp/ via junction/symlink (OAuth credentials)

The plugin dynamically provisions an isolated sandbox under ~/.gemini/sandboxes/pi-acp containing an empty config/mcp_config.json and a filesystem junction to the shared antigravity-acp OAuth credentials. This guarantees:

  • 0 ambient MCP subprocesses (saving ~42 child processes and ~900 MB RAM).
  • Clean agent context: Only Pi tools and extensions are registered.
  • Shared authentication: Logins, refreshes, and account switches remain centralized.

To disable sandbox isolation and restore ambient MCP loading, launch Pi with:

PI_ANTIGRAVITY_ISOLATE_MCP=false pi

Development & Verification

npm run check          # Run typecheck and full test suite
npm run test:packed    # Dry-run pack and smoke test isolated installation
npm run test:real-acp  # Integration test against installed Antigravity binary

License

MIT