Repository navigation
Releases
Releases · zou172866/Antigravity-agy-dart
v1.7.2 — Skills Progressive-Disclosure Audit & Scoped Agent Hardening
What's New in v1.7.2
English
- Agent Skills progressive disclosure & prefix-tax audit: Restructured
skills/agy-dart/with on-demandexamples/(ctx_trace_summary.py,filters.json) andreferences/error-playbook.mdsynced cleanly across Antigravity, Claude Code, and Codex; addednode bin/agy-dart.mjs audit skillsto inspect Turn-0 frontmatter tax and progressive-disclosure hygiene, and separated on-demand skill assets inprefix:budget. - Scoped
dart-coder/dart-reviewercheck routing: Guided built-in minimal agents to preferrun_checksfor short checks (keepingrun_commandfor>60sor async tasks) so command outputs stay within 8.8 KB without losinginheritMcp: false/inheritCustomizations: falseisolation. - Test & packaging hardening: Isolated
AGY_DART_CONFIG_PATHinv1.2-persist-prefix.test.mjsso local~/.agy-dart/config.jsonoverrides (such asstablePrefixOnly: true) never interfere with unit tests, and excluded Python bytecode artifacts (__pycache__,*.py[cod]) from Git and package manifests.
简体中文
- Agent Skills 渐进披露结构与首轮前缀税审计:为
skills/agy-dart/拆分按需加载的examples/(ctx_trace_summary.py、filters.json)与references/error-playbook.md并同步适配 Antigravity、Claude Code 与 Codex;新增node bin/agy-dart.mjs audit skills审计已装 Skills 的首轮 frontmatter 开销与渐进披露结构,并在prefix:budget中分离统计按需附件体积。 - 内置净身角色
dart-coder/dart-reviewer短检查引导:在保持inheritMcp: false与inheritCustomizations: false零外部前缀税的前提下,明确短检查优先走run_checks(长耗时/异步任务仍用run_command),减少原生终端输出超 10 KB 落盘。 - 测试隔离与打包卫生加固:修复
v1.2-persist-prefix.test.mjs对本机~/.agy-dart/config.json(如stablePrefixOnly: true)的读取隔离,并在.gitignore与package.json中排除__pycache__/*.py[cod]产物。
Verification
npm test: 249/249 PASSnpm run verify:pkg/npm run brief:check/npm run prefix:budget/node scripts/install.mjs doctor: PASS
v1.7.1 — Fast-Tool Savings Telemetry, Windows CLI Filters & Root-Session Rollup
What's New in v1.7.1
English
- Accurate "Guard Saved" accounting for
agy-dart_fasttools:read_slices,run_checks, andbatch_searchnow record strictly non-inflated byte savings (only when raw input/output genuinely exceeds returned bytes) and attribute anonymous shared MCP calls cleanly to the active conversation without cross-session stealing. - Expanded Windows / PowerShell CLI filtering:
cli-filternow recognizes leading package-manager flags (npm --prefix,pnpm -C,yarn --cwd, etc.) and safe--argument/path separators while preserving cross-shell safety guards. - Complete MCP receipt claiming & subagent rollup: Extended receipt claiming to
ctx_indexandctx_batchalongsidectx_execute, syncedsources/chunksownership (schema v155+idx_sources_origin_session), and unifiedrootSessionIdrollup so subagent savings roll up into parent conversation stats without double-counting. - Repository & docs: Updated repository URLs for
Antigravity-agy-dartand added fullv1.7.0/v1.7.1bilingual changelogs.
简体中文
- 修好侧边栏「已挡冗余」长期显示 0 的问题(补齐
agy-dart_fast真实埋点):read_slices、run_checks、batch_search现按真实裁剪/压缩字节差值记账(绝不虚报),并在匿名共享 MCP 下精准归属到当前对话,不串会话、不重复计数。 - 修复 Windows / PowerShell 终端过滤漏判:
cli-filter支持跳过npm --prefix、pnpm -C、yarn --cwd等前置参数,并在确保跨 Shell 安全的前提下放行常见--路径/参数分隔符。 - 补全 MCP 回执归属与子代理统计汇总:将回执认领从
ctx_execute扩展至ctx_index、ctx_batch并同步认领sources/chunks(数据库 schema 升级至v155);全链路统一按主对话rootSessionId汇总子代理节省量。
Verification
npm test: 240/240 PASSnpm run verify:pkg/npm run brief:check/npm run prefix:budget/node scripts/install.mjs doctor: PASS
v1.5.0 — Cross-Session Empirical TTL Calibration, Opt-In Expiry Alert & Stall Watchdog
社区反馈原文(Community Feedback)
「
@billy88lsh: 我看的记录,我的缓存是97。你的问题是你总是超时,超过15分钟就缓存没了。提升的办法就是回答完一轮,程序自动激活一下缓存」
「我在多轮对话之后很容易一直工作中却不输出任何东西,直接卡住了,难道没有自动总结压缩的功能么?」
核心升级(v1.3.0 → v1.5.0)
- 跨会话按模型实证 TTL 区间校准(
v1.5.0)- 在
context.dbmeta表新增 14 天有界去重 Ring Buffer(ttl_calibration:v1:<profileId>),跨会话累计同一模型档位(如gemini-4-512k、claude-200k)的热命中时间下界与纯空闲冷失效时间上界(规避ttl_idle_expiry循环依赖)。 estimateCalibratedTtl()支持双向区间收敛(后端动态 LRU 缩短时自动向近期冷上界下调,不再单向锁定)与explicit > session/history > profile严格优先级,新开会话直接继承实测 ~15 分钟窗口并实时同步至 Sidecar 与PreInvocation。
- 在
- 高上下文空闲 TTL 临期桌面提醒(Opt-in 默认关闭,零
statSync,v1.5.0)- 新增
ttlDesktopNotify(AGY_DART_TTL_DESKTOP_NOTIFY与 Sidecar#kv-ttl-notify-btn开关)、ttlNotifyLeadSec(默认60s)与ttlNotifyMinTokens(默认60000)。 - 主对话处于
IDLE、>= 60ktokens 且距服务端缓存过期剩余(0, 60s]时发送一次脱敏防抖桌面通知(全程0次statSync、休眠唤醒防误弹、与stallWatchdog解耦),把“切回续聊保热”还是“放冷后/compact”的决定权交还给用户。
- 新增
npm run cache:simulate新增 Keep-Alive 策略回放(v1.5.0)- 离线回放扩充至 9 套策略,新增
keepalive-1x与keepalive-unlimited(支持--keepalive-tail <sec>,标记hypothetical: true绝不抢占recommendedPolicy),同时输出表观命中率projectedHitRate与真实用户轮命中率userTurnHitRate,直接用本机真实日志算清保活 Ping 成本与离座尾窗浪费。
- 离线回放扩充至 9 套策略,新增
- Sidecar 卡死看门狗与免越狱救援闭环(
v1.4.0)+ 压缩零延迟补强(v1.3.1)- 双源融合状态机(5 大生命周期 Hooks
watchdog_lease:<convId>+transcript.jsonl增长检测与尾步终态自愈)、状态感知动态超时矩阵(黄灯suspect/ 红灯stalled)、自动预生成脱敏抢救版 Handoff Brief 与 6 类根因排障指引。 - 统一 4 类压缩/裁剪信号首轮即时失效、
readDedupMaxTurns: 12轮次衰减、readDedupMinBytes: 4096小切片放行与compactFailureWithErrorAnchors失败中段报错锚点保真。
- 双源融合状态机(5 大生命周期 Hooks
底层设计原理(Why Not Blind Auto Keep-Alive)
- 平台权限与零前缀污染边界:服务端 KV-Cache Key 绑定宿主底层完整请求前缀与签名;
StopHook 同步阻塞(5s超时),Sidecar 无静默 1-token 探针 RPC,强行注入保活消息会污染上下文并破坏零前缀污染不变量。 - 极窄盈亏平衡点与 Goodhart 刷分幻觉:每次保活仍需支付
10%–25%缓存读费用与请求配额(90% 折扣连 Ping 10 次、75% 折扣连 Ping 4 次即等同一次冷重算);离座开会或挂置多标签页时后台自动 Ping 100% 白烧额度,出现“表面命中率刷到 ~96%+ 但真实输入账单更贵”。
Verification
- Tests: 160/160 passing across 22 suites (including
tests/v1.5-ttl-keepalive-suite.test.mjs&tests/v1.4-stall-watchdog.test.mjs) - Packaging & Prefix Budget:
npm run verify:pkgPASS (34 reachable modules, zero devtools leakage) ·npm run prefix:budgetPASS (2,955 <= 4,000tokens,canonical=true) ·npm run brief:checkPASS - Docs: Full dedicated section added to README.zh-CN.md & README.md
v1.3.0 — 4-Tier Host-Aligned Read Guard, Diff Outlines & 3-Stage Git Diff Fidelity
社区反馈原文(Community Feedback)
「Claude 没有这个限制。大文件它会分段读完,不会因此停下来。这个 16 KB 的限制也不是 Antigravity 自带的,而是你那台机器上 Antigravity 配置里加的一道读前检查(agy-dart protection),放宽它或者给评审目录开个例外就能解决,16kb 单文件读写居然是默认配置吗」
「@XCQ: 我是让他做我工作流的 reviewer,会碰到这种情况,git 的 patch 文件直接拒绝读写,因为单个 patch 文件随便就超过 16kb 了碰到现在的默认设置就会失败,我走了
AGY_DART_DISABLE_READ_HOOK=1」
(注:agy-dart 仅做读前拦截不限制写操作;但对 code reviewer 来说,读 .patch 失败就足以中断整个评审工作流。)
改进方案(v1.2.2 → v1.3.0)
- 四层宿主对齐读守卫 + 2-Strike 软护栏(默认
host-45k)- Tier 0(恒定豁免):附件、
SKILL.md/AGENTS.md指令文档、二进制文件(0-SQLite 快路径直放)。 - Tier 1(高噪日志 / 锁文件 / 压缩单行):继续死守 16 KB(
noiseMaxReadBytes),压缩探针升级为头/中/尾采样防 >4 KB 许可证头绕过。 - Tier 2(常规源码 / 文档):精确对齐 Antigravity 原生
read_file上限 45 KiB(46,080 B)/ 800 行 + 2-strike 软护栏(5 分支会话/子代理/匿名 TTL 隔离)。 - Tier 3(
.patch/.diff代码评审):默认 128 KB(reviewMaxReadBytes)直放走宿主分页,超限 2-strike 软提示 + 原生 Diff Outline。
- Tier 0(恒定豁免):附件、
- 修复分页续读与无 MCP 子代理死锁
- 前置
ByteOffset余量计算并放行合法宿主翻页续读;拆开压缩单行与宽行多行文本(动态给出suggestedLines);读缓存(readDedup/diffRead)优先于大文件拦截消除三连拒;子代理全档支持 2-strike 原生降级(消除上游context-mode#1311同款死锁)。
- 前置
- 三通道严格解耦与评审一等公民
read_file体积豁免(exemptExtensions/ 线性无 ReDoSexemptPaths/readGuardMode: soft|strict|off)仅跳过大小检查,完整保留readDedup/diffRead;run_command拆出独立shellDumpMaxBytes = 16 KB并移除exemptExtensions依赖(同时封堵cat huge.png/curl .../archive.zip绕过)。agy-dart_fastread_slices({ outlines })新增原生.patch/.diff解析器(extractDiffSymbols);filterGitDiff升级为<= 7.9 KB内三阶段上下文保真(预算内 100% 留上下文 →-U/-W保上下文截断 → 1 行上下文再压缩)+ 修复gh pr view误伤。install引入cutoff:source平滑迁移旧默认16384 -> 46080并保留用户自定义阈值;顺修 Sidecar/api/purgeconversation报错、getExemptExtensions分裂 Bug 与sensitive_read_confirmTTL。
底层设计原理(Why This Design)
- 对齐宿主物理天花板,消灭负 ROI 拦截区间:Antigravity 原生
read_file本已封顶在46,080 B(~11.5K tokens)/ 800 行,在 16–45 KB 之间硬拦省 token 极少,却多花 1 轮 TTFT 与全量前缀 Cache Read;对齐45 KiB后,凡放行必一轮无损读完,仅在真正需要多轮分页时介入。 - 按信噪比与阅读模式分层,而非按字节一刀切:日志/锁文件/压缩包适合沙箱聚合(留 16 KB),源码需局部上下文(45 KiB),
.patch评审需按变更顺序通读找未知逻辑 Bug(128 KB + Diff Outline)。 - 软护栏防死锁 + 5 分支 TTL 隔离:Hook 无法假设所有子代理都挂载了 MCP,重试放行(由宿主 45 KiB 兜底)兼顾首轮引导与零卡死,同时避免跨会话串态、翻页逐页重拦与三连拒。
- 严格隔离有宿主封顶与无封顶通道:
cat/curl/git diff没有 45 KiB 宿主护栏,因此绝不共用read_file豁免或靠skipFlags绕过cli-filter.mjs,且豁免首读体积检查绝不跳过readDedup。 - 安全边界守恒:
exemptPaths/exemptExtensions仅从可信用户级~/.agy-dart/config.json与环境变量读取,严格排在sensitiveFileGuard之后,并经fs.realpathSync与线性匹配防软链逃逸与 ReDoS。
Verification
- GitHub Actions CI: 4/4 green (
ubuntu-latest&windows-latest× Node 22 & 24) - Tests: 132/132 passing across 18 suites (including
tests/v1.3-read-guard-overhaul.test.mjs) - Docs: Full dedicated section added to README.zh-CN.md & README.md
v1.2.2 — Long-Task Continuity & Deep Security/Isolation Hardening
What's New in v1.2.2
1. Long-Task Continuity & Anti-Premature-Handoff Protections
- Removed mid-task
/compactprompts fromrules/AGENTS.mdand routed>60sbuilds/tests + background tasks (WaitMsBeforeAsync <= 2000,cliFilterAsyncBypassMs) directly to nativerun_command(preserving live streaming logs and attaching read-onlypermissionOverridesfor plugin scripts on syncoverwrite). - Raised
ctx_executedefault timeout to120s(execTimeoutMs, per-calltimeoutSec: 1..300) withtimedOut: trueguidance, added workspacecwdsupport acrossagy-dart_contexttools + MCPinitializeworkspaceFolders/rootUri, suppressed mid-turn tool-loop (invocationNum >= 1) TTL/cold-compact banners inPreInvocation(scaling 1M-windowttlMinContextto300k), and added step-based read-dedup decay (readDedupMaxSteps: 40).
2. Second-Round Deep Audit, Cross-Platform CI & Protocol Hardening (42 Verified Fixes)
- Access-Control, SSRF, ReDoS & Windows Shell Fidelity: End-to-end
sensitiveFileGuard=denyacrossPreToolUse,fast/mcp-server.mjs,ctx_index, andctx_execute(covering symlinked files,.envrc/*.env, and\\?\ADS paths); forced-nongit remote showto block network SSRF; hardenedinstall.mjsagainst internal symlinks/NTFS junctions, UNC shares, and.gitclones/worktrees while restoring self-uninstall; respected per-directoryPATHEXTprecedence and PowerShell,/--/"safety incli-filter; and capped serializedfastJSON-RPC payloads<= 8.8 KBwith mixed\n\n/\r\n\r\nframe safety, dangling-symlink rollback, and bounded glob/regex/Markdown linear parsers. - Session Isolation, Process-Group Teardown & Multi-Provider Accuracy: Strict session/worktree/lifetime isolation in Sidecar
/api/searchand MCPctx_search/ctx_resume; POSIXdetachedprocess-group + Windowstaskkill /T /Fteardown, linear JS ESM--input-type=modulelexer, recursive subshell inspection, and graceful Windows413socket close; transactionalpruneByTtl, per-turn USD cost acrossmodel_switch, OpenAI gateway cached-token deduplication, and anchored 1h implicit-write replay deltas (126/126tests passing across Linux & Windows on Node 22/24).
v1.0.0 — Initial Release
agy-dart v1.0.0
All-in-one native Google Antigravity plugin uniting batched latency acceleration with local SQLite FTS5 context-window protection and a live Aux Pane Sidecar dashboard.
Highlights
- Dual zero-overlap MCP engines in 1 plugin:
agy-dart_fast(4 batched source-code tools) +agy-dart_context(8 local SQLite FTS5 & sandboxed execution tools) - Balanced 16 KB / 410-line default guard: lets Antigravity's 7ms local
read_filefly on small/ranged reads while blocking massive un-paged log dumps and unbounded shell commands - Hard
<= 8.8 KBUTF-8 inline cap across all tools: eliminates Antigravity's ~10 KB MCPoutput.txtdisk spill extra turns - Smart auto-exemption for agent instruction files: exempts
SKILL.md,AGENTS.md,GEMINI.md,CLAUDE.mdand builtin skill/rule paths - Unified
SessionStarthook + single-connection SQLite reuse inPreToolUse - Live Sidecar dashboard with dynamic
sidecar_sdkresolution + cross-platform installer (--install-rg, 4 switchable modes,doctorhealth check)
Credits & Open-Source Attributions
Built with gratitude upon:
- INK-Q/agy-fast (MIT)
- Domush/antigravity-plugin-context-mode (MIT)
- Architectural inspiration (no code included) from mksglu/context-mode
Full notices in THIRD_PARTY_NOTICES.md.