agent_tui_usecases/usecases/
spawn_error.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum SpawnError {
7 #[error("Session limit reached: maximum {max} sessions allowed")]
8 SessionLimitReached { max: usize },
9
10 #[error("Session already exists: {session_id}")]
11 SessionAlreadyExists { session_id: String },
12
13 #[error("Command not found: {command}")]
14 CommandNotFound { command: String },
15
16 #[error("Permission denied: {command}")]
17 PermissionDenied { command: String },
18
19 #[error("Terminal error during {operation}: {reason}")]
20 TerminalError { operation: String, reason: String },
21}