import { EventEmitter } from 'events'; export interface AdversarialJob { id: string; projectId: string; specName: string; phase: string; status: 'pending' | 'running-review' | 'completed' | 'failed'; startedAt: string; completedAt?: string; error?: string; analysisOutputPath: string; promptOutputPath: string; targetFile: string; model?: string; } interface RunOptions { projectId: string; specName: string; phase: string; /** * Worktree the review agent runs in (spawn `cwd`) — the only root this * runner spends. It never resolves a spec path and never builds a * `ToolContext`, so requirement 5.5 keeps `RunOptions` single-rooted; the * workflow root reaches the spawn as an argument to `run`/`runAgent`. */ workspacePath: string; targetFile: string; promptOutputPath: string; analysisOutputPath: string; version: number; model?: string; cli?: string; cliArgs?: string[]; } export declare class AdversarialRunner extends EventEmitter { private jobs; private processes; private timeouts; getJob(jobId: string): AdversarialJob | undefined; getJobsForProject(projectId: string): AdversarialJob[]; getActiveJobsForProject(projectId: string): AdversarialJob[]; /** * @param workflowRoot Shared workflow root for this job. Not a `RunOptions` * field (requirement 5.5) — it is threaded through to the spawn helper, * which sets `SPEC_WORKFLOW_SHARED_ROOT` from it (requirement 2.13). */ run(opts: RunOptions, workflowRoot: string): Promise; private executeJob; /** * @param workspacePath spawn `cwd` — the worktree the agent runs in. * @param workflowRoot the job's shared workflow root. Carried here rather * than on `RunOptions` (requirement 5.5); it becomes * `SPEC_WORKFLOW_SHARED_ROOT` on the spawn env (requirement 2.13). */ private runAgent; cancelJob(jobId: string): boolean; private cleanupProcess; shutdown(): void; } export {}; //# sourceMappingURL=adversarial-runner.d.ts.map