import { type BuildDispatchCheckpoint, type BuildRunningAction, type BuildWorkerBudgetReservation } from "../core/buildExecution.js"; import type { RunPaths } from "./artifacts.js"; import type { GraphExecutionState } from "../core/scheduler.js"; import type { GraphCheckpointLease } from "../runtime/graphCheckpoint.js"; export interface BuildActionSettlement { outcome: "succeeded" | "failed"; recordedAt: string; receipt?: unknown; } export interface BuildActionExecutor { /** Called only after the exact action intent is durable. */ execute(action: Readonly, context?: Readonly): Promise; /** Called instead of execute whenever a crash left the action outcome uncertain. */ reconcile(action: Readonly, context?: Readonly): Promise; } export interface BuildActionExecutionContext { workerBudgetReservation?: Readonly; graphState?: Readonly; signal?: AbortSignal; } export interface DurableBuildActionResult { checkpoint: Readonly; ledgerHead: string; reconciled: boolean; } /** * Execute one inner BUILD effect beneath the scheduler's single outer BUILD * reservation. This append-only ledger never overwrites scheduler sideEffect; * the caller seals and binds the ledger head in the outer result receipt. */ export declare function executeDurableBuildAction(paths: RunPaths, actionValue: Readonly, executor: Readonly, options: Readonly<{ owner: Readonly; recordedAt: string; context?: Readonly; }>): Promise;