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
//! # ironflow-engine
//!
//! Workflow orchestration engine for **ironflow**.
//!
//! Workflows are defined as Rust-native handlers implementing
//! [`WorkflowHandler`](handler::WorkflowHandler). Handlers receive a
//! [`WorkflowContext`](context::WorkflowContext) and can chain step outputs,
//! use native `if`/`else`/`match` for conditional branching, and execute
//! steps in parallel.
//!
//! Handlers can be executed inline or enqueued for a background worker.
//!
//! ## Custom operations
//!
//! Implement [`Operation`](operation::Operation) to define custom step types
//! (e.g. GitLab, Gmail, Slack) that integrate into the workflow lifecycle.
//! Call [`WorkflowContext::operation()`](context::WorkflowContext::operation)
//! inside a handler to execute them with full step tracking.
//!
//! # Example
//!
//! ```no_run
//! use ironflow_engine::prelude::*;
//! use std::future::Future;
//! use std::pin::Pin;
//!
//! struct DeployWorkflow;
//!
//! impl WorkflowHandler for DeployWorkflow {
//! fn name(&self) -> &str { "deploy" }
//! fn execute<'a>(&'a self, ctx: &'a mut WorkflowContext) -> HandlerFuture<'a> {
//! Box::pin(async move {
//! let build = ctx.shell("build", ShellConfig::new("cargo build")).await?;
//! ctx.agent("review", AgentStepConfig::new(
//! &format!("Review: {}", build.output["stdout"])
//! )).await?;
//! Ok(())
//! })
//! }
//! }
//! ```
/// Convenience re-exports.