/** * Encoding and fail-closed decoding for the application mailbox's index * records (WFT-84): the per-mailbox header, idempotency bindings, and the * entries of the delivery, listing, and terminal-retention indexes. * * Kept apart from the command-record codec so each stays under the repository's * file ceiling while carrying its full rationale. * * @module core/mailbox-index-codec */ import type { ApplicationCommandIdempotencyRecord, MailboxRecord } from './mailbox-types.ts'; /** * Decode the per-mailbox header holding the FIFO allocator and backlog counter. * * @throws {PersistedDataCorruptError} When the stored bytes are malformed. */ export declare function decodeMailboxRecord(bytes: Uint8Array, key: string): MailboxRecord; /** * Encode the per-mailbox header. */ export declare function encodeMailboxRecord(record: MailboxRecord): Uint8Array; /** * Decode an idempotency index record. * * @throws {PersistedDataCorruptError} When the stored bytes are malformed. */ export declare function decodeApplicationCommandIdempotencyRecord(bytes: Uint8Array, key: string): ApplicationCommandIdempotencyRecord; /** * Encode an idempotency index record. */ export declare function encodeApplicationCommandIdempotencyRecord(record: ApplicationCommandIdempotencyRecord): Uint8Array; /** * Decode the command id stored in a FIFO delivery-index entry. * * @throws {PersistedDataCorruptError} When the entry is not a non-empty string. */ export declare function decodeApplicationReadyEntry(bytes: Uint8Array, key: string): string; /** * Encode a FIFO delivery-index entry. */ export declare function encodeApplicationReadyEntry(commandId: string): Uint8Array;