def add

bendvy-ecs-core@0.1.0.4 · recognized_app_component.bend:87

import bendvy-ecs-core@0.1.0.4/recognized_app_component.bend as RecognizedAppComponent
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_execution_recipe.bend as Exec
import bendvy-ecs-core@0.1.0.4/execution_context.bend as Ctx
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/inspector.bend as I
import bendvy-ecs-core@0.1.0.4/ordinary_query_observable.bend as O
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/internal/ordinary_component_runner.bend as Generic
import bendvy-ecs-core@0.1.0.4/ordinary_app_component.bend as Legacy
import bendvy-ecs-core@0.1.0.4/recognized_query_declaration.bend as Recognized
import bendvy-ecs-core@0.1.0.4/recognized_system.bend as RecognizedSystem

87# Register one recognized query system on an executable App during setup.
88# Consumes value and calls exactly one continuation: done with the extended App,
89# or failed with the returned prior App if registration is refused. name and
90# slot use the normal registry rules. args is retained for repeatable runs.
91# The recognized declaration owns selection/access authority; the observable
92# query contributes inspection only, even if its operational clauses differ.
93# Tracing Off uses compact execution; tracing On uses the ordinary observed path
94# with that same recognized authority. Query failure rolls back this system's
95# transactional writes and clears its outputs; prior committed systems remain.
96# This operation neither runs the schedule nor applies deferred commands.
97# Complete example: motion-driver.bend:define in test-fixtures/
98# connected-performance/sparse-motion64/consumer/s-perf/canonical-api-v1/
99# sparse-runtime-v1/; recognized-controls.bend in that fixture's
100# diagnostics/typed-observation-v1/ exercises both trace modes.
101def add(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:Owners -> Owners & List<&2,Records.Fields<S>>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan<S>,~priorDispatch:Owners -> Ctx.Context<W.World<S,C,R,E>> -> U32 -> Owners & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,PriorError,Unit>,~priorProvide:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,SP.Requirement<S>>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration<S,Q.Frame<S,C,R,E>,Ops(Q.Frame<S,C,R,E>),I.Frame<S,C,R,E>,Value>,~recognized:Recognized.Declaration<S,C,R,E,Ops>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome<Error> & Out),~render:Value -> String,~Output:Type,done:Application(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~recognized,~body,~render) -> Output,failed:Exec.Registered<S,W.World<S,C,R,E>,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide> -> Output,value:Exec.Registered<S,W.World<S,C,R,E>,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide>,args:Args,name:String,slot:String) -> Output:
102  Generic.add(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~RecognizedSystem.runner(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~recognized,~body),~RecognizedSystem.define(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~recognized,~body),~execute(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~recognized,~body),~ExecutionError(Error),~callback_failure(~Error),~Legacy.RegistrationRefused{},~render,~Output,done,failed,value,args,name,slot)

Uses (26)

Used by (0)

No other definition uses this definition.