~/bend-docscommunity

inspector.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/inspector.bend as Inspector

7 imports
import Base
import ./change_tick.bend as Tick
import world.bend as W
import component.bend as C
import column.bend as Col
import lifecycle.bend as L
import capabilities.bend as Cap

Types

type Frame source · line 13 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> Type

Trusted closed setup owns concrete lenses. The callback sees only opaque H. Trusted Inspector execution frame owning World and its observation cursor. Bodies receive opaque H through grants, not this raw constructor. It is not a registered system transaction or a snapshot that can restore World.

type Instance source · line 19 · raw

@-S:Data -> Type

Standalone Inspector lifecycle cursor state. Fresh starts with no previous cursor; Active retains its last successful observation cursor and initial clock. Schema S is static: this raw value does not carry a runtime world namespace. Reuse with its intended world; use runtime-bound wrappers for checked ownership.

type Value source · line 25 · raw

@V:Data -> Data

Detached component lookup result plus added/changed flags relative to the Inspector cursor. access is Found, ComponentAbsent or MissingEntity; the original affine component remains in World, never in this Data observation.

type Lookup source · line 30 · raw

@-H:Type -> @-S:Data -> @-V:Data -> Type

Typed read-only lookup operation for a schema-scoped entity handle. get returns the opaque owner with a detached Value; no component write operation or live payload reference is exposed to the inspection body.

type Plan source · line 35 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> Type

Trusted setup containing the exact Inspector capability shape Ops. Concrete lenses/projections stay outside the universally quantified body. Arbitrary supplied callbacks remain trusted and must preserve payload owners.

type Observed source · line 40 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @U:Data -> @Out:Data -> Type

Inspector result retaining World and its updated Instance with either a Data error or output. Failure retains the prior observation cursor; success advances the standalone cursor and world clock. It owns no system reader.

Templates

template lookup_field source · line 43 · raw

@-H:Type -> @-S:Data -> @-V:Data -> @cap:Lookup<H, S, V> -> @_:H -> @_:0x67fd5084c1da4adc13317822045bb11f/world.Handle<S> -> Pair(H, Value<V>)

template lookup source · line 50 · raw

@-H:Type -> @-S:Data -> @-V:Data -> @-cap:Lookup<H, S, V> -> @ctx:H -> @target:0x67fd5084c1da4adc13317822045bb11f/world.Handle<S> -> Pair(H, Value<V>)

Look up a handle through a declared Inspector capability, returning its affine owner and detached Access/lifecycle flags. Stale or foreign handles are MissingEntity through canonical family lookup, not an absent component.

template family_clocked source · line 53 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @+cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @+stamp:0x67fd5084c1da4adc13317822045bb11f/lifecycle.Stamp -> @value:0x67fd5084c1da4adc13317822045bb11f/component.Access<V> -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick) -> Pair(Frame<S, Store, R, E>, Value<V>)

template family_join source · line 56 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @+cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @+stamp:0x67fd5084c1da4adc13317822045bb11f/lifecycle.Stamp -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, 0x67fd5084c1da4adc13317822045bb11f/component.Access<V>) -> Pair(Frame<S, Store, R, E>, Value<V>)

template family_stamped source · line 60 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x67fd5084c1da4adc13317822045bb11f/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @target:0x67fd5084c1da4adc13317822045bb11f/world.Handle<S> -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, 0x67fd5084c1da4adc13317822045bb11f/lifecycle.Stamp) -> Pair(Frame<S, Store, R, E>, Value<V>)

template family_get source · line 64 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x67fd5084c1da4adc13317822045bb11f/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @frame:Frame<S, Store, R, E> -> @+target:0x67fd5084c1da4adc13317822045bb11f/world.Handle<S> -> Pair(Frame<S, Store, R, E>, Value<V>)

template read_family source · line 71 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x67fd5084c1da4adc13317822045bb11f/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> Lookup<Frame<S, Store, R, E>, S, V>

Trusted setup constructor for component observation through canonical family lenses. project must return its payload owner alongside Data V. Creates a grant only; performs no lookup or cursor advancement itself.

template resource_join source · line 74 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, V) -> Pair(Frame<S, Store, R, E>, V)

template resource_get source · line 78 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-project:(@_:R -> Pair(R, V)) -> @frame:Frame<S, Store, R, E> -> Pair(Frame<S, Store, R, E>, V)

template read_resource source · line 85 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-project:(@_:R -> Pair(R, V)) -> 0x67fd5084c1da4adc13317822045bb11f/capabilities.ValueRead<Frame<S, Store, R, E>, V>

Trusted setup constructor for a detached resource Data view. project consumes/returns R; it must preserve affine resources and sibling owners. No replacement capability is exposed, and no resource is read during setup.

template plan_caps source · line 90 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @plan:Plan<S, Store, R, E, Ops> -> Ops(Frame<S, Store, R, E>)

Advanced projection extracting the capability shape from a trusted plan. Does not execute any grant or transfer a World owner.

template succeeded source · line 94 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @-Out:Data -> @registeredAt:0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick -> @value:Out -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick) -> Observed<S, Store, R, E, U, Out>

template finished source · line 98 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @-Out:Data -> @cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @registeredAt:0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick -> @frame:Frame<S, Store, R, E> -> @result:Result<&2, &2, U, Out> -> Observed<S, Store, R, E, U, Out>

template invoked source · line 103 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @-Out:Data -> @cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @registeredAt:0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick -> @result:Pair(Frame<S, Store, R, E>, Result<&2, &2, U, Out>) -> Observed<S, Store, R, E, U, Out>

template initialized source · line 107 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-U:Data -> @-Out:Data -> @-plan:Plan<S, Store, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Result<&2, &2, U, Out>)) -> @args:A -> @+cursor:Maybe<&2, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick> -> @+registeredAt:0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick -> @world:0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E> -> Observed<S, Store, R, E, U, Out>

template first source · line 110 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-U:Data -> @-Out:Data -> @-plan:Plan<S, Store, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Result<&2, &2, U, Out>)) -> @args:A -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick) -> Observed<S, Store, R, E, U, Out>

template run source · line 122 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-U:Data -> @-Out:Data -> @-plan:Plan<S, Store, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Result<&2, &2, U, Out>)) -> @instance:Instance<S> -> @args:A -> @world:0x67fd5084c1da4adc13317822045bb11f/world.World<S, Store, R, E> -> Observed<S, Store, R, E, U, Out>

Run a standalone read-only Inspector body with its own Instance cursor. Returns World and Instance on both body success and failure. Success advances World clock and observation cursor; failure retains the prior cursor. Neither path advances a registered system cursor or owns event retention. This raw Instance has no world namespace check; canonical runtime-bound wrappers enforce their separate registration/world contracts. Trusted projections must preserve owners; arbitrary host effects are not automatically rolled back. Inspection contract and consumers: docs/parity/inspect.md.