EventStream.frame: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/event_stream.bend as EventStream Lines 53-58 of bendvy-ecs-core@0.1.0.4/event_stream.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&start_line=53&end_line=58 import Base import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev # Apply frame-window and capacity trimming with current active-reader holds. # Return metadata with updated boundaries/dropped history; hard capacity can cause # lag, so active readers do not promise indefinite retention. def frame(~S:Data,~E:Data,stream:Stream,+tick:Nat) -> Stream: match stream: case Stream{domain,batches,+positions,nextReader,+frameStart,_,+capacity,dropped}:trimmed(~S,~E,domain,positions,nextReader,tick,frameStart,capacity,Ev.trim_capacity(~E,Ev.past_window(~E,batches,Ev.hold_boundary(positions,frameStart),dropped),capacity)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=hold_boundary https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=past_window https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=trim_capacity https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&name=Stream https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&name=trimmed