use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("connection error: {0}")]
Connection(#[from] agent_client_protocol::Error),
#[error("failed to deserialize response: {0}")]
Deserialization(#[from] serde_json::Error),
#[error("LLM did not return a result")]
NoResult,
#[error("tool error: {0}")]
Tool(String),
#[error("connection closed")]
ConnectionClosed,
}