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
//! Declarative multi-stage workflow orchestration for Common Agent Runtime.
//!
//! Composes `car-multi` agent coordination patterns and `car-engine` action
//! proposals into a named, conditional, compensable stage graph.
//!
//! ## Key types
//!
//! - [`Workflow`] — the top-level definition (stages + conditional edges)
//! - [`Stage`] / [`StageStep`] — what each step does (pattern, proposal, sub-workflow)
//! - [`Edge`] — conditional transition between stages (reuses [`car_ir::Precondition`])
//! - [`CompensationHandler`] — saga-style rollback per stage
//! - [`WorkflowEngine`] — executes the workflow graph
//! - [`verify_workflow`] — static analysis before execution
//!
//! ## Example (JSON definition)
//!
//! ```json
//! {
//! "id": "review-deploy",
//! "name": "Review and Deploy",
//! "start": "review",
//! "stages": [
//! { "id": "review", "name": "Code Review", "step": { "type": "pattern", ... } },
//! { "id": "deploy", "name": "Deploy", "step": { "type": "proposal", ... } }
//! ],
//! "edges": [
//! { "from": "review", "to": "deploy", "conditions": [{"key": "stage.review.succeeded", "operator": "eq", "value": true}] }
//! ]
//! }
//! ```
pub use WorkflowEngine;
pub use WorkflowError;
pub use ;
pub use ;
pub use ;