1use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum CliError {
7 #[error("Invalid project name: {0}")]
8 InvalidProjectName(String),
9
10 #[error("Project directory already exists: {0}")]
11 ProjectExists(String),
12
13 #[error("Not in a git repository")]
14 NotGitRepository,
15
16 #[error("Invalid agent type: {0}")]
17 InvalidAgentType(String),
18
19 #[error("Issue number required for agent execution")]
20 MissingIssueNumber,
21
22 #[error("Git configuration error: {0}")]
23 GitConfig(String),
24
25 #[error("Invalid input: {0}")]
26 InvalidInput(String),
27
28 #[error("Execution error: {0}")]
29 ExecutionError(String),
30
31 #[error("Miyabi error: {0}")]
32 Miyabi(#[from] miyabi_types::error::MiyabiError),
33
34 #[error("IO error: {0}")]
35 Io(#[from] std::io::Error),
36
37 #[error("JSON error: {0}")]
38 Json(#[from] serde_json::Error),
39
40 #[error("Serialization error: {0}")]
41 Serialization(String),
42}
43
44pub type Result<T> = std::result::Result<T, CliError>;