1use super::{Agent, LogProcessor};
2use crate::context::file_system::FileSystemOperations;
3use async_trait::async_trait;
4use std::sync::Arc;
5
6pub struct NoOpAgent;
12
13#[async_trait]
14impl Agent for NoOpAgent {
15 fn build_command(&self, instructions_path: &str) -> Vec<String> {
16 vec![
18 "sh".to_string(),
19 "-c".to_string(),
20 format!(
21 "echo '=== Task Instructions ==='; cat '{}'; echo; echo '=== End Instructions ==='",
22 instructions_path
23 ),
24 ]
25 }
26
27 fn volumes(&self) -> Vec<(String, String, String)> {
28 vec![]
30 }
31
32 fn environment(&self) -> Vec<(String, String)> {
33 vec![]
35 }
36
37 fn create_log_processor(
38 &self,
39 _file_system: Arc<dyn FileSystemOperations>,
40 ) -> Box<dyn LogProcessor> {
41 Box::new(super::no_op_log_processor::NoOpLogProcessor::new())
42 }
43
44 fn name(&self) -> &'static str {
45 "no-op"
46 }
47
48 async fn validate(&self) -> Result<(), String> {
49 Ok(())
51 }
52
53 async fn warmup(&self) -> Result<(), String> {
54 Ok(())
56 }
57}