diff --git a/CLIENTS.md b/CLIENTS.md index efaf836d8d..2f0bdf0342 100644 --- a/CLIENTS.md +++ b/CLIENTS.md @@ -365,10 +365,10 @@ The #321 budget `-c` args are kept verbatim (embedded mode honors them identically). If you want the shared background server, run native `codex` directly — no compression, but tools still work via `bili plugin install codex`. -## Gemini family (Gemini CLI / iFlow CLI / Qwen Code) +## Gemini family (Gemini CLI / iFlow CLI / Qwen Code / Antigravity) -Three launchers for the gemini-cli architecture family (#1043 tier 1). Two of -the three have a base-URL env hook; one doesn't: +Four launchers for the gemini-cli architecture family (#1043 tier 1). Three of +the four have a base-URL env hook; one doesn't: - **`bili gemini`** — Gemini CLI (`@google/gemini-cli`). Sets `GOOGLE_GEMINI_BASE_URL=/bili/` (default upstream @@ -392,12 +392,41 @@ the three have a base-URL env hook; one doesn't: `HTTPS_PROXY=` + `NODE_EXTRA_CA_CERTS=` with a static whitelist of the default model hosts (DashScope / Qwen gateway / common third-party endpoints). Custom relay hosts: add them with - `--mitm-domain `. Best-effort route — a `BLIND TUNNEL WARNING` in the - log means a host is missing from the whitelist. - -None of the three has a native mode: none exposes an in-loop tool injection + `--mitm-domain `. Best-effort route — a `BLIND TUNNEL WARNING` in the + log means a host is missing from the whitelist. +- **`bili antigravity`** — Google Antigravity (#2115). The launcher drives the + official CLI binary **`agy`** (the successor of Gemini CLI, which was + discontinued in 2026-06; found on `PATH` or at `~/.local/bin/agy`, Windows + `%LOCALAPPDATA%\agy\bin`). Its model channel lives inside the closed-source + Go `language_server`, which honors an **undocumented** `CLOUD_CODE_URL` env + override (verified in the v2.19.1 binary: *"Overriding CloudCodeServerURL + via CLOUD_CODE_URL environment variable"*) — same shape as the gemini-cli + base-URL hook. The launcher sets + `CLOUD_CODE_URL=/bili/` (default upstream + `https://cloudcode-pa.googleapis.com`; if you export your own + `CLOUD_CODE_URL`, that value is relayed through the proxy instead). No MITM, + no CA install. The proxy recognizes the wire **by path**: + `:streamGenerateContent` / `:generateContent` / `:countTokens` requests are + routed to the Google-native adapter and compressed like `bili gemini`. If + the server instead uses gRPC method paths + (`/google.internal.cloud.code.v1internal.CloudCode/*`), those requests are + not recognized and relay verbatim without compression — a graceful degrade, + fixable with a per-lane `protocol` declaration (#1909) once confirmed. + Fallback if Google ever removes the env hook: cert-MITM — the + language_server honors `HTTPS_PROXY` and does not pin certificates, so add + `cloudcode-pa.googleapis.com` to `"mitm".domains` and trust bili's root CA. + The desktop app and the IDE extension share this same language_server + channel; the launcher drives the CLI specifically — desktop users can export + `CLOUD_CODE_URL` manually or use the MITM recipe. + +None of the four has a native mode: none exposes an in-loop tool injection seam (gemini-cli extensions reach custom commands only; the forks inherit -that surface). Launcher-only by design. +that surface; Antigravity ships a user-plugin system — `plugins//` +with `plugin.json`, `hooks.json`, `mcp_config.json`, `skills/`, JS sidecars — +but every surface is additive only: tools, prompts, UI, event callbacks. +Nothing in it can intercept or rewrite the model request/response stream, +which stays entirely inside the closed language_server, so wire-only +integration is the ceiling for v1). Launcher-only by design. ## Pi (pi.dev coding agent) diff --git a/CLIENTS.zh-CN.md b/CLIENTS.zh-CN.md index 7cb5de923a..03c0e19d1f 100644 --- a/CLIENTS.zh-CN.md +++ b/CLIENTS.zh-CN.md @@ -28,9 +28,9 @@ - **看门狗与生命周期:** MCP 子进程每 30 s 探测一次代理。attach 模式下永远等待(绝不碰用户自己的代理);spawn 模式下代理死亡则重新拉起并把路由改写到新 origin。恢复失败时移除受管块,让流量退回直连上游而不是打到死端口。会话结束时 kimi 杀掉 MCP 子进程,父进程 pid 看门狗随之收掉拉起的代理。多个并发 TUI 共享第一个拉起的代理;它消失后其余会话自动重新拉起并改路。 - **已知局限:** 子代理会话各自得到独立的派生代理会话(kimi 不暴露稳定的会话 id;工具调用经每次调用的 `conversation_id` 参数绑定);kimi 的原生自动压缩**没有**被推后 —— ACP 压缩只是先触发,与启动器模式一致。退出开关:`BILI_NATIVE_KIMI=0`。 -## Gemini 系(Gemini CLI / iFlow CLI / Qwen Code) +## Gemini 系(Gemini CLI / iFlow CLI / Qwen Code / Antigravity) -面向 gemini-cli 架构家族的三个启动器(#1043 第一梯队)。三者中两个有 base-URL 环境变量钩子,一个没有: +面向 gemini-cli 架构家族的四个启动器(#1043 第一梯队)。四者中三个有 base-URL 环境变量钩子,一个没有: - **`bili gemini`** —— Gemini CLI(`@google/gemini-cli`)。设置 `GOOGLE_GEMINI_BASE_URL=/bili/`(默认上游 @@ -50,10 +50,33 @@ 但它遵循标准代理环境变量,所以启动器走证书 MITM:`HTTPS_PROXY=` + `NODE_EXTRA_CA_CERTS=`,并把默认模型主机(DashScope / Qwen 网关 / 常见第三方端点)静态加白。自建中转主机用 `--mitm-domain ` 追加。 - 尽力而为的路由 —— 日志里出现 `BLIND TUNNEL WARNING` 说明有主机没进白名单。 - -三者都没有 native 模式:均无环内工具注入接缝(gemini-cli 扩展只到自定义命令, -fork 继承同一面)。按设计保持 launcher-only。 + 尽力而为的路由 —— 日志里出现 `BLIND TUNNEL WARNING` 说明有主机没进白名单。 +- **`bili antigravity`** —— Google Antigravity(#2115)。启动器驱动官方 CLI + 二进制 **`agy`**(Gemini CLI 的继任者,Gemini CLI 已于 2026-06 退役;在 + `PATH` 或 `~/.local/bin/agy`,Windows 为 `%LOCALAPPDATA%\agy\bin`)。其模型 + 通道在闭源 Go `language_server` 内部,该进程遵循一个**未公开的** + `CLOUD_CODE_URL` 环境变量覆盖(已在 v2.19.1 二进制中验证:*"Overriding + CloudCodeServerURL via CLOUD_CODE_URL environment variable"*),形态与 + gemini-cli 的 base-URL 钩子相同。启动器设置 + `CLOUD_CODE_URL=/bili/`(默认上游 + `https://cloudcode-pa.googleapis.com`;如果你自己导出了 `CLOUD_CODE_URL`, + 该值会被中继经过代理)。无 MITM、无需装 CA。代理**按 path 识别 wire**: + `:streamGenerateContent` / `:generateContent` / `:countTokens` 请求走 + Google 原生适配器,与 `bili gemini` 一样被压缩。若服务端改用 gRPC 方法 + path(`/google.internal.cloud.code.v1internal.CloudCode/*`),这些请求不被 + 识别、原样透传不压缩 —— 属优雅降级,确认后可用按 lane 的 `protocol` + 声明(#1909)修复。若 Google 将来移除该环境钩子,退路是证书 MITM: + language_server 遵循 `HTTPS_PROXY` 且不锁定证书,把 + `cloudcode-pa.googleapis.com` 加进 `"mitm".domains` 并信任 bili 根 CA + 即可。桌面端与 IDE 扩展共用同一条 language_server 通道;启动器只驱动 + CLI —— 桌面用户可手动导出 `CLOUD_CODE_URL`,或直接用上面的 MITM 配方。 + +四者都没有 native 模式:均无环内工具注入接缝(gemini-cli 扩展只到自定义命令, +fork 继承同一面;Antigravity 自带用户插件系统 —— `plugins//` 下的 +`plugin.json`、`hooks.json`、`mcp_config.json`、`skills/`、JS sidecar —— +但每个面都只能追加:工具、提示词、UI、事件回调,没有任何一个能拦截或改写 +模型请求/响应流,那条流完全留在闭源 language_server 内部,所以 wire-only +是 v1 的上限)。按设计保持 launcher-only。 ## Hermes(Nous Research) diff --git a/README.md b/README.md index f328a39e5e..12ec29256a 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Pick by your client: | **gemini** (Gemini CLI) | `bili gemini` (launcher, `GOOGLE_GEMINI_BASE_URL` `/bili/` rewrite) or `/bili/` prefix — launcher-only (no in-loop tool seam, #1043) | | **iflow** (iFlow CLI) | `bili iflow` (launcher, `IFLOW_BASE_URL` `/bili/` rewrite) or `/bili/` prefix | | **qwen** (Qwen Code) | `bili qwen` (launcher, cert-MITM) or `/bili/` prefix | +| **antigravity** (Antigravity CLI / agy, Google) | `bili antigravity` (launcher, `CLOUD_CODE_URL` `/bili/` rewrite of cloudcode-pa.googleapis.com) or `/bili/` prefix — no plugin seam (closed Go language_server; its user-plugin surface is additive-only, #2115) — details: [CLIENTS.md](CLIENTS.md) | | **mcode** (MiniMax Code) | [`billion-context`](https://github.com/ranxianglei/billion-context) via `bili mcode` (cert-MITM) or `/bili/` prefix — no native mode (event hooks only, no model-request seam, [#1050](https://github.com/ranxianglei/billion-context/issues/1050)) | | **aider** | [`billion-context`](https://github.com/ranxianglei/billion-context) via `bili aider` (cert-MITM) or `/bili/` prefix — no native mode (shell-command-only hooks, no tool-injection seam, [#1048](https://github.com/ranxianglei/billion-context/issues/1048)) | | **copilot** (GitHub Copilot CLI) | `bili copilot` (launcher, cert-MITM) — closed Go binary, no plugin seam (#1049) | @@ -209,7 +210,7 @@ Notes: - `jcode` and `aider` have no native mode (no plugin/MCP/tool-injection seam: #962, #1048) — use `bili jcode` / `bili aider`. - `copilot`, `amp` and `goose` are launcher-only (#1049); goose cannot be cert-MITMed (rustls trusts no CA file) and rides plain-HTTP base-URL redirects instead. -### Option 2 — Launcher (`bili pi` / `bili codex` / `bili claude` / `bili omp` / `bili opencode` / `bili hermes` / `bili dsh` / `bili codebuddy` / `bili qoder` / `bili trae` / `bili jcode` / `bili kimi` / `bili gemini` / `bili iflow` / `bili qwen` / `bili mcode` / `bili aider` / `bili copilot` / `bili amp` / `bili goose`) +### Option 2 — Launcher (`bili pi` / `bili codex` / `bili claude` / `bili omp` / `bili opencode` / `bili hermes` / `bili dsh` / `bili codebuddy` / `bili qoder` / `bili trae` / `bili jcode` / `bili kimi` / `bili gemini` / `bili iflow` / `bili qwen` / `bili antigravity` / `bili mcode` / `bili aider` / `bili copilot` / `bili amp` / `bili goose`) The launcher wraps a client in one command: it starts a proxy on an independent port (a fresh instance is always spawned — a port is never @@ -236,6 +237,7 @@ bili kimi # Kimi Code CLI (Moonshot): standard proxy bili gemini # Gemini CLI (Google): GOOGLE_GEMINI_BASE_URL /bili/ rewrite to generativelanguage.googleapis.com (Google native wire), real ~/.gemini untouched bili iflow # iFlow CLI: IFLOW_BASE_URL /bili/ rewrite to apis.iflow.cn/v1 (OpenAI chat-completions wire), real ~/.iflow untouched bili qwen # Qwen Code (multi-protocol gemini-cli fork, no base-URL hook): cert-MITM via HTTPS_PROXY + NODE_EXTRA_CA_CERTS, default DashScope/Qwen model hosts whitelisted, custom relays via --mitm-domain +bili antigravity # Antigravity CLI (agy, Google): CLOUD_CODE_URL /bili/ rewrite of cloudcode-pa.googleapis.com (undocumented language-server env override, v2.19.1 binary-verified); wire recognized as Google native by path (#2115) bili mcode # MiniMax Code CLI: same shape as kimi (proxy envs, unconditional loopback bypass, cert-MITM/absolute-form); session bound via X-Mavis-Session-Id (#1050) bili aider # Aider (Python pair programmer): cert-MITM via HTTPS_PROXY + SSL_CERT_FILE/REQUESTS_CA_BUNDLE; endpoint from OPENAI_API_BASE / ANTHROPIC_BASE_URL / --openai-api-base / .aider.conf.yml (#1048) bili copilot # Copilot CLI (GitHub, closed Go binary) — cert-MITM via HTTPS_PROXY + SSL_CERT_FILE, api.githubcopilot.com + per-plan subdomains whitelisted (#1049) @@ -282,7 +284,7 @@ should see a `processTurn` line per request, and once the conversation grows, ### Client deep dives -Everything that doesn't fit in one Quickstart line — how each client's lanes attach, what gets written where, and known limitations — lives in **[CLIENTS.md](CLIENTS.md)**: dsh · Kimi Code · Hermes · ZCode · Gemini family (Gemini CLI / iFlow CLI / Qwen Code) · cert-MITM clients that never compress (CONNECT blind tunnels, #897) · unrecognized endpoints going direct (#1290) · OpenCode (launcher / native / pure proxy, `/acp` status & rules, legacy opencode-acp sessions #920). +Everything that doesn't fit in one Quickstart line — how each client's lanes attach, what gets written where, and known limitations — lives in **[CLIENTS.md](CLIENTS.md)**: dsh · Kimi Code · Hermes · ZCode · Gemini family (Gemini CLI / iFlow CLI / Qwen Code / Antigravity) · cert-MITM clients that never compress (CONNECT blind tunnels, #897) · unrecognized endpoints going direct (#1290) · OpenCode (launcher / native / pure proxy, `/acp` status & rules, legacy opencode-acp sessions #920). ## FAQ diff --git a/README.zh-CN.md b/README.zh-CN.md index 57ee4f5412..890efd8d61 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -118,6 +118,7 @@ QQ群: | **gemini**(Gemini CLI) | `bili gemini`(启动器,`GOOGLE_GEMINI_BASE_URL` `/bili/` 改写)或 `/bili/` 前缀 —— 仅启动器(无环内工具注入接缝,#1043) | | **iflow**(iFlow CLI) | `bili iflow`(启动器,`IFLOW_BASE_URL` `/bili/` 改写)或 `/bili/` 前缀 | | **qwen**(Qwen Code) | `bili qwen`(启动器,cert-MITM)或 `/bili/` 前缀 | +| **antigravity**(Antigravity CLI / agy,Google) | `bili antigravity`(启动器,`CLOUD_CODE_URL` 对 `cloudcode-pa.googleapis.com` 的 `/bili/` 改写)或 `/bili/` 前缀 —— 无插件接缝(闭源 Go language_server;其用户插件面仅可追加、不能拦截模型流,[#2115](https://github.com/ranxianglei/billion-context/issues/2115))—— 细节见 [CLIENTS.zh-CN.md](CLIENTS.zh-CN.md) | | **mcode**(MiniMax Code) | [`billion-context`](https://github.com/ranxianglei/billion-context),`bili mcode`(cert-MITM)或 `/bili/` 前缀 —— 无原生模式(纯声明式事件钩子,无模型请求接缝,[#1050](https://github.com/ranxianglei/billion-context/issues/1050)) | | **aider** | [`billion-context`](https://github.com/ranxianglei/billion-context),`bili aider`(cert-MITM)或 `/bili/` 前缀 —— 无原生模式(仅 shell 命令钩子,无工具注入接缝,[#1048](https://github.com/ranxianglei/billion-context/issues/1048)) | | **copilot**(GitHub Copilot CLI) | `bili copilot`(启动器,cert-MITM)—— 闭源 Go 二进制、无插件接缝(#1049) | @@ -182,7 +183,7 @@ pi / omp / kimi / claude 没有客户端侧通道 —— 它们的配置条目 - `jcode`、`aider` 无原生模式(无插件/MCP/工具注入接缝:#962、#1048)—— 用 `bili jcode` / `bili aider`。 - `copilot`、`amp`、`goose` 仅启动器模式(#1049);goose 无法 cert-MITM(rustls 不信任任何 CA 文件),改走纯 HTTP base-URL 重定向。 -### 方式 2 —— 启动器(`bili pi` / `bili codex` / `bili claude` / `bili omp` / `bili opencode` / `bili hermes` / `bili dsh` / `bili codebuddy` / `bili qoder` / `bili trae` / `bili jcode` / `bili kimi` / `bili gemini` / `bili iflow` / `bili qwen` / `bili mcode` / `bili aider` / `bili copilot` / `bili amp` / `bili goose`) +### 方式 2 —— 启动器(`bili pi` / `bili codex` / `bili claude` / `bili omp` / `bili opencode` / `bili hermes` / `bili dsh` / `bili codebuddy` / `bili qoder` / `bili trae` / `bili jcode` / `bili kimi` / `bili gemini` / `bili iflow` / `bili qwen` / `bili antigravity` / `bili mcode` / `bili aider` / `bili copilot` / `bili amp` / `bili goose`) 启动器把客户端包进一条命令:在独立端口拉起一个代理(总是全新实例,绝不复用端口),再按客户端支持的机制把它指向代理 —— 能吃代理/CA 环境变量的走**证书 MITM**,不吃的走隔离的**`/bili/` 配置重写**。真实配置文件从不被修改;客户端自己的配置只被**读取**,用来发现它实际连接的 HTTPS 上游主机,把这些主机加入 MITM 白名单 —— 代理只 TLS 终结它们,其余流量盲透传。 @@ -202,6 +203,7 @@ bili kimi # Kimi Code CLI(Moonshot):除无条件回 bili gemini # Gemini CLI(Google):GOOGLE_GEMINI_BASE_URL /bili/ 改写到 generativelanguage.googleapis.com(Google 原生 wire),真实 ~/.gemini 零改动 bili iflow # iFlow CLI:IFLOW_BASE_URL /bili/ 改写到 apis.iflow.cn/v1(OpenAI chat-completions wire),真实 ~/.iflow 零改动 bili qwen # Qwen Code(多协议 gemini-cli fork,无 base-URL 钩子):HTTPS_PROXY + NODE_EXTRA_CA_CERTS 证书 MITM,默认 DashScope/Qwen 模型主机加白,自建中转用 --mitm-domain 追加 +bili antigravity # Google Antigravity CLI(agy,Gemini CLI 继任者):CLOUD_CODE_URL 对 cloudcode-pa.googleapis.com 的 /bili/ 改写,无需证书 MITM(#2115) bili mcode # MiniMax Code CLI:与 kimi 同构(代理环境变量、无条件回环绕过、证书 MITM/绝对形式);会话经 X-Mavis-Session-Id 绑定(#1050) bili aider # Aider(Python pair programmer):HTTPS_PROXY + SSL_CERT_FILE/REQUESTS_CA_BUNDLE 证书 MITM;端点取自 OPENAI_API_BASE / ANTHROPIC_BASE_URL / --openai-api-base / .aider.conf.yml(#1048) bili copilot # Copilot CLI(GitHub,闭源 Go 二进制)—— 证书 MITM(HTTPS_PROXY + SSL_CERT_FILE),api.githubcopilot.com + 各套餐子域加白(#1049) @@ -243,7 +245,7 @@ curl -s http://localhost:8787/__bili/stats ### 客户端深入 -一行带不过来的细节 —— 各模式(启动器 / `/bili/` URL 前缀 / 原生插件)如何把流量接进代理、往哪儿写了什么、已知局限有哪些 —— 都在 **[CLIENTS.zh-CN.md](CLIENTS.zh-CN.md)**:dsh · Kimi Code · Hermes · ZCode · Gemini 系(Gemini CLI / iFlow CLI / Qwen Code)· CONNECT 盲隧道接入但从不压缩的客户端(#897)· 未识别端点直连(#1290)· OpenCode(启动器 / 原生 / 纯代理、`/acp` 状态与规则、旧 opencode-acp 会话 #920)。 +一行带不过来的细节 —— 各模式(启动器 / `/bili/` URL 前缀 / 原生插件)如何把流量接进代理、往哪儿写了什么、已知局限有哪些 —— 都在 **[CLIENTS.zh-CN.md](CLIENTS.zh-CN.md)**:dsh · Kimi Code · Hermes · ZCode · Gemini 系(Gemini CLI / iFlow CLI / Qwen Code / Antigravity)· CONNECT 盲隧道接入但从不压缩的客户端(#897)· 未识别端点直连(#1290)· OpenCode(启动器 / 原生 / 纯代理、`/acp` 状态与规则、旧 opencode-acp 会话 #920)。 ## 常见问题 diff --git a/src/cli.ts b/src/cli.ts index 4254ac4b30..d099f93ef1 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -58,6 +58,7 @@ Usage: bili gemini [opts --] [args] start a proxy + launch Gemini CLI against it (GOOGLE_GEMINI_BASE_URL /bili/ rewrite) bili iflow [opts --] [args] start a proxy + launch iFlow CLI against it (IFLOW_BASE_URL /bili/ rewrite) bili qwen [opts --] [args] start a proxy + launch Qwen Code against it (cert-MITM) + bili antigravity [opts --] [args] start a proxy + launch Antigravity CLI (agy) against it (CLOUD_CODE_URL /bili/ rewrite) bili mcode [opts --] [args] start a proxy + launch MiniMax Code against it (cert-MITM) bili aider [opts --] [args] start a proxy + launch aider against it (cert-MITM) bili copilot [opts --] [args] start a proxy + launch Copilot CLI against it (cert-MITM) @@ -92,7 +93,7 @@ Usage: bili --version print version bili --help show this help -Launcher (bili pi / bili codex / bili claude / bili omp / bili opencode / bili hermes / bili dsh / bili codebuddy / bili qoder / bili trae / bili jcode / bili kimi / bili gemini / bili iflow / bili qwen / bili mcode / bili aider / bili copilot / bili amp / bili goose): +Launcher (bili pi / bili codex / bili claude / bili omp / bili opencode / bili hermes / bili dsh / bili codebuddy / bili qoder / bili trae / bili jcode / bili kimi / bili gemini / bili iflow / bili qwen / bili antigravity / bili mcode / bili aider / bili copilot / bili amp / bili goose): Brings up a proxy on an independent port (a fresh instance every launch), then runs the client pointed at it via HTTPS_PROXY + the proxy's MITM CA — no config-file edits. Discovered HTTPS upstream domains are auto-whitelisted for MITM so the proxy TLS-terminates exactly the hosts the @@ -117,6 +118,7 @@ Launcher (bili pi / bili codex / bili claude / bili omp / bili opencode / bili h bili gemini # launch Gemini CLI through the proxy (GOOGLE_GEMINI_BASE_URL /bili/ rewrite; API-key & gateway auth) bili iflow # launch iFlow CLI through the proxy (IFLOW_BASE_URL /bili/ rewrite of apis.iflow.cn/v1) bili qwen # launch Qwen Code through the proxy (cert-MITM; DashScope/Qwen gateways whitelisted by default, custom relays via --mitm-domain) + bili antigravity # launch Antigravity CLI (agy) through the proxy (CLOUD_CODE_URL /bili/ rewrite of cloudcode-pa.googleapis.com) bili mcode # launch MiniMax Code through the proxy (cert-MITM; provider hosts from ~/.minimax*/config.yaml or the official agent.minimax.* endpoints) bili aider # launch aider through the proxy (cert-MITM; endpoint from OPENAI_API_BASE/--openai-api-base/.aider.conf.yml or api.openai.com+api.anthropic.com by default) bili copilot # launch Copilot CLI through the proxy (cert-MITM; api.githubcopilot.com + plan subdomains whitelisted by default) diff --git a/src/client-config.ts b/src/client-config.ts index 5a4a7ce28f..b7780e3254 100644 --- a/src/client-config.ts +++ b/src/client-config.ts @@ -181,6 +181,13 @@ export interface IflowConfig { baseUrl?: string; } +export interface AntigravityConfig { + /** The user's pre-existing `CLOUD_CODE_URL` env (undocumented override + * verified against the v2.19.1 language_server binary, #2115) — relay-wrap + * semantics, same as GeminiConfig.baseUrl. */ + baseUrl?: string; +} + export interface McodeProvider { baseUrl?: string; } @@ -234,6 +241,7 @@ export interface ClientConfig { kimi?: KimiConfig; gemini?: GeminiConfig; iflow?: IflowConfig; + antigravity?: AntigravityConfig; mcode?: McodeConfig; aider?: AiderConfig; goose?: GooseConfig; @@ -569,6 +577,10 @@ export function readIflowEnvConfig(env: NodeJS.ProcessEnv): IflowConfig { return { baseUrl: raw }; } +export function readAntigravityEnvConfig(env: NodeJS.ProcessEnv): AntigravityConfig { + return { baseUrl: nonEmpty(env.CLOUD_CODE_URL) ? env.CLOUD_CODE_URL : undefined }; +} + export function readClaudeSettings(homeDir: string, cwd: string, env: NodeJS.ProcessEnv = process.env): ClaudeSettings { const files = [ path.join(homeDir, ".claude", "settings.json"), @@ -1530,6 +1542,7 @@ export function loadClientConfig(env: NodeJS.ProcessEnv, cwd: string): ClientCon config.kimi = readKimiConfig(resolveKimiHome(env), env); config.gemini = readGeminiEnvConfig(env); config.iflow = readIflowEnvConfig(env); + config.antigravity = readAntigravityEnvConfig(env); config.mcode = readMcodeConfig(env); config.aider = readAiderConfig(env, cwd); config.goose = readGooseConfig(resolveGooseDirs(env), env); @@ -1657,7 +1670,7 @@ export function readAiderConfig(env: NodeJS.ProcessEnv = process.env, cwd: strin * launched client's own declarations are authoritative (#436: launching * `bili omp` with omp's models.yml declaring 131072 must not be overridden by * another client's larger declaration for the same model id). */ -export type ModelWindowScope = "claude" | "codex" | "pi" | "omp" | "opencode" | "hermes" | "dsh" | "codebuddy" | "qoder" | "trae" | "jcode" | "kimi" | "gemini" | "iflow" | "qwen" | "mcode" | "aider" | "copilot" | "amp" | "goose"; +export type ModelWindowScope = "claude" | "codex" | "pi" | "omp" | "opencode" | "hermes" | "dsh" | "codebuddy" | "qoder" | "trae" | "jcode" | "kimi" | "gemini" | "iflow" | "qwen" | "antigravity" | "mcode" | "aider" | "copilot" | "amp" | "goose"; /** Collect per-model context windows from client configs the launcher can * read (pi models.json, omp models.yml, opencode opencode.json, codex diff --git a/src/launcher.ts b/src/launcher.ts index ebcdd639af..080b286703 100644 --- a/src/launcher.ts +++ b/src/launcher.ts @@ -146,9 +146,9 @@ export { import { conflictScanEnabled, isDesignBenign, scanClientPlugins } from "./thirdparty-scan.js"; export const LAUNCHER_DEFAULT_HOST = "127.0.0.1"; -export const LAUNCH_CLIENTS = ["pi", "codex", "claude", "omp", "opencode", "hermes", "dsh", "codebuddy", "qoder", "trae", "jcode", "kimi", "gemini", "iflow", "qwen", "mcode", "aider", "copilot", "amp", "goose", "pi-test"] as const; +export const LAUNCH_CLIENTS = ["pi", "codex", "claude", "omp", "opencode", "hermes", "dsh", "codebuddy", "qoder", "trae", "jcode", "kimi", "gemini", "iflow", "qwen", "mcode", "aider", "copilot", "amp", "goose", "antigravity", "pi-test"] as const; export type ClientName = (typeof LAUNCH_CLIENTS)[number]; -export type BaseClientName = "claude" | "codex" | "pi" | "omp" | "opencode" | "hermes" | "dsh" | "codebuddy" | "qoder" | "trae" | "jcode" | "kimi" | "gemini" | "iflow" | "qwen" | "mcode" | "aider" | "copilot" | "amp" | "goose"; +export type BaseClientName = "claude" | "codex" | "pi" | "omp" | "opencode" | "hermes" | "dsh" | "codebuddy" | "qoder" | "trae" | "jcode" | "kimi" | "gemini" | "iflow" | "qwen" | "mcode" | "aider" | "copilot" | "amp" | "goose" | "antigravity"; const HEALTH_PATH = "/__bili/health"; const HEALTH_POLL_INTERVAL_MS = 200; @@ -721,6 +721,29 @@ export function discoverRoutes(client: ClientName, config: ClientConfig): Discov httpsDomains.push(host); } } + } else if (client === "antigravity") { + // #2115: Antigravity's model channel runs inside the closed Go + // language_server, which honors the undocumented CLOUD_CODE_URL env + // override (verified in the v2.19.1 binary: "Overriding + // CloudCodeServerURL via CLOUD_CODE_URL environment variable"). The + // stock endpoint is cloudcode-pa.googleapis.com; bili recognizes the + // wire by path (:streamGenerateContent et al. → google adapter). A + // user-exported CLOUD_CODE_URL is a relay: wrap IT instead of the + // stock endpoint (claude semantics). Fallback if Google removes the + // knob: cert-MITM (the server honors HTTPS_PROXY, no pinning) — see + // CLIENTS.md (Gemini family section). + const raw = nonEmpty(config.antigravity?.baseUrl) ? config.antigravity!.baseUrl! : "https://cloudcode-pa.googleapis.com"; + const real = unwrapUpstream(raw); + try { + const url = new URL(real); + if ((url.protocol === "https:" || url.protocol === "http:") && !rewriteKeys.has("CLOUD_CODE_URL")) { + rewriteKeys.add("CLOUD_CODE_URL"); + httpRewrites.push({ key: "CLOUD_CODE_URL", realUpstream: real }); + } + } catch { + // Unparseable base URL: leave routes empty (proxy still runs; + // Antigravity falls back to its own default endpoint). + } } else if (client === "aider") { // #1048: aider's Python stack (litellm → httpx, plus requests) honors // standard proxy envs for all outbound traffic, so no URL rewriting @@ -1149,6 +1172,23 @@ export function buildQwenEnv(origin: string, caPath: string, baseEnv: NodeJS.Pro }; } +/** #2115: CLOUD_CODE_URL points language_server straight at the loopback + * proxy; no proxy/CA env needed (the override IS the route). */ +export function buildAntigravityEnv( + origin: string, + caPath: string, + httpRewrites: HttpRewrite[], + httpsRewrites: HttpRewrite[], + baseEnv: NodeJS.ProcessEnv, +): NodeJS.ProcessEnv { + const env: NodeJS.ProcessEnv = { ...baseEnv, BILLION_CONTEXT_PROXY: origin }; + const r = httpRewrites.find((rw) => rw.key === "CLOUD_CODE_URL"); + if (r) env.CLOUD_CODE_URL = wrapUpstream(origin, r.realUpstream); + const hr = httpsRewrites.find((rw) => rw.key === "CLOUD_CODE_URL"); + if (hr) env.CLOUD_CODE_URL = hr.realUpstream; + return env; +} + /** * #653: qoder's auto-compact window is a single env knob — * `QODER_AUTOCOMPACT_WINDOW` (`QODERCN_` prefix on the CN site) caps the @@ -1253,12 +1293,14 @@ function isPrivateIPv4(host: string): boolean { * yet verified against a real build, so v1 runs pure wire mode (the proxy * injects the context tools on the wire). kimi is excluded as well: its * mcp.json path is hardcoded in the binary with no ephemeral-config flag, - * so v1 runs pure wire mode (#757). gemini/iflow/qwen (#1047) are excluded - * like codebuddy: their MCP-injection flags are unverified, v1 is pure wire. - * copilot/amp/goose are excluded likewise: closed or unverified MCP - * surfaces, v1 runs pure wire mode (#1049). */ + * so v1 runs pure wire mode (#757). gemini/iflow/qwen (#1047) are excluded + * like codebuddy: their MCP-injection flags are unverified, v1 is pure wire. + * copilot/amp/goose are excluded likewise: closed or unverified MCP + * surfaces, v1 runs pure wire mode (#1049). antigravity is excluded too + * (#2115): its model channel is a closed Go binary with no MCP-injection + * flag — v1 runs pure wire mode. */ export function launcherInjectMcp(env: NodeJS.ProcessEnv, base: string, codexUpstream?: string): boolean { - if (base === "pi" || base === "omp" || base === "opencode" || base === "hermes" || base === "dsh" || base === "codebuddy" || base === "qoder" || base === "trae" || base === "jcode" || base === "kimi" || base === "gemini" || base === "iflow" || base === "qwen" || base === "mcode" || base === "aider" || base === "copilot" || base === "amp" || base === "goose") return false; + if (base === "pi" || base === "omp" || base === "opencode" || base === "hermes" || base === "dsh" || base === "codebuddy" || base === "qoder" || base === "trae" || base === "jcode" || base === "kimi" || base === "gemini" || base === "iflow" || base === "qwen" || base === "antigravity" || base === "mcode" || base === "aider" || base === "copilot" || base === "amp" || base === "goose") return false; if (env.BILI_LAUNCHER_PLUGIN === "0") return false; if (base === "codex" && env.BILI_LAUNCHER_PLUGIN === undefined && codexUpstream !== undefined && isPrivateUpstreamHost(codexUpstream)) { return false; @@ -4162,6 +4204,25 @@ export function resolveClientCommand( } return { command: binBase, prefixArgs: [] }; } + if (client === "antigravity") { + // #2115: the CLI binary is named `agy` (Gemini CLI successor), not + // `antigravity`; install.sh places it at ~/.local/bin/agy (Windows: + // %LOCALAPPDATA%\agy\bin\agy.exe). + const resolved = resolveOnPath("agy", env); + if (resolved) return { command: resolved, prefixArgs: [] }; + const base = process.platform === "win32" + ? path.join(env.LOCALAPPDATA ?? path.join(os.homedir(), "AppData", "Local"), "agy", "bin", "agy") + : path.join(os.homedir(), ".local", "bin", "agy"); + for (const ext of process.platform === "win32" ? [".exe", ""] : [""]) { + const candidate = base + ext; + try { + if (fs.existsSync(candidate)) return { command: candidate, prefixArgs: [] }; + } catch { + // Unreadable candidate: fall through to the next extension. + } + } + return { command: base, prefixArgs: [] }; + } const resolved = resolveOnPath(client, env); return { command: resolved ?? client, prefixArgs: [] }; } @@ -4612,6 +4673,17 @@ export async function runLaunch(params: RunLaunchParams, deps: LauncherDeps = {} // whitelisted for the proxy's CA. NODE_EXTRA_CA_CERTS is additive, so // the plain root CA suffices. env = buildQwenEnv(origin, resolveCaCertPath(process.env), stripInheritedProxy(process.env)); + } else if (base === "antigravity") { + // #2115: CLOUD_CODE_URL points language_server straight at the loopback + // proxy (undocumented override verified in the v2.19.1 binary); no + // proxy/CA env needed. Fallback if Google removes the knob: cert-MITM + // (the server honors HTTPS_PROXY, no pinning) — CLIENTS.md. + env = buildAntigravityEnv(origin, ca, routes.httpRewrites, routes.httpsRewrites, stripInheritedProxy(process.env)); + if (routes.httpRewrites.length === 0 && routes.httpsRewrites.length === 0) { + console.error( + "bili: no routable antigravity upstream found (unparseable CLOUD_CODE_URL?) — traffic will NOT go through the proxy.", + ); + } } else if (base === "aider") { // #1048: cert-MITM like jcode/kimi — aider's Python stack (litellm → // httpx, plus requests) honors standard proxy envs for all outbound diff --git a/src/web/client.ts b/src/web/client.ts index ff789afda4..dd2081ccea 100644 --- a/src/web/client.ts +++ b/src/web/client.ts @@ -1506,7 +1506,7 @@ export const WEB_CLIENT = `(function () { function bindLauncherNotes() { // Per-client launch notes (from the README launcher table) as hover tooltips. - const N = { pi: t("con.note_pi"), codex: t("con.note_codex"), claude: t("con.note_claude"), omp: t("con.note_omp"), opencode: t("con.note_opencode"), hermes: t("con.note_hermes"), dsh: t("con.note_dsh"), codebuddy: t("con.note_codebuddy"), qoder: t("con.note_qoder"), trae: t("con.note_trae"), jcode: t("con.note_jcode"), kimi: t("con.note_kimi"), gemini: t("con.note_gemini"), iflow: t("con.note_iflow"), qwen: t("con.note_qwen"), mcode: t("con.note_mcode"), aider: t("con.note_aider"), copilot: t("con.note_copilot"), amp: t("con.note_amp"), goose: t("con.note_goose") }; + const N = { pi: t("con.note_pi"), codex: t("con.note_codex"), claude: t("con.note_claude"), omp: t("con.note_omp"), opencode: t("con.note_opencode"), hermes: t("con.note_hermes"), dsh: t("con.note_dsh"), codebuddy: t("con.note_codebuddy"), qoder: t("con.note_qoder"), trae: t("con.note_trae"), jcode: t("con.note_jcode"), kimi: t("con.note_kimi"), gemini: t("con.note_gemini"), iflow: t("con.note_iflow"), qwen: t("con.note_qwen"), antigravity: t("con.note_antigravity"), mcode: t("con.note_mcode"), aider: t("con.note_aider"), copilot: t("con.note_copilot"), amp: t("con.note_amp"), goose: t("con.note_goose") }; document.querySelectorAll(".chip[data-launcher]").forEach((el) => { const n = N[el.getAttribute("data-launcher")]; if (n) el.title = n; }); } diff --git a/src/web/i18n.ts b/src/web/i18n.ts index 0a259c869d..6eb7f9043e 100644 --- a/src/web/i18n.ts +++ b/src/web/i18n.ts @@ -273,6 +273,7 @@ export const MESSAGES: Record> = { "con.note_gemini": "Gemini CLI(Google):GOOGLE_GEMINI_BASE_URL /bili/ 改写到 generativelanguage.googleapis.com(Google 原生 wire);真实 ~/.gemini 零改动", "con.note_iflow": "iFlow CLI:IFLOW_BASE_URL /bili/ 改写到 apis.iflow.cn/v1(OpenAI chat-completions wire);真实 ~/.iflow 零改动", "con.note_qwen": "Qwen Code(多协议 gemini-cli fork,无 base-URL 钩子):HTTPS_PROXY + NODE_EXTRA_CA_CERTS 证书 MITM;DashScope/Qwen 默认模型主机加白,自建中转用 --mitm-domain 追加", + "con.note_antigravity": "Antigravity CLI(agy,Google,Gemini CLI 继任者):CLOUD_CODE_URL /bili/ 改写到 cloudcode-pa.googleapis.com(语言服务器内未公开的环境变量覆盖,v2.19.1 二进制验证;wire 按路径识别为 Google 原生)(#2115)", "con.note_mcode": "MiniMax Code CLI:除无条件回环绕过外遵循标准代理环境变量——非回环 https 证书 MITM、http 绝对形式转发;主机取 ~/.minimax*/config.yaml;会话经 X-Mavis-Session-Id 头绑定(#1050)", "con.note_aider": "Aider(Python pair programmer):HTTPS_PROXY + SSL_CERT_FILE/REQUESTS_CA_BUNDLE 证书 MITM;端点取自继承 env、--openai-api-base 或 .aider.conf.yml;回环端点经 NO_PROXY 直连(#1048)", "con.note_copilot": "Copilot CLI(GitHub,闭源 Go 二进制)——证书 MITM,api.githubcopilot.com + 各套餐子域加白(#1049)", @@ -585,6 +586,7 @@ export const MESSAGES: Record> = { "con.note_gemini": "Gemini CLI (Google): GOOGLE_GEMINI_BASE_URL /bili/ rewritten to generativelanguage.googleapis.com (Google native wire); real ~/.gemini zero-touch", "con.note_iflow": "iFlow CLI: IFLOW_BASE_URL /bili/ rewritten to apis.iflow.cn/v1 (OpenAI chat-completions wire); real ~/.iflow zero-touch", "con.note_qwen": "Qwen Code (multi-protocol gemini-cli fork, no base-URL hook): certificate MITM via HTTPS_PROXY + NODE_EXTRA_CA_CERTS; DashScope/Qwen default model hosts whitelisted; self-hosted relays appended via --mitm-domain", + "con.note_antigravity": "Antigravity CLI (agy, Google, Gemini CLI successor): CLOUD_CODE_URL /bili/ rewritten to cloudcode-pa.googleapis.com (undocumented language-server env override, verified in the v2.19.1 binary; wire recognized as Google native by path) (#2115)", "con.note_mcode": "MiniMax Code CLI: aside from the unconditional loopback bypass, standard proxy env — non-loopback https certificate MITM, http absolute-form forwarding; hosts from ~/.minimax*/config.yaml; sessions bound via X-Mavis-Session-Id header (#1050)", "con.note_aider": "Aider (Python pair programmer): certificate MITM via HTTPS_PROXY + SSL_CERT_FILE/REQUESTS_CA_BUNDLE; endpoint from inherited env, --openai-api-base or .aider.conf.yml; loopback endpoints direct via NO_PROXY (#1048)", "con.note_copilot": "Copilot CLI (GitHub, closed-source Go binary) — certificate MITM; api.githubcopilot.com plus tier subdomains whitelisted (#1049)", diff --git a/src/web/page.ts b/src/web/page.ts index daf1b73304..cb5560b777 100644 --- a/src/web/page.ts +++ b/src/web/page.ts @@ -118,7 +118,7 @@ export function renderPage(origin: string, version: string): string {

${zh("con.method_launcher_hint")}

-bili pibili codexbili claudebili ompbili opencodebili hermesbili dshbili codebuddybili qoderbili traebili jcodebili kimibili geminibili iflowbili qwenbili mcodebili aiderbili copilotbili ampbili goose +bili pibili codexbili claudebili ompbili opencodebili hermesbili dshbili codebuddybili qoderbili traebili jcodebili kimibili geminibili iflowbili qwenbili antigravitybili mcodebili aiderbili copilotbili ampbili goose

${zh("con.launcher_help_pre")} bili --help

${zh("con.launcher_mitm")}

${zh("con.method_a_hint")} ${o}/bili/

diff --git a/tests/launcher-gemini-family.test.ts b/tests/launcher-gemini-family.test.ts index 8ba36c09fb..b1ec94236f 100644 --- a/tests/launcher-gemini-family.test.ts +++ b/tests/launcher-gemini-family.test.ts @@ -8,12 +8,14 @@ import { buildGeminiEnv, buildIflowEnv, buildQwenEnv, + buildAntigravityEnv, launcherInjectMcp, } from "../src/launcher.ts"; import { QWEN_DEFAULT_MODEL_HOSTS, readGeminiEnvConfig, readIflowEnvConfig, + readAntigravityEnvConfig, loadClientConfig, } from "../src/client-config.ts"; @@ -29,6 +31,12 @@ test("launch client registry includes gemini/iflow/qwen (#1047)", () => { } }); +test("launch client registry includes antigravity (#2115)", () => { + assert.equal(isLaunchClient("antigravity"), true); + assert.equal(baseClientName("antigravity"), "antigravity"); + assert.ok(LAUNCH_CLIENTS.includes("antigravity")); +}); + test("discoverRoutes: gemini default → GOOGLE_GEMINI_BASE_URL /bili/ rewrite of generativelanguage", () => { assert.deepEqual(discoverRoutes("gemini", {}), { ...EMPTY_ROUTES, @@ -89,6 +97,34 @@ test("discoverRoutes: qwen default → cert-MITM whitelist of stock Qwen/DashSco assert.deepEqual(routes.httpEnvRoutes, []); }); +test("discoverRoutes: antigravity default → CLOUD_CODE_URL /bili/ rewrite of cloudcode-pa.googleapis.com (#2115)", () => { + assert.deepEqual(discoverRoutes("antigravity", {}), { + ...EMPTY_ROUTES, + httpRewrites: [{ key: "CLOUD_CODE_URL", realUpstream: "https://cloudcode-pa.googleapis.com" }], + }); +}); + +test("discoverRoutes: antigravity relay-wrapped CLOUD_CODE_URL unwraps back to the real upstream", () => { + const wrapped = `${ORIGIN}/bili/https://cloudcode-pa.googleapis.com`; + const routes = discoverRoutes("antigravity", { antigravity: { baseUrl: wrapped } }); + assert.deepEqual(routes.httpRewrites, [{ key: "CLOUD_CODE_URL", realUpstream: "https://cloudcode-pa.googleapis.com" }]); +}); + +test("discoverRoutes: antigravity custom plain upstream passes through unwrapped", () => { + const routes = discoverRoutes("antigravity", { antigravity: { baseUrl: "http://llm.internal:9000/v1beta" } }); + assert.deepEqual(routes.httpRewrites, [{ key: "CLOUD_CODE_URL", realUpstream: "http://llm.internal:9000/v1beta" }]); + assert.deepEqual(routes.httpsDomains, []); +}); + +test("discoverRoutes: antigravity unparseable CLOUD_CODE_URL → empty routes (client keeps its own default)", () => { + assert.deepEqual(discoverRoutes("antigravity", { antigravity: { baseUrl: "not a url" } }), EMPTY_ROUTES); +}); + +test("discoverRoutes: antigravity blank base URL behaves like unset (default upstream)", () => { + assert.deepEqual(discoverRoutes("antigravity", { antigravity: { baseUrl: " " } }).httpRewrites, + [{ key: "CLOUD_CODE_URL", realUpstream: "https://cloudcode-pa.googleapis.com" }]); +}); + test("buildGeminiEnv: wraps the rewrite target under /bili/, no proxy/CA env (GATEWAY mode goes direct)", () => { const base: NodeJS.ProcessEnv = { GEMINI_API_KEY: "k", PATH: "/bin" }; const env = buildGeminiEnv( @@ -141,8 +177,35 @@ test("buildQwenEnv: HTTPS_PROXY + additive root CA + loopback NO_PROXY (undici E assert.equal(env.HOME, "/home/u"); }); -test("launcherInjectMcp: gemini/iflow/qwen stay wire-only (unverified MCP flags, v1 pure wire)", () => { - for (const base of ["gemini", "iflow", "qwen"]) { +test("buildAntigravityEnv: wraps CLOUD_CODE_URL under /bili/, no proxy/CA env (the override IS the route) (#2115)", () => { + const base: NodeJS.ProcessEnv = { PATH: "/bin" }; + const env = buildAntigravityEnv( + ORIGIN, + "/ca/root-ca.pem", + [{ key: "CLOUD_CODE_URL", realUpstream: "https://cloudcode-pa.googleapis.com" }], + [], + base, + ); + assert.equal(env.CLOUD_CODE_URL, `${ORIGIN}/bili/https://cloudcode-pa.googleapis.com`); + assert.equal(env.BILLION_CONTEXT_PROXY, ORIGIN); + assert.equal(env.PATH, "/bin"); + assert.equal(env.HTTPS_PROXY, undefined); + assert.equal(env.NODE_EXTRA_CA_CERTS, undefined); +}); + +test("buildAntigravityEnv: never double-wraps an already-bili upstream", () => { + const env = buildAntigravityEnv( + ORIGIN, + "/ca/root-ca.pem", + [{ key: "CLOUD_CODE_URL", realUpstream: `${ORIGIN}/bili/https://cloudcode-pa.googleapis.com` }], + [], + {}, + ); + assert.equal(env.CLOUD_CODE_URL, `${ORIGIN}/bili/https://cloudcode-pa.googleapis.com`); +}); + +test("launcherInjectMcp: gemini/iflow/qwen/antigravity stay wire-only (closed/unverified MCP surfaces, v1 pure wire)", () => { + for (const base of ["gemini", "iflow", "qwen", "antigravity"]) { assert.equal(launcherInjectMcp({}, base), false); } assert.equal(launcherInjectMcp({}, "claude"), true); @@ -161,13 +224,21 @@ test("readIflowEnvConfig: IFLOW_BASE_URL wins over IFLOW_baseUrl", () => { assert.equal(readIflowEnvConfig({}).baseUrl, undefined); }); -test("loadClientConfig: exposes gemini/iflow sections from env", () => { +test("readAntigravityEnvConfig: captures user-exported CLOUD_CODE_URL as relay source (#2115)", () => { + assert.equal(readAntigravityEnvConfig({ CLOUD_CODE_URL: "http://llm.internal:9000/v1beta" }).baseUrl, "http://llm.internal:9000/v1beta"); + assert.equal(readAntigravityEnvConfig({}).baseUrl, undefined); + assert.equal(readAntigravityEnvConfig({ CLOUD_CODE_URL: " " }).baseUrl, undefined); +}); + +test("loadClientConfig: exposes gemini/iflow/antigravity sections from env", () => { const env: NodeJS.ProcessEnv = { ...process.env, GOOGLE_GEMINI_BASE_URL: "http://x.example:9000/v1beta", IFLOW_BASE_URL: "https://y.example/v1", + CLOUD_CODE_URL: "https://z.example", }; const cfg = loadClientConfig(env, process.cwd()); assert.equal(cfg.gemini?.baseUrl, "http://x.example:9000/v1beta"); assert.equal(cfg.iflow?.baseUrl, "https://y.example/v1"); + assert.equal(cfg.antigravity?.baseUrl, "https://z.example"); });