@@ -219,7 +219,7 @@ describe("CursorAdapterV2", () => {
219219 Stream . takeUntil ( ( event ) => event . type === "turn.terminal" ) ,
220220 Stream . runCollect ,
221221 ) ;
222- assert . isFalse ( sentWithMcpOverride ) ;
222+ assert . isTrue ( sentWithMcpOverride ) ;
223223 const rows = events . filter ( ( event ) => event . type === "subagent.updated" ) ;
224224 assert . equal ( rows [ 0 ] ?. subagent . status , "running" ) ;
225225 assert . equal ( rows [ 0 ] ?. subagent . model , model ?? null ) ;
@@ -510,11 +510,11 @@ describe("CursorAdapterV2", () => {
510510 ) ,
511511 ) ;
512512
513- it . effect ( "fails standalone SDK transport diagnostics and sends compaction as /compress " , ( ) =>
513+ it . effect ( "fails standalone SDK transport diagnostics and compacts with SDK summarize " , ( ) =>
514514 Effect . gen ( function * ( ) {
515515 const fileSystem = yield * FileSystem . FileSystem ;
516516 const workspace = yield * fileSystem . makeTempDirectoryScoped ( { prefix : "cursor-v2-errors-" } ) ;
517- const sentMessages : Array < string > = [ ] ;
517+ const summarizeRequests : Array < boolean > = [ ] ;
518518 let sendCalls = 0 ;
519519 const instanceId = ProviderInstanceId . make ( "cursor" ) ;
520520 const threadId = ThreadId . make ( "cursor-transport-error-thread" ) ;
@@ -538,9 +538,7 @@ describe("CursorAdapterV2", () => {
538538 send : ( input ) =>
539539 Effect . sync ( ( ) => {
540540 sendCalls += 1 ;
541- sentMessages . push (
542- typeof input . message === "string" ? input . message : input . message . text ,
543- ) ;
541+ summarizeRequests . push ( input . summarize === true ) ;
544542 const runId = `native-cursor-run-${ sendCalls } ` ;
545543 return {
546544 agentId : "native-cursor-error" ,
@@ -551,9 +549,10 @@ describe("CursorAdapterV2", () => {
551549 status : "finished" as const ,
552550 model : { id : "composer-2.5" } ,
553551 durationMs : 1 ,
554- ...( sendCalls === 1
555- ? { result : "Error: RetriableError: WritableIterable is closed" }
556- : { } ) ,
552+ result :
553+ sendCalls === 1
554+ ? "Error: RetriableError: WritableIterable is closed"
555+ : "Summary of the conversation so far" ,
557556 } ) ,
558557 cancel : Effect . void ,
559558 } ;
@@ -646,11 +645,12 @@ describe("CursorAdapterV2", () => {
646645 attachments : [ ] ,
647646 } ,
648647 } ) ;
649- yield * runtime . events . pipe (
650- Stream . filter ( ( event ) => event . type === "turn.terminal" ) ,
651- Stream . runHead ,
648+ const compactionEvents = yield * runtime . events . pipe (
649+ Stream . takeUntil ( ( event ) => event . type === "turn.terminal" ) ,
650+ Stream . runCollect ,
652651 ) ;
653- assert . equal ( sentMessages [ 1 ] , "/compress" ) ;
652+ assert . deepEqual ( summarizeRequests , [ false , true ] ) ;
653+ assert . notInclude ( JSON . stringify ( compactionEvents ) , "Summary of the conversation so far" ) ;
654654 } ) . pipe (
655655 Effect . scoped ,
656656 Effect . provide (
0 commit comments