@@ -5500,38 +5500,43 @@ it.layer(layerTest)("ProjectionStoreV2", (it) => {
55005500 } ,
55015501 } ) ;
55025502
5503- for ( const fresh of [ true , false ] ) {
5504- yield * projectionStore . apply ( {
5505- id : EventId . make ( "event:" + suffix + ":fresh-" + fresh ) ,
5506- type : "runtime-request.updated" ,
5507- threadId,
5508- runId,
5509- nodeId,
5510- driver,
5511- occurredAt : now ,
5512- payload : {
5513- id : requestId ,
5503+ for ( const responseCapability of [
5504+ { type : "live" , providerSessionId : ProviderSessionId . make ( "session:pending-secret" ) } ,
5505+ { type : "message" } ,
5506+ ] as const ) {
5507+ for ( const fresh of [ true , false ] ) {
5508+ yield * projectionStore . apply ( {
5509+ id : EventId . make ( "event:" + suffix + ":fresh-" + fresh ) ,
5510+ type : "runtime-request.updated" ,
5511+ threadId,
5512+ runId,
55145513 nodeId,
5515- providerTurnId : null ,
5516- nativeRequestRef : null ,
5517- kind : "user_input" ,
5518- status : "pending" ,
5519- responseCapability : { type : "message" } ,
5520- createdAt : fresh
5521- ? DateTime . add ( now , { seconds : 5 } )
5522- : DateTime . subtract ( now , { seconds : 1 } ) ,
5523- resolvedAt : null ,
5524- } ,
5525- } ) ;
5526- for ( const shell of [
5527- ( yield * projectionStore . getShellSnapshot ( ) ) . threads . find (
5528- ( thread ) => thread . id === threadId ,
5529- ) ,
5530- ProjectionStore . threadShellFromProjection (
5531- yield * projectionStore . getThreadProjection ( threadId ) ,
5532- ) ,
5533- ] ) {
5534- assert . equal ( shell ?. pendingRuntimeRequest ?. id , fresh ? requestId : "secret:b" ) ;
5514+ driver,
5515+ occurredAt : now ,
5516+ payload : {
5517+ id : requestId ,
5518+ nodeId,
5519+ providerTurnId : null ,
5520+ nativeRequestRef : null ,
5521+ kind : "user_input" ,
5522+ status : "pending" ,
5523+ responseCapability,
5524+ createdAt : fresh
5525+ ? DateTime . add ( now , { seconds : 5 } )
5526+ : DateTime . subtract ( now , { seconds : 1 } ) ,
5527+ resolvedAt : null ,
5528+ } ,
5529+ } ) ;
5530+ for ( const shell of [
5531+ ( yield * projectionStore . getShellSnapshot ( ) ) . threads . find (
5532+ ( thread ) => thread . id === threadId ,
5533+ ) ,
5534+ ProjectionStore . threadShellFromProjection (
5535+ yield * projectionStore . getThreadProjection ( threadId ) ,
5536+ ) ,
5537+ ] ) {
5538+ assert . equal ( shell ?. pendingRuntimeRequest ?. id , fresh ? requestId : "secret:b" ) ;
5539+ }
55355540 }
55365541 }
55375542
0 commit comments