#[derive(Debug, thiserror::Error)]
pub enum BlockError {
#[error("MCP error: {0}")]
Mcp(String),
#[error("mesh error: {0}")]
Mesh(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("script error: {0}")]
Script(String),
#[error("timeout: {0}")]
Timeout(String),
#[error("runtime error: {0}")]
Runtime(String),
#[error("bus error: {0}")]
Bus(String),
#[error("cancelled")]
Cancelled,
}
pub type BlockResult<T> = Result<T, BlockError>;