@@ -368,10 +368,11 @@ async function executeSend(params: {
368368 toolOptions ?: Partial < Parameters < typeof createMessageTool > [ 0 ] > ;
369369 toolCallId ?: string ;
370370} ) {
371+ const { config, getRuntimeConfig, ...toolOptions } = params . toolOptions ?? { } ;
371372 const tool = createMessageTool ( {
372- config : { } as never ,
373+ getRuntimeConfig : getRuntimeConfig ?? ( config ? ( ) => config : mocks . getRuntimeConfig ) ,
373374 runMessageAction : mocks . runMessageAction as never ,
374- ...params . toolOptions ,
375+ ...toolOptions ,
375376 } ) ;
376377 await tool . execute ( params . toolCallId ?? "1" , {
377378 action : "send" ,
@@ -838,7 +839,7 @@ describe("message tool agent routing", () => {
838839
839840 const tool = createMessageTool ( {
840841 agentSessionKey : "agent:alpha:main" ,
841- config : { } as never ,
842+ getRuntimeConfig : mocks . getRuntimeConfig ,
842843 runMessageAction : mocks . runMessageAction as never ,
843844 } ) ;
844845
@@ -858,7 +859,7 @@ describe("message tool agent routing", () => {
858859
859860 const tool = createMessageTool ( {
860861 agentSessionKey : "agent:main:slack:channel:c123:thread:111.222" ,
861- config : { } as never ,
862+ getRuntimeConfig : mocks . getRuntimeConfig ,
862863 currentChannelProvider : "slack" ,
863864 currentChannelId : "channel:C123" ,
864865 agentThreadId : "111.222" ,
@@ -881,7 +882,7 @@ describe("message tool agent routing", () => {
881882
882883 const tool = createMessageTool ( {
883884 agentSessionKey : "agent:main:slack:channel:c123:thread:111.222" ,
884- config : { } as never ,
885+ getRuntimeConfig : mocks . getRuntimeConfig ,
885886 currentChannelProvider : "slack" ,
886887 currentChannelId : "channel:C123" ,
887888 agentThreadId : "111.222" ,
0 commit comments