Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a message sent in Build mode waits for a running Plan turn #48192

OpenAhmadelmacho(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/48192/headopened View on GitHub

Showing 3 changed files with 157 additions and 0 deletions.

x
0 of 3 viewed, 3 left
47 additions and 0 deletionsapps/server/src/orchestration-v2/CommandPolicy.test.tsModified
View file
@@ -38,6 +38,8 @@
const providerThreadId = ProviderThreadId.make("command-policy-provider-thread");
const providerSessionId = ProviderSessionId.make("command-policy-provider-session");
return {
+ thread: { interactionMode: "default" },
+ attempts: [],
runs:
sessionCapabilities === undefined
? []
@@ -269,6 +271,51 @@
});
​
+it.each([
+ ["default", { type: "queue_after_active" }],
+ ["plan", { type: "steer_active", targetRunId: activeRunId }],
+] as const)("resolves a steer into a Plan turn of a thread now in %s mode", (mode, expected) => {
+ const projection = {
+ ...dispatchProjection(baseCapabilities),
+ thread: { interactionMode: mode },
+ attempts: [
+ {
+ id: activeAttemptId,
+ startedModes: { runtimeMode: "full-access", interactionMode: "plan" },
+ },
+ ],
+ } as unknown as OrchestrationV2ThreadProjection;
+ for (const deliveryIntent of ["auto", "steer"] as const) {
+ assert.deepEqual(