/** * Multi-Agent Swarm Mode * * Runs the same task with multiple agents in parallel using git worktrees. * Supports three strategies: * - race: First successful agent wins * - consensus: All agents run, LLM judges best result * - pipeline: Chain agents sequentially (build → review → test) */ import type { Agent } from './agents.js'; import { type LoopResult } from './executor.js'; export type SwarmStrategy = 'race' | 'consensus' | 'pipeline'; export type SwarmConfig = { task: string; cwd: string; agents?: Agent[]; strategy: SwarmStrategy; headless?: boolean; enableSkills?: boolean; auto?: boolean; validate?: boolean; maxIterations?: number; pr?: boolean; push?: boolean; commit?: boolean; onProgress?: (message: string) => void; }; export type SwarmAgentResult = { agent: Agent; result: LoopResult; worktreePath: string; branch: string; success: boolean; error?: string; }; export type SwarmResult = { strategy: SwarmStrategy; agents: Agent[]; results: SwarmAgentResult[]; winner?: SwarmAgentResult; totalCost: number; prUrl?: string; }; /** * Run a swarm of agents on the same task. */ export declare function runSwarm(config: SwarmConfig): Promise; //# sourceMappingURL=swarm.d.ts.map