zeph_core/agent/
orchestration_commands.rs1use std::future::Future;
10use std::pin::Pin;
11
12use zeph_commands::{CommandError, OrchestrationAccess};
13
14use super::Agent;
15use super::command_macros::delegate_cmd;
16use crate::channel::Channel;
17
18impl<C: Channel + Send + 'static> OrchestrationAccess for Agent<C> {
19 #[cfg(feature = "scheduler")]
22 delegate_cmd!(handle_plan, dispatch_plan_command_as_string, input: &'a str => String);
23
24 #[cfg(not(feature = "scheduler"))]
25 fn handle_plan<'a>(
26 &'a mut self,
27 _input: &'a str,
28 ) -> Pin<Box<dyn Future<Output = Result<String, CommandError>> + Send + 'a>> {
29 Box::pin(async move { Ok(String::new()) })
30 }
31
32 delegate_cmd!(handle_experiment, handle_experiment_command_as_string, input: &'a str => String);
35}