/**
 * CheckpointManager - Approval gates between pipeline phases
 *
 * Supports two gate types:
 * - auto: condition function returns true → pass automatically
 * - manual: requires explicit approval (skipped in ULTRAWORK mode)
 *
 * Checkpoint state is persisted to disk alongside PhaseResultStore.
 */
import type { StageResult } from './PhasePipeline.js';
export interface CheckpointGate {
    /** Phase number after which this gate activates */
    afterPhase: number;
    /** Gate type: auto (condition-based) or manual (user approval) */
    type: 'auto' | 'manual';
    /** For auto gates: condition function (true = pass) */
    condition?: (result: StageResult) => boolean;
    /** Optional label for this checkpoint */
    label?: string;
}
export declare class CheckpointManager {
    private readonly gates;
    private readonly options;
    private state;
    private readonly statePath;
    /**
     * @param gates - Checkpoint gate definitions
     * @param options - Optional: ultrawork mode and persistence path
     */
    constructor(gates: CheckpointGate[], options?: {
        ultrawork?: boolean;
        storeDir?: string;
    });
    /**
     * Check if the pipeline should pause after the given phase.
     * Returns true if a gate exists and hasn't been approved yet.
     */
    shouldPause(phaseNumber: number, result: StageResult): boolean;
    /** Approve a checkpoint (manual or failed auto) */
    approve(phaseNumber: number, auto?: boolean): void;
    /** Check if a checkpoint has been approved */
    isApproved(phaseNumber: number): boolean;
    /** Get the phase number where pipeline is currently paused (if any) */
    getPausedPhase(): number | undefined;
    /** Get gate definition for a phase */
    getGate(phaseNumber: number): CheckpointGate | undefined;
    /** Get all gates */
    getGates(): CheckpointGate[];
    /** Reset all checkpoint state */
    reset(): void;
    private loadState;
    private saveState;
}
//# sourceMappingURL=CheckpointManager.d.ts.map