Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): hand a thread off to a linked environment #16751

Closedjuliusmarmingewants to merge 1 commit intot3code/peer/handoff-git fromt3code/peer/handoffopened View on GitHub

Showing 31 changed files with 66 additions and 0 deletions (loading 28).

x
0 of 31 viewed, 31 left
4 additions and 0 deletionsapps/server/src/auth/RpcAuthorization.tsModified
View file
@@ -87,6 +87,10 @@
[WS_METHODS.serverGetDatabaseStorage]: AuthOrchestrationReadScope,
[WS_METHODS.serverGetSettings]: AuthOrchestrationReadScope,
[WS_METHODS.peerLinksList]: AuthAccessReadScope,
+ // Moving a thread drives the linked environment through this one's link.
+ [WS_METHODS.threadHandoffOptions]: AuthOrchestrationReadScope,
+ [WS_METHODS.threadHandoffStart]: AuthOrchestrationOperateScope,
+ [WS_METHODS.threadHandoffCancel]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpdateSettings]: AuthSettingsWriteScope,
[WS_METHODS.serverSearchAcpRegistry]: AuthOrchestrationReadScope,
[WS_METHODS.serverPrepareAcpRegistryAgent]: AuthProvidersManageScope,
45 additions and 0 deletionsapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -5,6 +5,7 @@
import * as PeerForwarding from "../../../peer/PeerForwarding.ts";
import * as PeerLinkRequests from "../../../peer/PeerLinkRequests.ts";
import * as PeerLinks from "../../../peer/PeerLinks.ts";
+import * as ThreadHandoff from "../../../peer/handoff/ThreadHandoff.ts";
import { readCaller } from "../../threadAccess.ts";
import * as McpInvocationContext from "../../McpInvocationContext.ts";
import * as McpToolAccess from "../../McpToolAccess.ts";
@@ -184,6 +185,50 @@
return yield* service.waitForThread(scope, input);
}),
+ t3_thread_handoff: McpToolAccess.writesThreads(
+ (input) => [input.threadId],