~/bend-docscommunity

ordinary_app_run.bend checks

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

16 imports
import Base
import ./ordinary_app_execution_recipe.bend as Recipe
import ./ordinary_app_composer.bend as Build
import ./ordinary_app_recipe.bend as Tree
import ./ordinary_app_schema.bend as App
import ./ordinary_app_schedule.bend as Single
import ./ordinary_app_execution.bend as Execute
import ./ordinary_app_registration_fields.bend as Records
import ./ordinary_app_observation_data.bend as DTO
import ./ordinary_schema.bend as Schema
import ./captured_schedule_composition.bend as Identity
import ./execution_context.bend as Ctx
import ./world.bend as W
import ./system.bend as Sys
import ./schedule.bend as Sch
import ./schedule_provision.bend as SP

Types

type Application source · line 21 · raw

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

Executable application owning one world, registered system owners and a declaration-derived execution recipe. Thread this affine value through run; its type binds schema, observations and dispatch together. Example: examples/scheduled-health/registration.bend, Application().

Templates

template initial source · line 23 · raw

@-S:Data -> @barrier:Bool -> @plan:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>

template built source · line 27 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @recipe:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.Recipe<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> @+selected:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> @result:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Build<S, C, R, E, H> -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

template checked source · line 31 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @valid:Bool -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @owners:H -> @recipe:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.Recipe<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> @+selected:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> @namespace:U32 -> @name:String -> @ids:List<&2, U32> -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

template folded source · line 35 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @recipe:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.Recipe<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> @selected:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> @name:String -> @result:Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>) -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

template planned source · line 40 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @recipe:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.Recipe<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> @name:String -> @barrier:Bool -> @result:Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>) -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

template attach source · line 50 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @value:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide> -> @name:String -> @barrier:Bool -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

Derive and validate a schedule from the existing registered application. Returns Attached with the executable App, or Invalid with the original registered owner; world and registration owners are never copied. Validates registration identity and schedule structure before execution. barrier=True prepends an explicit barrier; False adds none. Registration order is retained by the derived plan. No system body runs here. Example: examples/scheduled-health/registration.bend, attach().

template returned source · line 53 · raw

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

template executed source · line 59 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @result:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution.Run<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Application<S, C, R, E, H, Rows, observe, fold>, S, Error> -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution.Run<Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>, S, Error>

template run_when source · line 71 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @-condition:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @_:U32 -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Bool)) -> @value:Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide> -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution.Run<Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>, S, Error>

Run the derived schedule with a per-system condition(world, id), returning an Execute.Run containing the application result and detached trace batch. Finished/Failed/Rejected/Missing all retain the application owner. A failed system rolls back its ECS transaction, preserving earlier successful systems; retained local/capture state and host IO follow their own contracts. Structural commands become visible only at plan barriers, not at run end. A false condition bypasses dispatch and leaves its invocation/lifecycle cursor unchanged. condition is a trusted world-transforming callback: its returned world is retained even when false; it is not confined to read-only access.

template enabled source · line 77 · raw

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

Return the same application owner with debug enabled or disabled. Enabling derives observations from declarations; no repeated metadata input is required. This call neither runs systems nor advances their cursors.

template observed source · line 80 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Application<S, C, R, E, H, Rows, observe, fold>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Description<S, Rows>>) -> Pair(Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Description<S, Rows>>)

template snapshot source · line 87 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @value:Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide> -> Pair(Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Description<S, Rows>>)

Return the application owner with Some detached debug description when enabled, or None when disabled. This is inspection, not a restorable save. It does not execute systems or consume their lifecycle/event cursors. Example: examples/scheduled-health/registration.bend, snapshot().

template replan source · line 95 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @value:Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide> -> @name:String -> @barrier:Bool -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_schedule.Attachment<0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_execution_recipe.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, H, Rows, observe, fold, Error, plan, dispatch, provide>, Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>>

Rebuild the derived schedule from the same application registrations. Preserves the world and invocation owners; name and leading barrier replace the prior plan configuration. Returns Attached, or Invalid with the retained registered owner. Does not run bodies or recreate their registration state. Example: examples/scheduled-health/registration.bend, replan().

template always source · line 98 · raw

@-World:Type -> @world:World -> @id:U32 -> Pair(World, Bool)

template run source · line 106 · raw

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

Execute one pass of the declaration-derived schedule with all systems eligible; returns Execute.Run with a retained App on every result variant (Finished, Failed, Rejected or Missing) plus a detached trace batch. Earlier successful systems remain committed if a later system fails. Deferred commands remain pending until an explicit schedule barrier. Example: examples/scheduled-health/application.bend, ticks().

template inspected source · line 108 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @-Value:Data -> @schema:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_schema.Schema<S, C, R> -> @owners:H -> @recipe:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.Recipe<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> @selected:0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S> -> @namespace:U32 -> @name:String -> @steps:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule.Step> -> @needs:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>> -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Value) -> Pair(Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>, Value)

template inspect source · line 115 · raw

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

Advanced world projection callback: consumes and returns the application together with detached Data Value. project must return the world owner. This adapter does not itself restrict project to read-only operations; use public Inspector projections for noninterfering observation. No system is run.

template update_owners source · line 124 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Rows:Data -> @-observe:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:H -> Pair(H, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @-Error:Data -> @-plan:(@_:H -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Plan<S>)) -> @-dispatch:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>> -> @_:U32 -> Pair(H, 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/execution_context.Context<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>, Error, Unit>)) -> @-provide:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/schedule_provision.Requirement<S>>)) -> @-Args:Type -> @-modify:(@_:H -> @_:Args -> H) -> @value:Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide> -> @args:Args -> Application<S, C, R, E, H, Rows, observe, fold, Error, plan, dispatch, provide>

Advanced adapter to modify retained invocation owners with caller-supplied arguments, including affine Type values. Returns the application with the same world, plan and execution recipe; modify must return H and preserve registration identity/metadata invariants. It is not an ECS transaction and does not validate arbitrary owner changes.