use thiserror::Error;
pub type AiResult<T> = Result<T, AiError>;
#[derive(Error, Debug)]
pub enum AiError {
#[error("Memory capacity exceeded: {0}")]
CapacityExceeded(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
#[error("Encoding error: {0}")]
EncodingError(String),
#[error("Query error: {0}")]
QueryError(String),
#[error("Safety violation: {0}")]
SafetyViolation(String),
#[error("Resource exhausted: {0}")]
ResourceExhausted(String),
#[error("Serialization error: {0}")]
SerializationError(#[from] serde_json::Error),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("Internal error: {0}")]
Internal(String),
}