use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum RinneError {
#[error("configuration error: {0}")]
Config(String),
#[error("worker error: {0}")]
Worker(String),
#[error("conductor error: {0}")]
Conductor(String),
#[error("blackboard error: {0}")]
Blackboard(String),
#[error("plan/DAG error: {0}")]
Plan(String),
#[error("cancelled: {0}")]
Cancelled(String),
#[error("path not found: {0}")]
NotFound(PathBuf),
#[error("feature not implemented: {0}")]
NotImplemented(&'static str),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
Json(#[from] serde_json::Error),
}
pub type Result<T> = std::result::Result<T, RinneError>;