ito_core/harness/
codex.rs1use super::streaming_cli::CliHarness;
2use super::types::{HarnessName, HarnessRunConfig};
3
4#[derive(Debug, Default)]
18pub struct CodexHarness;
19
20impl CliHarness for CodexHarness {
21 fn harness_name(&self) -> HarnessName {
22 HarnessName::Codex
23 }
24
25 fn binary(&self) -> &str {
26 "codex"
27 }
28
29 fn build_args(&self, config: &HarnessRunConfig) -> Vec<String> {
30 let mut args = vec!["exec".to_string()];
31 if let Some(model) = config.model.as_deref() {
32 args.push("--model".to_string());
33 args.push(model.to_string());
34 }
35 if config.allow_all {
36 args.push("--yolo".to_string());
37 }
38 args.push(config.prompt.clone());
39 args
40 }
41}
42
43#[cfg(test)]
44#[path = "codex_tests.rs"]
45mod codex_tests;