Skip to content
Projets

RazvanBugoi/antigravity-context-monitor

Voir sur GitHub

À propos

Calm, real-time context window, fast-memory warmth, and auto-compaction monitor sidecar plugin for Google Antigravity

IA et apprentissage automatique

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
Historique en cours
in 7 days
Historique en cours
in 15 days
Historique en cours
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Context Monitor logo

Context Monitor for Antigravity

A calm, read-only side pane for Google Antigravity that tracks chat space, fast-memory warmth, why sudden jumps happened, and learned auto-compaction warnings in real time — automatically following whichever conversation you have open.

Latest release MIT License Node.js 18+ Zero dependencies 100% local transcripts

Features · In-App Updates · Quick Install · Privacy · How It Works


Context Monitor dark theme showing Gemini 4 Neon approaching auto-compact with early heads-up banner and learned chart guides
Dark Theme · Early Auto-Compact Heads-Up
Gemini 4 Neon (512k) with learned guides, image jump note & Update pill
Context Monitor light theme showing Gemini 4 Neon right after automatic compaction with chart drop and helper totals
Light Theme · Auto-Compact Recovery & Helpers
Clean post-compaction chart drop, plain-English recap & subagent totals

Why Context Monitor?

Long agent sessions can fill up silently until an unexpected compaction or cold cache slows everything down. Context Monitor turns raw local transcripts into a quiet, plain-English dashboard that stays out of your way until you actually need it.

📊 Calm Chat Space at a Glance

Leads with plain-English fullness tiers (Plenty of room → Past halfway → Getting close to compact → Nearly full), remaining headroom, and estimated replies left — aligned with Antigravity's 512k Gemini window and clean >100% overshoot display when a single step vaults past the ceiling.

⚠️ Early Auto-Compact Heads-Up

Learns each model's real auto-compaction mark from your local history (pooling effort variants like high / medium while ignoring manual /compact and browser checkpoints). Draws amber Getting heavy and coral Auto-compact (observed) chart guides, plus a calm 75% heads-up with /compact vs. fresh-chat guidance.

💡 Quiet "Why it changed" Notes

Stays hidden on steady turns and surfaces a single clear note only when something notable happens — immediate post-checkpoint compaction confirmation, manual /compact vs. auto-compact, warm vs. cold model switches, fast-memory cooldown pauses, or large images, files, and parallel tool batches.

⚡ Model-Aware Fast Memory

Shows prompt-cache reuse and cooldown timing tailored to each model family — Gemini (5m warm / 30m cooling), Claude (live 5m countdown), and OpenAI (5m warm / 10m cooling) — alongside output, media, and nested subagent/swarm helper totals without double-counting.

📈 Growth Chart & Recent Replies

Stacked Reused vs. New token bars let you spot spikes immediately and click any bar to jump straight to that reply. Collapsible Recent replies list plain-English deltas, compaction and model-switch badges, tool chips, and hover/keyboard tooltips.

🎨 Native Feel, Zero Bloat

Syncs automatically with Antigravity's light and dark themes, adapts cleanly to narrow sidebars, and respects prefers-reduced-motion. Pure Node.js ESM + vanilla HTML/CSS/JS with incremental byte-offset reads (O(new bytes)) and zero external dependencies.


One-Click In-App Updates

Context Monitor in-app one-click update popover showing version upgrade and SHA-256 verification

Stay up to date without touching a terminal:

  1. Context Monitor quietly checks GitHub Releases every 12 hours using conditional ETag requests (and fails silently when offline).
  2. When a newer stable release ships, a subtle Update pill appears beside Live — click it to preview the version bump and release notes.
  3. Click Update to vX.Y.Z to download the official context-monitor.zip, verify its SHA-256 checksum and archive safety in pure Node.js, apply the update atomically with rollback protection, and restart automatically.
  4. On a clean main Git checkout, it runs git pull --ff-only; on dirty branches or read-only folders, it never writes files and gives you a copyable OS-tailored command instead.

Quick Install

Requirements: Google Antigravity (sidecar plugin support) and Node.js 18+ on PATH — no npm install needed.

Fast one-line install or update (no Git required)

Downloads the latest context-monitor.zip release and extracts it straight into your global Antigravity plugins folder:

  • macOS / Linux:
    mkdir -p ~/.gemini/config/plugins && curl -fsSL -L https://github.com/RazvanBugoi/antigravity-context-monitor/releases/latest/download/context-monitor.zip -o /tmp/cm.zip && unzip -o /tmp/cm.zip -d ~/.gemini/config/plugins/ && rm -f /tmp/cm.zip
    
  • Windows (PowerShell):
    $p = "$env:USERPROFILE\.gemini\config\plugins"; New-Item -ItemType Directory -Force -Path $p | Out-Null; $z = "$env:TEMP\cm.zip"; Invoke-WebRequest -Uri "https://github.com/RazvanBugoi/antigravity-context-monitor/releases/latest/download/context-monitor.zip" -OutFile $z; Expand-Archive -Force -Path $z -DestinationPath $p; Remove-Item $z
    
More install & manual update options (ZIP download, Git clone, or project-only install)

Option A: Download the ZIP manually

  1. Download context-monitor.zip from the latest release.
  2. Extract it so plugin.json lives at .../plugins/context-monitor/plugin.json:
    • macOS / Linux:
      mkdir -p ~/.gemini/config/plugins
      unzip -o context-monitor.zip -d ~/.gemini/config/plugins/
      
    • Windows (PowerShell):
      New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.gemini\config\plugins"
      Expand-Archive -Force -Path .\context-monitor.zip -DestinationPath "$env:USERPROFILE\.gemini\config\plugins\"
      

Option B: Clone & update with Git

  • Install (macOS / Linux):
    mkdir -p ~/.gemini/config/plugins
    git clone https://github.com/RazvanBugoi/antigravity-context-monitor.git ~/.gemini/config/plugins/context-monitor
    
  • Install (Windows PowerShell):
    New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.gemini\config\plugins"
    git clone https://github.com/RazvanBugoi/antigravity-context-monitor.git "$env:USERPROFILE\.gemini\config\plugins\context-monitor"
    
  • Update later:
    git -C ~/.gemini/config/plugins/context-monitor pull
    

Option C: Project-only install (single workspace)

To enable Context Monitor for one repository only, clone or extract it into:

<your-repo>/.agents/plugins/context-monitor/

Activate & Verify

  1. Reload or restart Antigravity (or toggle Context Monitor in Customizations / Plugins) if the Context tab doesn't appear in the side pane right away.
  2. Confirm everything is healthy at any time with the Antigravity CLI:
    agy plugin validate --strict ~/.gemini/config/plugins/context-monitor
    agy plugin list
    
    (Your enabled/disabled setting is saved in ~/.gemini/config/config.json and preserved across updates.)

Privacy & Opt-Out

Your conversation transcripts never leave your machine.

Context Monitor is strictly read-only against local transcript.jsonl files under ~/.gemini/*/brain/ and queries conversation titles locally via agentapi. The only network traffic is checking public GitHub Releases for RazvanBugoi/antigravity-context-monitor every 12 hours (plus downloading verified release assets when you explicitly click Update).

To disable release checks completely, set:

CONTEXT_MONITOR_DISABLE_UPDATE_CHECK=1

How It Works

Architecture & module overview

The plugin registers a single sidecar exposed in Antigravity's auxiliary side pane (SIDECAR_UI_ENTRYPOINT_AUX_PANE):

Whenever you switch conversations, the UI polls /api/context with an ETag keyed on the transcript's mtime, size, inode, helper transcripts, learned compaction-guide state, and release-updater state — keeping idle polling near-zero overhead while keeping focus and hover tooltips steady in place.

License

MIT

Explorer des projets similaires

Chargement…