Skip to main content
Glama
context-monitor_context-monitor

context-monitor_context-monitor

by caodung0712

Antigravity Context Monitor

Plugin theo dõi Context Window, MCP Tools / Memory Files, Connectors và Quota Gemini Models (5h & Weekly) theo thời gian thực ngay bên trong Google Antigravity.

English version below


Tiếng Việt

Tính năng chính

  • Theo dõi Context Window theo thời gian thực: Hiển thị phần trăm đã dùng (/ 1M), thanh tiến trình phân đoạn nhiều màu và chi tiết theo từng thành phần (Messages, Skills, MCP tools, Memory files, MCP server instructions, Free space, MCP tools deferred).

  • Tự động nhận diện hội thoại đang mở: Tự động cập nhật theo conversation bạn đang thao tác (làm mới mỗi 3 giây), đồng thời hỗ trợ chọn thủ công các conversation gần đây.

  • Chi tiết MCP & Memory: Mở rộng danh sách server MCP (số lượng tool và dung lượng schema) và các file memory/rules (AGENTS.md, GEMINI.md).

  • Connectors: Hiển thị gọn 3 connector đầu tiên kèm nút See more để mở rộng.

  • Quota Gemini Models (5h & Weekly): Lấy trực tiếp từ Antigravity Language Server (RetrieveUserQuotaSummary), hiển thị đồng thời cả 2 thanh tiến trình 5h và Weekly kèm phần trăm còn lại và thời gian reset.

Yêu cầu

  • Google Antigravity (macOS / Linux)

  • Node.js >= 18

Cài đặt nhanh

Repo đã build sẵn dist/server.js và dist/app.html, bạn chỉ cần clone thẳng vào thư mục plugins của Antigravity:

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

Plugin sẽ được Antigravity tự động nhận diện mà không cần khởi động lại.

Cách mở trong Antigravity

  1. Ở Side Pane: Bấm nút + ở thanh tab bên phải và chọn Context.

  2. Ở Sidebar bên trái: Chọn mục Context để mở toàn màn hình.

  3. Trong khung chat: Nhắn với agent "Open Context Monitor".

Phát triển / Tự build lại

Nếu bạn muốn chỉnh sửa giao diện (src/app.ts, build.mjs) hoặc bộ thu thập dữ liệu (src/collector.ts):

cd ~/.gemini/config/plugins/context-monitor
npm install
npm run build

Sau khi build xong, hãy làm mới MCP server context-monitor_context-monitor trong phần cài đặt MCP Servers của Antigravity.


Related MCP server: Antigravity Context Card

English

A real-time Context Window, MCP Tools / Memory Files, Connectors, and Gemini Models Quota (5h & Weekly) monitor plugin built natively for Google Antigravity using MCP Apps.

Features

  • Live Context Window Breakdown: Displays percentage used (/ 1M), a color-coded segmented progress bar, and real token measurements for Messages, Skills, MCP tools, Memory files, MCP server instructions, Free space, and MCP tools (deferred).

  • Auto-Follows Active Conversation: Automatically detects and tracks whichever conversation you are currently working in (polls every 3 seconds), with an optional dropdown to inspect recent conversations.

  • Expandable MCP & Memory Details: Accordion views for cached MCP servers (tool counts & deferred schema sizes) and loaded memory/rule files (AGENTS.md, GEMINI.md).

  • Compact Connectors List: Shows the top 3 connectors by default with a See more toggle.

  • Live Gemini Models Quota (5h & Weekly): Queries the local Antigravity Language Server (RetrieveUserQuotaSummary) to display both 5h and Weekly remaining quota bars, percentages, and reset countdowns.

Requirements

  • Google Antigravity (macOS / Linux)

  • Node.js >= 18

Quick Install

dist/server.js and dist/app.html are pre-bundled with zero runtime dependencies, so you can install with a single command:

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

Antigravity automatically discovers the plugin without requiring a restart.

How to Open

  1. Side Pane: Click the + button in the side pane and select Context.

  2. Left Sidebar: Click Context for the full-page view.

  3. Chat: Ask the agent to "Open Context Monitor".

Development & Build

To customize the UI (src/app.ts, build.mjs) or data collector (src/collector.ts):

cd ~/.gemini/config/plugins/context-monitor
npm install
npm run build

After rebuilding, refresh the context-monitor_context-monitor server in Antigravity's MCP Servers settings.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      This MCP server gives AI coding agents continuous self-awareness of their remaining Google Antigravity quota across both 5-hour rolling and weekly entitlement windows, plus live session token consumption and context pressure for the active conversation. It enables agents to probe headroom between tool steps, checkpoint work gracefully before hitting rate limits, and govern subagent model choice — all at zero LLM token cost.
      3
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables real-time monitoring of Google Antigravity context usage with detailed Messages/Thinking/Tool breakdowns, cache and checkpoint telemetry, one-click compaction, and smart suggested replies across Desktop, IDE, and CLI/tmux.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      An Antigravity MCP App plugin that surfaces real-time context window occupancy, remaining tokens, prompt cache hit rate, output speed, rolling 5-hour/7-day quota usage, and a 28-day activity heatmap by read-only parsing of local transcript logs. It presents these metrics in a theme-aware sidebar dashboard without patching or injecting into the host client.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Google Antigravity users to view 5-hour and weekly model quota balances alongside offline local token usage, context size, and cache hit rates from a side-pane interface.
      MIT