ordinary_machine_operations.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.7/ordinary_machine_operations.bend as Ordinary_machine_operations
8 imports
import Base import ./ordinary_machine_declaration.bend as OD import ./machine_queue.bend as Q import ./machine.bend as M import ./machine_world.bend as MW import ./transaction.bend as Tx import ./world.bend as W import ./capabilities.bend as Cap
Templates
template current source · line 11 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @pair:Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V>) -> Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, K, V>)
Schema-authored closed lenses/comparator grant operations to an opaque owner. The existing declaration remains unchanged; names carry no authority.
template get source · line 17 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V>)) -> @frame:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, K, V>)
Advanced transactional read of the committed machine CurrentView through the trusted nominal slot lens, returning the transaction owner. Queued targets are not committed current state; a missing slot remains explicit.
template set source · line 23 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V>)) -> @-put:(@_:R -> @_:0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V> -> R) -> @-same:(@_:V -> @_:V -> Bool) -> @-declaration:0x7e321819d0ff210531780719c7674cef/ordinary_machine_declaration.Declaration<S, K, V, R, take> -> @frame:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @input:0x7e321819d0ff210531780719c7674cef/machine.QueueInput<V> -> 0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>
Stage a Set or Reset next-state request in the current ECS transaction. Returns the transaction owner; the slot change is journaled for rollback. Does not execute handlers or immediately change committed state: transition markers apply queued work. Vocabulary metadata is not a membership validator.
template read source · line 28 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V>)) -> @-declaration:0x7e321819d0ff210531780719c7674cef/ordinary_machine_declaration.Declaration<S, K, V, R, take> -> 0x7e321819d0ff210531780719c7674cef/capabilities.ValueRead<0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, K, V>>
Declare current-state read access to the nominal machine slot. The resulting capability threads the transaction owner and exposes only CurrentView; building it does not read state or grant next-state writes.
template write source · line 34 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V>)) -> @-put:(@_:R -> @_:0x7e321819d0ff210531780719c7674cef/machine.Slot<S, K, V> -> R) -> @-same:(@_:V -> @_:V -> Bool) -> @-declaration:0x7e321819d0ff210531780719c7674cef/ordinary_machine_declaration.Declaration<S, K, V, R, take> -> 0x7e321819d0ff210531780719c7674cef/capabilities.ValueWrite<0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/machine.QueueInput<V>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, K, V>>
Declare current-state reads plus Set/Reset next-state requests for one nominal slot. take/put/comparator are trusted schema setup. Requests are journaled by set and later processed at explicit transition markers, with existing exit/transition/enter failure boundaries. Does not grant raw resources.