import type { FleetManifest, FleetChild } from "./manifest.js"; import type { ScaffoldResult } from "./scaffolder.js"; import type { ChildSpawnResult } from "./runner.js"; import type { ChildExecution } from "./types.js"; import type { SharedBlackboard } from "./shared-blackboard.js"; /** Optional 3rd param threads the blackboard config into round-1 scaffolding. */ export interface Scaffolder { scaffold(rootDir: string, child: FleetChild, blackboard?: { dbPath: string; namespace: string; maxRounds: number; }): Promise; } export interface Runner { run(spec: { cwd: string; task: string; timeoutMs?: number; }): Promise; } export declare class FleetCoordinator { private readonly scaffolder; private readonly runner; constructor(deps?: { scaffolder?: Scaffolder; runner?: Runner; }); execute(manifest: FleetManifest): Promise; /** * Run children for up to opts.maxRounds rounds sharing the blackboard. * Round 1 scaffolds each child (writes config.fleet from scaffoldCfg). * Rounds 2..N skip scaffolding entirely and re-spawn via runner only. * Early-stops when a completed round adds zero new 'finding' facts. * Returns the FINAL round's ChildExecution[]. */ executeRounds(manifest: FleetManifest, blackboard: SharedBlackboard, opts: { maxRounds: number; dbPath: string; }): Promise<{ executions: ChildExecution[]; roundsRun: number; }>; /** * Round-aware never-reject thunk. * Scaffolds ONLY on round 1 (with optional blackboard config threaded in). * On rounds ≥ 2, skips scaffolding and reuses the round-1 absPath. */ private runChildRound; private runChild; } //# sourceMappingURL=coordinator.d.ts.map