Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): schedule_task can switch an existing task to fresh sessions #31649

ClosedMarcoDotIO(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/31649/headopened View on GitHub

Showing 2 changed files with 51 additions and 1 deletion.

x
0 of 2 viewed, 2 left
2 additions and 1 deletionapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -101,7 +101,7 @@
{ refused: "schedule tasks in this environment" },
McpToolAccess.writes(
- ({ scheduledTaskId, prompt, title, schedule, enabled, bindToCurrentThread }) =>
+ ({ scheduledTaskId, prompt, title, schedule, enabled, bindToCurrentThread, freshSession }) =>
Effect.gen(function* () {
if (scheduledTaskId === undefined) return yield* Effect.die("unreachable");
const scope = yield* McpInvocationContext.McpInvocationContext;
@@ -113,6 +113,7 @@
schedule,
enabled,
bindToCurrentThread,
+ freshSession,
});
}),
49 additions and 0 deletionsapps/server/src/mcp/toolkits/core.test.tsModified
View file
@@ -20,6 +20,7 @@
TurnItemId,
type OrchestrationV2ProjectedTurnItem,
type OrchestrationV2ThreadShell,
+ type ScheduledTaskUpsertInput,
} from "@t3tools/contracts";
import * as McpProviderSessions from "@t3tools/provider-core/server/McpProviderSessions";
import * as Deferred from "effect/Deferred";