/** * Reply decode funnel, ported from `decode_response` in * `core/sdk/src/vsr.rs`. Strict order: frame length, frame discriminant * (evictions surface as typed errors, never a read timeout), declared size, * pre-commit denial status before any body decode, then the committed * result section for result-framed operations. */ import { ResponseError } from '../error.utils.js'; export declare class VsrEvictionError extends ResponseError { constructor(errorCode: number); } /** * Decodes one complete consensus frame into the reply body, stripping the * committed result section for result-framed operations and mapping every * denial channel to a thrown error. */ export declare const decodeResponse: (frame: Buffer, commandCode?: number) => Buffer; /** * Strips the committed result section leading a result-framed reply body. * A Register reply is result-framed too, except a terminal register failure * ships an empty body, passed through so the typed decode fails. A metadata * body too short for the entries its count claims is corruption, never a * silent success. */ export declare const splitMetadataResult: (operation: number, body: Buffer, commandCode?: number) => Buffer; /** * Maps a session-terminal eviction frame to a typed error, the same mapping * as `eviction_reason_to_error` in `core/common`. An invalid protocol window * degrades to an authentication error rather than trusting the remote frame. */ export declare const evictionError: (frame: Buffer) => VsrEvictionError; //# sourceMappingURL=reply.d.ts.map