Run a single step. A one-element barrier — reuses the panic isolation and placement of [`parallel`](Self::parallel) so one and many steps share a single code path.
(&self, spec: AgentStepSpec)
| 207 | /// placement of [`parallel`](Self::parallel) so one and many steps share a |
| 208 | /// single code path. |
| 209 | pub async fn agent(&self, spec: AgentStepSpec) -> StepOutcome { |
| 210 | let task_id = spec.task_id.clone(); |
| 211 | let agent = spec.agent.clone(); |
| 212 | execute_steps_parallel( |
| 213 | Arc::clone(&self.executor), |
| 214 | vec![spec], |
| 215 | self.step_events.clone(), |
| 216 | ) |
| 217 | .await |
| 218 | .into_iter() |
| 219 | .next() |
| 220 | .unwrap_or_else(|| StepOutcome::failed(task_id, agent, "step produced no outcome")) |
| 221 | } |
| 222 | |
| 223 | /// Barrier fan-out. Bounded by the executor's |
| 224 | /// [`concurrency_hint`](AgentExecutor::concurrency_hint); input order is |