MCPcopy Create free account
hub / github.com/AI45Lab/Code / execute_step

Method execute_step

core/src/orchestration/combinators.rs:299–317  ·  view source on GitHub ↗
(
            &self,
            spec: AgentStepSpec,
            _event_tx: Option<broadcast::Sender<AgentEvent>>,
        )

Source from the content-addressed store, hash-verified

297 #[async_trait]
298 impl AgentExecutor for EchoExecutor {
299 async fn execute_step(
300 &self,
301 spec: AgentStepSpec,
302 _event_tx: Option<broadcast::Sender<AgentEvent>>,
303 ) -> StepOutcome {
304 let now = self.active.fetch_add(1, Ordering::SeqCst) + 1;
305 self.max_active.fetch_max(now, Ordering::SeqCst);
306 tokio::time::sleep(Duration::from_millis(15)).await;
307 self.active.fetch_sub(1, Ordering::SeqCst);
308 assert!(spec.agent != "boom", "boom");
309 StepOutcome {
310 task_id: spec.task_id.clone(),
311 session_id: format!("task-run-{}", spec.task_id),
312 agent: spec.agent.clone(),
313 output: spec.prompt.clone(),
314 success: spec.agent != "fail",
315 structured: None,
316 }
317 }
318 fn concurrency_hint(&self) -> usize {
319 4
320 }

Callers 2

execute_pipelineFunction · 0.45

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected