eatingDream ContextRadar

Context Telemetry & Cache Diagnostics上下文遥测与缓存诊断 · macOS · LinuxmacOS · Linux

ContextRadar

eatingDream-antigravity-plugins/context-radar-mcp

See how full your Antigravity context really is, why a turn slowed down, and when /compact actually pays off.看清上下文真实余量、定位单轮变慢根因,并精准判断何时值得 /compact 或开新会话。

A local native Rust MCP server, live Antigravity side panel, and pure-protocol ACP thin client that tracks context headroom, diagnoses prompt-cache breaks, and distills bloated turns without poisoning your KV prefix.面向 Antigravity 的原生 Rust 本地 MCP 服务、实时侧边栏与纯协议 ACP 客户端:监控上下文余量、归因提示词缓存抖动,并在不破坏 KV 前缀的前提下安全蒸馏冗长对话。 Not a cloud proxy, history mutator, or analytics agent—it reads local ledgers strictly read-only and never rewrites live logs.不是云端代理、不会篡改对话历史,也不上报任何遥测数据——所有账本严格只读打开。

Read-Only只读分析
Storage Access账本访问
< 45 KB< 45 KB
Panel Budget面板体积
3-Way三路分类
Miss Classes失效归因
0 Bytes零上报
Telemetry外联上报
CONTEXTRADAR · SEP-1865CONTEXTRADAR · SEP-1865 面板 KV CACHE 94.2%KV 缓存 94.2%
62% context used上下文占用 124k / 200k tok
Miss Class失效归因
New-Turn新轮自然
/compact Gate压缩评估
HOLD · 4.2t暂缓 · 4.2 轮
Stream E2E端到端速率
78 tok/s
Pinned · main-session置顶 · 主会话ready · 76k left就绪 · 余 76k
Subagent · verifier子代理 · 校验器running · 18k运行中 · 18k
scratch/turns-12-19.mdprefix hot前缀保持命中

01 · QUICK START01 · 快速启用

Install in one line, or hand to your agent.一行命令安装,或直接交由 Agent 接管

Copy the verified installer or attach the portable skill to Antigravity, Claude Code, Codex, or Cursor.一键复制经校验的安装脚本,或为 Antigravity、Claude Code、Codex、Cursor 挂载可移植技能。

Install Plugin & Native Binary安装插件与原生二进制 context-radar-mcp
$curl -fsSL https://raw.githubusercontent.com/eatingDream-antigravity-plugins/context-radar-mcp/main/scripts/install.sh | sh

Reload Antigravity after installing to open the side panel, or inspect verified releases on GitHub.安装完成后重载 Antigravity 即可在侧边栏启用,也可在 GitHub Releases 手动校验包体。

Add Portable Agent Skill加载便携 Agent Skill agentskills.io
$npx skills add eatingDream-antigravity-plugins/context-radar-mcp

Full MCP tool schemas, flags, and operational rules live in docs/ai-guide.md and llms.txt.完整 MCP 工具定义、配置项与操作规程均收录于 docs/ai-guide.md 与 llms.txt。

02 · CAPABILITIES02 · 核心能力

Precision controls without hidden side effects.精准可控,零隐蔽副作用

Live 4-State Budget & Headroom实时四态遥测与余量监控

Tracks main sessions and subagents (ready, running, waiting, error), remaining token headroom, KV cache hit rate, thinking vs response share, and Stream/E2E speed.同步跟踪主会话与子代理四态(就绪、运行、等待、错误)、剩余上下文余量、KV 缓存命中率、思考/回复占比与端到端吐字速度。

3-Way Cold-Cache Miss Attribution三路冷缓存失效归因

Separates normal new-turn misses, mid-loop cache breaks (slow-turn TTL expiry, spillover, model switches), and post-compact rebuilds—with cross-model /compact warnings.精准区分正常新轮未命中、轮内缓存断裂(慢轮 TTL 过期、溢出、切模型)与压缩后重建,并提前预警跨模型 /compact 风险。

Prefix-Safe Slice Distillation前缀安全切片蒸馏

Extracts concise digests of bloated turn ranges into out-of-band scratch/ files via O_NOFOLLOW checks and atomic 0600 renames so your active KV prefix stays hot.通过 O_NOFOLLOW 检查与 0600 原子写入,将冗长轮次旁路蒸馏到 scratch/ 摘要文件,保持在线 KV 前缀持续命中。

Pinned vs Recent Session Cards置顶与最近会话清晰分组

Dark-first zero-flash side panel with a single focus hero, horizontal subagent dock, mini-bar turn hotspots, and deterministic Pinned vs Recent session cards.零闪烁暗色优先侧边栏:单一焦点视图、横向子代理坞、单轮热点柱状图,以及清晰的置顶/最近会话分组。

Gated /compact & Fresh Handoffs门控 /compact 与新会话交接

Evaluates budget tiers, active subagents, and break-even turns before dispatching through official SEP-1865 ui/message or pure-protocol ACP v1.综合评估预算档位、活跃子代理与回本轮数,通过官方 SEP-1865 ui/message 或纯协议 ACP v1 触发门控压缩与交接。

Session Guardrails & Fail-Closed Grants会话护栏与失效闭合授权

Prevents short shell commands from backgrounding prematurely; one-time handoff grants bind strictly to conversation_id and workspace in 0600 files.防止短命令过早转入后台;一次性交接凭证严格绑定会话 ID 与工作区并落盘为 0600 权限,持久化失败即拒绝放行。

03 · OPERATIONAL MATRIX03 · 运行机制对照

3-Way Cache Attribution & Compaction Gate三路缓存归因与压缩门控矩阵

Signal Class信号分类 Root Cause Pattern典型成因 Recommended Action建议策略
New-Turn Miss新轮自然未命中 Fresh prompt suffix after stable cached prefix缓存前缀稳定,仅新增当前轮次输入 Keep session hot — do not /compact保持会话预热,无需压缩
Mid-Loop Break轮内缓存断裂 Slow-turn TTL expiry, tool spillover, or model switch长耗时 TTL 过期、工具输出膨胀或模型切换 Distill noisy slice to scratch/ or inspect hotspot将膨胀轮次旁路蒸馏至 scratch/ 或排查热点
Post-Compact Rebuild压缩后前缀重建 Expected single-turn cold write right after /compact/compact 后首轮正常冷写入重建前缀 Verify break-even turns before next compaction等待回本轮数达成后再评估下次压缩
Cross-Model Warning跨模型风险预警 Compacting across incompatible tokenizer / prefix cache在跨模型切换边界触发压缩导致双倍冷启动 Prefer clean handoff into a fresh conversation优先采用结构化 handoff 开启全新会话

04 · SAFETY & PRIVACY04 · 安全与隐私边界

Hard boundaries enforced in code.由代码硬性守护的信任边界

01

100% local & read-only: opens Antigravity SQLite ledgers with SQLITE_OPEN_READ_ONLY plus incremental WAL/JSONL tailing.100% 本地只读:以 SQLITE_OPEN_READ_ONLY 打开账本并增量追踪 WAL/JSONL,零外联请求。

02

Atomic symlink-safe writes: scratch/ digests traverse directories with O_NOFOLLOW checks and atomic 0600 temp-file renames.原子且防符号链接写入:scratch/ 目录遍历启用 O_NOFOLLOW 校验,并以 0600 临时文件原子重命名。

03

Fail-closed grants & ACP auth: headless acp-run cancels allow-only prompts unless --auto-approve is explicitly set.失效闭合授权:无头 acp-run 默认拒绝放行敏感确认,除非显式声明 --auto-approve。

04

Strict panel CSP: single self-contained HTML bundle (default-src 'none'), zero external assets, and zero innerHTML writes.严格面板 CSP:单文件自包含 HTML(default-src 'none'),零外部资源与零 innerHTML 写入。