~/bend-docscommunity

ordinary_app_execution_recipe.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/ordinary_app_execution_recipe.bend as Ordinary_app_execution_recipe

10 imports
import Base
import ./ordinary_app_composer.bend as Build
import ./ordinary_app_records.bend as Leaf
import ./ordinary_app_registration_fields.bend as Records
import ./ordinary_app_observation_data.bend as DTO
import ./execution_context.bend as Ctx
import ./system.bend as Sys
import ./schedule_provision.bend as SP
import ./schedule.bend as Sch
import ./captured_schedule_composition.bend as Identity

Types

type Recipe source · line 15 · raw

@S:Data -> @World:Type -> @Owners:Type -> @Error:Data -> @-plan:(@_:Owners -> Pair(Owners, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:Owners -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(Owners, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, Error, Unit>)) -> @-provide:(@_:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> Type

Advanced erased execution recipe retaining plan/dispatch/provision types, not a second runtime owner bundle. Actual owners remain in Registered.app. Closed callbacks are trusted setup, not authority inferred from a Data plan or id.

type Registered source · line 20 · raw

@S:Data -> @World:Type -> @Owners:Type -> @Rows:Data -> @-observe:(@_:World -> Pair(World, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @Error:Data -> @-plan:(@_:Owners -> Pair(Owners, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:Owners -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(Owners, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, Error, Unit>)) -> @-provide:(@_:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> Type

Execution-enabled App pairing the actual composer App with its typed Recipe. World, registrations and affine Local/capture state are retained in app; this wrapper alone neither dispatches a system nor validates arbitrary callbacks.

type Invocation source · line 104 · raw

@S:Data -> @Token:Type -> @Args:Data -> @Out:Data -> Type

Affine registered invocation owner retaining its actual token, Data arguments and latest detached row outputs. Field metadata alone cannot reconstruct token or guarantee authority; ordinary App runners define output/refusal updates.

Templates

template identities source · line 24 · raw

@-S:Data -> @fields:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>> -> List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Identity>

Advanced metadata conversion retaining namespace/id/name/ordered access. Does not inspect payloads or turn presentation metadata into gameplay grants.

template registration_id source · line 29 · raw

@-S:Data -> @fields:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S> -> U32

Extract the recorded system id without validating its World or runner owner.

template member source · line 34 · raw

@-S:Data -> @fields:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>> -> @id:U32 -> Bool

Advanced dispatch-routing membership test by id against supplied field records. Not a namespace/provenance or capability check for arbitrary forged records.

template empty_plan source · line 37 · raw

@-S:Data -> @owner:Unit -> Pair(Unit, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)

Empty execution setup: retain Unit owner and return SP.Empty, with no steps.

template empty_provide source · line 40 · raw

@-S:Data -> @-World:Type -> @world:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)

Empty provisioning returns World unchanged and no schedule requirements.

template empty_dispatch source · line 44 · raw

@-World:Type -> @owner:Unit -> @world:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @id:U32 -> Pair(Unit, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, Unit, Unit>)

Empty dispatcher retains owner/context and returns Sys.Failed(Unit) for every id. It never treats an unknown id as a successfully executed empty system.

template empty source · line 48 · raw

@-S:Data -> @-World:Type -> @world:World -> Registered<S, World, Unit, Unit, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_composer.empty_observe(World), 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_records.empty(S), Unit, empty_plan(S), empty_dispatch(World), empty_provide(S, World)>

Start an empty execution-enabled App with debug disabled and no steps or requirements. Does not execute empty_dispatch or register a runner.

template plan_right source · line 50 · raw

@-S:Data -> @-L:Type -> @-R:Type -> @left:L -> @before:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> @result:Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)

template plan_left source · line 53 · raw

@-S:Data -> @-L:Type -> @-R:Type -> @-right:(@_:R -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @owner:R -> @result:Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)

template plan_pair source · line 59 · raw

@-S:Data -> @-L:Type -> @-R:Type -> @-left:(@_:L -> Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-right:(@_:R -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @owners:Pair(L, R) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)

Advanced ordered plan composition: call left then right with their respective actual owners, returning both owners and SP.Sequence(before,after). No scheduling conflict or registration validation is added by this adapter.

template provision_right source · line 62 · raw

@-S:Data -> @-World:Type -> @before:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>> -> @result:Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>) -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)

template provision_left source · line 65 · raw

@-S:Data -> @-World:Type -> @-right:(@_:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @result:Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>) -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)

template provision_pair source · line 71 · raw

@-S:Data -> @-World:Type -> @-left:(@_:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @-right:(@_:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @world:World -> Pair(World, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)

Advanced requirement composition threading the World through left then right. Concatenate requirements in that order; callbacks must return their actual World. This does not grant gameplay access from requirement strings.

template left_outcome source · line 73 · raw

@-World:Type -> @-LE:Data -> @-RE:Data -> @outcome:0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, LE, Unit> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>

template right_outcome source · line 77 · raw

@-World:Type -> @-LE:Data -> @-RE:Data -> @outcome:0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, RE, Unit> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>

template left_returned source · line 81 · raw

@-World:Type -> @-L:Type -> @-R:Type -> @-LE:Data -> @-RE:Data -> @right:R -> @result:Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, LE, Unit>) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>)

template right_returned source · line 84 · raw

@-World:Type -> @-L:Type -> @-R:Type -> @-LE:Data -> @-RE:Data -> @left:L -> @result:Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, RE, Unit>) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>)

template dispatch_selected source · line 87 · raw

@-World:Type -> @-L:Type -> @-R:Type -> @-LE:Data -> @-RE:Data -> @-left:(@_:L -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, LE, Unit>)) -> @-right:(@_:R -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, RE, Unit>)) -> @found:Bool -> @a:L -> @b:R -> @world:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @id:U32 -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>)

template dispatch_folded source · line 91 · raw

@-S:Data -> @-World:Type -> @-L:Type -> @-R:Type -> @-LE:Data -> @-RE:Data -> @-left:(@_:L -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, LE, Unit>)) -> @-right:(@_:R -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, RE, Unit>)) -> @b:R -> @world:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @+id:U32 -> @result:Pair(L, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>) -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>)

template dispatch_pair source · line 98 · raw

@-S:Data -> @-World:Type -> @-L:Type -> @-R:Type -> @-LE:Data -> @-RE:Data -> @-fold:(@_:L -> Pair(L, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-left:(@_:L -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(L, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, LE, Unit>)) -> @-right:(@_:R -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @_:U32 -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, RE, Unit>)) -> @owners:Pair(L, R) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World> -> @id:U32 -> Pair(Pair(L, R), 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<World>, 0x14a72e1c180a5ab1f8a056d43822425c/captured_schedule_composition.Choice<LE, RE>, Unit>)

Advanced owner-preserving routing: fold left metadata, dispatch left if its id is present, otherwise delegate to right. Return both actual owners and tag failed outcomes LeftError/RightError. This is not two-system execution, global duplicate id validation or an extra transaction; each dispatcher supplies its own contract.

template invocation_fields source · line 108 · raw

@-S:Data -> @-Token:Type -> @-Args:Data -> @-Out:Data -> @value:Invocation<S, Token, Args, Out> -> Pair(Invocation<S, Token, Args, Out>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)

Advanced owner-returning fold exposing this invocation's single field record. Arguments, outputs and actual token remain retained unchanged.

template invocation_plan source · line 114 · raw

@-S:Data -> @-Token:Type -> @-Args:Data -> @-Out:Data -> @value:Invocation<S, Token, Args, Out> -> Pair(Invocation<S, Token, Args, Out>, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)

Advanced owner-returning plan for this registered id: one System step with condition slot zero and no requirements. Does not derive requirement grants from field access metadata, invoke gameplay or change retained invocation outputs.