@@ -378,7 +378,7 @@ describe('runProgrammaticStep', () => {
378378
379379 it ( 'should comprehensively test STEP_ALL functionality with multiple tools and state management' , async ( ) => {
380380 // Track all tool results and state changes for verification
381- const toolResultsReceived : ( ToolResult | undefined ) [ ] = [ ]
381+ const toolResultsReceived : ( string | undefined ) [ ] = [ ]
382382 const stateSnapshots : AgentState [ ] = [ ]
383383 let stepCount = 0
384384
@@ -573,10 +573,9 @@ describe('runProgrammaticStep', () => {
573573
574574 // Verify tool results were passed back to generator
575575 expect ( toolResultsReceived ) . toHaveLength ( 7 )
576- expect ( toolResultsReceived [ 0 ] ?. toolName ) . toBe ( 'read_files' )
577- expect ( toolResultsReceived [ 0 ] ?. result ) . toContain ( 'authenticate' )
578- expect ( toolResultsReceived [ 3 ] ?. toolName ) . toBe ( 'add_subgoal' )
579- expect ( toolResultsReceived [ 6 ] ?. toolName ) . toBe ( 'set_output' )
576+ expect ( toolResultsReceived [ 0 ] ) . toContain ( 'authenticate' )
577+ expect ( toolResultsReceived [ 3 ] ) . toContain ( 'auth-analysis' )
578+ expect ( toolResultsReceived [ 6 ] ) . toContain ( 'Output set successfully' )
580579
581580 // Verify state management throughout execution
582581 expect ( stateSnapshots ) . toHaveLength ( 7 )
@@ -638,7 +637,7 @@ describe('runProgrammaticStep', () => {
638637
639638 it ( 'should pass tool results back to generator' , async ( ) => {
640639 const toolResults : ToolResult [ ] = [ ]
641- let receivedToolResult : ToolResult | undefined
640+ let receivedToolResult : string | undefined
642641
643642 const mockGenerator = ( function * ( ) {
644643 const input1 = yield {
@@ -664,11 +663,7 @@ describe('runProgrammaticStep', () => {
664663
665664 await runProgrammaticStep ( mockAgentState , mockParams )
666665
667- expect ( receivedToolResult ) . toEqual ( {
668- toolName : 'read_files' ,
669- toolCallId : 'test-id' ,
670- result : 'file content' ,
671- } )
666+ expect ( receivedToolResult ) . toEqual ( 'file content' )
672667 } )
673668 } )
674669
0 commit comments