/**
 * Immutable routing decision for the capture phase.
 *
 * The orchestrator used to carry the same decision in several mutable booleans
 * (`useStreamingEncode`, `useLayeredComposite`, `forceScreenshot`) plus worker
 * routing state. Keeping those values independently mutable made invalid
 * combinations representable during fallback. A CapturePlan is the single
 * value consumed by capture stages, and `replanAfterFailure` is the only
 * transition between variants.
 */
export type CapturePlanTarget = Readonly<{
    kind: "sdr_streaming" | "sdr_disk";
    workerCount: number;
    forceParallelStream: boolean;
}>;
export type CaptureRouting = Readonly<{
    kind: "default";
}> | Readonly<{
    kind: "worker_inversion" | "parallel_router";
    state: "active" | "reverted";
    fallback: CapturePlanTarget;
    memoryExhaustionFallback: CapturePlanTarget;
}>;
interface CapturePlanBase {
    readonly workerCount: number;
    readonly forceScreenshot: boolean;
    readonly forceParallelStream: boolean;
    readonly usePageSideCompositing: boolean;
    readonly hasHdrContent: boolean;
    readonly needsAlpha: boolean;
    readonly routing: CaptureRouting;
}
export interface SdrStreamingCapturePlan extends CapturePlanBase {
    readonly kind: "sdr_streaming";
}
export interface SdrDiskCapturePlan extends CapturePlanBase {
    readonly kind: "sdr_disk";
    readonly forceParallelStream: false;
}
export interface HdrLayeredCapturePlan extends CapturePlanBase {
    readonly kind: "hdr_layered";
    readonly forceScreenshot: true;
    readonly forceParallelStream: false;
}
export type CapturePlan = SdrStreamingCapturePlan | SdrDiskCapturePlan | HdrLayeredCapturePlan;
export interface CreateCapturePlanInput {
    workerCount: number;
    forceScreenshot: boolean;
    forceParallelStream?: boolean;
    useStreamingEncode: boolean;
    useLayeredComposite: boolean;
    usePageSideCompositing: boolean;
    hasHdrContent: boolean;
    needsAlpha: boolean;
    routing?: CaptureRouting;
}
export type CapturePlanFailure = Readonly<{
    kind: "streaming_unavailable";
}> | Readonly<{
    kind: "draw_element_verification";
}> | Readonly<{
    kind: "capture_failure";
    memoryExhaustion: boolean;
}>;
export declare function createCapturePlan(input: CreateCapturePlanInput): CapturePlan;
/** Pure, exhaustive capture fallback transition. The input plan is never mutated. */
export declare function replanAfterFailure(plan: CapturePlan, failure: CapturePlanFailure): CapturePlan;
export {};
//# sourceMappingURL=capturePlan.d.ts.map