miyabi_workflow/lib.rs
1//! Miyabi Workflow DSL
2//!
3//! Graph-based agent orchestration with fluent API for building complex workflows.
4//!
5//! # Features
6//!
7//! - `.then()` - Sequential execution
8//! - `.branch()` - Conditional branching
9//! - `.parallel()` - Concurrent execution
10//! - State persistence with sled
11//!
12//! # Example
13//!
14//! ```no_run
15//! use miyabi_workflow::WorkflowBuilder;
16//! use miyabi_types::agent::AgentType;
17//!
18//! // Define a workflow
19//! let workflow = WorkflowBuilder::new("issue-resolution")
20//! .step("analyze", AgentType::IssueAgent)
21//! .then("implement", AgentType::CodeGenAgent)
22//! .parallel(vec![
23//! ("test", AgentType::ReviewAgent),
24//! ("lint", AgentType::CodeGenAgent),
25//! ])
26//! .then("deploy", AgentType::DeploymentAgent);
27//!
28//! let dag = workflow.build_dag().unwrap();
29//! ```
30
31pub mod builder;
32pub mod condition;
33pub mod error;
34pub mod state;
35
36pub use builder::{ConditionalBranch, Step, StepType, WorkflowBuilder};
37pub use condition::Condition;
38pub use error::{Result, WorkflowError};
39pub use state::{
40 ExecutionState, StateStore, StepContext, StepOutput, WorkflowOutput, WorkflowStatus,
41};
42
43/// Workflow DSL version
44pub const VERSION: &str = env!("CARGO_PKG_VERSION");