1#[derive(Debug, thiserror::Error)]
3#[non_exhaustive]
4pub enum Error {
5 #[error("no AI CLI found — install claude, codex, or gemini")]
6 NoCli,
7
8 #[error("must specify `cli` when using `executable_path`")]
9 CliRequiredWithExecutable,
10
11 #[error("CLI process failed: {0}")]
12 Process(String),
13
14 #[error("IO error: {0}")]
15 Io(#[from] std::io::Error),
16
17 #[error("JSON error: {0}")]
18 Json(#[from] serde_json::Error),
19
20 #[error("{0}")]
21 Other(String),
22}
23
24pub type Result<T> = std::result::Result<T, Error>;