Skip to main content

ai_agent/utils/shell/
shell_provider.rs

1//! Shell provider types and definitions.
2
3use thiserror::Error;
4
5/// Result of building a shell exec command
6#[derive(Debug, Clone)]
7pub struct ShellExecCommand {
8    /// The full command string to execute
9    pub command_string: String,
10    /// Path to file containing the current working directory
11    pub cwd_file_path: String,
12}
13
14/// Shell-related errors
15#[derive(Debug, Error)]
16pub enum ShellError {
17    #[error("Failed to build command: {0}")]
18    BuildError(String),
19
20    #[error("Shell not found: {0}")]
21    ShellNotFound(String),
22
23    #[error("IO error: {0}")]
24    IoError(#[from] std::io::Error),
25}