1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # Szál — Workflow Engine
//!
//! Szál (Hungarian: thread) provides shared workflow execution for the AGNOS
//! ecosystem. Define steps, wire them into flows with branching, retry, and
//! rollback — then execute sequentially, in parallel, or as a DAG.
//!
//! ## Quick start
//!
//! ```
//! use szal::step::StepDef;
//! use szal::flow::{FlowDef, FlowMode};
//!
//! // Build a DAG pipeline
//! let build = StepDef::new("build");
//! let test = StepDef::new("test").depends_on(build.id);
//! let deploy = StepDef::new("deploy")
//! .depends_on(test.id)
//! .with_retries(3, 5_000)
//! .with_rollback();
//!
//! let mut flow = FlowDef::new("ci-cd", FlowMode::Dag);
//! flow.add_step(build);
//! flow.add_step(test);
//! flow.add_step(deploy);
//! flow.validate().unwrap();
//! ```
//!
//! ## Modules
//!
//! - [`step`] — Individual workflow steps with timeout, retry, rollback, DAG dependencies
//! - [`flow`] — Flow definitions: sequential, parallel, DAG, hierarchical
//! - [`engine`] — Execution configuration and flow result aggregation
//! - [`state`] — Workflow state machine with validated transitions
//! - [`migration`] — Flow versioning and schema migration across definition versions
//! - [`stream`] — Stream step progress to SSE / WebSocket clients via a broadcast hub
pub use SzalError;
/// Re-export `ai_hwaccel` key types when the `hardware` feature is enabled.
pub use AcceleratorRequirement;
pub type Result<T> = Result;