/** * Launcher port and default RunSpawner-backed adapter. * * HARD BOUNDARY: `src/cli/commands/do.ts` MUST NOT import RunSpawner or * execa directly. The RunSpawner import lives here; do.ts imports from * this file instead. */ import { RunSpawner } from "../chat/run-spawner.js"; import type { PromotionPlan } from "./types.js"; /** * Port for launching the work behind an approved PromotionPlan. * Injected into runDo so unit tests use a fake and never spawn a real process. */ export interface Launcher { /** Launch the work described by plan. Returns the runId used + optional pid. */ launch(plan: PromotionPlan): Promise<{ runId: string; pid?: number; }>; } /** Options for the RunSpawnerLauncher adapter. */ export interface RunSpawnerLauncherOptions { /** Absolute project root, passed to RunSpawner. */ projectRoot: string; /** The finding id — embedded in the generated runId: `do--`. */ findingId: string; /** Session id for the RunSpawner sidecar. Defaults to `do-`. */ sessionId?: string; /** Clock injection. Defaults to () => new Date().toISOString(). */ now?: () => string; /** * Pre-built RunSpawner to use instead of constructing one. * Inject a RunSpawner with a fake spawn fn in launcher.test.ts so no real * process is ever started in unit tests. */ spawner?: RunSpawner; } /** * Default Launcher adapter — wraps RunSpawner to spawn a detached * `agent-bober run --run-id ` child. * * runId format: `do--` — stable prefix for identifying * do-bridge runs in roster state.json files. */ export declare class RunSpawnerLauncher implements Launcher { private readonly spawner; private readonly findingId; private readonly now; constructor(opts: RunSpawnerLauncherOptions); launch(plan: PromotionPlan): Promise<{ runId: string; pid?: number; }>; } //# sourceMappingURL=launcher.d.ts.map