pub async fn plan_workflow(
task: &str,
backend: Arc<dyn AgentBackend>,
cfg: &PlannerConfig,
) -> Result<PlannedWorkflow, PlannerError>Expand description
Generate a Lua orchestration script for task by asking the backend agent.
Retries up to cfg.max_retries times, feeding the validation error back to
the agent so it can self-correct.