/** * Admission for the application command mailbox (WFT-84): validating an offered * command, resolving its idempotency identity, enforcing backlog capacity, and * committing the record with its indexes and fleet event. * * Admission is the one transition that also allocates: it advances the mailbox * header's FIFO sequence and open count in the same conditional batch as the * record itself, so backlog accounting can never drift from the records it * describes. * * @module core/mailbox-admission */ import type { ApplicationCommandAdmission, ApplicationCommandInput, MailboxCapacity } from './mailbox-contract.ts'; import { type MailboxRuntime } from './mailbox-internals.ts'; /** Backlog accounting, shared by admission rejection and the public `capacity()`. */ export declare function capacityOf(runtime: MailboxRuntime, open: number, admitted: number): MailboxCapacity; /** * Offer a command to the mailbox. * * An exact retry of the same idempotency identity returns the original * receipt without creating a second command. Reusing the key with a different * caller, target, kind, or payload digest returns a conflict and leaves the * original command untouched. A full backlog is rejected before anything is * persisted. */ export declare function admitCommand(runtime: MailboxRuntime, command: ApplicationCommandInput): Promise;