| 35 | |
| 36 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] |
| 37 | pub struct BashCommandOutput { |
| 38 | pub stdout: String, |
| 39 | pub stderr: String, |
| 40 | #[serde(rename = "rawOutputPath")] |
| 41 | pub raw_output_path: Option<String>, |
| 42 | pub interrupted: bool, |
| 43 | #[serde(rename = "isImage")] |
| 44 | pub is_image: Option<bool>, |
| 45 | #[serde(rename = "backgroundTaskId")] |
| 46 | pub background_task_id: Option<String>, |
| 47 | #[serde(rename = "backgroundedByUser")] |
| 48 | pub backgrounded_by_user: Option<bool>, |
| 49 | #[serde(rename = "assistantAutoBackgrounded")] |
| 50 | pub assistant_auto_backgrounded: Option<bool>, |
| 51 | #[serde(rename = "dangerouslyDisableSandbox")] |
| 52 | pub dangerously_disable_sandbox: Option<bool>, |
| 53 | #[serde(rename = "returnCodeInterpretation")] |
| 54 | pub return_code_interpretation: Option<String>, |
| 55 | #[serde(rename = "noOutputExpected")] |
| 56 | pub no_output_expected: Option<bool>, |
| 57 | #[serde(rename = "structuredContent")] |
| 58 | pub structured_content: Option<Vec<serde_json::Value>>, |
| 59 | #[serde(rename = "persistedOutputPath")] |
| 60 | pub persisted_output_path: Option<String>, |
| 61 | #[serde(rename = "persistedOutputSize")] |
| 62 | pub persisted_output_size: Option<u64>, |
| 63 | #[serde(rename = "sandboxStatus")] |
| 64 | pub sandbox_status: Option<SandboxStatus>, |
| 65 | } |
| 66 | |
| 67 | pub fn execute_bash(input: BashCommandInput) -> io::Result<BashCommandOutput> { |
| 68 | let cwd = env::current_dir()?; |
nothing calls this directly
no outgoing calls
no test coverage detected