Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 14:40
· 49 commits to main since this release
150d4b7

Added

  • Direct --cli invocation mode for Swarm workers & non-MCP environments (src/cli-runner.ts, #31, thanks @wathing-wind)
    • Added node dist/mcp-server.mjs --cli <search|outline|slice|edit|check> so Antigravity Swarm workers (where MCP servers, user_rules, and SessionStart are not mounted) and shell environments can still batch searches, symbol outlines, atomic multi-hunk edits, and concurrent checks within the same ≤8.8 KB UTF-8 budget.
    • Hardened --cli exit codes (failing reliably on Checks: failures/not-run, Verify [FAIL|TIMEOUT|ERROR], and Error: lines), per-query search modifier scoping, --flag=value parsing, literal --help search, and --cli tracking in benchmark-core.ts (Swarm worker coverage + cli:N dispatch breakdown).
  • Prompt Cache miss attribution & sustained-collapse diagnostics (src/benchmark-core.ts, rules/AGENTS.md)
    • Added structured cacheMissAttribution to benchmark.mjs analyze / compare / --split-usage, distinguishing true prefix misses (activeSlowGap, idleOrWaitGap, planModeSwitch, errorRetry, asyncWakeupFast, modelSwitch, fastReplicaOrPrefixMiss) from expected compactionResets and contextDilutionTurns, plus >=3-turn sustained cache collapse tracking (sustainedCollapseRuns, sustainedCollapseTurns, maxConsecutiveMisses).
    • Added empirically grounded edit-loop cache hygiene guidance to rules/AGENTS.md Rule 4 (prefer <45s targeted checks inside edit-verify loops; keep <=10s commands synchronous via WaitMsBeforeAsync instead of early backgrounding).
  • Persistent --tool-loading eager|lazy installer option (#25)
    • Added --tool-loading eager|lazy in scripts/install.mjs (install / config) persisted in ~/.gemini/cache/agy-fast/config.json and preserved across auto-updates for hosts or setups that need lazy loading.
  • Multi-branch CI & automated GitHub Release workflow (.github/workflows/ci.yml, .github/workflows/release.yml, CONTRIBUTING.md)
    • Added cross-platform CI (verify (ubuntu-latest), verify (windows-latest), stress), dev + main branching guide, PR template, and automated v* tag release publishing verified against origin/main, package.json, plugin.json, dist/, and CHANGELOG.md.

Security & Reliability

  • Trusted hooks.json path precedence & isolated GEMINI_HOME support (#30, thanks @ErrantSnow)
    • Reordered hooks.json plugin resolution to check PLUGIN_ROOT → AGY_PLUGIN_ROOT → $GEMINI_HOME/config/plugins/agy-fast → ~/.gemini/config/plugins/agy-fast before workspace-local .agents/plugins/agy-fast / ., preventing untrusted workspaces from hijacking SessionStart.
  • POSIX piped installer isolation (#36, thanks @0x7b1e)
    • Prevented curl ... | sh from inferring or executing a workspace-local decoy scripts/install.mjs in CWD, verifying plugin.json identity (name === "agy-fast") before local execution and handling root-level /install.sh safely.
  • MCP NDJSON 64 MiB frame size cap (#42, thanks @wathing-wind)
    • Enforced a 64 MiB frame cap on NDJSON stdio framing matching Content-Length mode, returning -32600, releasing large buffers, and discarding oversized lines with O(chunk) memory without corrupting subsequent frames.
  • Block accidental writes inside .git internal metadata (#41, thanks @wathing-wind)
    • Refused apply_edits writes targeting .git directories, worktree/submodule .git files, symlinks resolving into .git, Windows NTFS ADS suffixes (:stream) / trailing dots-spaces, and case-insensitive .GIT paths across all platforms (including WSL), while keeping .gitignore/.github/.gitattributes unaffected.
  • Non-interactive Git credential guards (#44, thanks @wathing-wind)
    • Injected default GIT_TERMINAL_PROMPT=0 and GCM_INTERACTIVE=never (preserving caller overrides, including case-insensitive Windows keys) across runShellCommandAsync, batch_search git queries, SessionStart snapshots, and updater-core.ts remote git ls-remote/clone/fetch calls.

Fixed

  • Issue #27 verified bottlenecks (batch_search, apply_edits, run_checks, benchmark)
    • Eliminated batch_search file starvation under tight budgets and centered match windowing on long lines past column 240; improved apply_edits drifted-range hints and failure-first bestEffort reporting; fixed benchmark-core.ts out-of-order parallel tool-result pairing and spill/truncation/parallel-leak false positives.
  • apply_edits mismatch & verify diagnostics (#32, thanks @wathing-wind)
    • Upgraded findClosestRegionSnippet with anchor-aligned high-entropy line scoring (including trailing anchors on >10-line hunks), preserved head+tail output on Verify [FAIL] by compacting long Applied: lists, water-filled multi-file validation errors, pre-validated verify.cwd before writing files, and surfaced Verify [ERROR] spawn failures consistently.
  • output-filter VT100 & mid-suite failure hygiene (#31, thanks @wathing-wind)
    • Stripped VT100 line-erase spinner sequences (\x1b[2K/\x1b[K) and preserved mid-suite failures when folding verbose passing test lines.
  • Node 20 & Windows CI determinism
    • Replaced multi-hop async init queuing in src/protocol/mcp.ts with a synchronous postInitOutgoingQueue, eliminated premature Node 20 timer .unref() exits in snapshot.ts and cli-runner.ts, and fixed Windows AppData tmpdir test matching.
  • Docs: Documented agy --dangerously-skip-permissions unattended CLI flag in README.md and README.zh-CN.md.

简体中文摘要(v0.3.0)

  • 新增 --cli 直调模式,打通 Swarm Worker 与非 MCP 环境(#31,感谢 @wathing-wind):支持通过 node dist/mcp-server.mjs --cli <search|outline|slice|edit|check> 在无 MCP 挂载的 Swarm Worker 中批量搜索、提大纲、原子多块编辑与并发校验(同样死守 ≤8.8 KB 预算),并加固退出码、参数作用域与基准覆盖率统计。
  • 新增 Prompt Cache 失效归因与持续暴跌诊断,补齐编辑循环护缓存规则:benchmark.mjs 新增 cacheMissAttribution(精准拆解 active>=60s / idle>=60s / plan_mode / errorRetry / async<60s / modelSwitch / 副本漂移,并单独剥离压缩与大读取稀释,识别连续 >=3 轮持续暴跌);rules/AGENTS.md Rule 4 补齐编辑循环快检(<45s)与短命令同步等待纪律。
  • 安装器支持持久化 --tool-loading eager|lazy(#25):可在安装或配置时切换急/懒加载并跨自动更新持久化保留。
  • 5 项安全与稳定性加固:
    • hooks.json 优先可信插件目录并支持隔离 GEMINI_HOME,防止不可信工作区劫持 SessionStart(#30,感谢 @ErrantSnow);
    • install.sh 禁止 curl | sh 管道安装回退执行当前目录伪造安装器,并校验 plugin.json 身份(#36,感谢 @0x7b1e);
    • MCP NDJSON 帧强制 64 MiB 上限防 OOM 并支持溢出后安全恢复(#42,感谢 @wathing-wind);
    • apply_edits 拦截对 .git 内部目录/worktree 文件/软链/Windows NTFS ADS 与跨平台大小写变体的误写,不误伤 .gitignore/.github(#41,感谢 @wathing-wind);
    • 全链路(含 updater-core.ts 远程 git 操作)默认注入 GIT_TERMINAL_PROMPT=0 与 GCM_INTERACTIVE=never 防止凭据弹窗卡死(#44,感谢 @wathing-wind)。
  • 核心工具体验修复与 CI/CD 基建(#27、#31、#32):解决 batch_search 紧预算饿死与长行 240 列截断;升级 apply_edits 锚点对齐错因提示、失败 verify 首尾保真与多文件水填充;优化 VT100 进度条清理与测试日志折叠;修复 Node 20 与 Windows 边界问题,并上线 Linux/Windows/压测 CI 与 v* tag 自动发版流水线。