import type { CompiledBuildPlan } from "../core/buildPlan.js"; import type { GraphCheckpointLease } from "../runtime/graphCheckpoint.js"; import { type BuildWorkerAdapter } from "../runtime/buildWorker.js"; import type { RunPaths } from "./artifacts.js"; import type { BuildCoordinatorAdapter, BuildWorkerBudgetEstimates } from "./buildCoordinator.js"; import { type GitRunner } from "./worktreeExecution.js"; export interface ReviewedCommandResult { code: number; stdout: string; stderr: string; killed?: boolean; } export interface PiBuildCoordinatorRuntimeOptions { compiled: Readonly; paths: RunPaths; owner: Readonly; repositoryRoot: string; candidateRoot: string; git: GitRunner; worker: Readonly; now(): string; unattended: boolean; budgetForNode(nodeId: string): Readonly>; runReviewedCommand(command: string, options: Readonly<{ cwd: string; timeoutMs: number; signal?: AbortSignal; }>): Promise; validateStructuredOutput?(input: Readonly<{ validatorRef: string; value: unknown; nodeId: string; contractId: string; }>): boolean; validateReviewedCommands(input: Readonly<{ validatorRef: string; commands: readonly string[]; nodeId: string; contractId: string; }>): boolean; allowWorktreeCreation: boolean; trustRepositoryCheckout: boolean; } /** Production adapter beneath the durable coordinator. Models never write run * artifacts or settle checkpoints; this trusted adapter owns those boundaries. */ export declare function createPiBuildCoordinatorAdapter(options: Readonly): Readonly; export declare function buildWorkspaceWriteFingerprint(cwd: string, writeSet: readonly string[], git: GitRunner): string;