use super::streaming_cli::CliHarness;
use super::types::{HarnessName, HarnessRunConfig};
#[derive(Debug, Default)]
pub struct OpencodeHarness;
impl CliHarness for OpencodeHarness {
fn harness_name(&self) -> HarnessName {
HarnessName::Opencode
}
fn binary(&self) -> &str {
"opencode"
}
fn build_args(&self, config: &HarnessRunConfig) -> Vec<String> {
let mut args = vec!["run".to_string()];
if let Some(model) = config.model.as_deref() {
args.push("-m".to_string());
args.push(model.to_string());
}
args.push(config.prompt.clone());
args
}
}
#[cfg(test)]
#[path = "opencode_tests.rs"]
mod opencode_tests;