import type { RollingWorkerSupervisorOptions, RollingWorkerSupervisorSnapshot, TransferableProxySocket } from "../types/index.js";
/**
 * Owns worker generations while the caller owns the public listening socket.
 * Sockets are transferred once to the active worker, so response bytes never
 * traverse a supervisor-side proxy hop.
 */
export declare class RollingWorkerSupervisor {
    private readonly options;
    private generation;
    private active;
    private candidate;
    private readonly draining;
    private readonly queuedSockets;
    private replacement;
    private rejectedSockets;
    private failedTransfers;
    private lastFailure;
    private closed;
    private shutdownPromise;
    private readonly shutdownWaiters;
    constructor(options: RollingWorkerSupervisorOptions);
    snapshot(): RollingWorkerSupervisorSnapshot;
    start(expectedVersion: string): Promise<RollingWorkerSupervisorSnapshot>;
    replace(expectedVersion: string): Promise<RollingWorkerSupervisorSnapshot>;
    acceptSocket(socket: TransferableProxySocket): void;
    private queueSocket;
    close(): Promise<void>;
    private closeWorkers;
    private requestWorkerShutdown;
    private forceTerminateWorkers;
    private notifyShutdownWaiters;
    private spawnCandidate;
    private flushQueuedSockets;
    private transferSocket;
    private handleTransferFailure;
    private rejectSocket;
    private recordFailure;
    private publishState;
}
