Expand description
The workflow engine v3 (RFC 0027): the dialect-3 model + validation
(model), templates (template), and the durable run record + pure
scheduler (run). Step execution (turn workers, MCP calls, internal
tools, timers) is the runtime’s job (crate::runtime): the engine says
what is ready and records what happened. P3 ships the model, validation
and the scheduler with the core step kinds; P4 completes the catalogue
(iteration, waits, child runs, start nodes beyond once/manual).
Re-exports§
pub use model::Workflow;pub use model::parse_workflow;pub use model::workflow_schema;pub use run::Next;pub use run::RunState;pub use run::RunStatus;pub use run::StepStatus;
Modules§
- data
- The data steps (RFC 0027 §5 “Data”): array and text operations without
a model —
map,filter,reduce,sort,dedupe,chunk,parse— as pure functions over JSON values. Element expressions are CEL (item,index,acc, plus the run data) or{{template}}strings;bykeys are dotted paths. - model
- The dialect-3 workflow model (RFC 0027 §2–§5, §8): a named DAG of steps
beginning at start nodes, parsed from a JSON/YAML document with a strict
per-kind field check (unknown fields are refused — the RFC 0021 §4.1 typo
shield carried over), validated for acyclicity, reachability,
finishreachability, dependency existence, schema well-formedness, CEL compilation and the caps. The node catalogue is one table (KINDS) — the validator, the executor and--workflow-schemaall read it. - run
- The run record and the scheduler (RFC 0027 §6, §7, §9): a run is a
durable transition log over a workflow’s DAG — per-step
{status, attempt, started, finished, output, error},vars, the start payload, budgets and the terminal outcome. The scheduler is pure: given a workflow and a run it names the steps that are ready (alldepends_onterminal,whentrue), applies step outcomes (on_errorrouting,gotorecovery edges), and decides the run’s terminal state (finishreached, failed, cancelled, or stalled — no ready step and no finish). - template
- Workflow templates (RFC 0027 §3):
{{path}}interpolation with dotted / JSON-pointer paths and{{path | default}}over the run data (inputs,run,steps.<id>.output,vars,memory.<key>,item,index,batch,env), plusCEL:expressions over the same names (featurecel; a non-CEL build refuses them at validation). Dependency-free.