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
63
64
//! distri-workflow — workflow engine for Distri.
//!
//! Define multi-step workflows as data, execute them step by step,
//! with support for sequential/parallel execution, conditions, agent runs,
//! tool calls, and persistent state tracking.
//!
//! # Architecture
//!
//! Two layers, deliberately separated:
//!
//! - **Definition** — the workflow as a DAG of steps. Static template;
//! no runtime state. (`WorkflowDefinition`, `WorkflowStep`).
//! - **Run** — execution state for one invocation: status, shared
//! context, per-step status / result / error / timestamps.
//! (`WorkflowRun`, `WorkflowStepRun`).
//!
//! Other key types:
//!
//! - `StepRequirement` — what a step needs to run (native skills, connections)
//! - `StepExecutor` trait — executes a step (implement for your runtime)
//! - `WorkflowStateStore` trait — persists `WorkflowRun`s (Redis, DB, in-memory)
//! - `WorkflowRunner` — orchestrates execution with requirement checking
//!
//! # Example
//!
//! ```rust,no_run
//! use distri_workflow::*;
//!
//! let steps = vec![
//! WorkflowStep::api_call("read", "Read document", "GET", "/api/docs/{id}")
//! .with_requires(vec![
//! StepRequirement::native("network"),
//! StepRequirement::connection("google", "drive").with_permissions(vec!["drive.readonly"]),
//! ]),
//! WorkflowStep::tool_call("process", "Process data", "analyze_doc", serde_json::json!({"format": "markdown"})),
//! WorkflowStep::script("test", "Run tests", "cargo test")
//! .with_cwd("/project")
//! .with_timeout(300),
//! ];
//!
//! let definition = WorkflowDefinition::new(steps);
//! let run = WorkflowRun::new(definition);
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use *;