/** * render — format AgentSwarm and SwarmTeam output. * * Produces the structured XML output that the parent LLM reads. * Format: XML-wrapped per-agent results. */ import type { SwarmSpawnSpec, SwarmResumeSpec, SwarmSpec, SubagentResult } from "./types.js"; interface SwarmRunResult { readonly spec: SwarmSpawnSpec | SwarmResumeSpec; readonly agentId?: string; readonly status: "completed" | "failed" | "aborted"; readonly state?: "started" | "not_started"; readonly result?: string; readonly error?: string; } /** * Render the aggregated AgentSwarm result as an XML string. * * Format: * * completed: N, failed: M * result text * ... * * * Note (#114): A element was previously emitted when any result * was non-completed, instructing the LLM to call AgentSwarm with * resume_agent_ids. The AgentSwarm tool schema has additionalProperties: false * and no resume_agent_ids parameter, so the hint was misleading and has been * removed. */ export declare function renderSwarmResults(results: readonly SwarmRunResult[]): string; /** * Convert SubagentResult array (from controller) to SwarmRunResult array. * * #146: T is constrained to extend SwarmSpec so that `r.task.data` is * provably assignable to the `spec: SwarmSpawnSpec | SwarmResumeSpec` * field — no cast needed. The call site in swarm/tool.ts already * instantiates SubagentBatchController, so the bound is * always satisfied. */ export declare function toSwarmRunResults(results: readonly SubagentResult[]): SwarmRunResult[]; export {}; //# sourceMappingURL=render.d.ts.map