def runtime_view
import bendvy-ecs-core@0.1.0.4/ordinary_app_event_runtime.bend as OrdinaryAppEventRuntimeimport Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/ordinary_app_access.bend as Access
159# Return App and optional copied RuntimeView. Disabled bypasses log observation;
160# enabled preserves Runtime fields and owners, without sync/trim/frame or dispatch.
161def runtime_view(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:H -> H & List<&2,Records.Fields<S>>,~Events:Type,~eventFold:Events -> Events & List<&2,Access.Entry>,app:Application<S,C,R,E,H,Rows,observe,fold,Events,eventFold>) -> Application<S,C,R,E,H,Rows,observe,fold,Events,eventFold> & Maybe<&2,RuntimeView<E>>:
162 match app:
163 case Application{schema,runtime,owners,recipe,events,False{}}:(Application{schema,runtime,owners,recipe,events,False{}},None{})
164 case Application{schema,runtime,owners,recipe,events,True{}}:runtime_view_enabled(~S,~C,~R,~E,~H,~Rows,~observe,~fold,~Events,~eventFold,schema,owners,recipe,events,runtime)
Uses (12)
Used by (0)
No other definition uses this definition.