claude_code_cli_acp/
error.rs1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4pub enum AdapterError {
5 #[error("failed to locate claude executable")]
6 ClaudeNotFound,
7 #[error("claude command failed: {0}")]
8 ClaudeCommand(String),
9 #[error("transcript for session {session_id} was not found under {root}")]
10 TranscriptNotFound { session_id: String, root: PathBuf },
11 #[error("timed out waiting for claude session {session_id}")]
12 Timeout { session_id: String },
13 #[error("transcript persistence is disabled; transcript extraction cannot work")]
14 TranscriptPersistenceDisabled,
15 #[error("pty error: {0}")]
16 Pty(String),
17}
18
19pub type Result<T> = std::result::Result<T, AdapterError>;