Skip to main content

flow_core/
lib.rs

1//! Core types, configuration, and error handling for the Agent Flow workspace.
2//!
3//! This crate provides the shared foundation used by all other `flow-*` crates:
4//! - [`Feature`] and [`Task`] types for work item tracking
5//! - [`Config`] for workspace configuration (loaded from TOML)
6//! - [`FlowError`] for unified error handling across the workspace
7//! - [`Theme`] for terminal color customization
8//!
9//! # Example
10//!
11//! ```rust
12//! use flow_core::Config;
13//!
14//! let config = Config::load().unwrap_or_default();
15//! println!("Projects dir: {:?}", config.projects_dir);
16//! ```
17
18pub mod agent;
19pub mod config;
20pub mod error;
21pub mod event;
22pub mod feature;
23pub mod project;
24pub mod state;
25pub mod task;
26pub mod theme;
27
28pub use agent::AgentConfig;
29pub use config::Config;
30pub use error::FlowError;
31pub use event::FlowEvent;
32pub use feature::{CreateFeatureInput, DependencyRef, Feature, FeatureGraphNode, FeatureStats};
33pub use task::{SessionListItem, SessionMeta, Task, TaskWithSession};
34pub use theme::{AnsiColor, Theme, ThemeColors};
35
36/// Convenience type alias for Results using `FlowError`.
37pub type Result<T> = std::result::Result<T, FlowError>;