Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity accepts t3_background_wait for its own background commands #39421

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/39421/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 42 additions and 0 deletions.

x
0 of 2 viewed, 2 left
19 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.tsModified
View file
@@ -1462,6 +1462,25 @@
}).pipe(Effect.provide(layerSession)),
+ // agy names its background commands `<session>/task-<n>`; the agent passes that to
+ // t3_background_wait, which must not fail since the adapter already holds the run open.
+ it.effect("accepts t3_background_wait for a command it already tracks", () =>
+ Effect.gen(function* () {
+ const { session, providerThread, startTurn, throughPromptSettled } =
+ yield* openSessionWithRunningCommand({ WaitMsBeforeAsync: 10000 });
+ yield* startTurn(1, false);
+ yield* throughPromptSettled;
+ const taskIds = ["mock-session-1/task-2"];
+ assert.isDefined(session.awaitBackgroundTasks, "t3_background_wait must not be unsupported");
+ const result = yield* session.awaitBackgroundTasks!({
+ providerThread,
+ taskIds,
+ awaited: true,
+ });
+ assert.deepEqual(result.matched, taskIds);
+ }).pipe(Effect.provide(layerSession)),
+ );
+​
// agy 1.5.11 reads a prompt sent mid-turn as a steer: it answers the running prompt end_turn
// and goes on under the new one. session/cancel would end its running commands and subagents.
it.effect("steers a running prompt with the next one and leaves its work running", () =>
23 additions and 0 deletionspackages/provider-acp/src/server/adapter.tsModified
View file