Antigravity Official Plugin · v0.2.0

See context pressure
before compaction hits.

A read-only monitor plugin for Google Antigravity (Desktop & CLI). Calibrates live occupancy to Auto (256K) compaction thresholds while separating Base / Growth tokens, Prompt Cache hits, Avg / Last TTFT, and output speed.

0 Extra Prompt Tokens No App Patching · No CDP macOS Capsule + Cross-Platform Pane
Refactor Context Monitor
42% (108K/256K) | 18.4M tok · Cache 94%
Why did my thread trigger CHECKPOINT auto-compaction near 220K when the spec says 1M?
Most flagship models compact near 256K by default in long threads. The floating pill above stays synced with the simulator below—switch scenarios, drag the turn slider, or toggle capsule density to see how headroom changes.
Interactive HUD Simulator

Three-Tab Popover & Auto 256K Calibration

Select a session scenario or scrub through turns on the left; interact with the macOS popover tabs (Session, History, Settings) on the right.

1. Pick a Session Stage 127.0.0.1 Read-Only
Turn 8 · 108.0K ctx
Dividing 214.6K by a nominal 1M ceiling shows a calm 21.5%. Calibrating against Antigravity's actual compaction window (256K default, auto-promoted on observed peaks) surfaces the real 83.8% pressure warning in time.
Against nominal 1M ceiling:10.8% (looks empty)
Against Auto 256K gauge:42.2% (true headroom)
How It Works

Read-Only on Local Files, Zero Client Edits

Runs strictly within Antigravity's official Plugin, Hooks, and Sidecar rules—validated with 0 errors and 0 warnings via agy plugin validate.

Read-Only Local Sources

A minimal SessionStart / PreInvocation hook records the active conversation ID while reading Antigravity's existing files.

  • transcript.jsonl → tokens, tools & checkpoints
  • annotations/*.pbtxt → renamed session titles
  • conversations/*.db → read-only step timestamps

Zero-npm Node Sidecar

No third-party npm packages: includes a compact pure-JS Protobuf reader and read-only SQLite wrapper, quietly skipping TTFT on Node 20.

  • f1 (created_at) → f6 (viewable_at) yields true TTFT
  • 127.0.0.1 loopback only, zero outbound network calls
  • Per-launch random CONTEXT_MONITOR_HUD_TOKEN

Auxiliary Pane + macOS Pill

All platforms get the Sidecar Auxiliary Pane; macOS compiles a local AppKit Universal binary (arm64 + x86_64) via swiftc on first launch.

  • Aux Pane: Overview · History · Steps · Tools · Raw
  • macOS HUD: left-click popover, right-click menu
  • Apple code signature stays intact across updates
Quick Start

Install into Antigravity with One Command

Clone directly into your plugins folder and restart Antigravity, or download the prebuilt hud_bar-v0.2.0-macos-universal.tar.gz (with SHA-256 checksum) from GitHub Releases. MIT Licensed.

bash
git clone https://github.com/heywalter/antigravity-context-monitor.git \
  ~/.gemini/config/plugins/context-monitor

# Optional: validate & install via CLI
cd ~/.gemini/config/plugins/context-monitor
agy plugin validate . && agy plugin install .
Zoomed screenshot preview