diff --git a/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts index 55b313a9d3adc..2234ddddb7b08 100644 --- a/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts @@ -453,74 +453,77 @@ const claudeUnrelatedChildren = [ describe("AcpRegistryAdapterV2", () => { it.effect.each([ - { commandPath: "/root/.local/bin/agy", offers: 1 }, - { commandPath: "C:\\tools\\agy.exe", offers: 1 }, - { commandPath: "/opt/bin/other-agent", offers: 0 }, - ])("continues late output only for agy ($commandPath)", ({ commandPath, offers }) => - Effect.gen(function* () { - const gate = makeProviderReplayGate(["wake"]); - const update = (sessionUpdate: Record) => - claudeFrames.update(CLAUDE_ROOT_SESSION, sessionUpdate); - const session = yield* openClaudeReplaySession( - [ - { - type: "expect_outbound", - frame: { kind: "request", method: "initialize", params: "" }, - }, - { - type: "emit_inbound", - frame: { - kind: "response", - method: "initialize", - result: { - protocolVersion: 1, - agentInfo: { name: "Antigravity ACP Server", version: "1.5.9" }, - agentCapabilities: { loadSession: true }, - authMethods: [], + { commandPath: "/root/.local/bin/agy", version: "1.5.11", offers: 1 }, + { commandPath: "C:\\tools\\agy.exe", version: "1.5.11", offers: 1 }, + { commandPath: "/root/.local/bin/agy", version: "1.5.9", offers: 0 }, + { commandPath: "/opt/bin/other-agent", version: "1.5.11", offers: 0 }, + ])( + "continues late output only for agy >= 1.5.10 ($commandPath, $version)", + ({ commandPath, version, offers }) => + Effect.gen(function* () { + const gate = makeProviderReplayGate(["wake"]); + const update = (sessionUpdate: Record) => + claudeFrames.update(CLAUDE_ROOT_SESSION, sessionUpdate); + const session = yield* openClaudeReplaySession( + [ + { + type: "expect_outbound", + frame: { kind: "request", method: "initialize", params: "" }, + }, + { + type: "emit_inbound", + frame: { + kind: "response", + method: "initialize", + result: { + protocolVersion: 1, + agentInfo: { name: "Antigravity ACP Server", version }, + agentCapabilities: { loadSession: true }, + authMethods: [], + }, }, }, - }, - claudeFrames.open[2], - claudeFrames.open[3], - claudeFrames.prompt(1)[0], - { - type: "emit_inbound", - frame: { - kind: "response", - method: "session/prompt", - result: { stopReason: "end_turn" }, + claudeFrames.open[2], + claudeFrames.open[3], + claudeFrames.prompt(1)[0], + { + type: "emit_inbound", + frame: { + kind: "response", + method: "session/prompt", + result: { stopReason: "end_turn" }, + }, }, - }, - { - ...update({ - sessionUpdate: "agent_message_chunk", - content: { type: "text", text: "Background work finished." }, - }), - label: "wake", - }, - // agy ends each reply with usage_update; this one ends before the continuation run starts. - update({ sessionUpdate: "usage_update", used: 100, size: 1000 }), - claudeMarker("late output received"), - ], - gate, - true, - { source: "local", commandPath, commandArgs: ["acp"] }, - ); - yield* session.runtime.startTurn(session.turnInput(1)); - assert.equal((yield* session.terminal).status, "completed"); - gate.release("wake"); - yield* session.throughMarker("late output received"); - assert.lengthOf(session.offers, offers, "late output must only wake agy"); - if (offers === 0) return; - yield* session.offers[0]!.dispatchIfCurrent!(Effect.void); - yield* session.runtime.startTurn(session.turnInput(2, { continuation: true })); - yield* TestClock.adjust("3 seconds"); - const continued = yield* session.until((event) => event.type === "turn.terminal"); - assert.include(JSON.stringify(continued), "Background work finished."); - const terminal = continued.at(-1)!; - if (terminal.type !== "turn.terminal") throw new Error("Missing continuation terminal"); - assert.equal(terminal.status, "completed"); - }).pipe(Effect.provide(layerTest)), + { + ...update({ + sessionUpdate: "agent_message_chunk", + content: { type: "text", text: "Background work finished." }, + }), + label: "wake", + }, + // agy ends each reply with usage_update; this one ends before the continuation run starts. + update({ sessionUpdate: "usage_update", used: 100, size: 1000 }), + claudeMarker("late output received"), + ], + gate, + true, + { source: "local", commandPath, commandArgs: ["acp"] }, + ); + yield* session.runtime.startTurn(session.turnInput(1)); + assert.equal((yield* session.terminal).status, "completed"); + gate.release("wake"); + yield* session.throughMarker("late output received"); + assert.lengthOf(session.offers, offers, "late output must only wake agy"); + if (offers === 0) return; + yield* session.offers[0]!.dispatchIfCurrent!(Effect.void); + yield* session.runtime.startTurn(session.turnInput(2, { continuation: true })); + yield* TestClock.adjust("3 seconds"); + const continued = yield* session.until((event) => event.type === "turn.terminal"); + assert.include(JSON.stringify(continued), "Background work finished."); + const terminal = continued.at(-1)!; + if (terminal.type !== "turn.terminal") throw new Error("Missing continuation terminal"); + assert.equal(terminal.status, "completed"); + }).pipe(Effect.provide(layerTest)), ); it.effect.each(["approval-required", "full-access"] as const)( @@ -541,7 +544,7 @@ describe("AcpRegistryAdapterV2", () => { method: "initialize", result: { protocolVersion: 1, - agentInfo: { name: "Antigravity ACP Server", version: "1.5.9" }, + agentInfo: { name: "Antigravity ACP Server", version: "1.5.11" }, agentCapabilities: { loadSession: true }, authMethods: [], }, diff --git a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts index fca472c6c433e..f821ddef271a8 100644 --- a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts @@ -1004,6 +1004,7 @@ const openSessionWithRunningCommand = Effect.fn("openSessionWithRunningCommand") options?: { readonly profileDirectory?: string; readonly initialToolCalls?: ReadonlyArray; + readonly agentVersion?: string; }, ) { const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; @@ -1055,7 +1056,7 @@ const openSessionWithRunningCommand = Effect.fn("openSessionWithRunningCommand") cwd: input.cwd, env: { T3_ACP_ANTIGRAVITY: "1", - ...(steering === undefined ? {} : { T3_ACP_AGENT_VERSION: steering.agentVersion }), + T3_ACP_AGENT_VERSION: steering?.agentVersion ?? options?.agentVersion ?? "1.5.11", }, }, }).pipe( @@ -1349,6 +1350,24 @@ describe("AntigravityAdapterV2 work after the prompt ends", () => { }).pipe(Effect.provide(layerSession)), ); + // agy below 1.5.10 exits its conversation update stream on end_turn and never emits a + // post-prompt completion for a backgrounded command, so holding the turn open would hang. + it.effect("completes the run on end_turn when agy below 1.5.10 leaves a command running", () => + Effect.gen(function* () { + const { offers, startTurn, until } = yield* openSessionWithRunningCommand( + { WaitMsBeforeAsync: 10000 }, + undefined, + undefined, + { agentVersion: "1.5.9" }, + ); + yield* startTurn(1, false); + const run = yield* until((event) => event.type === "turn.terminal"); + const terminal = run.at(-1); + assert.equal(terminal?.type === "turn.terminal" && terminal.status, "completed"); + assert.lengthOf(offers, 0); + }).pipe(Effect.provide(layerSession)), + ); + // Command 2 finishes during reply 1; agy dequeues command 2 after reply 1's usage_update and // needs >3 s before streaming reply 2. Wait for reply 2 (bounded by the 2-minute quiet limit), // but still finalize at 3 s when both commands were batched into reply 1. diff --git a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts index 3f629c813b615..5c3b255de96c2 100644 --- a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts @@ -25,6 +25,7 @@ import { antigravityPermissionMode, antigravityRuntimeModeForSessionMode, antigravitySteersWithPrompt, + antigravityStreamsAfterPrompt, applyAntigravityAcpModelSelection, buildAntigravityPrompt, type AntigravityAcpRuntimeInput, @@ -237,10 +238,11 @@ export function makeAntigravityAcpAdapterFlavor( ), // Loading history replays tool calls; resume avoids replay. subagentsIdleOnTurnCompletion: true, - // A finished background command or timer wakes the agent with no prompt open: it streams a - // reply and asks for permissions, and no prompt response ever ends that reply. - enablePostSettleContinuation: true, - deferFinalizeForBackgroundWork: true, + // From agy 1.5.10, a finished background command or timer wakes the agent with no prompt open: + // it streams a reply and asks for permissions, and no prompt response ever ends that reply. + // Earlier 1.5 releases close their update stream on end_turn, so deferring finalize would hang. + enablePostSettleContinuation: antigravityStreamsAfterPrompt, + deferFinalizeForBackgroundWork: antigravityStreamsAfterPrompt, wakeOnDetachedRequest: true, replyEndsWithUsageUpdate: true, toolOutlivesPrompt: antigravityToolOutlivesPrompt, diff --git a/apps/server/src/provider/AntigravityInstallation.test.ts b/apps/server/src/provider/AntigravityInstallation.test.ts index 5dcd840991f83..ac2656e518813 100644 --- a/apps/server/src/provider/AntigravityInstallation.test.ts +++ b/apps/server/src/provider/AntigravityInstallation.test.ts @@ -28,8 +28,8 @@ import { type AntigravityCliReleaseAsset } from "./antigravityCliRelease.ts"; const serverContents = "antigravity runtime\n"; const previousReleaseId = "1".repeat(64); -const previousVersion = "1.5.3"; -const assetVersion = "1.5.5"; +const previousVersion = "1.5.10"; +const assetVersion = "1.5.11"; const encodeJsonString = Schema.encodeSync(Schema.fromJsonString(Schema.Unknown)); // One regular member, `antigravity`, holding serverContents. const cliTarball = Buffer.from( @@ -200,7 +200,7 @@ const makeHarness = Effect.fn("test.makeAntigravityInstallation")(function* ( if (request.url.includes("/manifests/")) { return Effect.gen(function* () { yield* options.beforeManifest ?? Effect.void; - const version = options.nativeVersion ?? "1.5.7"; + const version = options.nativeVersion ?? "1.5.13"; const folder = platform === "win32" ? "windows-x64" : "linux-x64"; const manifest = { version, @@ -302,11 +302,11 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* installation.start; expect(yield* terminalState(installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); yield* Deferred.await(stagingReleased); const resolved = yield* installation.resolve(); - expect(resolved).toMatchObject({ source: "managed", version: "1.5.7" }); + expect(resolved).toMatchObject({ source: "managed", version: "1.5.13" }); expect(validations).toHaveLength(1); expect(yield* fs.exists(legacyDirectory)).toBe(false); expect(yield* fs.readFileString(resolved.executablePath)).toBe(serverContents); @@ -316,7 +316,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst native: true, archive, platform, - nativeVersion: "1.5.6", + nativeVersion: "1.5.12", }); expect(yield* restarted.installation.start).toMatchObject({ phase: "verifying", @@ -324,7 +324,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst }); expect(yield* terminalState(restarted.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); expect(restarted.requests.filter((url) => url.includes("storage.googleapis.com"))).toEqual( [], @@ -372,7 +372,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* installation.checkForUpdate; if (enabled) { yield* installation.changes.pipe( - Stream.filter((value) => value.version === "1.5.7"), + Stream.filter((value) => value.version === "1.5.13"), Stream.runHead, ); yield* installation.state; @@ -397,7 +397,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst { driver: "antigravity", t3CodeRange: ">=0.0.42", - ranges: [{ range: ">=1.5.7", status: "broken" }], + ranges: [{ range: ">=1.5.13", status: "broken" }], }, ], } satisfies ModelManifest.ModelManifestData) @@ -437,20 +437,20 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst const recovery = yield* makeHarness({ baseDir: first.baseDir, native: true, - nativeVersion: "1.5.6", + nativeVersion: "1.5.12", archive: Buffer.from("recovery runtime"), platform: "win32", manifest, }); yield* recovery.installation.checkForUpdate; expect(yield* recovery.installation.state).toMatchObject({ - installedVersion: "1.5.7", - version: "1.5.6", + installedVersion: "1.5.13", + version: "1.5.12", }); yield* recovery.installation.start; expect(yield* terminalState(recovery.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.6", + installedVersion: "1.5.12", }); }), ); @@ -468,21 +468,21 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst const next = yield* makeHarness({ baseDir: first.baseDir, native: true, - nativeVersion: "1.5.8", + nativeVersion: "1.5.14", archive: Buffer.from("next runtime"), platform: "win32", }); yield* next.installation.start; expect(yield* terminalState(next.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.8", + installedVersion: "1.5.14", }); const nextPath = (yield* next.installation.resolve()).executablePath; expect(nextPath).not.toBe(initialPath); const republished = yield* makeHarness({ baseDir: first.baseDir, native: true, - nativeVersion: "1.5.8", + nativeVersion: "1.5.14", archive: Buffer.from("republished runtime"), platform: "win32", }); @@ -499,7 +499,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* offline.installation.start; expect(yield* terminalState(offline.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.8", + installedVersion: "1.5.14", }); expect(offline.requests.filter((url) => url.includes("storage.googleapis.com"))).toEqual([]); }), @@ -532,7 +532,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst const result = yield* Effect.result(installation.start); // Without an acceptable release, start re-verifies the installed one. if (result._tag === "Success") yield* terminalState(installation); - expect(validations.map(({ version }) => version)).not.toContain("1.5.7"); + expect(validations.map(({ version }) => version)).not.toContain("1.5.13"); expect(requests.some((url) => url.startsWith("https://example.com"))).toBe(false); yield* expectPreviousRelease(installation); }), @@ -1108,7 +1108,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst expect((yield* terminalState(installation)).phase).toBe("succeeded"); yield* Deferred.await(stagingReleased); const current = yield* installation.resolve(); - expect(current.version).toBe("1.5.7"); + expect(current.version).toBe("1.5.13"); expect(current.executablePath).not.toBe(oldExecutable.executablePath); expect(yield* fs.readFileString(oldExecutable.executablePath)).toBe(serverContents); expect(yield* installation.remove().pipe(Effect.flip)).toMatchObject({ operation: "remove" }); @@ -1315,7 +1315,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* installation.start; expect(yield* terminalState(installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); yield* Deferred.await(stagingReleased); @@ -1341,7 +1341,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst const relocked = yield* makeHarness({ baseDir, native: true }); expect(yield* relocked.installation.state).toMatchObject({ phase: "idle", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); expect((yield* fs.stat(releaseDir)).mode & 0o777).toBe(0o500); expect((yield* fs.stat(installed.executablePath)).mode & 0o777).toBe(0o555); @@ -1371,12 +1371,12 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* restarted.installation.start; expect(yield* terminalState(restarted.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); yield* Deferred.await(restarted.stagingReleased); const repaired = yield* restarted.installation.resolve(); - expect(repaired.version).toBe("1.5.7"); + expect(repaired.version).toBe("1.5.13"); expect(yield* fs.readFileString(repaired.executablePath)).toBe(serverContents); if (hostPlatform !== "win32") { expect((yield* fs.stat(releaseDir)).mode & 0o777).toBe(0o500); @@ -1491,7 +1491,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* unreadableRecord.installation.start; expect(yield* terminalState(unreadableRecord.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); yield* Deferred.await(unreadableRecord.stagingReleased); } @@ -1510,7 +1510,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst yield* repairedFromFile.installation.start; expect(yield* terminalState(repairedFromFile.installation)).toMatchObject({ phase: "succeeded", - installedVersion: "1.5.7", + installedVersion: "1.5.13", }); yield* Deferred.await(repairedFromFile.stagingReleased); expect(yield* fs.readFileString(installed.executablePath)).toBe(serverContents); @@ -1600,13 +1600,13 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst expect(acquired).toMatchObject({ source: "override", executablePath: installed.executablePath, - version: "1.5.7", + version: "1.5.13", }); if (symlinkResolveFiber !== null) { expect(yield* Fiber.join(symlinkResolveFiber)).toMatchObject({ source: "override", executablePath: installed.executablePath, - version: "1.5.7", + version: "1.5.13", }); } expect(yield* fs.readFileString(acquired.executablePath)).toBe(serverContents); @@ -1638,7 +1638,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst path.join(outsideReleaseDir, ".install-complete.json"), encodeJsonString({ releaseId: path.basename(releaseDir), - version: "1.5.7", + version: "1.5.13", executable: { name: executableName, bytes: Buffer.byteLength(serverContents) }, }), ); diff --git a/apps/server/src/provider/acp/AntigravityAcpSupport.test.ts b/apps/server/src/provider/acp/AntigravityAcpSupport.test.ts index 05f12ec278fd9..7d5bbe2a551b0 100644 --- a/apps/server/src/provider/acp/AntigravityAcpSupport.test.ts +++ b/apps/server/src/provider/acp/AntigravityAcpSupport.test.ts @@ -19,6 +19,7 @@ import { antigravityPermissionDisposition, antigravitySessionMeta, antigravitySessionMode, + antigravityStreamsAfterPrompt, buildAntigravityPrompt, } from "./AntigravityAcpSupport.ts"; @@ -60,14 +61,17 @@ function makeModelRuntime( describe("Antigravity release gates", () => { it.each([ - { version: "1.5.0", ownName: false, advertisedAppend: false }, - { version: "1.5.1", ownName: true, advertisedAppend: false }, - { version: "1.5.7", ownName: true, advertisedAppend: true }, - { version: undefined, ownName: false, advertisedAppend: false }, - { version: "unknown", ownName: false, advertisedAppend: false }, + { version: "1.5.0", ownName: false, advertisedAppend: false, streamsAfterPrompt: false }, + { version: "1.5.1", ownName: true, advertisedAppend: false, streamsAfterPrompt: false }, + { version: "1.5.7", ownName: true, advertisedAppend: true, streamsAfterPrompt: false }, + { version: "1.5.9", ownName: true, advertisedAppend: true, streamsAfterPrompt: false }, + { version: "1.5.10", ownName: true, advertisedAppend: true, streamsAfterPrompt: true }, + { version: "1.5.11", ownName: true, advertisedAppend: true, streamsAfterPrompt: true }, + { version: undefined, ownName: false, advertisedAppend: false, streamsAfterPrompt: false }, + { version: "unknown", ownName: false, advertisedAppend: false, streamsAfterPrompt: false }, ])( - "$version: advertised system append $advertisedAppend, own client name $ownName", - ({ version, ownName, advertisedAppend }) => { + "$version: advertised system append $advertisedAppend, own client name $ownName, post-prompt stream $streamsAfterPrompt", + ({ version, ownName, advertisedAppend, streamsAfterPrompt }) => { const initialize = { protocolVersion: 1, ...(advertisedAppend @@ -85,6 +89,7 @@ describe("Antigravity release gates", () => { : undefined, ); expect(antigravityClientInfo(version).name).toBe(ownName ? "t3-code" : "zed"); + expect(antigravityStreamsAfterPrompt(initialize)).toBe(streamsAfterPrompt); }, ); }); diff --git a/apps/server/src/provider/acp/AntigravityAcpSupport.ts b/apps/server/src/provider/acp/AntigravityAcpSupport.ts index 7434e23b5eda9..8a1ffc6806aad 100644 --- a/apps/server/src/provider/acp/AntigravityAcpSupport.ts +++ b/apps/server/src/provider/acp/AntigravityAcpSupport.ts @@ -73,6 +73,9 @@ function compareVersions(left: ReadonlyArray, right: ReadonlyArray= 0; }; +export const antigravityStreamsAfterPrompt = ( + initializeResult: EffectAcpSchema.InitializeResponse, +) => { + const parsed = parseAntigravityVersion(initializeResult.agentInfo?.version); + return parsed !== undefined && compareVersions(parsed, POST_PROMPT_STREAM_RELEASE) >= 0; +}; + export const antigravityAppendsSystemPrompt = ( initializeResult: EffectAcpSchema.InitializeResponse, ) => { diff --git a/apps/server/src/provider/model-manifest.json b/apps/server/src/provider/model-manifest.json index 09dcf0f752448..d78b0c8ab43d2 100644 --- a/apps/server/src/provider/model-manifest.json +++ b/apps/server/src/provider/model-manifest.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-11-20T23:50:00Z", + "updatedAt": "2026-11-21T10:00:00Z", "compatibility": [ { "driver": "codex", @@ -92,7 +92,8 @@ "versionPattern": "^(?:agy_acp_server_)?(\\d+\\.\\d+\\.\\d+)(?:-[0-9A-Za-z.-]+)?$", "recommendedRange": ">=1.5.12 <2", "ranges": [ - { "range": ">=1.5.0 <2", "status": "supported" }, + { "range": ">=1.5.10 <2", "status": "supported" }, + { "range": ">=1.5.0 <1.5.10", "status": "unsupported" }, { "range": "<1.5.0", "status": "broken" } ] }, diff --git a/apps/server/src/provider/providerCompatibility.test.ts b/apps/server/src/provider/providerCompatibility.test.ts index 83947bedf9213..f151e85c7657a 100644 --- a/apps/server/src/provider/providerCompatibility.test.ts +++ b/apps/server/src/provider/providerCompatibility.test.ts @@ -143,9 +143,16 @@ describe("provider compatibility", () => { const advisory = resolveProviderCompatibility(policies, antigravity, version); assert.strictEqual(advisory?.status, "broken", version); } - const supported = resolveProviderCompatibility(policies, antigravity, "1.5.11"); - assert.strictEqual(supported?.status, "supported"); - assert.strictEqual(supported?.recommendedRange, ">=1.5.12 <2"); + for (const version of ["1.5.0", "1.5.7", "1.5.9"]) { + const advisory = resolveProviderCompatibility(policies, antigravity, version); + assert.strictEqual(advisory?.status, "unsupported", version); + assert.strictEqual(advisory?.recommendedRange, ">=1.5.12 <2", version); + } + for (const version of ["1.5.10", "1.5.11"]) { + const supported = resolveProviderCompatibility(policies, antigravity, version); + assert.strictEqual(supported?.status, "supported", version); + assert.strictEqual(supported?.recommendedRange, ">=1.5.12 <2", version); + } // Stable releases before 0.1.10 cannot install the CLI, so they keep the policy they shipped with. assert.strictEqual( resolveProviderCompatibility(policies, antigravity, "1.4.5", "0.1.9")?.status, diff --git a/packages/provider-acp-registry/src/server/adapter.ts b/packages/provider-acp-registry/src/server/adapter.ts index 8eb5dbb30b8cc..46d50855f89c7 100644 --- a/packages/provider-acp-registry/src/server/adapter.ts +++ b/packages/provider-acp-registry/src/server/adapter.ts @@ -22,6 +22,7 @@ import { import { prefersHttpMcpTransport } from "./mcpTransport.ts"; import { defaultInstanceIdForDriver, ProviderDriverKind } from "@t3tools/contracts"; import { readCustomModelEntries } from "@t3tools/shared/model"; +import { satisfiesSemverRange } from "@t3tools/shared/semver"; import { AcpRegistrySettings } from "../settings.ts"; import * as HostProcess from "@t3tools/shared/HostProcess"; import { resolveSelfInvocation, type SelfInvocation } from "@t3tools/shared/nodeRuntime"; @@ -186,6 +187,15 @@ const isHermes = ( initializeResult: AcpSessionRuntime.AcpSessionRuntimeStartResult["initializeResult"], ) => initializeResult.agentInfo?.name === "hermes-agent"; +// agy 1.5.10 keeps its conversation update stream open after session/prompt returns; earlier +// 1.5 releases close the stream on end_turn and never send post-prompt completions. +const isAntigravityPostPromptStreamRelease = ( + initializeResult: AcpSessionRuntime.AcpSessionRuntimeStartResult["initializeResult"], +) => { + const version = initializeResult.agentInfo?.version?.trim() ?? ""; + return version.length > 0 && satisfiesSemverRange(version, ">=1.5.10"); +}; + export const makeAcpRegistryAdapterV2 = Effect.fn("makeAcpRegistryAdapterV2")(function* ( options: AcpRegistryAdapterV2Options, ) { @@ -313,9 +323,11 @@ export const makeAcpRegistryAdapterV2 = Effect.fn("makeAcpRegistryAdapterV2")(fu // Hermes is not in the public registry and may run through a wrapper, so only its // initialize reply identifies it. agy does the same and is known by its command. enablePostSettleContinuation: (initializeResult) => - isAntigravityCli || isHermes(initializeResult), + (isAntigravityCli && isAntigravityPostPromptStreamRelease(initializeResult)) || + isHermes(initializeResult), deferFinalizeForBackgroundWork: (initializeResult) => - isAntigravityCli || isHermes(initializeResult), + (isAntigravityCli && isAntigravityPostPromptStreamRelease(initializeResult)) || + isHermes(initializeResult), ...(isDevin ? { clientCapabilitiesMeta: {