#![deny(missing_docs)]
//! Multi-agent composition shapes for the klieo agent framework.
//!
//! Foundation Plan #10 fixed the [`klieo_core::Agent`] trait with associated
//! types `Input`, `Output`, `Error`. That choice prevents `Box<dyn Agent>`,
//! which composition shapes (Sequential / Parallel / Loop / Graph) need.
//!
//! `klieo-flows` introduces a separate type-erased [`Flow`] trait with
//! `serde_json::Value` I/O. The [`AgentFlow<A>`] adapter wraps any concrete
//! `Agent` implementation into a `Flow` by JSON-marshalling at the boundary.
//! Concrete shapes ([`SequentialFlow`], [`ParallelFlow`], [`LoopFlow`],
//! [`GraphFlow`]) compose `Arc<dyn Flow>` references freely.
//!
//! The cost: one JSON serialise/deserialise per `Flow::run` boundary.
//! Acceptable for v0.0.1; a typed-builder follow-up is listed in the plan's
//! carryovers section.

mod error;
mod flow;
mod graph;
mod loop_flow;
mod parallel;
mod sequential;
mod typed;

#[cfg(test)]
pub(crate) mod test_helpers;

pub use error::FlowError;
pub use flow::{AgentFlow, Flow};
pub use graph::{Edge, GraphFlow};
pub use loop_flow::{LoopFlow, LoopVerdict};
pub use parallel::ParallelFlow;
pub use sequential::SequentialFlow;
pub use typed::TypedSequentialFlow;
