use thiserror::Error;
#[derive(Error, Debug)]
pub enum AgentError {
#[error("Configuration Error: {0}")]
Config(String),
#[error("API Error: {0}")]
Api(#[source] anyhow::Error),
#[error("Strategy Error: {0}")]
Strategy(String),
#[error("Tool Error: {0}")]
Tool(String),
#[error("MCP Error: {0}")]
Mcp(#[source] anyhow::Error),
#[error("Delegation Error: {0}")]
Delegation(String),
#[error("User Interaction Error: {0}")]
Ui(#[source] anyhow::Error),
}
impl AgentError {
pub fn config(msg: impl Into<String>) -> Self {
AgentError::Config(msg.into())
}
}