Skip to content

Non-invasive MCP accelerator plugin for Google Antigravity (CLI/Desktop/IDE): cuts LLM turns (-34%), token quota (-31%), and upload traffic (-40%) without affecting native UI or diffs.

chore(release): prepare v0.3.4

inkwhite6373776eb870
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d264ea2..db02a27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
---
-## [Unreleased]
+## [0.3.4] - 2026-12-01
### Security & Reliability
@@ -14,11 +14,42 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
- **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`, `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`), verified cloned `stagingDir` `HEAD` equals the observed commit SHA (blocking fetch-time TOCTOU hijacking), verified GitHub Release `SHA256SUMS.txt` digests via constant-time `timingSafeEqual` (with strict opt-in `AGY_FAST_REQUIRE_CHECKSUMS=1`), and printed target commit SHA + GitHub compare diff URL in `update --prompt` / `update --check`.
+- **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 <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`)**
@@ -26,16 +57,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
- 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 (`README.md`, `README.zh-CN.md`, `README.zh-TW.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; and added 628-session Prompt Cache prefix alignment tables (including parallel image + text turns).
+- **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`.
-### 简体中文摘要(Unreleased)
+### 简体中文摘要(v0.3.4)
-- **防 Tag 劫持、SHA-256 校验与供应链防线加固**:修复 annotated tag `^{}` 剥离获取真实 commit SHA,持久化 `knownTagCommits` 强制拦截同版本号 tag 被 force re-tag / 劫持(含 `--force`)及克隆期 TOCTOU 替换;更新器支持校验 Release 附带的 `SHA256SUMS.txt`(可通过 `AGY_FAST_REQUIRE_CHECKSUMS=1` 开启严格强制模式),并在 `update --prompt` / `--check` 展示目标 commit SHA 与 GitHub compare diff 链接;CI/Release 工作流将全部 Action 锁定为 40 位 commit SHA,发版自动产出 `SHA256SUMS.txt`、SLSA 构建溯源证明(`attest-build-provenance`)并预留零 token npm OIDC `--provenance` 发布任务;`SECURITY.md` 补充 2 分钟独立自查手册。
-- **默认改为 `notify` 仅提醒更新(消除静默热更新供应链风险)**:将后台更新默认模式由 `auto` 调整为 `notify`,默认仅检测 GitHub Release 标签并展示一次性提示、绝不静默替换本机 `dist/*.mjs` 或规则文件;如需自动更新可显式运行 `config --auto-update auto`(已有显式配置不受影响)。
-- **`apply_edits` 默认工作区 `cwd` 写边界护栏与 Plan Mode 约束**:默认拦截越出工作区 `cwd` 的文件写入与 `verify.cwd`(含 `../`、工作区外绝对路径与软链接/目录软链接逃逸,`0` 文件改动;确需跨工作区写入可显式设置 `AGY_FAST_ALLOW_OUTSIDE_CWD=1`,`0 B` Schema 成本),并在规则中明示只读 Plan Mode 禁用写工具。
-- **Antigravity Desktop `v2.34–v2.36` / CLI `v1.5.x` 专项加固、降智体检与官方安全审核报告**:`SessionStart` 新增 `<1 ms` 纯 `stat` 规则超限预警(仅当工作区规则文件超过宿主 `rules.go:736` 的 `24,000 B` 静默截断上限时追加 1 行告警,未超限 `0 B` 开销);显式 `doctor` 新增 `24,000 B` 规则体检与桌面/CLI 禁用插件残留 MCP Schema 检查;`benchmark` 新增首轮主会话基线上下文、可见思考摘要为空率 vs 估算隐藏思考深度、独立 UI 进度空转轮次与 `compare --surfaces`(Desktop vs CLI)对照;微调 `rules/AGENTS.md`(标注适用 `Desktop v2.34–v2.36 / CLI v1.5.x` 版本范围,防中途切档位缓存归零与单 UI 轮空转),并新增中英文脱敏安全审批分析报告 `docs/SAFETY_MONITOR_ANALYSIS.md` / `docs/SAFETY_MONITOR_ANALYSIS.zh-CN.md`。
-- **三语 README 诚实化修订、已知权衡专节与 628 会话 Cache 对齐实测表**:如实区分 Git/文件列表感知与原生 `edit_file` 工具步级检查点差异、标明 `quick_outline` 为零依赖正则/词法启发式索引(非 AST/LSP),补充最小权限只读模式(`--tools batch_search,quick_outline,read_slices`)、`--project` 按项目安装建议与 628 会话(含图+文并行)Prompt Cache 前缀对齐实测表。
+- **供应链安全与防 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`。
---
diff --git a/dist/mcp-server.mjs b/dist/mcp-server.mjs
index c7a5b18..6bd8da4 100755
--- a/dist/mcp-server.mjs
+++ b/dist/mcp-server.mjs
@@ -12989,7 +12989,7 @@ function detectPluginInstallDir(candidateDir, scriptPluginRoot, env = process.en
}
// src/mcp-server-core.ts
-var SERVER_VERSION = "0.3.3";
+var SERVER_VERSION = "0.3.4";
var DEFAULT_PLUGIN_ROOT = path9.resolve(
path9.dirname(fileURLToPath2(import.meta.url)),
".."
diff --git a/package-lock.json b/package-lock.json
index 84643fc..49013ea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "agy-fast",
- "version": "0.3.3",
+ "version": "0.3.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "agy-fast",
- "version": "0.3.3",
+ "version": "0.3.4",
"license": "MIT",
"bin": {
"agy-fast": "scripts/install.mjs",
diff --git a/package.json b/package.json
index 2751447..fbe40cc 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "agy-fast",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Policy-compliant latency and tool-call accelerator plugin for Google Antigravity",
"type": "module",
"author": "inkwhite <[email protected]>",
diff --git a/plugin.json b/plugin.json
index ff3d384..9f8a60c 100644
--- a/plugin.json
+++ b/plugin.json
@@ -1,7 +1,7 @@
{
"name": "agy-fast",
"displayName": "agy-fast",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Reduce Antigravity task latency with batched search, atomic multi-hunk edits, symbol-aware slice reading, concurrent checks, and fast session snapshots.",
"logo": "assets/logo.svg",
"author": {
diff --git a/src/mcp-server-core.ts b/src/mcp-server-core.ts
index 56fdf47..057a6ab 100644
--- a/src/mcp-server-core.ts
+++ b/src/mcp-server-core.ts
@@ -25,7 +25,7 @@ import {
isFullAbsolutePath,
} from "./utils/session-workspace.js";
-const SERVER_VERSION = "0.3.3";
+const SERVER_VERSION = "0.3.4";
const DEFAULT_PLUGIN_ROOT = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"..",