diff --git a/packages/paperclip-runner/runner/crates/runner-core/src/acpx_sidecar_transport.rs b/packages/paperclip-runner/runner/crates/runner-core/src/acpx_sidecar_transport.rs index 4f17698dc90..e51725e5156 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/src/acpx_sidecar_transport.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/src/acpx_sidecar_transport.rs @@ -1293,10 +1293,11 @@ pub(crate) const ANTIGRAVITY_SAVED_STATE_INCOMPATIBLE: &str = const SIDECAR_REJECTION_MESSAGE_CHARS: usize = 512; -/// The sidecar's own code and, when it sent no typed provider cause, its -/// (sidecar-redacted) message, for operators reading the failed command. The -/// rejection text itself stays closed; a provider cause travels only in -/// `providerFailure`, so its message is never copied here. +/// The sidecar's own code and its (sidecar-redacted) message, for operators +/// reading the failed command. The rejection text itself stays closed; a +/// provider cause travels only in `providerFailure`, so its message is never +/// copied here. A sidecar message that differs from that cause is operator +/// detail (for example the models a provider offered) and is kept. fn sidecar_rejection_detail(command: &str, error: &ResponseError) -> Value { let code = if !error.code.is_empty() && error.code.len() <= 96 @@ -1310,7 +1311,9 @@ fn sidecar_rejection_detail(command: &str, error: &ResponseError) -> Value { "invalid_code" }; let mut detail = json!({ "command": command, "code": code }); - if validated_provider_failure(error.provider_failure.clone()).is_none() { + let cause_message = validated_provider_failure(error.provider_failure.clone()) + .and_then(|cause| cause.get("message").and_then(Value::as_str).map(str::to_owned)); + if cause_message.as_deref() != Some(error.message.as_str()) { let message: String = crate::durable::redact_sensitive_text_values(&error.message) .chars() .filter(|character| { diff --git a/packages/paperclip-runner/runner/crates/runner-core/src/bin/fake-acpx-sidecar.rs b/packages/paperclip-runner/runner/crates/runner-core/src/bin/fake-acpx-sidecar.rs index 7ed0270231e..086e2f2e048 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/src/bin/fake-acpx-sidecar.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/src/bin/fake-acpx-sidecar.rs @@ -853,7 +853,7 @@ fn run() -> Result<(), Box> { "remote-error" => { let mut error = json!({ "code": request["params"]["errorCode"].as_str().unwrap_or("Q7Z9"), - "message": "violet-circuit-4821", + "message": request["params"]["errorMessage"].as_str().unwrap_or("violet-circuit-4821"), "retryable": false, }); if let Some(cause) = request["params"].get("providerFailure") { diff --git a/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_sidecar_transport.rs b/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_sidecar_transport.rs index f0045ecfc71..43171e5e53c 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_sidecar_transport.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_sidecar_transport.rs @@ -349,20 +349,35 @@ fn session_open_rejection_keeps_the_sidecar_code_and_reason_outside_the_error_te ) ); } - // A provider cause has its own channel: the sidecar message is not copied. + // A provider cause has its own channel: its message is not copied. let cause = json!({ "schema": "paperclip.provider-failure.v1", "provider": "antigravity", "phase": "startup", "category": "unknown", "message": "Swarm is not available.", "providerCode": "ANTIGRAVITY_SWARM_UNAVAILABLE", "retryability": "unknown" }); let error = sidecar .request( GeneratedAcpxSidecarCommand::SessionOpen, - json!({ "errorCode": "ANTIGRAVITY_SWARM_UNAVAILABLE", "providerFailure": cause }), + json!({ "errorCode": "ANTIGRAVITY_SWARM_UNAVAILABLE", "providerFailure": cause, + "errorMessage": "Swarm is not available." }), + ) + .unwrap_err(); + assert_eq!(error.provider_failure(), Some(cause.clone())); + assert_eq!( + error.sidecar_rejection(), + Some(json!({ "command": "session.open", "code": "ANTIGRAVITY_SWARM_UNAVAILABLE" })) + ); + // Operator detail beside the cause (what the provider offered) is kept for diagnostics. + let error = sidecar + .request( + GeneratedAcpxSidecarCommand::SessionOpen, + json!({ "errorCode": "ANTIGRAVITY_SWARM_UNAVAILABLE", "providerFailure": cause, + "errorMessage": "The Antigravity CLI offered 2 models: gemini-4-argon-low, gemini-3.8-flash-low" }), ) .unwrap_err(); assert_eq!(error.provider_failure(), Some(cause)); assert_eq!( error.sidecar_rejection(), - Some(json!({ "command": "session.open", "code": "ANTIGRAVITY_SWARM_UNAVAILABLE" })) + Some(json!({ "command": "session.open", "code": "ANTIGRAVITY_SWARM_UNAVAILABLE", + "message": "The Antigravity CLI offered 2 models: gemini-4-argon-low, gemini-3.8-flash-low" })) ); sidecar.shutdown().unwrap(); // A code outside the closed identifier shape fails the frame contract and is never echoed. diff --git a/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts b/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts index 8990fffdcd5..051898e6bcd 100644 --- a/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts +++ b/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts @@ -2166,7 +2166,8 @@ describe("qualified ACPX runtime sidecar", () => { open(sidecar, 2, "swarm"); const refused = await sidecar.next(frame => frame.id === 2); expect(refused).toMatchObject({ ok: false, error: { code: "ANTIGRAVITY_SWARM_UNAVAILABLE", retryable: false, - providerFailure: { providerCode: "ANTIGRAVITY_SWARM_UNAVAILABLE", message: expect.stringMatching(/Gemini API key/) } } }); + providerFailure: { provider: "antigravity", message: expect.stringMatching(/Gemini API key/) } } }); + expect(refused.error.providerFailure).not.toHaveProperty("providerCode"); expect(JSON.stringify(refused)).not.toContain("only for Cursor"); // Only the registered provider modes pass the parser; the refusal names its contract. diff --git a/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.ts b/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.ts index 4f51d522793..5509c0ad636 100644 --- a/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.ts +++ b/packages/paperclip-runner/src/cli/acpx-runtime-sidecar.ts @@ -296,7 +296,9 @@ async function receiveLine(line: string): Promise { acpxSidecarErrorCode(normalized), "acpx_sidecar_command_failed", ), - message: safeMessage(normalized), + // Operator detail beside a typed provider cause (the Runner keeps it for diagnostics). + message: typeof normalizedRecord.diagnostic === "string" && normalizedRecord.diagnostic + ? safeText(normalizedRecord.diagnostic) : safeMessage(normalized), retryable: normalizedRecord.retryable === true, ...(request.command === "session.open" && initializedAgent ? { providerFailure: providerFailureFromError(error) ?? acpxProviderFailure(error, initializedAgent, "startup", process.env) ?? undefined } : {}), diff --git a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.test.ts b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.test.ts index 6d9d0dcc96f..44f81214376 100644 --- a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.test.ts @@ -1,11 +1,16 @@ +import { readFileSync } from "node:fs"; import { describe, expect, it } from "vitest"; import { providerFailureFromError } from "../provider-failure.js"; import { AntigravitySwarmError } from "./antigravity-swarm-guard.js"; import { - antigravitySwarmWorkspaceEscape, classifyAntigravityRefusalText, createAntigravitySwarmGuard, + antigravitySwarmModelName, antigravitySwarmWorkspaceEscape, classifyAntigravityRefusalText, createAntigravitySwarmGuard, } from "./antigravity-swarm-guard.js"; const WORKSPACE = "/work/task"; +// Real `session/new` results from the pinned CLI on one paid Google sign-in (2026-11-24). +const fixture = (name: string) => JSON.parse(readFileSync(new URL(`../../../test-fixtures/antigravity-cli/${name}`, import.meta.url), "utf8")) as Record; +const STABLE_ENDPOINT_SESSION = fixture("session-new.stable-endpoint.json"); +const DAILY_ENDPOINT_SESSION = fixture("session-new.daily-endpoint.json"); const INSTRUCTIONS = "Paperclip instructions"; const SESSION = "s-1"; @@ -125,11 +130,65 @@ describe("Antigravity CLI swarm guard (replaces the registry admission receipt)" expect(classifyAntigravityRefusalText("Both files are written.")).toBeNull(); }); - it("carries its plain message to the user as a typed provider failure", () => { + it("carries its plain message to the user as a typed provider failure, without a code", () => { const error = new AntigravitySwarmError("ANTIGRAVITY_SWARM_SIGN_IN_REQUIRED", "The Antigravity CLI on this computer is not signed in to Google."); - expect(providerFailureFromError(new Error("session.open failed", { cause: error }))).toMatchObject({ + const failure = providerFailureFromError(new Error("session.open failed", { cause: error })); + expect(failure).toMatchObject({ provider: "antigravity", phase: "startup", category: "authentication", - message: "The Antigravity CLI on this computer is not signed in to Google.", providerCode: "ANTIGRAVITY_SWARM_SIGN_IN_REQUIRED", + message: "The Antigravity CLI on this computer is not signed in to Google.", + }); + expect(failure).not.toHaveProperty("providerCode"); + expect(new AntigravitySwarmError("ANTIGRAVITY_SWARM_UNAVAILABLE", "x").providerFailure).toMatchObject({ category: "invalid_request", retryability: "requires_action" }); + }); + + describe("model selection against the CLI's real model lists", () => { + const open = (model: string, session: Record) => { + const guard = createAntigravitySwarmGuard({ model, instructions: INSTRUCTIONS, workspace: WORKSPACE }); + guard.initialize(initializeResult()); + guard.sessionRequest(sessionRequest()); + guard.sessionResult(session); + return guard; + }; + + it("refuses Gemini 4 Neon on the stable endpoint in one plain sentence, naming no code, and keeps the offered list for diagnostics", () => { + let refusal: unknown; + try { open("gemini-4-neon-low", STABLE_ENDPOINT_SESSION); } catch (error) { refusal = error; } + expect(refusal).toBeInstanceOf(AntigravitySwarmError); + const error = refusal as AntigravitySwarmError; + expect(error.code).toBe("ANTIGRAVITY_SWARM_UNAVAILABLE"); + expect(error.message).toBe("Swarm is not available with Gemini 4 Neon (Low) yet, so nothing was changed: choose another model for this agent, such as Gemini 4 Argon, and send /swarm again."); + expect(error.message).not.toMatch(/gemini-4-neon|ANTIGRAVITY_|sign-in/); + expect(error.providerFailure).toMatchObject({ category: "model_unavailable", retryability: "requires_action", message: error.message }); + expect(error.providerFailure).not.toHaveProperty("providerCode"); + expect(error.diagnostic).toMatch(/^The Antigravity CLI offered 13 models and not gemini-4-neon-low: gemini-4-argon-medium, /); + expect(error.diagnostic).toContain("gpt-oss-120b-medium"); + }); + + it("admits every Neon level the daily endpoint lists, reading family and thinking level back separately", () => { + for (const [level, cliLevel] of [["low", "low"], ["medium", "medium"], ["high", "high"], ["xhigh", "xhigh"]]) { + const guard = open(`gemini-4-neon-${level}`, DAILY_ENDPOINT_SESSION); + guard.observe({ sessionId: SESSION, update: { sessionUpdate: "current_mode_update", currentModeId: "auto" } }); + guard.bindMode(); + guard.observe(config("gemini-4-neon", cliLevel!)); + guard.bindModel(); + expect(guard.receipt()).toMatchObject({ model: `gemini-4-neon-${level}`, modelFamily: "gemini-4-neon", thoughtLevel: cliLevel, + agentVersion: "1.5.15", modelName: expect.stringMatching(/^Gemini 4 Neon \((Low|Medium|High|XHigh)\)$/) }); + } + }); + + it("admits a model the stable endpoint lists, with the CLI's own name", () => { + const guard = open("gemini-4-argon-low", STABLE_ENDPOINT_SESSION); + guard.observe({ sessionId: SESSION, update: { sessionUpdate: "current_mode_update", currentModeId: "auto" } }); + guard.bindMode(); + guard.observe(config("gemini-4-argon", "low")); + guard.bindModel(); + expect(guard.receipt()).toMatchObject({ modelName: "Gemini 4 Argon (Low)", modelFamily: "gemini-4-argon", thoughtLevel: "low" }); + }); + + it("names a model the CLI does not list in plain words", () => { + expect(antigravitySwarmModelName("gemini-4-neon-xhigh")).toBe("Gemini 4 Neon (Extra high)"); + expect(antigravitySwarmModelName("claude-opus-5-5-high")).toBe("Claude Opus 5.5 (High)"); + expect(antigravitySwarmModelName("gemini-3.8-flash-low")).toBe("Gemini 3.8 Flash (Low)"); }); }); }); diff --git a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.ts b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.ts index f849eac880b..35f0c3a3793 100644 --- a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.ts +++ b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.ts @@ -34,19 +34,74 @@ export type AntigravitySwarmErrorCode = | "ANTIGRAVITY_SWARM_WORKSPACE_ESCAPE" | "ANTIGRAVITY_SWARM_HELPERS_TIMEOUT"; -/** `message` is written for the person who asked for the swarm. */ +const CATEGORY: Record = { + // Each of these needs the person to change something; a plain Retry meets the same refusal. + ANTIGRAVITY_SWARM_UNAVAILABLE: "invalid_request", + ANTIGRAVITY_SWARM_SIGN_IN_REQUIRED: "authentication", + ANTIGRAVITY_SWARM_RECEIPT_MISMATCH: "unknown", + ANTIGRAVITY_SWARM_WORKSPACE_ESCAPE: "unknown", + ANTIGRAVITY_SWARM_HELPERS_TIMEOUT: "timeout", +}; + +/** + * `message` is written for the person who asked for the swarm. `diagnostic` is + * operator evidence (for example the models the CLI offered); it travels as the + * sidecar's rejection message, never in the user's provider failure. + */ export class AntigravitySwarmError extends Error { readonly retryable = false; /** Lets the sidecar hand this plain message to the user instead of a generic open failure. */ readonly providerFailure: ProviderFailure | null; - constructor(readonly code: AntigravitySwarmErrorCode, message: string) { + readonly diagnostic: string | null; + constructor(readonly code: AntigravitySwarmErrorCode, message: string, + options: { category?: ProviderFailure["category"]; diagnostic?: string } = {}) { super(message); this.name = "AntigravitySwarmError"; - this.providerFailure = createProviderFailure({ provider: "antigravity", phase: "startup", message, providerCode: code, - category: code === "ANTIGRAVITY_SWARM_SIGN_IN_REQUIRED" ? "authentication" : code === "ANTIGRAVITY_SWARM_HELPERS_TIMEOUT" ? "timeout" : "unknown" }); + this.diagnostic = options.diagnostic ?? null; + // No providerCode: the code travels as the sidecar error code, and people never see it. + this.providerFailure = createProviderFailure({ provider: "antigravity", phase: "startup", message, + category: options.category ?? CATEGORY[code] }); } } +const LEVEL_NAMES: Record = { + minimal: "Minimal", low: "Low", medium: "Medium", high: "High", xhigh: "Extra high", extra_high: "Extra high", max: "Max", +}; + +/** A readable name for a `-` id the CLI did not list (so it has no name of its own). */ +export function antigravitySwarmModelName(id: string): string { + const cut = id.lastIndexOf("-"); + const level = cut > 0 ? LEVEL_NAMES[id.slice(cut + 1)] : undefined; + const words: string[] = []; + for (const token of (level ? id.slice(0, cut) : id).split("-").filter(Boolean)) { + if (/^\d+$/.test(token) && /^\d+(?:\.\d+)*$/.test(words.at(-1) ?? "")) words[words.length - 1] += `.${token}`; + else words.push(/^[a-z]/.test(token) ? token[0]!.toUpperCase() + token.slice(1) : token); + } + const family = words.join(" "); + return level ? `${family} (${level})` : family; +} + +/** The models a `session/new` result offers, as `{ id, name }`. */ +function offeredModels(value: Json): Array<{ id: string; name: string }> { + const available = record(value.models).availableModels; + return Array.isArray(available) ? available.flatMap(entry => { + const model = record(entry); + return typeof model.modelId === "string" && model.modelId + ? [{ id: model.modelId, name: typeof model.name === "string" && model.name.trim() ? model.name.trim() : antigravitySwarmModelName(model.modelId) }] : []; + }) : []; +} + +/** The CLI's default family, by its own name, as a suggestion. */ +function defaultFamilyName(value: Json): string | null { + const options = record(value).configOptions; + const model = Array.isArray(options) ? options.map(record).find(option => option.id === "model") : undefined; + const choices = Array.isArray(model?.options) ? model.options.map(record) : []; + const current = choices.find(choice => choice.value === model?.currentValue) ?? choices[0]; + return typeof current?.name === "string" && current.name.trim() ? current.name.trim() : null; +} + +const MAX_DIAGNOSTIC_MODELS = 40; + const mismatch = (detail: string): never => { throw new AntigravitySwarmError("ANTIGRAVITY_SWARM_RECEIPT_MISMATCH", `Swarm stopped before it started: ${detail}. Nothing was changed.`); @@ -55,11 +110,14 @@ const mismatch = (detail: string): never => { /** What the driver verified in place of the registry server's admission receipt. */ export interface AntigravitySwarmReceipt { agentName: string; + /** The pinned CLI version the CLI itself reported in `initialize`. */ agentVersion: string; sessionId: string; workspace: string; mode: typeof ANTIGRAVITY_CLI_SESSION_MODE; model: string; + /** The CLI's own name for the confirmed model, for people. */ + modelName: string; modelFamily: string; thoughtLevel: string | null; instructionDigest: string; @@ -99,7 +157,7 @@ export function createAntigravitySwarmGuard(options: AntigravitySwarmGuardOption const instructionDigest = antigravitySwarmInstructionDigest(options.instructions); const state = { agentName: "", agentVersion: "", sessionId: "", modeBound: false, modelBound: false, - selections: new Map(), commands: null as string[] | null, mcpServers: [] as string[], + selections: new Map(), commands: null as string[] | null, mcpServers: [] as string[], modelName: "", }; const assertStable = (next: Map) => { for (const [id, value] of next) { @@ -145,10 +203,19 @@ export function createAntigravitySwarmGuard(options: AntigravitySwarmGuardOption throw new AntigravitySwarmError("ANTIGRAVITY_SWARM_UNAVAILABLE", "Swarm is not available with this Google connection: helpers can only change files in Antigravity's auto mode, which this sign-in does not offer."); } - const available = record(value.models).availableModels; - if (!Array.isArray(available) || !available.some(entry => record(entry).modelId === model)) { - mismatch(`the model ${model} is not offered to this sign-in`); + const offered = offeredModels(value); + const selected = offered.find(entry => entry.id === model); + if (!selected) { + // The CLI lists each model as `-`, the same spelling as the agent's + // model, so a missing entry means the CLI does not serve it (seen live: Google's + // stable endpoint, which this route uses, offers no Gemini 4 Neon). + const suggestion = defaultFamilyName(value); + throw new AntigravitySwarmError("ANTIGRAVITY_SWARM_UNAVAILABLE", + `Swarm is not available with ${antigravitySwarmModelName(model)} yet, so nothing was changed: choose another model for this agent${suggestion ? `, such as ${suggestion},` : ""} and send /swarm again.`, + { category: "model_unavailable", + diagnostic: `The Antigravity CLI offered ${offered.length} models and not ${model}: ${offered.slice(0, MAX_DIAGNOSTIC_MODELS).map(entry => entry.id).join(", ") || "none"}` }); } + state.modelName = selected.name; state.sessionId = value.sessionId as string; assertStable(antigravitySelections(value)); return state.sessionId; @@ -190,7 +257,7 @@ export function createAntigravitySwarmGuard(options: AntigravitySwarmGuardOption const family = state.selections.get("model")!; return { agentName: state.agentName, agentVersion: state.agentVersion, sessionId: state.sessionId, - workspace: options.workspace, mode: ANTIGRAVITY_CLI_SESSION_MODE, model, modelFamily: family, + workspace: options.workspace, mode: ANTIGRAVITY_CLI_SESSION_MODE, model, modelName: state.modelName, modelFamily: family, thoughtLevel: family === model ? null : state.selections.get("thought_level") ?? null, instructionDigest, mcpServers: [...state.mcpServers], }; diff --git a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.test.ts b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.test.ts index 3b3bf422387..ed3a1540307 100644 --- a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.test.ts @@ -87,6 +87,18 @@ describe("Antigravity CLI swarm runtime", () => { await expect(openAntigravitySwarmRuntime(options, { readbackTimeoutMs: 200 })).rejects.toThrow(message); }); + it("refuses a model the CLI does not offer before changing any setting, in plain words, with the offered list for diagnostics", async () => { + const { options, clientMessages } = setup("success", { + profile: { agent: "antigravity", reportedModelId: "gemini-4-neon-low", qualificationModel: "gemini-4-neon-low" } as AcpxRuntimePortOpenOptions["profile"], + }); + const refusal = await openAntigravitySwarmRuntime(options).then(() => null, (error: unknown) => error); + expect(refusal).toMatchObject({ code: "ANTIGRAVITY_SWARM_UNAVAILABLE", + message: "Swarm is not available with Gemini 4 Neon (Low) yet, so nothing was changed: choose another model for this agent and send /swarm again.", + providerFailure: { category: "model_unavailable" } }); + expect((refusal as { diagnostic: string }).diagnostic).toContain("gemini-4-argon-medium, gemini-4-argon-low"); + expect(clientMessages().map(message => message.method)).not.toEqual(expect.arrayContaining(["session/set_mode"])); + }); + it("runs a native swarm whose files land in the task folder, in plain steps, with coordinator-reported usage", async () => { const run = await runTurn("success"); expect(run.result).toMatchObject({ status: "completed" }); @@ -95,6 +107,7 @@ describe("Antigravity CLI swarm runtime", () => { "Started helper writer-a: Write a.txt containing exactly 'A' in the current workspace directory", "Checked on the helpers", "Files changed in the task folder: a.txt, b.txt", ])); + expect(run.titles).toContainEqual(expect.stringMatching(/^Swarm started in the task folder with Gemini 3\.8 Flash \(Low\) \(Antigravity CLI 1\.5\.15\)\. /)); expect(run.titles.some(title => /approved automatically/.test(title))).toBe(true); expect(run.text).not.toContain("/swarm board"); expect(run.clientMessages().find(message => message.method === "session/prompt").params.prompt[0].text).toMatch(/^\/swarm /); diff --git a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.ts b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.ts index 2507bb04fe6..349ee036117 100644 --- a/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.ts +++ b/packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.ts @@ -408,7 +408,7 @@ export async function openAntigravitySwarmRuntime( let transcript = ""; let stop: AntigravitySwarmError | null = null; const halt = (error: AntigravitySwarmError) => { stop ??= error; connection.notify("session/cancel", { sessionId }); wake?.(); }; - events.push(line("setup", `Swarm started in the task folder with ${receipt.model}. Helper changes inside the task folder are approved automatically; anything else is blocked.`)); + events.push(line("setup", `Swarm started in the task folder with ${receipt.modelName} (Antigravity CLI ${receipt.agentVersion}). Helper changes inside the task folder are approved automatically; anything else is blocked.`)); updateListener = params => { try { guard.observe(params); } catch (error) { diff --git a/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.daily-endpoint.json b/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.daily-endpoint.json new file mode 100644 index 00000000000..c3d9c29aaec --- /dev/null +++ b/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.daily-endpoint.json @@ -0,0 +1,230 @@ +{ + "_source": "agy 1.5.15 session/new on https://daily-cloudcode-pa.googleapis.com, paid Google sign-in, probed 2026-11-24 (no account identifiers)", + "sessionId": "s-1", + "modes": { + "currentModeId": "default", + "availableModes": [ + { + "id": "default" + }, + { + "id": "accept-edits" + }, + { + "id": "auto" + }, + { + "id": "plan" + } + ] + }, + "models": { + "currentModelId": "gemini-4-neon-high", + "availableModels": [ + { + "modelId": "gemini-4-neon-high", + "name": "Gemini 4 Neon (High)" + }, + { + "modelId": "gemini-4-neon-xhigh", + "name": "Gemini 4 Neon (XHigh)" + }, + { + "modelId": "gemini-4-neon-medium", + "name": "Gemini 4 Neon (Medium)" + }, + { + "modelId": "gemini-4-neon-low", + "name": "Gemini 4 Neon (Low)" + }, + { + "modelId": "gemini-4-carbon-medium", + "name": "Gemini 4 Carbon (Medium)" + }, + { + "modelId": "gemini-4-carbon-high", + "name": "Gemini 4 Carbon (High)" + }, + { + "modelId": "gemini-4-carbon-low", + "name": "Gemini 4 Carbon (Low)" + }, + { + "modelId": "gemini-4-argon-medium", + "name": "Gemini 4 Argon (Medium)" + }, + { + "modelId": "gemini-4-argon-high", + "name": "Gemini 4 Argon (High)" + }, + { + "modelId": "gemini-4-argon-low", + "name": "Gemini 4 Argon (Low)" + }, + { + "modelId": "gemini-4-hydrogen-high", + "name": "Gemini 4 Hydrogen (High)" + }, + { + "modelId": "gemini-4-hydrogen-xhigh", + "name": "Gemini 4 Hydrogen (XHigh)" + }, + { + "modelId": "gemini-4-hydrogen-medium", + "name": "Gemini 4 Hydrogen (Medium)" + }, + { + "modelId": "gemini-4-hydrogen-low", + "name": "Gemini 4 Hydrogen (Low)" + }, + { + "modelId": "gemini-pro-orchestrator-neon", + "name": "Orchestrator (Neon)" + }, + { + "modelId": "gemini-pro-orchestrator", + "name": "Orchestrator (Carbon)" + }, + { + "modelId": "gemini-pro-orchestrator-argon", + "name": "Orchestrator (Argon)" + }, + { + "modelId": "gemini-3.8-flash-high", + "name": "Gemini 3.8 Flash (High)" + }, + { + "modelId": "gemini-3.8-flash-medium", + "name": "Gemini 3.8 Flash (Medium)" + }, + { + "modelId": "gemini-3.8-flash-low", + "name": "Gemini 3.8 Flash (Low)" + }, + { + "modelId": "claude-opus-5-5-low", + "name": "Claude Opus 5.5 (Low)" + }, + { + "modelId": "claude-opus-5-5-medium", + "name": "Claude Opus 5.5 (Medium)" + }, + { + "modelId": "claude-opus-5-5-high", + "name": "Claude Opus 5.5 (High)" + }, + { + "modelId": "claude-sonnet-5-5-low", + "name": "Claude Sonnet 5.5 (Low)" + }, + { + "modelId": "claude-sonnet-5-5-medium", + "name": "Claude Sonnet 5.5 (Medium)" + }, + { + "modelId": "claude-sonnet-5-5-high", + "name": "Claude Sonnet 5.5 (High)" + }, + { + "modelId": "gpt-oss-120b-medium", + "name": "GPT-OSS 120B (Medium)" + } + ] + }, + "configOptions": [ + { + "id": "model", + "currentValue": "gemini-4-neon", + "options": [ + { + "value": "gemini-4-neon", + "name": "Gemini 4 Neon" + }, + { + "value": "gemini-4-carbon", + "name": "Gemini 4 Carbon" + }, + { + "value": "gemini-4-argon", + "name": "Gemini 4 Argon" + }, + { + "value": "gemini-4-hydrogen", + "name": "Gemini 4 Hydrogen" + }, + { + "value": "gemini-pro-orchestrator-neon", + "name": "Orchestrator (Neon)" + }, + { + "value": "gemini-pro-orchestrator", + "name": "Orchestrator (Carbon)" + }, + { + "value": "gemini-pro-orchestrator-argon", + "name": "Orchestrator (Argon)" + }, + { + "value": "gemini-3.8-flash", + "name": "Gemini 3.8 Flash" + }, + { + "value": "claude-opus-5-5", + "name": "Claude Opus 5.5" + }, + { + "value": "claude-sonnet-5-5", + "name": "Claude Sonnet 5.5" + }, + { + "value": "gpt-oss-120b-medium", + "name": "GPT-OSS 120B (Medium)" + } + ] + }, + { + "id": "thought_level", + "currentValue": "high", + "options": [ + { + "value": "low", + "name": "Low" + }, + { + "value": "medium", + "name": "Medium" + }, + { + "value": "high", + "name": "High" + }, + { + "value": "xhigh", + "name": "Extra" + } + ] + }, + { + "id": "mode", + "currentValue": "default", + "options": [ + { + "value": "default", + "name": "Default" + }, + { + "value": "accept-edits", + "name": "Accept edits" + }, + { + "value": "auto", + "name": "Auto" + }, + { + "value": "plan", + "name": "Plan" + } + ] + } + ] +} diff --git a/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.stable-endpoint.json b/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.stable-endpoint.json new file mode 100644 index 00000000000..12ac4add5e2 --- /dev/null +++ b/packages/paperclip-runner/test-fixtures/antigravity-cli/session-new.stable-endpoint.json @@ -0,0 +1,146 @@ +{ + "_source": "agy 1.5.15 session/new on https://cloudcode-pa.googleapis.com, paid Google sign-in, probed 2026-11-24 (no account identifiers)", + "sessionId": "s-1", + "modes": { + "currentModeId": "default", + "availableModes": [ + { + "id": "default" + }, + { + "id": "accept-edits" + }, + { + "id": "auto" + }, + { + "id": "plan" + } + ] + }, + "models": { + "currentModelId": "gemini-4-argon-medium", + "availableModels": [ + { + "modelId": "gemini-4-argon-medium", + "name": "Gemini 4 Argon (Medium)" + }, + { + "modelId": "gemini-4-argon-high", + "name": "Gemini 4 Argon (High)" + }, + { + "modelId": "gemini-4-argon-low", + "name": "Gemini 4 Argon (Low)" + }, + { + "modelId": "gemini-3.8-flash-high", + "name": "Gemini 3.8 Flash (High)" + }, + { + "modelId": "gemini-3.8-flash-medium", + "name": "Gemini 3.8 Flash (Medium)" + }, + { + "modelId": "gemini-3.8-flash-low", + "name": "Gemini 3.8 Flash (Low)" + }, + { + "modelId": "claude-opus-5-5-low", + "name": "Claude Opus 5.5 (Low)" + }, + { + "modelId": "claude-opus-5-5-medium", + "name": "Claude Opus 5.5 (Medium)" + }, + { + "modelId": "claude-opus-5-5-high", + "name": "Claude Opus 5.5 (High)" + }, + { + "modelId": "claude-sonnet-5-5-low", + "name": "Claude Sonnet 5.5 (Low)" + }, + { + "modelId": "claude-sonnet-5-5-medium", + "name": "Claude Sonnet 5.5 (Medium)" + }, + { + "modelId": "claude-sonnet-5-5-high", + "name": "Claude Sonnet 5.5 (High)" + }, + { + "modelId": "gpt-oss-120b-medium", + "name": "GPT-OSS 120B (Medium)" + } + ] + }, + "configOptions": [ + { + "id": "model", + "currentValue": "gemini-4-argon", + "options": [ + { + "value": "gemini-4-argon", + "name": "Gemini 4 Argon" + }, + { + "value": "gemini-3.8-flash", + "name": "Gemini 3.8 Flash" + }, + { + "value": "claude-opus-5-5", + "name": "Claude Opus 5.5" + }, + { + "value": "claude-sonnet-5-5", + "name": "Claude Sonnet 5.5" + }, + { + "value": "gpt-oss-120b-medium", + "name": "GPT-OSS 120B (Medium)" + } + ] + }, + { + "id": "thought_level", + "currentValue": "medium", + "options": [ + { + "value": "low", + "name": "Low" + }, + { + "value": "medium", + "name": "Medium" + }, + { + "value": "high", + "name": "High" + } + ] + }, + { + "id": "mode", + "currentValue": "default", + "options": [ + { + "value": "default", + "name": "Default" + }, + { + "value": "accept-edits", + "name": "Accept edits" + }, + { + "value": "auto", + "name": "Auto" + }, + { + "value": "plan", + "name": "Plan" + } + ] + } + ] +}