export declare const MeshLinkProtocolVersion = 2;
export type MeshLinkFrameType = 'invoke' | 'reserveStreamIds' | 'confirmStreamIds' | 'releaseStreamIds' | 'streamWrite' | 'streamFinish' | 'streamDestroy' | 'streamActivate' | 'streamAttach' | 'revokeCapability'
/** Generic MeshClientService request delivery over an authenticated link. */
 | 'clientInvoke'
/** Exact-generation client close/fence. */
 | 'fenceClient'
/** Generic MeshClientService metadata mutation. */
 | 'clientUpdateMetadata' | 'disconnect' | 'updateMetadata' | 'accepted' | 'result' | 'ping' | 'pong' | 'goAway';
export interface MeshLinkFrameHeader {
    version?: number;
    type: MeshLinkFrameType;
    meshKey?: string;
    id?: string;
    replyTo?: string;
    clientId?: string;
    connectionId?: string;
    prefix?: string;
    timeoutMs?: number;
    /** Authenticated end-to-end invocation deadline (epoch milliseconds). */
    deadlineAt?: number;
    streamId?: number;
    count?: number;
    ids?: number[];
    /** Opaque, per-requester handle capability (v2). */
    capability?: string;
    /** Caller-generated idempotency key for a sender-ID reservation (v2). */
    reservationId?: string;
    ok?: boolean;
    error?: string;
    errorName?: string;
    userError?: boolean;
    reason?: string;
    closeCapability?: boolean;
}
export interface MeshLinkFrame {
    header: MeshLinkFrameHeader;
    body: Buffer;
}
export declare function encodeMeshLinkFrame(header: Omit<MeshLinkFrameHeader, 'version'>, body?: Uint8Array, maxFrameBytes?: number): Buffer;
export declare function decodeMeshLinkFrame(data: Uint8Array, maxFrameBytes: number): MeshLinkFrame;
//# sourceMappingURL=protocol.d.ts.map