use thiserror::Error; #[derive(Debug, Error)] pub enum AgiError { #[error("agent error: {0}")] Agent(String), #[error("action channel closed")] ActionChannelClosed, #[error("output channel closed")] OutputChannelClosed, #[error("serialization error: {0}")] Serialize(String), #[error("task join error: {0}")] Join(#[from] tokio::task::JoinError), }