# Changelog All notable changes to `agy-fast` are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/). --- ## [0.3.4] - 2026-12-01 ### Security & Reliability - **Notify-only background update checks by default (`src/utils/updater-core.ts`, `scripts/install.mjs`)** - Changed the default `autoUpdate` mode from `auto` to `notify` so background checks only inspect GitHub release tags and surface a one-time session notice without silently replacing local executable files (`dist/*.mjs` / `rules/AGENTS.md`). Users who want background auto-apply can opt in explicitly via `config --auto-update auto` or `AGY_FAST_AUTO_UPDATE=auto` (existing explicit `config.json` preferences are preserved). - **Default workspace `cwd` write boundary for `apply_edits` & Plan Mode guard (`src/tools/apply-edits.ts`, `rules/AGENTS.md`, `scripts/install.mjs`)** - Rejected `apply_edits` file writes and `verify.cwd` targets that escape workspace `cwd` (including `../`, out-of-workspace absolute paths, and symlink/directory-symlink escapes) by default with `0` files modified, while preserving in-workspace symlinks and `..hidden` filenames and supporting explicit opt-out via `AGY_FAST_ALLOW_OUTSIDE_CWD=1` (`0 B` MCP schema cost). - Explicitly instructed agents in `rules/AGENTS.md` and `mcp-config --rules` never to invoke `apply_edits` (or write-side `run_checks`) during read-only Plan Mode. - **Anti-tag-hijacking, `SHA256SUMS.txt` integrity checks, SLSA provenance & pinned Action SHAs (`src/utils/updater-core.ts`, `scripts/install.mjs`, `.github/workflows/release.yml`, `.github/workflows/ci.yml`, `.gitattributes`, `SECURITY.md`, `CONTRIBUTING.md`)** - Fixed annotated-tag commit SHA peeling (`git ls-remote --tags` + `^{}` resolution in `pickLatestSemverTag`), persisted `knownTagCommits` in `update-state.json` to hard-refuse force re-tagged / hijacked release tags (even under `--force`, with safe pre-`v0.3.4` unpeeled annotated tag object SHA migration), verified cloned `stagingDir` `HEAD` equals the observed commit SHA fail-closed (blocking fetch-time TOCTOU hijacking), enforced LF checkouts (`-c core.autocrlf=false -c core.eol=lf` + root `.gitattributes`) so Windows hosts with default `core.autocrlf=true` match Linux-generated `SHA256SUMS.txt` digests verified via constant-time `timingSafeEqual` (strict opt-in via `AGY_FAST_REQUIRE_CHECKSUMS=1`), and printed target commit SHA + GitHub compare diff URL in `update --prompt` / `update --check`. - Pinned all GitHub Actions in `ci.yml` and `release.yml` to immutable 40-char commit SHAs, enforced `package-lock.json` and `SERVER_VERSION` parity in `release.yml`, added `SHA256SUMS.txt` release assets + `actions/attest-build-provenance` SLSA attestations, added an opt-in zero-token npm OIDC `--provenance` publish job (`vars.NPM_TRUSTED_PUBLISHING == 'true'`), and expanded `SECURITY.md` with a 2-minute independent supply-chain audit guide. ### Added - **Opt-in `--bin-shim` / `--bin-shim-dir` CLI shims (`scripts/install.mjs`, `test/bin-shim.test.ts`, #111, thanks `@1-pluto1`, Closes #96)** - Added opt-in `--bin-shim` / `--bin-shim-dir ` installation support creating `agy-fast` and `agy-fast-mcp` shims on `PATH` (POSIX symlinks + Windows `.cmd` trampolines supporting non-ASCII paths), with ownership safety guards and full `doctor` / `update` / `uninstall` lifecycle wiring. - **Compact 1-line trailing pass summaries in `run_checks` (`src/tools/run-checks.ts`, `src/utils/output-filter.ts`, `src/mcp-server-core.ts`, #112, thanks `@1-pluto1`, Closes #59)** - Preserved compact 1-line trailing pass summaries (test counts, build/typecheck output summaries) in `run_checks` `compact` mode with water-fill shrinking and spill integration within the `8,800 B` UTF-8 budget. - **Python decorator metadata in `quick_outline` / `read_slices` (`src/tools/read-slices.ts`, #106, thanks `@lnb-git`)** - Surfaced Flask/FastAPI routes, `@dataclass`, and `@pytest.fixture` decorator metadata in Python outlines, with non-route receiver guards, escaped-newline rejection, and PEP 614/701 f-string handling. - **Pytest progress collapsing & generalized error headers in `output-filter` (`src/utils/output-filter.ts`, #104, thanks `@lnb-git`)** - Collapsed noisy pytest progress output while preserving failure/error/xfail markers and generalized `Error`/`Exception`/`ExceptionGroup` root-cause headers, and eliminated `.py::` ReDoS backtracking. - **Tab-vs-space & indentation mismatch diagnostics in `apply_edits` (`src/tools/apply-edits.ts`, #50, thanks `@wathing-wind`)** - Diagnosed tab-vs-space and indentation mismatches on failed edit targets with visible `→` tab markers and bounded scan budgets. - **Actionable MCP-vs-CLI misuse hints (`src/cli-runner.ts`, #123, thanks `@f22363712-dotcom`)** - Added actionable CLI error hints when callers pass MCP-only JSON keys/flags to `--cli` subcommands, plus Unicode payload path and `--file` byte-limit regression tests (`test/cli-runner.test.ts`, #118, thanks `@pzy19-prog`). - **Japanese documentation (`README.ja.md`, `package.json`, `scripts/install.mjs`, `src/utils/updater-core.ts`, #117, thanks `@dgtlchika`)** - Added Japanese README (`README.ja.md`), 4-language navigation switcher across all READMEs, and installer/updater/package registration. ### Fixed - **Serialized in-process commits, stale snapshot guards & rollback reporting in `apply_edits` (`src/tools/apply-edits.ts`, #102, thanks `@0x7b1e`)** - Serialized concurrent in-process `apply_edits` commits, rejected stale pre-write file/symlink swaps before touching disk, and reported incomplete rollback failures cleanly within the `8,800 B` budget. - **Consistent self-overlapping target rejection & line-1 verify-fail badge in `apply_edits` (`src/tools/apply-edits.ts`, #128 & #122, thanks `@acrot0`)** - Rejected ambiguous self-overlapping targets consistently across in-range and drift-recovery paths (#128), and surfaced the `[VERIFY ... — fix before proceeding]` badge on line 1 within the `8,800 B` budget (#122). - **BOM-marked UTF-16 decoding in `read_slices` / `quick_outline` (`src/utils/fs-utils.ts`, `src/tools/read-slices.ts`, #121, thanks `@BanszNeo`)** - Decoded BOM-marked UTF-16 LE/BE files cleanly for read-only outlining and slicing (rejecting odd lengths, NULs, and lone surrogates) while keeping `apply_edits` safely rejecting non-UTF-8 writes. - **Hardened `install.ps1` CWD isolation & `pwsh` / PowerShell 5.1 parity (`install.ps1`, `test/installer.test.ts`, #43, thanks `@wathing-wind`)** - Isolated piped remote installs (`irm ... | iex`) from arbitrary workspace CWD decoys, tightened manifest/repo checks, and verified home resolution across both `pwsh` and Windows PowerShell 5.1. - **Accurate `effectiveTps` numerator in `benchmark` (`src/benchmark-core.ts`, #119, thanks `@ErrantSnow`)** - Aligned `effectiveTps` numerator strictly with timed turns (`timedOutputTokens`). - **Raised unminified `dist/mcp-server.mjs` bundle test ceiling (`test/mcp-protocol.test.ts`)** - Raised the internal anti-bloat test cap for the intentionally unminified `dist/mcp-server.mjs` from `512 KiB` to `1 MiB` so future features stay readable and merge-friendly. ### Documentation - **Antigravity Desktop `v2.34–v2.36` / CLI `v1.5.x` rule-truncation guard, context hygiene `doctor`, degradation-audit `benchmark` metrics & bilingual safety monitor report (`src/utils/snapshot.ts`, `src/session-start.ts`, `scripts/install.mjs`, `src/benchmark-core.ts`, `src/benchmark.ts`, `rules/AGENTS.md`, `docs/SAFETY_MONITOR_ANALYSIS.md`, `docs/SAFETY_MONITOR_ANALYSIS.zh-CN.md`)** - Added `<1 ms` pure-`stat` detection in `SessionStart` (`detectOversizedWorkspaceRuleFiles` / `formatRuleLimitNotice`) warning only when a workspace rule file exceeds Antigravity's `24,000 B` silent truncation cap (`rules.go:736` on Desktop `v2.34–v2.36` / CLI `v1.5.x`, `0 B` overhead otherwise). - Extended explicit `doctor` with read-only `24,000 B` rule-cap checks and Desktop/CLI MCP schema size + disabled-plugin residue checks. - Extended `benchmark` with Turn-1 main-session baseline context, visible thinking-summary empty rate vs. estimated hidden reasoning tokens, solo `update_steps`/`update_focus` turn tracking, and `compare --surfaces` (Desktop 2.0 vs. CLI). - Tightened `rules/AGENTS.md` (with explicit Antigravity `Desktop v2.34–v2.36 / CLI v1.5.x` applicability annotations) to warn against mid-session model/effort/Plan-Mode toggling and solo UI-progress turns, and published a sanitized empirical audit report covering the 3-tier official safety monitor (`agy_tool_safety` → `sir_flash_lite` → `severe_internal_risks_agy`) and `agy-fast`'s compliant batching advantages. - **Transparent trade-offs, security boundaries, 628-session Prompt Cache alignment audit & community Awesome Acknowledgments (`README.md`, `README.zh-CN.md`, `README.zh-TW.md`, `README.ja.md`, `docs/ANALYSIS_REPORT*.md`)** - Clarified that while Antigravity's Git/filesystem modified-files list and Git diff viewer work normally, `apply_edits` writes via the external MCP Node process and does not attach to built-in `edit_file` per-step inline diff cards or tool-level checkpoints; explicitly noted `quick_outline` is a zero-dep regex/lexical heuristic index (not a full AST/LSP); added a candid trade-offs FAQ covering least-privilege read-only mode (`--tools batch_search,quick_outline,read_slices`), `--project` per-repo installation for non-coding chat hygiene, and `notify`-by-default update security; added 628-session Prompt Cache prefix alignment tables (including parallel image + text turns); and added a bottom Acknowledgments section featuring community Awesome lists that curated `agy-fast`. ### 简体中文摘要(v0.3.4) - **供应链安全与防 Tag 劫持全面加固**:后台更新默认改为 **`notify` 仅提醒**(绝不静默替换本机 `dist/*.mjs` 或规则文件,如需自动应用可显式开启 `config --auto-update auto`);`apply_edits` 默认拦截越出工作区 `cwd` 的写入与 `verify.cwd`(含 `../`、软链接逃逸,`0` 文件改动)并在规则中明示只读 Plan Mode 禁用写工具;修复 annotated tag `^{}` 剥离并持久化 `knownTagCommits` 硬拦截同版本 tag 劫持(含 `--force`,兼容 `v0.3.3` 旧状态平滑迁移),克隆期 fail-closed 核验 `HEAD` 并强制 LF 检出(`-c core.autocrlf=false -c core.eol=lf` + `.gitattributes`)保障 Windows 默认 `core.autocrlf=true` 下 `SHA256SUMS.txt` 校验正常;CI/Release 工作流全部 Action 锁定 40 位 SHA,发版自动产出 `SHA256SUMS.txt` + SLSA 构建溯源证明并预留 npm OIDC 发布;`SECURITY.md` 补充 2 分钟独立自查手册。 - **Antigravity Desktop `v2.34–v2.36` / CLI `v1.5.x` 专项加固、降智体检与安全审核报告**:`SessionStart` 新增 `<1 ms` 纯 `stat` 24KB 规则超限预警;`doctor` 新增 24KB 规则与禁用插件残留 MCP Schema 检查;`benchmark` 新增首轮主会话基线上下文、思考摘要为空率、独立 UI 轮统计与 `compare --surfaces`(Desktop vs CLI),并对齐 `effectiveTps` 分子统计(#119 感谢 `@ErrantSnow`);新增中英文脱敏安全审批分析报告 `docs/SAFETY_MONITOR_ANALYSIS*.md` 与 628 会话 Prompt Cache 前缀对齐实测表。 - **`apply_edits` 并发、安全与诊断全面增强(#102 感谢 `@0x7b1e`;#128/#122 感谢 `@acrot0`;#50 感谢 `@wathing-wind`)**:串行化进程内提交、写前检测外部改动/软链接掉包并在 8,800 B 内完整报告回滚失败(#102);一致拦截自重叠目标歧义(#128);失败时首行置顶 `[VERIFY ...]` 徽章(#122);新增 Tab/空格与缩进不匹配诊断及可见 `→` 制表符标记(#50)。 - **大纲、测试过滤、UTF-16 与紧凑通过摘要升级(#106/#104 感谢 `@lnb-git`;#112 感谢 `@1-pluto1` Closes #59;#121 感谢 `@BanszNeo`)**:Python 大纲支持 Flask/FastAPI 路由、`@dataclass` 与 `@pytest.fixture` 装饰器元数据(#106);`output-filter` 折叠 pytest 进度行、保留泛化异常根因并消除 `.py::` ReDoS(#104);`run_checks` `compact` 模式保留 1 行紧凑通过摘要并衔接溢写(#112);`read_slices` / `quick_outline` 支持 BOM UTF-16 只读解码(#121)。 - **安装器、CLI 防呆与四语文档生态(#111 感谢 `@1-pluto1` Closes #96;#43 感谢 `@wathing-wind`;#123 感谢 `@f22363712-dotcom`;#118 感谢 `@pzy19-prog`;#117 感谢 `@dgtlchika`)**:新增可选 `--bin-shim` / `--bin-shim-dir` 自动创建 PATH 垫片(#111);加固 Windows `install.ps1` `irm | iex` 隔离与 `pwsh`/PS 5.1 兼容(#43);`--cli` 新增 MCP-vs-CLI 误用提示(#123)及 Unicode/字节上限回归测试(#118);新增日文版 `README.ja.md`(#117)、同步四语权衡/隐私 FAQ 并在文末新增 Awesome 收录致谢徽章;将未压缩 `dist/mcp-server.mjs` 测试预算上限由 `512 KiB` 上调至 `1 MiB`。 --- ## [0.3.3] - 2026-11-29 ### Added - **Zero-dep spill-on-overflow at tool boundaries (`src/utils/spill.ts`, `src/tools/run-checks.ts`, `src/tools/apply-edits.ts`, `src/tools/batch-search.ts`, #113, thanks `@1-pluto1`, Closes #80)** - When `run_checks`, `apply_edits` inline `verify`, or `batch_search` exceeds the inline `<= 8,800 B` UTF-8 budget, full untruncated output is now automatically saved to a private `0o700`/`0o600` spill file under `/spills/` (capped at 2 MiB/file with 20-file FIFO rotation, strict symlink/owner guards, and a trailing `Full output saved:` footer preserved even when paired with passing `diff: true`; disable via `AGY_FAST_SPILL=0`/`off`). - **Compact `+-2`-line `diff: true` output for `apply_edits` (`src/tools/apply-edits.ts`, `src/mcp-server-core.ts`, `src/cli-runner.ts`, #78, thanks `@acrot0`)** - Added optional `diff: true` (and `--cli edit --diff`) emitting compact unified `+-2`-line diff hunks within leftover inline budget without crowding out applied summaries, `verify` diagnostics, or trailing spill footers. - **Benchmark Issue #59 hygiene, multimodal split, logical-op packing, and session-kind stratification (`src/benchmark-core.ts`, #93, thanks `@1-pluto1`)** - Surfaced `run_checks` hygiene (`full`-mode & single-cmd counts), multimodal high-context breakdown (tool vs. user media), logical-op packing ratio, and `main / subagent / swarm` session stratification. - **Read-only local storage health check in `doctor` (`scripts/install.mjs`)** - Reported tracked local Antigravity `conversations/` DB and `brain/` transcript storage sizes (across `~/.gemini/antigravity*`, `GEMINI_HOME`, T3 Code ACP profiles, and `ANTIGRAVITY_APP_DATA_DIR`, bounded with concurrency + time budget and canonical deduplication) plus `>60`-day stale session counts in explicit `doctor` runs (advisory tip at `>= 2 GiB` or `>= 50` stale sessions; strictly read-only, never deletes user history, skipped on `install`/`update` hot paths). - **`--file` / `--from-file ` JSON input & actionable CLI flags (`src/cli-runner.ts`, `src/benchmark-core.ts`)** - Added `--file` / `--from-file ` JSON payload input (with bounded `fs.open` reads, UTF-8 BOM tolerance, UTF-16 BOM guidance, regular-file validation, duplicate/mixed-flag rejection, and normalized `~/` / relative `--cwd` resolution) across `--cli` subcommands, silently aliased `--query`/`-q` → `--pattern` and `--paths` → `--path` in `--cli search`, fixed `--context <0..10>` usage text, and appended a 1-line `Valid flags:` list to `Unknown option` errors. - **Trilingual documentation sync, eager `toolSummary` / portable MCP docs & long-SSE proxy templates (`README.md`, `README.zh-CN.md`, `README.zh-TW.md`, `CONTRIBUTING.md`, `SECURITY.md`, `docs/ANALYSIS_REPORT*.md`, #91 thanks `@Komorebi-GZM`, #95 thanks `@1-pluto1`)** - Documented Antigravity eager `toolSummary` requirements and canonical `npx -y agy-fast mcp` / `mcp-config --rules` workflows across all three READMEs (#91), synchronized trilingual READMEs, CI/security metadata, and analysis reports (#95), and added copyable static-TCP routing templates (Clash/Mihomo `prepend-rules:` Merge Override, Surge, sing-box) for Antigravity API endpoints to prevent mid-stream `unexpected EOF` / `broken pipe` drops without touching third-party proxy configs. ### Performance & Reliability - **Safe auto-recovery for unique small line-range drifts in `apply_edits` (`src/tools/apply-edits.ts`)** - When a non-`replaceAll` hunk misses its requested `startLine..endLine` window but has a single globally unique exact match within `<= 50` lines (and passes range & overlap checks), `apply_edits` now applies it automatically and notes `auto-shifted L...->L...` instead of aborting and forcing an extra LLM retry turn (`0 B` schema cost; inverted ranges, ambiguous matches, `replaceAll`, and `>50`-line drifts remain strictly rejected). - **Dynamic truncation tips & self-contained absolute-path `cwd` inference (`src/tools/batch-search.ts`, `src/tools/run-checks.ts`, `src/mcp-server-core.ts`)** - Appended compact within-budget footer hints (`... [tip: for broad scans, use outputMode: "files_with_matches" or "count"]` on broad `batch_search` content truncations / `>=40`-match caps without re-truncating fitting output, and `Tip: omit outputMode (defaults to "compact")...` when `run_checks` `full` mode truncates passing stdout). - Allowed omitting `cwd` on hosts without MCP `roots/list` (e.g. Desktop 2.0 / Hub) when every target path in the call is already an explicit full absolute path and no implicit workspace scan or relative `verify` command is requested (preserving all relative-path and `$HOME`/plugin-dir/root safety guards). - **~26% leaner `rules/AGENTS.md` + v2.36 safety-review, frontend image-hygiene & anti-`batch=1` calibration (`rules/AGENTS.md`, `README*.md`, #97, thanks `@1-pluto1`)** - Trimmed always-on `rules/AGENTS.md` from `8,466 B` (`v0.3.2`) down to `6,236 B` (`~26%` fewer permanent rule bytes per turn) while raising single-file `quick_outline` threshold to `>800` lines (matching zero-check built-in `read_file`), curbing wasteful single-item MCP calls, guiding callers to omit `startLine`/`endLine` on unique blocks and inspect saved spill footers, refining Rule 3 so frontend/UI developers can directly read 1–2 pixel-level design/UI screenshots in `<150k`-token sessions while still delegating `>150k`/bulk screenshot audits to text-only subagents, keeping Swarm `--cli` & long-SSE/compaction hygiene, and adding trilingual FAQ notes clarifying zero custom agents (no 4x billing), `1/N` serial safety-check batching, and small vs. multi-file task routing. ### Fixed - **Actionable `apply_edits` batch failures & 0-byte line-count fix (`src/tools/apply-edits.ts`, `src/mcp-server-core.ts`, #100, thanks `@iazrael`)** - Clarified `bestEffort` retry wording and EOF `startLine` diagnostics while preserving drift detection, guarded `lineStarts.pop()` on 0-byte empty files, avoided false `Verify skipped` notices on whitespace-only `verify`, and tightened `apply_edits` failure guidance. - **Preserved already-scanned `walkFiles` results on `maxDirs` and timeout budgets (`src/utils/fs-utils.ts`, `test/fs-utils.test.ts`, #108, thanks `@1-pluto1`)** - Tracked per-directory scan outcomes so `walkFiles` retains contiguous lexicographical DFS prefixes up to the truncation boundary instead of discarding already-scanned siblings, improving partial-result recall across `batch_search` fallback, glob, and fuzzy queries. - **Hardened `install.sh` / `install.ps1` subcommands, test env isolation, and build/CI checks (`install.sh`, `install.ps1`, `scripts/test.mjs`, `scripts/build.mjs`, `scripts/stress-benchmark.mjs`, `.github/workflows/ci.yml`, #107, thanks `@1-pluto1`)** - Forwarded `mcp`/`mcp-config` directly in both `install.sh` and `install.ps1`, blocked remote-pipe `irm ... | iex` workspace-CWD decoy execution in `install.ps1` with `plugin.json` identity checks and guarded `$env:USERPROFILE` / `${HOME:-}`, stripped `GEMINI_HOME`, `PLUGIN_ROOT`, `AGY_PLUGIN_ROOT`, and `ANTIGRAVITY_*` plus case-insensitive `PATH` in test/stress scripts, marked `dist/benchmark.mjs` and `dist/updater.mjs` executable, and added Windows `install.ps1` PowerShell AST syntax checks to CI. - **Per-install updater state/lock isolation & Windows 8.3 canonicalization (`src/utils/updater-core.ts`, `scripts/install.mjs`, #101, thanks `@1-pluto1`)** - Isolated `update-state.json` and `update.lock` per canonical `pluginDir` (using `realpathSync.native` on Windows 8.3 paths) so multiple installations or isolated profiles never collide on update state. - **Validated `workspacePaths` preference in `SessionStart` & PowerShell `-NoProfile` (`src/utils/session-workspace.ts`, `src/utils/exec-utils.ts`, #81, thanks `@yzd05`)** - Preferred validated `workspacePaths` when host `cwd` points inside the plugin dir and passed `-NoProfile` when invoking PowerShell on Windows. - **Accurate `streamWaitSec` attribution with `update_focus`/`update_steps` & long-cycle diagnostics (`src/benchmark-core.ts`)** - Excluded leading UI progress calls (`update_focus` / `update_steps`) from anchoring `firstGeneric` so single large `apply_edits`/`write_file` decode time is no longer miscounted as multi-tool `streamWaitSec`, prevented `ERROR_MESSAGE` retry-backoff gaps from inflating `longSse60sTurns`/`longSse120sTurns`, and surfaced `Turns >= 300k context`, `Long SSE turns (>=60s / >=120s)`, and `Network/SSE disconnect errors` across benchmark reports. ### 简体中文摘要(v0.3.3) - **工具边界零依赖超限溢写(#113 感谢 `@1-pluto1`,Closes #80)**:`run_checks`、`apply_edits` 内联 `verify`(含 `diff: true` 通过时保持 footer 末尾锚定)与 `batch_search` 超出 `8.8 KB` 内联上限时,自动将完整输出写入私有 `0o700`/`0o600` 缓存文件(单文件上限 2 MiB、20 份 FIFO 轮转、严格防 symlink/越权校验),并在末尾附带 `Full output saved:` 路径提示(可通过 `AGY_FAST_SPILL=0`/`off` 关闭)。 - **`apply_edits` 紧凑差异 `diff: true`、批次报错可操作化与行号微漂移自动纠偏(#78 感谢 `@acrot0`;#100 感谢 `@iazrael`)**:新增可选 `+-2` 行紧凑 `diff: true`;优化 `bestEffort` 重试提示与 EOF `startLine` 诊断并修复 0 字节文件行号计数;非 `replaceAll` 且全文件存在唯一精确匹配、偏移 `≤ 50` 行且行号合法无重叠时自动应用并标注 `auto-shifted L...->L...`(`0 B` Schema 成本)。 - **`walkFiles` 预算截断保底与双平台安装/测试/CI 加固(#108、#107 感谢 `@1-pluto1`)**:`walkFiles` 触发 `maxDirs` 或超时预算时保留连续 DFS 已扫描结果;`install.sh` 与 `install.ps1` 均支持 `mcp`/`mcp-config` 直通、`plugin.json` 身份校验(阻止 `irm | iex` 误执行工作区同名脚本)与空 `HOME`/`USERPROFILE` 防护;`scripts/test.mjs` 隔离宿主环境变量;CI 新增 Windows `install.ps1` PowerShell AST 校验。 - **常驻规则瘦身 ~26% + v2.36 路由、前端读图分级与三语文档同步(#97/#95 感谢 `@1-pluto1`;#91 感谢 `@Komorebi-GZM`)**:将 `rules/AGENTS.md` 从 `8,466 B`(`v0.3.2`)精简至 `6,236 B`;单文件 `quick_outline` 门槛上调至 `>800` 行对齐免审 `read_file`,抑制低效 `batch=1` 调用并强调唯一代码块免传行号与溢写文件读取指引;Rule 3 改为按上下文与场景分级(`<150k` 允许前端直读 1–2 张像素级 UI/设计稿截图,`>150k` 或批量巡检/OCR 仍委派纯文本子代理);同步三语 README/分析报告、急加载 `toolSummary` 与标准 `npx -y agy-fast mcp` 文档,并新增 Clash/Mihomo `prepend-rules:`、Surge 与 sing-box 长 SSE 静态分流模板及 v2.36 4x/安全复审 FAQ。 - **Swarm `--cli` 防呆增强、动态截断提示与全绝对路径免 `cwd` 误报**:`--cli` 新增 `--file` / `--from-file ` JSON 输入(有界安全读取、UTF-8 BOM 兼容、Windows UTF-16 BOM 提示与相对 `--cwd` 归一化),静默兼容 `--query`/`-q` 与 `--paths` 并附带 1 行 `Valid flags:` 提示;`batch_search` / `run_checks` 截断自动附带紧凑调优提示;无 `roots/list` 宿主在全部路径均为显式绝对路径时免报 `'cwd' is required`。 - **多实例更新隔离与 `SessionStart`/PowerShell 加固(#101 感谢 `@1-pluto1`;#81 感谢 `@yzd05`)**:按规范安装目录隔离自动更新状态与锁文件(兼容 Windows 8.3 路径);优先采用有效 `workspacePaths` 并在 Windows 下透传 PowerShell `-NoProfile`。 - **`benchmark` 指标升级与 `doctor` 存储盘点(#93 感谢 `@1-pluto1`)**:新增 Issue #59 专项指标(`run_checks` 规范度、工具/用户多模态拆分、逻辑操作打包率与 `main/subagent/swarm` 会话分层),同时修复首位 `update_focus`/`update_steps` 导致的 `streamWaitSec` 虚高并新增 `>=300k` 上下文、长 SSE(`>=60s / >=120s`)与网络断流指标;显式 `doctor` 新增只读并发限时本地存储盘点(覆盖 `antigravity*`、ACP 与 T3)。 --- ## [0.3.2] - 2026-11-26 ### Added - **Selective tool exposure (`--tools` / `AGY_FAST_TOOLS`), minimal JSON Schema subset switch, and portable MCP entrypoints (`src/mcp-server-core.ts`, `src/mcp-server.ts`, `scripts/build.mjs`, `scripts/install.mjs`, `package.json`, #64, thanks `@acrot0`, Refs #61, #74)** - Added `--tools ` / `AGY_FAST_TOOLS` so standalone MCP hosts can expose only the needed tool subset (e.g. `batch_search,quick_outline,run_checks`) and cut fixed schema token overhead, while rejecting excluded tools with `-32602` and isolating ambient `AGY_FAST_TOOLS` in installer/updater/stress smoke checks. - Added `--schema-compat ` / `AGY_FAST_SCHEMA_COMPAT=minimal` to recursively strip numeric/array range constraint keywords (`minimum`/`maximum`/`minItems`/`maxItems`) for strict JSON Schema subset hosts (preserving property names such as `batch_search.queries[].pattern` and keeping all runtime validation unchanged). - Added executable `#!/usr/bin/env node` shebang to `dist/mcp-server.mjs`, exposed `agy-fast-mcp` in `package.json` `bin` (with public npmjs `publishConfig`), and added `agy-fast mcp [args...]` in-process passthrough in `scripts/install.mjs`. - **Standard MCP config snippet generator & host-agnostic rules template (`scripts/install.mjs`, #72, thanks `@acrot0`, Refs #61, #74)** - Added `mcp-config` subcommand supporting `--host `, `--tools `, `--schema-compat=minimal`, `--tool-loading eager|lazy`, and `--rules` for generating standard JSON snippets, strict-validated Antigravity `mcp_config.json`, and trimmed host-agnostic routing rules. - **Zero-schema-cost boundary coercion & 1-line validation examples (`src/utils/arg-validation.ts`, `src/tools/*.ts`, #77, thanks `@acrot0`, Refs #74)** - Coerced clean bare single strings into 1-element arrays for `quick_outline.paths`, `read_slices.outlines`, and `read_slices.lineRanges` (while continuing to circuit-break serialized `"true"`/`"false"`/`"null"` and malformed JSON fragments), silently accepted `oldText`/`old_string` and `newText`/`new_string` fallback aliases in `apply_edits` (failing fast on conflicts within the `8,800 B` UTF-8 cap), and appended a minimal 1-line `Example:` JSON snippet to validation errors with `0 B` MCP schema overhead. - **Traditional Chinese documentation (`README.zh-TW.md`, `src/utils/updater-core.ts`, `scripts/install.mjs`, `package.json`, #87, thanks `@popuchoco`)** - Added `README.zh-TW.md`, wired it into package files, installer optional docs, and updater sync, added language switcher links across all three READMEs, and aligned documented `run_checks` timeout limits with `150 s`. ### Performance & Reliability - **Bounded `batch_search` / `walkFiles` scan budgets, `150 s` MCP call budget, and `contextLines <= 10` (`src/tools/batch-search.ts`, `src/utils/fs-utils.ts`, `src/utils/exec-utils.ts`, `src/mcp-server-core.ts`, `rules/AGENTS.md`, Refs #83)** - Added time (`12 s` walk / `60 s` call) and directory-count (`20,000` dirs) caps to `walkFiles` and `batch_search` to prevent slow filesystem hangs, tightened `MCP_CALL_BUDGET_SEC` from `170 s` to `150 s`, raised `contextLines` maximum from `5` to `10` within the `<=1280 B` schema cap, and clarified required `pattern` usage. - **Streaming transcript JSONL benchmark parser (`src/benchmark-core.ts`, #49, thanks `@wathing-wind`, Refs #59)** - Streamed transcript JSONL files line-by-line with bounded concurrency and skipped-file reporting to avoid loading multi-hundred-MB transcripts into memory at once. - **Sharper `rules/AGENTS.md` routing & cache hygiene (`rules/AGENTS.md`, #86, thanks `@liuye0209`)** - Refined Rule 2 and Rule 4 to encourage complete symbol-range slicing (`<=200 lines/call`), compact-first broad searches (`files_with_matches`/`count`), accurate `run_checks` `full` vs. targeted failure reruns, and fast edit-verify timeout hygiene. - **Deterministic anti-bloat guardrails (`test/mcp-protocol.test.ts`)** - Added assertions locking zero runtime `dependencies`, portable `bin`/`files` packaging, executable `dist/mcp-server.mjs` shebang, and a `512 KB` bundle ceiling alongside the existing `<=1280 B` per-tool schema cap. ### Fixed - **Windows unquoted `;` PowerShell routing & hyphenated CLI guard (`src/utils/exec-utils.ts`, #76, thanks `@BLACK-BIRTHDAY`, Fixes #75)** - Routed unquoted Windows `;` command chains to PowerShell while guarding hyphenated commands (`call-api`, `rem-tool`, `goto-def`) from being misclassified as `cmd.exe` builtins. - **Reject `apply_edits` hunk edits on non-UTF-8 files (`src/tools/apply-edits.ts`, #68, thanks `@ErrantSnow`)** - Validated raw file bytes with Node's SIMD `isUtf8()` before applying hunks so non-UTF-8 legacy encodings are never silently corrupted with `\uFFFD`, while keeping UTF-8 BOM/CJK/CRLF and `create+overwrite: true` intact. - **Windows `EBUSY` atomic in-place installer/updater fallback & dev-source updates (`scripts/install.mjs`, `src/utils/updater-core.ts`, #69, thanks `@acrot0`, Fixes #65)** - Added atomic in-place file swap fallback when Windows holds directory locks on `plugins/agy-fast`, evacuated targets via atomic rename into dot-prefixed trash before deletion, wrapped `uninstall` lock errors cleanly, and allowed dev-source `plugins/agy-fast` directories to update safely. - **Nested workspace `git status` scoping & timeout/rename hardening (`src/utils/snapshot.ts`, #79, thanks `@lymTudou`)** - Scoped `SessionStart` `git status` to nested workspaces, skipped enclosing repos that do not track them, distinguished `rev-parse` timeouts from unborn `HEAD`, guarded `" -> "` splitting to `R`/`C` rename/copy entries, and resolved canonical git entries for branch reads. - **Compact test-failure header preservation in `output-filter` (`src/utils/output-filter.ts`, #73, thanks `@ErrantSnow`)** - Preserved failing test headers (`not ok`, `✖`/`✕`/`✘`/`✗`/`×`, Jest `●` while excluding benign `● Console` and Next.js build bullets) and colon-scoped monorepo prefixes when compacting test logs. - **Hermetic, Windows-compatible test runner (`scripts/test.mjs`, `test/*.test.ts`, #70, thanks `@acrot0`; #89, thanks `@lymTudou`)** - Isolated Windows non-admin `EPERM` symlink tests, gated `--test-concurrency` on Node `>=20.10.0`, stripped `NODE_USE_ENV_PROXY`, and isolated every `npm test` run inside a temporary `HOME` with `GIT_CONFIG_NOSYSTEM=1` and scrubbed `GIT_CONFIG_*`/`AGY_FAST_*` env vars. ### 简体中文摘要(v0.3.2) - **按需暴露工具(`--tools`)、精简 Schema 子集与可移植 MCP 入口(#64 感谢 `@acrot0`,Refs #61/#74)**:新增 `--tools` / `AGY_FAST_TOOLS` 裁剪工具集合;新增 `--schema-compat=minimal` / `AGY_FAST_SCHEMA_COMPAT=minimal` 剥离数值/数组范围关键字以适配严格 JSON Schema 子集宿主(运行时校验不变);为 `dist/mcp-server.mjs` 补齐 shebang、`package.json` 新增 `agy-fast-mcp` 入口与官方 npmjs `publishConfig`,`install.mjs` 新增进程内 `mcp` 透传子命令。 - **标准 `mcp-config` 片段生成与通用精简规则(#72,感谢 `@acrot0`)**:新增 `mcp-config` 子命令,支持标准 JSON、通过严格校验的原生 Antigravity 配置与按 `--tools` 裁剪的宿主无关路由规则。 - **零 Schema 成本入口容错与 1 行报错示例(#77,感谢 `@acrot0`,Refs #74)**:`paths`/`outlines`/`lineRanges` 支持干净裸字符串自动包数组,`apply_edits` 内部静默兼容 `oldText`/`newText` 别名(冲突显式报错且严守 `8,800 B` 上限),校验报错附带 1 行最小合法 JSON `Example:`。 - **繁體中文 README(#87,感谢 `@popuchoco`)**:新增 `README.zh-TW.md` 并同步纳入打包、安装器与自动更新清单。 - **防卡死预算、流式基准解析与规则/门禁优化(#49 感谢 `@wathing-wind`;#86 感谢 `@liuye0209`;Refs #83/#59)**:为 `walkFiles`/`batch_search` 加上时间与目录数上限、将 MCP 预算收紧至 `150 s`、`contextLines` 上限提至 `10`;`benchmark` 改为逐行流式解析 JSONL;优化 `rules/AGENTS.md`;新增零依赖、`bin` 打包与 `512 KB` 产物体积确定性门禁。 - **Windows 与核心稳定性六连修(#76 感谢 `@BLACK-BIRTHDAY`;#68/#73 感谢 `@ErrantSnow`;#69/#70 感谢 `@acrot0`;#79/#89 感谢 `@lymTudou`)**:Windows 未加引号 `;` 路由至 PowerShell 并修复连字符命令误判;`apply_edits` 拒改非 UTF-8 文件;Windows `EBUSY` 原子就地更新回退;嵌套工作区 `snapshot` 范围与超时/重命名加固;`output-filter` 紧凑模式保留失败测试标题;测试运行器全面隔离本机 `git` 配置、代理与 `AGY_FAST_*` 环境变量。 --- ## [0.3.1] - 2026-11-24 ### Added - **Interactive release updates, version skipping, and no-git GitHub API fallback (`src/updater-core.ts`, `scripts/install.mjs`, `src/session-start.ts`, #58, thanks `@wathing-wind`)** - Added interactive confirmation (`update --prompt`), persistent `--skip-version `, compact `<=185B` `SessionStart` update notices, and hardened GitHub Releases API fallback for environments without `git` (with strict zero-tag fallback guards, safe GitHub URL sanitization, and stale-state cleanup in `doctor`). - **Fatal signal, OOM, and Windows crash diagnostics (`src/utils/output-filter.ts`, `src/tools/run-checks.ts`, `src/tools/apply-edits.ts`, #46, thanks `@wathing-wind`)** - Surfaced fatal POSIX signal names (`SIGKILL - possible OOM`, `SIGSEGV - segmentation fault`, `SIGABRT - process aborted`, `SIGTERM`), portable shell `128+N` exit codes (`134`/`137`/`139`), and Windows NTSTATUS crash codes (`0xC0000005` / `0xC00000FD` / `0xC0000409`) across `run_checks` and `apply_edits` inline `verify` while keeping timeout/spawn-error precedence and `--cli` non-zero exit detection intact. - **Expanded macOS & Node.js 20/22/24 CI coverage (`.github/workflows/ci.yml`, #37, thanks `@0x7b1e`)** - Added `macos-latest` and Node 20/22/24 verification jobs plus `sh -n install.sh` POSIX syntax checks to CI. ### Performance & Reliability - **Compact MCP tool schemas `<=1280B` to prevent eager tool eviction (`src/mcp-server.ts`, #57, thanks `@kf953741`)** - Compacted tool descriptions and parameter schemas within tight host per-tool budgets and removed array-mode JSON-string hints so Antigravity keeps all 5 tools eagerly loaded. - **Refuse silent `$HOME`/`/` fallback on omitted `cwd` (`src/mcp-server.ts`, #66, thanks `@OnurrUgur`)** - Prevented omitted `cwd` (common on Desktop 2.0 / Hub hosts when `roots/list` is unavailable) from silently scanning the user's home directory or filesystem root—including Windows `HOMEDRIVE+HOMEPATH` and MSYS2 path guards—while still allowing explicit `cwd: "~"`. - **Fast-path `$HOME` snapshots & instant JSON stdin exit (`src/utils/snapshot.ts`, `src/session-start.ts`, `rules/AGENTS.md`, `docs/ANALYSIS_REPORT.zh-CN.md`, #62, thanks `@757530253`)** - Skipped depth-2 directory scans and child subproject manifest probes when `SessionStart` runs in `$HOME`, returned immediately on complete JSON stdin objects (eliminating the 1,500ms stall when a host keeps stdin open without EOF), tightened `/compact` guidance (`~100k–150k` tokens), and documented Windows cold-start behavior. - **Updater, search, snapshot, and filesystem hardening (`src/updater-core.ts`, `src/tools/batch-search.ts`, `src/utils/snapshot.ts`, `src/utils/fs-utils.ts`, `src/utils/exec-utils.ts`, #28, thanks `@3956418278-dotcom`)** - Blocked `repoUrl` option injection and `release -> main` error fallback in the updater; added Node fallback buffer/file prechecks, fixed `rg` glob precedence, symlinked-workspace (`/var -> /private/var`) anchored globs, and ES2025 inline `(?-m:...)` precheck guards; halved snapshot git spawns and prevented false clean status on timeout; bound drive-less Windows paths, capped `walkFiles` FD concurrency, eliminated `globToRegExp` ReDoS, canceled POSIX `SIGKILL` timers on exit, and deduped `rg` probing. ### Fixed - **`apply_edits` safety, fidelity, and no-op hygiene (#39, #40, #47, #51, #52, thanks `@wathing-wind`)** - Rejected overwriting existing binary or UTF-16 files on `create` + `overwrite: true` (peeking `>8KB` binaries without full reads). - Preserved UTF-8 BOM across outlines and edits and clarified UTF-16 diagnostics. - Preserved mixed CRLF/LF line endings byte-for-byte on untouched lines and matched local span EOL. - Removed orphaned newly created parent directories on atomic rollback and used short temp filenames to prevent `ENAMETOOLONG` on long CJK/UTF-8 names. - Skipped redundant disk writes for no-op hunks (preserving `mtime`/inode and short-circuiting hot-path mixed-EOL/UTF-8 buffer work), reported `unchanged` status, and kept byte-budget truncation footers accurate when `noOpCount > 0`. - **CJK git filenames & mixed-encoding process output (#45, thanks `@wathing-wind`; #55, thanks `@ErrantSnow`)** - Passed `-c core.quotePath=false` in `snapshot.ts` and `batch_search` git queries so CJK/non-ASCII paths render cleanly without octal escapes. - Decoded mixed UTF-8 and legacy codepage process output line-by-line in `exec-utils.ts`. - **`--cli` flag parsing & rules clarity (#56, thanks `@ErrantSnow`; #60, thanks `@gaofeng21cn`, Refs #59; #63, thanks `@anhnt256`, Refs #61)** - Supported `--flag=value`, `--pattern`, and `--type` with properly scoped positional modifiers in `--cli search`. - Sharpened Swarm worker & `run_checks` hygiene and documented the host-injected `toolSummary` field in `rules/AGENTS.md`. ### 简体中文摘要(v0.3.1) - **交互式更新确认、跳过版本与无 `git` API 回退(#58,感谢 `@wathing-wind`)**:新增 `update --prompt` 交互确认、`--skip-version ` 持久化跳过、`SessionStart` 紧凑更新提示(`≤185B`)以及无 `git` 环境的 GitHub Releases API 安全回退。 - **宿主机急加载防驱逐与 Hub 防误扫 `$HOME`(#57 感谢 `@kf953741`;#66 感谢 `@OnurrUgur`)**:将 5 个 MCP 工具 Schema 压缩至 `≤1280B` 防止宿主机预算紧时被驱逐;禁止漏传 `cwd` 时静默回落扫描 `$HOME` 或根目录(兼容 Windows `HOMEDRIVE+HOMEPATH` 且保留显式 `cwd: "~"`)。 - **`SessionStart` 冷启动与 Windows 体验优化(#62,感谢 `@757530253`)**:`$HOME` 快照跳过二级目录与子项目清单探针;收到完整 JSON stdin 后立即返回(消除宿主不关 stdin 时的 1500ms 卡顿);收紧 `rules/AGENTS.md` 的 `/compact` 阈值与 Windows 实践说明。 - **`apply_edits` 五连加固(#39、#40、#47、#51、#52,感谢 `@wathing-wind`)**:禁止 `create+overwrite` 覆盖二进制/UTF-16 文件;全程保留 UTF-8 BOM 并优化 UTF-16 报错;保留未改动行的混合 CRLF/LF 换行符;原子回滚清理新建空目录并用短临时名避免超长中文文件名 `ENAMETOOLONG`;无变化 hunk 跳过写盘保 `mtime`/inode 且精准汇报 `written/unchanged` 截断统计。 - **搜索、编码、致命信号诊断与 CI 全面补强(#28 感谢 `@3956418278-dotcom`;#45/#46 感谢 `@wathing-wind`;#55/#56 感谢 `@ErrantSnow`;#60 感谢 `@gaofeng21cn`;#63 感谢 `@anhnt256`;#37 感谢 `@0x7b1e`)**:加固更新器与 `batch_search`(Node 预检、glob 优先级、macOS 软链工作区与 ReDoS 防护);支持 CJK git 路径无八进制转义与混合编码逐行解码;在 `run_checks`/`apply_edits` 输出 OOM/段错误/信号名与 Windows NTSTATUS 崩溃码;修复 `--cli search` 参数解析与规则文档;CI 新增 macOS + Node 20/22/24 矩阵。 --- ## [0.3.0] - 2026-11-23 ### 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 ` 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 ` 在无 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 自动发版流水线。 --- ## [0.2.10] - 2026-11-22 ### Fixed - **Prevent silent `PLUGIN_ROOT` fallback when `cwd` is omitted without MCP `roots/list` (#22, thanks `@GoodCoder666`)** - On hosts such as **Antigravity Desktop 2.0 Hub** (`--standalone --subclient_type hub`) where the MCP server starts in `~/.gemini/config/plugins/agy-fast` and the client reports no (or empty) MCP `roots/list`, omitting `cwd` or passing a relative `cwd` previously fell back to `process.cwd()` inside the plugin directory. - `src/mcp-server.ts` now detects when `process.cwd()` resides inside the installed plugin directory (via `PLUGIN_ROOT`/`AGY_PLUGIN_ROOT`, standard `.gemini/.../plugins/*` / `.agents/plugins/*` paths, or runtime-only plugin installs) and immediately fails fast with an actionable `isError: true` message instructing the caller to pass the active workspace root in `cwd`, while keeping explicit `cwd`, valid MCP `roots/list`, and local dev checkouts unaffected. - Reinforced explicit `cwd` guidance across all 5 MCP tool schemas and `rules/AGENTS.md` Rule 6, with end-to-end regression tests in `test/mcp-protocol.test.ts`. ### Changed - **Faster default background update check interval (`12 h` → `4 h`)** - Lowered `DEFAULT_CHECK_INTERVAL_HOURS` from `12` to `4` (keeping the detached `0 ms` startup design, 5-minute concurrent debounce, `git ls-remote` priority, and `AGY_FAST_UPDATE_INTERVAL_HOURS` / `config --interval` overrides) so active users receive hotfixes within half a day instead of waiting overnight. - **HOL Registry verified badge & Dependabot hygiene (#24)** - Moved the HOL Registry verified badge into the hero badge strip across both `README.md` and `README.zh-CN.md` using the live `metric=score` endpoint, and configured `.github/dependabot.yml` to skip pre-1.0 `esbuild` minor jumps. ### 简体中文摘要(v0.2.10) - **根治 Antigravity Desktop 2.0 Hub 漏传 `cwd` 静默回退到插件目录的问题(#22,感谢 `@GoodCoder666`)**:当宿主未通过 MCP `roots/list` 上报工作区(或返回空 `roots: []`)且 MCP 服务进程位于已安装插件目录内时,若工具调用省略 `cwd` 或传入相对路径,现立即 Fail-Fast 报错提示补传当前工作区根目录,彻底避免误搜或误改 `~/.gemini/config/plugins/agy-fast`;显式绝对路径 `cwd`、正常回报 `roots/list` 的宿主与本地开发态均零影响。 - **后台自动更新默认检查周期由 `12 小时` 调整为 `4 小时`**:在保持 0ms 启动阻塞、5 分钟防抖与优先 `git ls-remote` 不占 GitHub API 限额的前提下,让高频迭代期的热修半天内即可无感触达(仍支持 `--interval` / `AGY_FAST_UPDATE_INTERVAL_HOURS` 自定义)。 - **HOL Registry 认证徽章对齐与 Dependabot 降噪(#24)**:将 HOL 官方认证徽章统一移至中英文 README 顶部徽章栏并修复可用端点,同时优化 `.github/dependabot.yml` 过滤规则。 --- ## [0.2.9] - 2026-11-22 ### Added & Improved - **Water-filling fair token budgets, unified HTML/Vue/Svelte outliner & proactive build-log folding (#14, co-authored with `@BLACK-BIRTHDAY`)** - Introduced exact water-filling budget allocation (`computeWaterFillBudgets`) across `output-filter`, `run_checks` (`compact` and `full`), and `read_slices`/`quick_outline`, so short error outputs and compact files keep their full context while oversized outputs share the remaining inline budget fairly under the hard `≤8.8 KB` UTF-8 cap. - Added a unified HTML/Vue/Svelte closed-range tag-stack outliner (supporting `