def restored_read

bendvy-ecs-core@0.1.0.4 · inspector_runtime.bend:64

import bendvy-ecs-core@0.1.0.4/inspector_runtime.bend as InspectorRuntime
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/inspector.bend as I
import bendvy-ecs-core@0.1.0.4/inspector_stream_frame.bend as F

64# Lift a trusted World-backed capability without detaching or duplicating the
65# event runtime. This preserves the supplied grant exactly; it is not a sandbox
66# or a type-enforced read-only boundary for caller-constructed capabilities.
67# As with I.Plan, grant construction is part of the trusted setup boundary.
68# Every Event Runtime field except its World is preserved.
69def restored_read(~S:Data,~C:Type,~R:Type,~E:Data,~V:Data,observed:I.Frame<S,C,R,A.Notice<S,E>> & V,namespace:U32,batches:List<&2,Ev.Batch<A.Notice<S,E>>>,positions:List<&2,Ev.Position>,nextReader:U32,tick:Nat,frameStart:Nat,boundary:Nat,capacity:Nat,dropped:Nat) -> F.Frame<S,C,R,E> & V:
70  match observed:
71    case (I.Frame{world,cursor},value): (F.Frame{Ev.Runtime{world,namespace,batches,positions,nextReader,tick,frameStart,boundary,capacity,dropped},cursor},value)

Uses (11)

Used by (1)