Skip to content

v0.2.7 — Host Version Controller, Workspace Root CWD, 170s Budget & Windows PowerShell

Choose a tag to compare

@INK-Q INK-Q released this 21 Nov 11:26
· 7 commits to main since this release

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 MCP initialize clientInfo, SessionStart .gemini/antigravity* paths, and ANTIGRAVITY_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 array edits (~2.6x–3.3x fewer output tokens and 0 extra SessionStart bytes) on Desktop 2.0, IDE, third-party hosts, and unaffected CLI versions; automatically switches apply_edits to JSON array string schema + a compact 1-line [agy-fast compat] SessionStart directive on affected Antigravity CLI 1.5.x builds to avoid call_mcp_tool edits: [] payload loss (server runtime always accepts both).
  • Overrides & Diagnostics: Configurable via AGY_FAST_EDITS_FORMAT=auto|array|string, AGY_FAST_HOST, and node scripts/install.mjs config --edits-format ..., with live Host compat output in doctor.
  • Argument Corruption & JSON Diagnostics: Treats edits: [] / "[]" and stringified "true" / "false" / "null" as call_mcp_tool serialization corruption (with decoded type labels and benchmark accounting), and returns precise JSON.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 MCP roots/list on notifications/initialized and notifications/roots/list_changed, resolving omitted and relative cwd against the first valid workspace root without mutating global process.cwd(); hardened with bounded wait timeouts, EOF/error/out-of-order sequencing, 64-entry knownRootsIds cap, batch queue flushing before waitForRoots(), mixed \n\r\n Content-Length framing, and graceful stdout EPIPE exit.
  • 170 s Shared Call Budget: Caps run_checks and apply_edits verify timeouts at 170 s (under Antigravity's 180 s MCP limit) using monotonic performance.now(), reporting unstarted commands as [NOT RUN] and rejecting boolean/non-numeric timeout coercion.
  • Deterministic batch_search Truncation & rg/Node Parity: 2-pass --count -> --json flow keeps first matches in deterministic path order on maxResults truncation; adds unconditional --no-config & --crlf, guards bare - filenames, enforces 2 MB / binary / glob checks on single-file targets, avoids line-number gaps when truncating with contextLines > 0, tolerates transient Pass-2 ENOENT when stderr is empty, and aligns negated !glob in 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 = ..., $(...), @(...)) through pwsh -> powershell.exe -> cmd.exe (caching resolved executable paths) with forced UTF-8 output while keeping plain commands on cmd.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):通过加固版 MCP roots/list 解析工作区默认 cwd;run_checks 与 apply_edits verify 上限调整为 170s 并采用单调时钟共享预算;batch_search 2-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