@@ -68,14 +68,12 @@ import {
6868} from "./subagent-announce-origin.js" ;
6969import { resolveRequesterStoreKey } from "./subagent-requester-store-key.js" ;
7070
71- // No resolveGatewayContext: this dispatch is bound to the Gateway instance,
72- // which supplies its own context. The instance runtime forwards a fixed option
73- // allowlist, so a caller-supplied resolver here would be silently ignored.
7471async function runAnnounceAgentCall ( params : {
7572 agentParams : Record < string , unknown > ;
7673 delegatedToolPolicyHandoff ?: SubagentCompletionToolHandoffRegistration ;
7774 expectFinal ?: boolean ;
7875 timeoutMs ?: number ;
76+ resolveGatewayContext ?: import ( "../../../gateway/server-methods/types.js" ) . GatewayContextResolver ;
7977} ) : Promise < unknown > {
8078 return await dispatchSubagentAnnounceAgent ( params . agentParams , {
8179 expectFinal : params . expectFinal ,
@@ -84,6 +82,7 @@ async function runAnnounceAgentCall(params: {
8482 ) ,
8583 delegatedToolPolicyHandoff : params . delegatedToolPolicyHandoff ,
8684 timeoutMs : params . timeoutMs ,
85+ resolveGatewayContext : params . resolveGatewayContext ,
8786 } ) ;
8887}
8988
@@ -108,6 +107,7 @@ export async function sendSubagentAnnounceDirectly(params: {
108107 requesterIsSubagent : boolean ;
109108 onDeliveryResult ?: ( delivery : SubagentAnnounceDeliveryResult ) => void ;
110109 signal ?: AbortSignal ;
110+ resolveGatewayContext ?: import ( "../../../gateway/server-methods/types.js" ) . GatewayContextResolver ;
111111} ) : Promise < SubagentAnnounceDeliveryResult > {
112112 if ( params . signal ?. aborted ) {
113113 return {
@@ -372,6 +372,7 @@ export async function sendSubagentAnnounceDirectly(params: {
372372 : undefined ,
373373 expectFinal : true ,
374374 timeoutMs : announceTimeoutMs ,
375+ resolveGatewayContext : params . resolveGatewayContext ,
375376 } ) ;
376377 } ,
377378 } ) ;
0 commit comments