@@ -417,7 +417,11 @@ describe('tool ownership is call-frame authoritative', () => {
417417 const blocks = ( result [ 1 ] . contentBlocks ?? [ ] ) as Array < Record < string , unknown > >
418418 const tool = blocks . find ( ( b ) => b . type === MothershipStreamV1EventType . tool )
419419 const tc = tool ?. toolCall as Record < string , unknown > | undefined
420- return { calledBy : tc ?. calledBy , parentToolCallId : tool ?. parentToolCallId , spanId : tool ?. spanId }
420+ return {
421+ calledBy : tc ?. calledBy ,
422+ parentToolCallId : tool ?. parentToolCallId ,
423+ spanId : tool ?. spanId ,
424+ }
421425 }
422426
423427 it ( 'an unscoped main call clears provisional subagent attribution' , ( ) => {
@@ -427,10 +431,7 @@ describe('tool ownership is call-frame authoritative', () => {
427431 messages : [ buildUserMessage ( 'stream-1' , 'Hello' ) ] ,
428432 activeStreamId : 'stream-1' ,
429433 streamSnapshot : {
430- events : [
431- toolEvent ( 1 , 'result' , 'fc_1' , superagentScope ) ,
432- toolEvent ( 2 , 'call' , 'fc_1' ) ,
433- ] ,
434+ events : [ toolEvent ( 1 , 'result' , 'fc_1' , superagentScope ) , toolEvent ( 2 , 'call' , 'fc_1' ) ] ,
434435 previewSessions : [ ] ,
435436 status : 'active' ,
436437 } ,
@@ -446,10 +447,7 @@ describe('tool ownership is call-frame authoritative', () => {
446447 messages : [ buildUserMessage ( 'stream-1' , 'Hello' ) ] ,
447448 activeStreamId : 'stream-1' ,
448449 streamSnapshot : {
449- events : [
450- toolEvent ( 1 , 'call' , 'fc_1' ) ,
451- toolEvent ( 2 , 'result' , 'fc_1' , superagentScope ) ,
452- ] ,
450+ events : [ toolEvent ( 1 , 'call' , 'fc_1' ) , toolEvent ( 2 , 'result' , 'fc_1' , superagentScope ) ] ,
453451 previewSessions : [ ] ,
454452 status : 'active' ,
455453 } ,
@@ -464,10 +462,7 @@ describe('tool ownership is call-frame authoritative', () => {
464462 messages : [ buildUserMessage ( 'stream-1' , 'Hello' ) ] ,
465463 activeStreamId : 'stream-1' ,
466464 streamSnapshot : {
467- events : [
468- toolEvent ( 1 , 'call' , 'fc_2' , superagentScope ) ,
469- toolEvent ( 2 , 'result' , 'fc_2' ) ,
470- ] ,
465+ events : [ toolEvent ( 1 , 'call' , 'fc_2' , superagentScope ) , toolEvent ( 2 , 'result' , 'fc_2' ) ] ,
471466 previewSessions : [ ] ,
472467 status : 'active' ,
473468 } ,
0 commit comments