(
&self,
spec: AgentStepSpec,
_event_tx: Option<broadcast::Sender<AgentEvent>>,
)
| 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 | } |
no test coverage detected