[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115313":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":38,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":15,"starSnapshotCount":15,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},115313,"antigravity-plugin-context-mode","Domush\u002Fantigravity-plugin-context-mode","Domush","Reduce context size by 90%+ *and* make your agent smarter. Antigravity Context Mode is a local-first plugin built specifically for the Google Antigravity App. It prevents terminal commands, build logs, and multi-megabyte files from flooding your conversation history, saving thousands of tokens per turn and stopping \"agent amnesia\" in its tracks.","https:\u002F\u002Fdomush.github.io\u002Fantigravity-plugin-context-mode\u002F",null,"JavaScript",132,8,1,0,9,71,50,87.96,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33,34,35,36,37],"agy","agy-plugin","agy-skill","antigravity","antigravity-extension","antigravity-plugin","antigravity-skill","antigravity-skills","antigravity-tools","context-engineering","context-management","context-mode","rag","2026-11-21 20:03:22","2026-11-23 15:58:26","# Antigravity Context Mode\n\n> **Stop context bloat. Save 90%+ of your prompt tokens. Keep your agent fast, focused, and sharp.**\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fantigravity-plugin-context-mode.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fantigravity-plugin-context-mode)\n[![Live Simulator](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLive%20Simulator-domush.github.io-10b981?style=flat&logo=github)](https:\u002F\u002Fdomush.github.io\u002Fantigravity-plugin-context-mode\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](LICENSE)\n[![Zero Runtime Dependencies](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdependencies-0-brightgreen.svg)]()\n[![Antigravity App Compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAntigravity%20App-Native%20Plugin-6366f1.svg)]()\n\n**Antigravity Context Mode** is a free, local-first plugin built specifically for the **Google Antigravity App**. It prevents terminal commands, build logs, and multi-megabyte source files from flooding your conversation history — saving thousands of tokens per turn and stopping \"agent amnesia\" in its tracks.\n\n> 🌐 **Interactive Live Simulator & Documentation:** [domush.github.io\u002Fantigravity-plugin-context-mode](https:\u002F\u002Fdomush.github.io\u002Fantigravity-plugin-context-mode\u002F)\n\n\u003Cimg width=\"715\" height=\"632\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F952b84a0-3e71-4bd6-99ae-e604532c1c7f\" \u002F>\n\n---\n\n## Quick Install (10 Seconds)\n\nInstall directly into Google Antigravity using `npx`:\n\n```bash\n# Global install (available across all Antigravity chats)\nnpx antigravity-plugin-context-mode install\n\n# Or per-project install (scoped to current workspace only)\nnpx antigravity-plugin-context-mode install --workspace\n```\n\nRestart or open the **Google Antigravity App**, and Context Mode is active immediately.\n\n---\n\n## The Problem: Context Window Bloat\n\nWhen an AI coding agent executes tools, standard workflows dump everything directly into your conversation context:\n\n* Running `Get-Content Logs\u002FEditor.log` dumps **65 KB (~16,000 tokens)** into your prompt.\n* Running test suites, compiler outputs, or git diffs dumps **100+ KB** of repetitive text.\n* Reading large files or documentation dumps **thousands of lines** of irrelevant boilerplate.\n\n### Why this hurts:\n1. **Agent Amnesia**: Important system instructions, user constraints, and earlier architectural decisions get drowned out.\n2. **Slower Responses**: Generation times climb as the context window fills up with raw text.\n3. **Burned Quota**: You hit model context ceilings and rate limits after only a few turns.\n\n---\n\n## How It Works\n\n```text\n┌────────────────────────────────────────────────────────┐\n│ 1. Agent attempts to read a large file or command      │\n│    (e.g. 5,000-line build log or 40 KB source file)    │\n└───────────────────────────┬────────────────────────────┘\n                            │\n                            ▼\n┌────────────────────────────────────────────────────────┐\n│ 2. Pre-Tool Lifecycle Hook Intercepts Unbounded Dumps  │\n│    • Files under 8 KB pass through normally            │\n│    • Un-paged dumps over 8 KB are safely intercepted   │\n│    • Images, docs, and chat attachments are exempted   │\n└───────────────────────────┬────────────────────────────┘\n                            │\n                            ▼\n┌────────────────────────────────────────────────────────┐\n│ 3. Sandboxed Execution (\"Thinking in Code\")            │\n│    • Agent filters data locally using Node\u002FPython      │\n│    • Indexes text into local SQLite FTS5 BM25 database │\n│    • Returns only the exact answer or error to chat!   │\n└────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Proven Results\n\nTested live on real-world build logs and source files in the Antigravity App:\n\n| Operation | Without Context Mode | With Context Mode | Savings |\n| :--- | :---: | :---: | :---: |\n| **Parsing 665-line Unity Editor.log** | 65,242 B (~16,300 tokens) | **550 B (~137 tokens)** | **99.2% saved** |\n| **Full File Read on 40 KB component** | 40,960 B (~10,240 tokens) | Intercepted & paged to 50 lines (**~800 tokens**) | **92.1% saved** |\n| **Searching Compiler Warnings** | Entire log dumped into chat | Top 2 ranked FTS5 snippets (**~350 tokens**) | **97.8% saved** |\n\n---\n\n## Key Features\n\n* 🛡️ **Automated Interception**: Blocks unbounded file dumps and commands before they bloat your context window.\n* ⚡ **Thinking in Code**: Filters multi-thousand-line outputs in 50 ms via local sandboxed scripts.\n* 🔍 **Local SQLite FTS5 Search**: Indexes files and logs locally on your machine with BM25 keyword matching and trigram search.\n* 📊 **Built-In Sidecar Dashboard**: Real-time stats pane inside Antigravity showing tokens kept out of context.\n* 🔒 **100% Local & Private**: All indexed data stays on your machine in `~\u002F.context-mode\u002Fcontext.db`. Zero network calls.\n* 📦 **Zero Dependencies**: Pure native Node.js (`node:sqlite`). No native builds, no `node-gyp`.\n\n---\n\n## Available MCP Tools\n\nOnce installed, Context Mode provides 8 specialized tools for your agent:\n\n| Tool | What It Does |\n| :--- | :--- |\n| **`ctx_execute`** | Runs sandboxed Node.js, Python, or PowerShell scripts to inspect files and extract answers without context dumps. |\n| **`ctx_search`** | Searches indexed logs and documentation using local SQLite FTS5 BM25 stemming. |\n| **`ctx_index`** | Indexes local files or documentation into searchable chunks for the agent. |\n| **`ctx_batch`** | Runs multiple terminal commands in batch and indexes the combined output. |\n| **`ctx_stats`** | Displays a formatted context savings report and token metrics. |\n| **`ctx_resume`** | Returns recent indexed sources and state pointers after context compactions. |\n| **`ctx_doctor`** | Checks SQLite database health, WAL mode, and platform runtimes. |\n| **`ctx_purge`** | Clears stored sources and events from SQLite. |\n\n---\n\n## Managing the Plugin\n\n### Enable \u002F Disable Anytime\nOpen the **Google Antigravity App** &rarr; **Customizations** &rarr; **Plugins**, and toggle **Context Mode** on or off with one click.\n\n### Adjust Cutoffs\nYou can adjust the file read cutoff directly in the sidecar dashboard dropdown (`2 KB`, `4 KB`, `8 KB`, `16 KB`, `32 KB`, `64 KB`, or `none`).\n\n### Uninstall\nTo remove the plugin from your system:\n\n```bash\n# Remove global plugin\nnpx antigravity-plugin-context-mode uninstall\n\n# Remove per-project plugin\nnpx antigravity-plugin-context-mode uninstall --workspace\n```\n\n---\n\n## License\n\nMIT © [Phillip Webber](https:\u002F\u002Fgithub.com\u002FDomush)\n","Antigravity Context Mode 是一款专为 Google Antigravity App 设计的本地优先插件，用于智能压缩对话上下文。它通过拦截并过滤终端命令输出、构建日志、大文件内容等冗余信息，在不丢失关键语义的前提下将上下文体积减少90%以上，显著节省 token 消耗、缓解模型上下文溢出与“代理失忆”问题。核心采用预工具生命周期钩子实现零运行时依赖的轻量级上下文工程，支持全局或工作区级一键安装。适用于 AI 编程助手在代码调试、日志分析、大型项目协作等需高频调用工具且对上下文精度和响应效率要求较高的场景。",2,"2026-11-24 04:50:38","CREATED_QUERY"]