weavegraph 0.7.0

Graph-driven, concurrent agent workflow framework with versioned state, deterministic barrier merges, and rich diagnostics.
Documentation
//! Graph construction, compilation, and iteration for workflow execution.
//!
//! The main entry point is [`GraphBuilder`], which assembles nodes, edges, and
//! conditional routes into a workflow that compiles into an executable
//! [`App`](crate::app::App).
//!
//! ```
//! use weavegraph::graphs::GraphBuilder;
//! use weavegraph::types::NodeKind;
//!
//! # struct MyNode;
//! # #[async_trait::async_trait]
//! # impl weavegraph::node::Node for MyNode {
//! #     async fn run(&self, _: weavegraph::state::StateSnapshot, _: weavegraph::node::NodeContext) -> Result<weavegraph::node::NodePartial, weavegraph::node::NodeError> {
//! #         Ok(weavegraph::node::NodePartial::default())
//! #     }
//! # }
//! let app = GraphBuilder::new()
//!     .add_node(NodeKind::Custom("process".into()), MyNode)
//!     .add_edge(NodeKind::Start, NodeKind::Custom("process".into()))
//!     .add_edge(NodeKind::Custom("process".into()), NodeKind::End)
//!     .compile();
//! ```

mod builder;
mod compilation;
mod edges;
mod iteration;

#[cfg(feature = "petgraph-compat")]
mod petgraph_compat;

pub use builder::GraphBuilder;
pub use compilation::GraphCompileError;
pub use edges::{ConditionalEdge, EdgePredicate};
pub use iteration::{EdgesIter, NodesIter};

#[cfg(feature = "petgraph-compat")]
#[cfg_attr(docsrs, doc(cfg(feature = "petgraph-compat")))]
pub use petgraph_compat::{NodeIndexMap, PetgraphConversion, WeaveDiGraph, is_cyclic};