~/bend-docscommunity

inspector_transition_projection.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.0/inspector_transition_projection.bend as Inspector_transition_projection

8 imports
import Base
import ./change_tick.bend as Tick
import ./world.bend as W
import ./event_runtime.bend as Ev
import ./machine_stream.bend as St
import ./relation_commands.bend as A
import ./capabilities.bend as Cap
import ./inspector_stream_frame.bend as F

Types

type Declaration source · line 12 · raw

@S:Data -> @K:Data -> @V:Data -> @R:Type -> @-take:(@_:R -> Pair(R, 0x296ca5f551e3792cd56cfc8122905b94/machine_stream.Stream<V>)) -> Data

Declares a named transition-log projection. K and the resource lens take determine the stream; name is presentation metadata, not access validation.

type TransitionLog source · line 15 · raw

@S:Data -> @K:Data -> @V:Data -> Data

Detached Data observation of a machine transition stream, not its owner.

Templates

template joined source · line 17 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @cursor:Maybe<&2, 0x296ca5f551e3792cd56cfc8122905b94/change_tick.Tick> -> @namespace:U32 -> @batches:List<&2, 0x296ca5f551e3792cd56cfc8122905b94/event_runtime.Batch<0x296ca5f551e3792cd56cfc8122905b94/relation_commands.Notice<S, E>>> -> @positions:List<&2, 0x296ca5f551e3792cd56cfc8122905b94/event_runtime.Position> -> @nextReader:U32 -> @tick:Nat -> @frameStart:Nat -> @boundary:Nat -> @capacity:Nat -> @dropped:Nat -> @observed:Pair(0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, 0x296ca5f551e3792cd56cfc8122905b94/relation_commands.Notice<S, E>>, 0x296ca5f551e3792cd56cfc8122905b94/machine_stream.Stream<V>) -> Pair(0x296ca5f551e3792cd56cfc8122905b94/inspector_stream_frame.Frame<S, C, R, E>, TransitionLog<S, K, V>)

template from_runtime source · line 23 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x296ca5f551e3792cd56cfc8122905b94/machine_stream.Stream<V>)) -> @cursor:Maybe<&2, 0x296ca5f551e3792cd56cfc8122905b94/change_tick.Tick> -> @runtime:0x296ca5f551e3792cd56cfc8122905b94/event_runtime.Runtime<S, C, R, 0x296ca5f551e3792cd56cfc8122905b94/relation_commands.Notice<S, E>> -> Pair(0x296ca5f551e3792cd56cfc8122905b94/inspector_stream_frame.Frame<S, C, R, E>, TransitionLog<S, K, V>)

Observe the stream through the trusted resource lens and return the runtime in an Inspector frame. Preserve event batches, reader positions and cursor. The lens must return the resource owner with the intended stream observation.

template read source · line 28 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x296ca5f551e3792cd56cfc8122905b94/machine_stream.Stream<V>)) -> @frame:0x296ca5f551e3792cd56cfc8122905b94/inspector_stream_frame.Frame<S, C, R, E> -> Pair(0x296ca5f551e3792cd56cfc8122905b94/inspector_stream_frame.Frame<S, C, R, E>, TransitionLog<S, K, V>)

Read the declared resource stream without executing a transition or advancing an event reader. Return the affine frame and its detached transition log.

template inspect source · line 33 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x296ca5f551e3792cd56cfc8122905b94/machine_stream.Stream<V>)) -> @-declaration:Declaration<S, K, V, R, take> -> 0x296ca5f551e3792cd56cfc8122905b94/capabilities.ValueRead<0x296ca5f551e3792cd56cfc8122905b94/inspector_stream_frame.Frame<S, C, R, E>, TransitionLog<S, K, V>>

Build a read capability using the declaration's typed resource lens. The declaration name does not select a different stream or enforce lens behavior.