Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(agent): clarify Antigravity daemon mode
Bohan Jiang78d668a2f241
diff --git a/apps/docs/content/docs/install-agent-runtime.mdx b/apps/docs/content/docs/install-agent-runtime.mdxindex 7cad226911..5bce75b5dd 100644--- a/apps/docs/content/docs/install-agent-runtime.mdx+++ b/apps/docs/content/docs/install-agent-runtime.mdx@@ -159,14 +159,14 @@ Agentic coding CLI using the ACP protocol over stdio (shares the transport with### Antigravity (Google)-Google's Antigravity CLI (`agy`). Pairs with Google's Antigravity service and runs Gemini-backed models. Session resumption works through `--conversation <id>`, captured by the daemon from the CLI log file. Model selection is managed inside the Antigravity CLI itself — Multica disables the per-agent model picker for this provider. Skills are written to `.agents/skills/` (the CLI inherits Gemini CLI's workspace skill layout — see [Antigravity docs](https://antigravity.google/docs/gcli-migration)).+Google's Antigravity CLI (`agy`). Pairs with Google's Antigravity service and runs Gemini-backed models. Multica launches it with `agy -p`, the daemon-compatible non-interactive mode; current Antigravity CLI releases can execute tools from that mode, while `agy -i` requires an attached TTY. Session resumption works through `--conversation <id>`, captured by the daemon from the CLI log file. Model selection is managed inside the Antigravity CLI itself — Multica disables the per-agent model picker for this provider. Skills are written to `.agents/skills/` (the CLI inherits Gemini CLI's workspace skill layout — see [Antigravity docs](https://antigravity.google/docs/gcli-migration)).| | ||---|---|| Daemon looks for | `agy` || Install | Follow the official guide at [antigravity.google/docs/cli-overview](https://antigravity.google/docs/cli-overview). The CLI ships pre-built — run `agy install` once to wire up PATH and shell aliases. || Authentication | Run `agy` once interactively and complete the Google account login, or sign in via the Antigravity desktop app — the CLI reuses the keyring entry the GUI writes. |-| Notes | The CLI emits plain assistant text on stdout, not a structured event stream; intermediate "I will run X" lines and the final reply are both relayed to Multica as text. |+| Notes | The CLI emits plain assistant text on stdout, not a structured event stream; intermediate "I will run X" lines and the final reply are both relayed to Multica as text, and per-tool telemetry is not available today. |## After installingdiff --git a/apps/docs/content/docs/install-agent-runtime.zh.mdx b/apps/docs/content/docs/install-agent-runtime.zh.mdxindex 6b07adede2..8847d12388 100644--- a/apps/docs/content/docs/install-agent-runtime.zh.mdx+++ b/apps/docs/content/docs/install-agent-runtime.zh.mdx@@ -159,14 +159,14 @@ ACP 协议 agent(和 Kimi 共享传输层)。会话续接可用,MCP 配置### Antigravity(Google)-Google 的 Antigravity CLI(`agy`)。搭配 Google Antigravity 服务,默认走 Gemini 系列模型。会话续接通过 `--conversation <id>` 工作——守护进程从 CLI 的日志文件里抓取 conversation UUID。模型选择保存在 Antigravity CLI 自己的设置里——Multica 里这款工具的「模型」选择项被禁用。Skill 文件写入 `.agents/skills/`(CLI 沿用 Gemini CLI 的 workspace 布局——见 [Antigravity 文档](https://antigravity.google/docs/gcli-migration))。+Google 的 Antigravity CLI(`agy`)。搭配 Google Antigravity 服务,默认走 Gemini 系列模型。Multica 使用 `agy -p` 启动它,这是适合 daemon 后台任务的一次性非交互模式;当前 Antigravity CLI 在这个模式下仍可执行工具,而 `agy -i` 需要连接 TTY,不适合 daemon 驱动。会话续接通过 `--conversation <id>` 工作——守护进程从 CLI 的日志文件里抓取 conversation UUID。模型选择保存在 Antigravity CLI 自己的设置里——Multica 里这款工具的「模型」选择项被禁用。Skill 文件写入 `.agents/skills/`(CLI 沿用 Gemini CLI 的 workspace 布局——见 [Antigravity 文档](https://antigravity.google/docs/gcli-migration))。| | ||---|---|| 守护进程扫描 | `agy` || 安装 | 看官方指引 [antigravity.google/docs/cli-overview](https://antigravity.google/docs/cli-overview)。CLI 是预编译的,跑一次 `agy install` 配好 PATH 和 shell 别名即可。 || 认证 | 交互式跑一次 `agy` 走 Google 账号登录流程;或者通过 Antigravity 桌面端登录——CLI 会复用 GUI 写入 keyring 的凭据。 |-| 备注 | CLI 的 stdout 是纯文本,不是结构化事件流;中间的 "I will run X" 思考过程和最终回复都会作为 text 消息送回 Multica。 |+| 备注 | CLI 的 stdout 是纯文本,不是结构化事件流;中间的 "I will run X" 过程和最终回复都会作为 text 消息送回 Multica,目前无法展示 Antigravity 的逐工具 telemetry。 |## 装完之后diff --git a/apps/docs/content/docs/providers.mdx b/apps/docs/content/docs/providers.mdxindex 82b220092b..67492dda9d 100644--- a/apps/docs/content/docs/providers.mdx+++ b/apps/docs/content/docs/providers.mdx@@ -31,7 +31,7 @@ For guidance on picking a tool when creating an agent, see [Creating and configu### Antigravity-From Google. CLI binary name is `agy`. Pairs with Google's Antigravity service and ships with a Gemini-backed default model. **Session resumption works** via `--conversation <id>`; the daemon captures the conversation UUID from the CLI's log file because stdout is plain text rather than a structured event stream. **Model selection works** via the `--model` flag (added in agy 1.0.6): the daemon enumerates the catalog with `agy models` and ships the chosen value verbatim. Note these are human display strings such as `Claude Opus 4.6 (Thinking)`, not `provider/model` slugs — and agy silently no-ops on a value it doesn't recognise, so prefer picking from the discovered list over typing a custom one. Skills land in `.agents/skills/` (the CLI inherits Gemini CLI's workspace skill layout — see [Antigravity migration docs](https://antigravity.google/docs/gcli-migration)).+From Google. CLI binary name is `agy`. Pairs with Google's Antigravity service and ships with a Gemini-backed default model. Multica launches Antigravity with `agy -p` because that is the daemon-compatible non-interactive mode; `agy -i` needs an attached TTY and is not suitable for background task execution. Current Antigravity CLI releases can still execute tools from this mode, but stdout is plain assistant text rather than a structured event stream, so Multica relays the transcript as text and cannot show per-tool telemetry for Antigravity today. **Session resumption works** via `--conversation <id>`; the daemon captures the conversation UUID from the CLI's log file. **Model selection works** via the `--model` flag (added in agy 1.0.6): the daemon enumerates the catalog with `agy models` and ships the chosen value verbatim. Note these are human display strings such as `Claude Opus 4.6 (Thinking)`, not `provider/model` slugs — and agy silently no-ops on a value it doesn't recognise, so prefer picking from the discovered list over typing a custom one. Skills land in `.agents/skills/` (the CLI inherits Gemini CLI's workspace skill layout — see [Antigravity migration docs](https://antigravity.google/docs/gcli-migration)).### Claude Codediff --git a/apps/docs/content/docs/providers.zh.mdx b/apps/docs/content/docs/providers.zh.mdxindex fec4136931..7cdb1c9191 100644--- a/apps/docs/content/docs/providers.zh.mdx+++ b/apps/docs/content/docs/providers.zh.mdx@@ -31,7 +31,7 @@ Multica 内置支持 **13 款 AI 编程工具**。它们都实现了同一套接### Antigravity-Google 出品。CLI 二进制名为 `agy`,搭配 Google Antigravity 服务,默认走 Gemini 系列模型。**会话恢复真用**——通过 `--conversation <id>`;因为 stdout 是纯文本而非结构化事件流,守护进程从 CLI 的日志文件里抓取 conversation UUID。**模型选择真用**——通过 `--model` flag(agy 1.0.6 新增):守护进程用 `agy models` 枚举可选项,并把选中的值原样传入。注意这些是 `Claude Opus 4.6 (Thinking)` 这样的人类可读显示名,而非 `provider/model` slug;而且 agy 遇到无法识别的值会静默空跑,所以优先从发现列表里挑选,不要手填。Skill 文件写入 `.agents/skills/`(CLI 沿用 Gemini CLI 的 workspace 布局——见 [Antigravity 迁移文档](https://antigravity.google/docs/gcli-migration))。+Google 出品。CLI 二进制名为 `agy`,搭配 Google Antigravity 服务,默认走 Gemini 系列模型。Multica 使用 `agy -p` 启动 Antigravity,因为这是适合 daemon 后台任务的一次性非交互模式;`agy -i` 需要连接 TTY,不适合后台执行。当前 Antigravity CLI 在 `agy -p` 下仍可执行工具,但 stdout 是纯文本而非结构化事件流,所以 Multica 会把 transcript 作为 text 转发,暂时无法展示逐工具 telemetry。**会话恢复真用**——通过 `--conversation <id>`,守护进程从 CLI 的日志文件里抓取 conversation UUID。**模型选择真用**——通过 `--model` flag(agy 1.0.6 新增):守护进程用 `agy models` 枚举可选项,并把选中的值原样传入。注意这些是 `Claude Opus 4.6 (Thinking)` 这样的人类可读显示名,而非 `provider/model` slug;而且 agy 遇到无法识别的值会静默空跑,所以优先从发现列表里挑选,不要手填。Skill 文件写入 `.agents/skills/`(CLI 沿用 Gemini CLI 的 workspace 布局——见 [Antigravity 迁移文档](https://antigravity.google/docs/gcli-migration))。### Claude Codediff --git a/server/pkg/agent/agent.go b/server/pkg/agent/agent.goindex dab2217d4a..c2a5beaccb 100644--- a/server/pkg/agent/agent.go+++ b/server/pkg/agent/agent.go@@ -217,7 +217,7 @@ func DetectVersion(ctx context.Context, executablePath string) (string, error) {// environment variables are deliberately omitted so the string is a hint// about *what* users are extending, not a dump of the full command line.var launchHeaders = map[string]string{- "antigravity": "agy -p (print mode)",+ "antigravity": "agy -p (non-interactive)","claude": "claude (stream-json)","codebuddy": "codebuddy (stream-json)","codex": "codex app-server",diff --git a/server/pkg/agent/agent_test.go b/server/pkg/agent/agent_test.goindex 1c141beaf9..de04ad7e2c 100644--- a/server/pkg/agent/agent_test.go+++ b/server/pkg/agent/agent_test.go@@ -2,6 +2,7 @@ package agentimport ("context"+ "strings""testing""time")@@ -115,6 +116,18 @@ func TestLaunchHeaderCoversAllSupportedBackends(t *testing.T) {}}+func TestLaunchHeaderAntigravityAvoidsTextOnlyPrintModeLabel(t *testing.T) {+ t.Parallel()++ header := LaunchHeader("antigravity")+ if header != "agy -p (non-interactive)" {+ t.Fatalf("unexpected Antigravity launch header: %q", header)+ }+ if strings.Contains(header, "print mode") {+ t.Fatalf("Antigravity launch header must not imply a text-only mode: %q", header)+ }+}+func TestLaunchHeaderReturnsEmptyForUnknownType(t *testing.T) {t.Parallel()if header := LaunchHeader("made-up-agent"); header != "" {diff --git a/server/pkg/agent/antigravity.go b/server/pkg/agent/antigravity.goindex 0dc6c66c73..f26ba20f88 100644--- a/server/pkg/agent/antigravity.go+++ b/server/pkg/agent/antigravity.go@@ -14,12 +14,14 @@ import ()// antigravityBackend implements Backend by spawning Google's Antigravity CLI-// (`agy -p <prompt>`) in non-interactive print mode. Unlike Claude / Codex /-// Cursor / Gemini, the Antigravity CLI does not expose a structured event-// stream — stdout is plain assistant text (intermediate "I will run X" lines-// and the final reply, all interleaved). The backend therefore streams stdout-// line-by-line as `MessageText` events and accumulates the same text as the-// final `Result.Output`.+// with a one-shot prompt (`agy -p <prompt>`). Despite the upstream flag name,+// current agy print mode is still capable of running Antigravity tools; it is+// the daemon-compatible mode because `agy -i` requires an attached TTY. Unlike+// Claude / Codex / Cursor / Gemini, the Antigravity CLI does not expose a+// structured event stream — stdout is plain assistant text (intermediate "I+// will run X" lines and the final reply, all interleaved). The backend+// therefore streams stdout line-by-line as `MessageText` events and accumulates+// the same text as the final `Result.Output`.//// Session resumption uses `--conversation <id>`. The conversation id is not// emitted on stdout; we capture it by routing `--log-file` to a temp file and@@ -154,7 +156,7 @@ func (b *antigravityBackend) Execute(ctx context.Context, prompt string, opts Ex// success the user can't distinguish from a finished task (MUL-3570).finalStatus = "timeout"finalError = fmt.Sprintf(- "agy print mode timed out after %s waiting for the agent response; a long-running command likely outlived --print-timeout",+ "agy --print-timeout elapsed after %s waiting for the agent response; a long-running command likely outlived the print timeout",antigravityPrintTimeout(timeout),)} else if providerErr := antigravityProviderError(logPath); finalStatus == "completed" && providerErr != "" {@@ -270,7 +272,7 @@ var antigravityBlockedArgs = map[string]blockedArgMode{"-p": blockedWithValue,"--print": blockedWithValue,"--prompt": blockedWithValue,- "-i": blockedStandalone, // interactive mode would block the daemon+ "-i": blockedStandalone, // interactive mode requires a TTY and cannot run under the daemon"--prompt-interactive": blockedStandalone,"-c": blockedStandalone, // resume via --conversation, not --continue"--continue": blockedStandalone,@@ -281,7 +283,8 @@ var antigravityBlockedArgs = map[string]blockedArgMode{"--log-file": blockedWithValue, // daemon needs it for session capture}-// buildAntigravityArgs assembles the argv for a one-shot agy invocation.+// buildAntigravityArgs assembles the argv for a daemon-compatible one-shot agy+// invocation.//// agy -p <prompt> --dangerously-skip-permissions [--model <display name>]// --print-timeout <duration> --log-file <tmp>diff --git a/server/pkg/agent/antigravity_test.go b/server/pkg/agent/antigravity_test.goindex d4e4b96970..36f98991b4 100644--- a/server/pkg/agent/antigravity_test.go+++ b/server/pkg/agent/antigravity_test.go@@ -219,6 +219,8 @@ func TestBuildAntigravityArgsFiltersBlockedCustomArgs(t *testing.T) {// resume-aware operation.CustomArgs: []string{"-p", "hijacked-prompt",+ "-i",+ "--prompt-interactive","--continue","-c","--conversation", "bad-id",@@ -247,6 +249,9 @@ func TestBuildAntigravityArgsFiltersBlockedCustomArgs(t *testing.T) {if strings.Contains(joined, "hijacked-prompt") {t.Errorf("custom -p value leaked through filter: %v", args)}+ if strings.Contains(joined, "-i") || strings.Contains(joined, "--prompt-interactive") {+ t.Errorf("interactive-mode flags leaked through filter: %v", args)+ }if strings.Contains(joined, "bad-id") {t.Errorf("custom --conversation value leaked through filter: %v", args)}@@ -389,8 +394,8 @@ func TestAntigravityBackendPrintTimeoutSurfacesAsTimeout(t *testing.T) {if result.Status != "timeout" {t.Fatalf("expected status=timeout, got %q (error=%q)", result.Status, result.Error)}- if !strings.Contains(result.Error, "print mode timed out") {- t.Errorf("expected error to explain the print-mode timeout, got %q", result.Error)+ if !strings.Contains(result.Error, "agy --print-timeout elapsed") {+ t.Errorf("expected error to explain the agy print timeout, got %q", result.Error)}// Narration streamed before the cut-off must still reach the result so// the user sees how far the turn got.