import { type OpencodeEventSubscription, type OpencodeRuntime } from "./opencode-client.js"; import { type SwarmEventHandler, type SwarmEventName } from "./swarm-events.js"; import { type SpawnSwarmInput, type SwarmRunConfig, type SwarmRunState, type SwarmStatus } from "./swarm-run.js"; import { type EngineTemplates } from "./templates.js"; export type SwarmRunnerOptions = { runtime: OpencodeRuntime; templates?: EngineTemplates; subscribeEvents?: (onEvent: (event: unknown) => void | Promise) => Promise; }; export type SwarmRunner = { readonly state: SwarmRunState; on: (event: SwarmEventName, handler: SwarmEventHandler) => () => void; start: () => Promise; cancel: (reason?: string) => Promise; status: () => SwarmStatus; collect: (maxLines?: number) => Promise>; handleEvent: (event: unknown) => Promise; dispose: () => void; }; export declare function createSwarmRunner(config: SwarmRunConfig, options: SwarmRunnerOptions): SwarmRunner; /** Returns an error message when spawn input is invalid, otherwise `null`. */ export declare function validateSpawnSwarmInput(input: SpawnSwarmInput): string | null; export declare function newSwarmId(): string; //# sourceMappingURL=swarm-runner.d.ts.map