Repository navigation
v0.2.7 — Host Version Controller, Workspace Root CWD, 170s Budget & Windows PowerShell
What's New in v0.2.7
Antigravity Host Surface & Version Compatibility Controller (#10, building on @fwyc0573)
- Surface & SemVer 2.0 Detection (
src/utils/host-compat.ts): Identifies Antigravity CLI, Desktop 2.0, IDE, and third-party MCP hosts via MCPinitializeclientInfo,SessionStart.gemini/antigravity*paths, andANTIGRAVITY_LS_VERSION(supporting 4-part builds and SemVer 2.0 prerelease precedence, with strict cross-surface and third-party client isolation). - Token-Saving Defaults + Targeted CLI 1.5.x Protection: Defaults to native
arrayedits(~2.6x–3.3x fewer output tokens and0extraSessionStartbytes) on Desktop 2.0, IDE, third-party hosts, and unaffected CLI versions; automatically switchesapply_editsto JSON array string schema + a compact 1-line[agy-fast compat]SessionStart directive on affected Antigravity CLI 1.5.x builds to avoidcall_mcp_tooledits: []payload loss (server runtime always accepts both). - Overrides & Diagnostics: Configurable via
AGY_FAST_EDITS_FORMAT=auto|array|string,AGY_FAST_HOST, andnode scripts/install.mjs config --edits-format ..., with liveHost compatoutput indoctor. - Argument Corruption & JSON Diagnostics: Treats
edits: []/"[]"and stringified"true"/"false"/"null"ascall_mcp_toolserialization corruption (with decoded type labels and benchmark accounting), and returns preciseJSON.parse/ non-array errors for malformed JSON strings.
Workspace Root cwd, 170 s Call Budget, Stable batch_search & Python Outlines (#9, thanks @fwyc0573)
- Workspace Root as Default
cwd: Queries MCProots/listonnotifications/initializedandnotifications/roots/list_changed, resolving omitted and relativecwdagainst the first valid workspace root without mutating globalprocess.cwd(); hardened with bounded wait timeouts, EOF/error/out-of-order sequencing, 64-entryknownRootsIdscap, batch queue flushing beforewaitForRoots(), mixed\n\r\nContent-Lengthframing, and gracefulstdoutEPIPEexit. - 170 s Shared Call Budget: Caps
run_checksandapply_editsverifytimeouts at170 s(under Antigravity's180 sMCP limit) using monotonicperformance.now(), reporting unstarted commands as[NOT RUN]and rejecting boolean/non-numeric timeout coercion. - Deterministic
batch_searchTruncation &rg/Node Parity: 2-pass--count->--jsonflow keeps first matches in deterministic path order onmaxResultstruncation; adds unconditional--no-config&--crlf, guards bare-filenames, enforces 2 MB / binary /globchecks on single-file targets, avoids line-number gaps when truncating withcontextLines > 0, tolerates transient Pass-2 ENOENT when stderr is empty, and aligns negated!globin Node fallback. - Python Symbol Outline Hardening: Fixes decorator/body ranges across triple-quoted strings, multiline calls/signatures, backslash continuations inside quoted strings, Python 3.12+ PEP 701 f-strings, and mid-edit unclosed bracket recovery.
Windows Selective PowerShell Routing & Codepage Decoding (#1, thanks @BLACK-BIRTHDAY)
- Routes Windows commands containing PowerShell syntax (
$env:, cmdlets,$x = ...,$(...),@(...)) throughpwsh->powershell.exe->cmd.exe(caching resolved executable paths) with forced UTF-8 output while keeping plain commands oncmd.exe. - Decodes non-UTF-8 Windows console codepages (CP936/GBK, CP950/Big5, CP932/Shift_JIS, CP949/EUC-KR, CP1250–1258, CP850/CP437) cleanly without mojibake.
简体中文摘要
- Antigravity 宿主端与版本检查控制器(#10,基于
@fwyc0573扩展):识别 CLI / 桌面端 2.0 / IDE / 第三方客户端及版本(支持 4 段版本号与 SemVer 2.0 预发布比较,严格隔离跨端与第三方客户端);默认优先省 token 的原生数组(桌面端/IDE/其他客户端 0 额外SessionStart字节),在受影响的 CLI 1.5.x 自动切换apply_edits.edits为 JSON 数组字符串以防[]丢参;支持AGY_FAST_EDITS_FORMAT/AGY_FAST_HOST/install.mjs config --edits-format覆盖与doctor诊断;补齐edits: []/"true"/"null"熔断与非法 JSON 精确报错。 - 工作区默认
cwd与 170s 预算 / 稳定搜索 / Python 大纲(#9,感谢@fwyc0573):通过加固版 MCProots/list解析工作区默认cwd;run_checks与apply_editsverify上限调整为170s并采用单调时钟共享预算;batch_search2-pass 路径有序截断并补齐--no-config/--crlf/单文件过滤/中途删文件容错与!glob一致性;Python 大纲支持字符串内\续行、PEP 701 f-string 与未闭合括号恢复。 - Windows 选择性 PowerShell 路由与多代码页解码(#1,感谢
@BLACK-BIRTHDAY):仅对含 PowerShell 语法的命令按pwsh -> powershell.exe -> cmd.exe路由并强制 UTF-8 输出,无乱码解码 GBK/Big5/Shift_JIS/EUC-KR 及 CP1250–1258 等控制台编码。
Full Changelog: v0.2.6...v0.2.7