~/bend-docscommunity

ordinary_app_capture_query.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.2/ordinary_app_capture_query.bend as Ordinary_app_capture_query

18 imports
import Base
import ./ordinary_app_execution_recipe.bend as Exec
import ./execution_context.bend as Ctx
import ./schedule_provision.bend as SP
import ./captured_schedule_composition.bend as Choice
import ./ordinary_app_composer.bend as Build
import ./ordinary_app_registration_fields.bend as Records
import ./ordinary_app_records.bend as Leaf
import ./world.bend as W
import ./system.bend as Sys
import ./transaction.bend as T
import ./compose.bend as Q
import ./ordinary_capture_query.bend as O
import ./ordinary_query_declaration.bend as Decl
import ./ordinary_app_capture_query_fields.bend as Fields
import ./ordinary_app_observation_data.bend as DTO
import ./trace_facts.bend as Facts
import ./ordinary_app_recipe.bend as Tree

Types

type ExecutionError source · line 33 · raw

@Error:Data -> Data

Failure of this captured App leaf. CallbackFailure wraps the query's access or user error; RegistrationRefused reports rejected execution authority. A failure result still returns the context and captured-query owner.

Templates

template Owned source · line 25 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> Type

The actual affine capture-query owner is the invocation token. Fields are refreshed from that owner after each execution, including its real cursor. The registered owner of a repeatable query with affine capture L. Retain the actual returned owner, including its capture and reader cursor; metadata alone cannot replace its authority. Normally stored in Invocation.

template Invocation source · line 29 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> Type

An App-owned captured-query invocation: registered owner, repeatable Args, and latest row outputs. Thread the returned invocation through every update; use arguments, outputs and with_arguments rather than reconstructing tokens.

template execution_extracted source · line 36 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @args:Args -> @outputs:List<&2, Out> -> @outcome:0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, ExecutionError<Error>, Unit> -> @result:Pair(Owned(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>) -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, ExecutionError<Error>, Unit>)

template execution_returned source · line 39 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @args:Args -> @trace:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> @result:0xb2b0f04555daca474f0f77d0966945c9/ordinary_capture_query.Run<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Owned(S, C, R, E, L, Ops, Args, Error, Out, query, body), Args, 0xb2b0f04555daca474f0f77d0966945c9/compose.Error<Error>, Out> -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, ExecutionError<Error>, Unit>)

template execution_allowed source · line 44 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @allowed:Bool -> @invocation:Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body) -> @context:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, ExecutionError<Error>, Unit>)

template execution_run source · line 48 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @invocation:Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body) -> @context:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @id:U32 -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, ExecutionError<Error>, Unit>)

template Application source · line 56 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> Type

Executable App type after appending a query with retained affine capture. The new invocation is paired with prior owners; earlier inspection rows remain. The polymorphic body receives declared Ops and must return both its opaque frame and capture on every branch. Args, Error and Out are repeatable Data. See examples/captured-query/app.bend for named aliases and a complete App.

template added_extracted source · line 58 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @-Output:Type -> @args:Args -> @done:(@_:Application(S, C, R, E, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide, L, Ops, Args, Error, Out, query, body) -> Output) -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @owners:Owners -> @result:Pair(Owned(S, C, R, E, L, Ops, Args, Error, Out, query, body), 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>) -> @recipe:0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_recipe.Recipe<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Rows, observe> -> @debug:Bool -> Output

template added source · line 61 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @-Output:Type -> @args:Args -> @done:(@_:Application(S, C, R, E, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide, L, Ops, Args, Error, Out, query, body) -> Output) -> @failed:(@_:0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_execution_recipe.Registered<S, 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide> -> @_:L -> Output) -> @result:0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_capture_query_fields.Appended<0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_composer.Registered<S, 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Owners, Rows, observe, fold>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_composer.Registered<S, 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Pair(Owners, Owned(S, C, R, E, L, Ops, Args, Error, Out, query, body)), Rows, observe, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_records.fold_pair(S, Owners, Owned(S, C, R, E, L, Ops, Args, Error, Out, query, body), fold, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_capture_query_fields.fold(S, C, R, E, L, Ops, Args, Error, Out, query, body))>, L> -> Output

template add source · line 76 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @-Output:Type -> @done:(@_:Application(S, C, R, E, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide, L, Ops, Args, Error, Out, query, body) -> Output) -> @failed:(@_:0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_execution_recipe.Registered<S, 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide> -> @_:L -> Output) -> @value:0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_execution_recipe.Registered<S, 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Owners, Rows, observe, fold, PriorError, priorPlan, priorDispatch, priorProvide> -> @args:Args -> @name:String -> @capture:L -> Output

Register a captured query during App setup, consuming value and capture. On success done receives the extended App. On refusal failed receives the returned prior App AND capture, so the caller can recover or explicitly drop those affine owners. args is retained for future invocations; name follows the ordinary registry rules. No callback runs during this registration. During execution, failure rolls back transactional writes and clears row outputs, but retains the callback-returned capture: capture mutation is not ECS rollback. Failure/refusal do not advance the query reader cursor; success does. Deferred structural commands still need the ordinary explicit barrier. Runnable example: bash examples/captured-query/run.sh js (or native). Its app.bend:add_second shows add; body.bend returns all owners on failure.

template execution_owners source · line 81 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> Type

Advanced App-composition type projection: prior owners plus this Invocation. Use the complete matching execution_* family to name a composed App.

template execution_rows source · line 85 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> Data

Advanced App-composition type projection: prior inspection rows, unchanged. Captured row results are read with outputs, not added to inspection here.

template execution_observe source · line 89 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)

Advanced App-composition projection: retain the prior World observer. This captured leaf does not add a separate inspection-query projection.

template execution_fold source · line 93 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @_:Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)) -> Pair(Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)), List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)

Advanced App-composition projection: collect live registration fields while returning every owner, including this query's actual reader cursor.

template execution_plan source · line 97 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @_:Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)) -> Pair(Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)), 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)

Advanced App-composition projection: build the combined registration plan without consuming or executing the retained captures.

template execution_dispatch source · line 102 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @_:Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)) -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Pair(Owners, Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)), 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, 0xb2b0f04555daca474f0f77d0966945c9/captured_schedule_composition.Choice<PriorError, ExecutionError<Error>>, Unit>)

Advanced App-composition projection: dispatch a registered ID and return all owners/context on success or failure. Prefer App schedule/run in gameplay; use the library-generated registration IDs and reader cursors.

template execution_provide source · line 106 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Owners:Type -> @-Rows:Data -> @-observe:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/ordinary_app_registration_fields.Fields<S>>)) -> @-PriorError:Data -> @-priorPlan:(@_:Owners -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Plan<S>)) -> @-priorDispatch:(@_:Owners -> @_:0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>> -> @_:U32 -> Pair(Owners, 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/execution_context.Context<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>>, PriorError, Unit>)) -> @-priorProvide:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)) -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/schedule_provision.Requirement<S>>)

Advanced App-composition projection: combine prior provisioning requirements. This query leaf adds no host-service provisioner and returns the World owner.

template arguments source · line 111 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @value:Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body) -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), Args)

Read the repeatable arguments without losing the invocation. Returns (invocation, args); the affine capture remains inside the invocation.

template outputs source · line 118 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @value:Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body) -> Pair(Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body), List<&2, Out>)

Read this invocation's latest per-row outputs, preserving the invocation. A callback failure or Refused returned by the captured query runner clears outputs. An early ID-routing refusal returns the invocation and its previous outputs unchanged. Values are Data, not capture owners.

template with_arguments source · line 124 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-Ops:(@_:Type -> Type) -> @-Args:Data -> @-Error:Data -> @-Out:Data -> @-query:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>, Ops(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, C, R, E>)> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:Args -> @_:H -> Pair(H, Pair(L, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)))) -> @value:Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body) -> @args:Args -> Invocation(S, C, R, E, L, Ops, Args, Error, Out, query, body)

Replace repeatable invocation arguments, preserving capture, cursor and the stored output list. Does not run the query or reset failure visibility. See examples/captured-query/app.bend's retry path with Entry.update_owners.