Expand description
Blueprint runner — glue that executes a flow.ir AST
(mlua_flow_ir::Node) through the engine. Each Step.ref is run as a
single task via start_task + dispatch_attempt_with, and the
resulting Pass Value is written back to Step.out.
Fully-async chain. Uses mlua_flow_ir::eval_async and
AsyncDispatcher; block_on and spawn_blocking are never mixed in,
so the whole stack stays consistent with the engine’s tokio async
world.
§Usage
ⓘ
let dispatcher = EngineDispatcher::with_spawner(engine.clone(), op_token, spawner);
let bp: mlua_flow_ir::Node = serde_json::from_str(BP_JSON)?;
let final_ctx = mlua_flow_ir::eval_async(&bp, init_ctx, &dispatcher).await?;§Schema types (the IF crate)
Blueprint / AgentDef / AgentKind and friends live in the
mlua_swarm_schema crate and are re-exported from here.
The struct/enum set that used to live directly in src/blueprint.rs
has been moved into the IF crate to support extension discipline,
versioning, and external consumers.
Modules§
- compiler
- Blueprint
Compiler,CompiledAgentTable, and the three defaultSpawnerFactoryimplementations. - loader
- Blueprint loader (Phase B). Loads a Blueprint from a JSON / YAML file
and recursively expands the internal
{"$file": "..."}refs. - store
BlueprintStore— the Blueprint VCS abstraction.
Structs§
- Agent
Def - Maps an agent name to a Worker IMPL kind and its configuration. Referenced from flow.ir
Step.refby name. - Agent
Meta - Agent / Operator level metadata (description / version / tags).
- Agent
Profile - Agent persona information. Orthogonal to the backend kind (Shell / InProc / Operator).
- Blueprint
- Unified package of flow.ir + Swarm extension layers. The entry-point type of Swarm.
- Blueprint
Metadata - Blueprint-level metadata (description / origin / tags / ttl / version label / alias).
- Compiler
Hints - Per-agent overrides / hints. Interpreted by the Compiler / SpawnerFactory; not required.
- Compiler
Strategy - Compiler behavior rules. Controls strict / lenient handling and default fallback.
- Engine
Dispatcher - Bridges
mlua_flow_ir::AsyncDispatcherto the engine’sstart_task+dispatch_attempt_withpair. Holds one Operator session token and onespawner, and spins up a fresh task perStep.ref, using it as the agent name. - Operator
Def - Design-time definition of an Operator role (first-class).
- Spawner
Hints - Set of capability hint keys for the SpawnerLayer required by a Blueprint.
Enums§
- Agent
Kind - SoT of the Worker IMPL axis. A closed enum managed inside Swarm and extended by variant addition through explicit maintenance. String lookup / escape hatches are deliberately not adopted.
- Blueprint
Origin - Provenance record of a Blueprint.
- Schema
Operator Kind - The schema-side
OperatorKind(seecrate::core::ctx::OperatorKindfor the runtime duplicate consumed byEngine). Re-exported under an explicit alias so callers readingBlueprint.operators[].kind/Blueprint.default_operator_kinddo not have to reach intomlua_swarm_schemadirectly. Kind axis of an Operator role (= “in which mode does this Operator run”). Corresponds 1:1 with the engine’s runtimeOperatorKind. Kept as a schema duplicate so that BPs can be authored while depending only on this crate.
Constants§
- CURRENT_
SCHEMA_ VERSION - Current Blueprint schema version. Tied to this crate’s semver.
Functions§
- current_
schema_ version - Blueprint construction helper: returns the semver of the current schema version.
Callers can write
schema_version: current_schema_version(),. - default_
global_ agent_ kind - Global default
AgentKindat the Schema impl Default layer. Bottom of the 4-layer cascade.