/** * Delivery for the application command mailbox (WFT-84): leasing the FIFO head * to one attempt and handing that attempt a digest-verified payload. * * Strict FIFO is the ordering contract. A claim only ever considers the * lowest-sequence entry in the delivery index, so a later command never * overtakes a delayed head — `claim()` reports `held` instead of skipping * ahead. That also means head-of-line blocking is real and intended: a command * in retry backoff holds its resource's queue until it is due or dead-lettered. * * @module core/mailbox-delivery */ import type { ApplicationCommandClaimedPayload, MailboxClaimResult } from './mailbox-contract.ts'; import { type MailboxRuntime } from './mailbox-internals.ts'; import type { ApplicationCommandRecord } from './mailbox-types.ts'; /** * Recompute an inline payload's digest and fail closed on a mismatch. * * A reference payload cannot be verified here — Weft never dereferences the * locator — so the consumer receives the stored digest and `verified: false` * rather than a guarantee the mailbox cannot back up. * * @throws {PersistedDataCorruptError} When a stored inline payload no longer * matches the digest admission recorded for it. */ export declare function verifyClaimedPayload(runtime: MailboxRuntime, record: ApplicationCommandRecord): Promise; /** * Lease the FIFO head of a mailbox to one attempt. * * The returned claim carries an attempt-scoped `AbortSignal` registered in this * process, so a cancellation request raised here reaches the claimant * immediately. A claimant in another process learns about cancellation from * `renew()` instead — the signal is process-local by construction. */ export declare function claimNextCommand(runtime: MailboxRuntime, options?: { readonly signal?: AbortSignal | undefined; }): Promise;