import type { LegacyViewCursor } from "./legacy-view-cursor.ts";
export declare const EVENT_RESYNC_CAPABILITY = "event_resync";
export type ResyncReason = "overflow" | "stall";
/**
 * A shed's recovery cut: read by the peer's barrier after the gap, released on every end. `sessions` are the ones
 * it reports, carried into a re-cut so a session detached in between is still reported closed.
 */
export type ResyncCut = LegacyViewCursor & {
    readonly sessions: readonly string[];
};
export type RpcSessionResyncRequired = {
    readonly type: "resync_required";
    readonly sessionId: string;
    readonly reason: ResyncReason;
    readonly message: unknown;
    readonly closed?: true;
};
export declare function isCorrelatedReply(value: unknown): boolean;
/** One gap and one outstanding ping, regardless of how many events the producer emits. */
export declare class SocketPeerRecovery {
    private reason;
    private awaitingPing;
    private pingBuffered;
    private replyLost;
    private readonly write;
    constructor(write: (line: string) => void);
    get pending(): boolean;
    /** The first shed names the gap's reason; a supersession while pending keeps it. */
    shed(reason: ResyncReason): void;
    /** A fresh set_client_info is the existing connection-scoped acknowledgement. */
    acknowledge(): void;
    loseReply(): void;
    ping(): void;
    /** The gap line that opens the recovery; taken once the peer drains again, before the cut's frames. */
    takeGap(): string;
}
//# sourceMappingURL=socket-peer-recovery.d.ts.map