acp_utils/client/error.rs
1/// Errors returned by ACP client-side operations.
2#[derive(Debug, thiserror::Error)]
3pub enum AcpClientError {
4 /// The agent command string could not be parsed.
5 #[error("invalid agent command: {0}")]
6 InvalidAgentCommand(#[source] agent_client_protocol::Error),
7
8 /// The agent subprocess exited unexpectedly.
9 #[error("agent subprocess crashed: {0}")]
10 AgentCrashed(String),
11
12 /// The ACP request/response exchange failed (`initialize`, `new_session`,
13 /// `prompt`, etc.).
14 #[error("ACP protocol error: {0}")]
15 Protocol(#[source] agent_client_protocol::Error),
16}