/** * Claims for the application delivery outbox (WFT-85): leasing the earliest * due delivery to one attempt and handing that attempt a digest-verified * payload, the credential reference, and an attempt-scoped abort signal. * * The due index is time-keyed, so a claim considers the earliest entries and * takes the first one that is due now. A delivery in retry backoff never holds * back one that is due, which is the deliberate difference from the mailbox's * strict FIFO. * * @module core/outbox-delivery */ import type { ApplicationDeliveryClaimedPayload, OutboxClaimResult } from './outbox-contract.ts'; import { type OutboxRuntime } from './outbox-internals.ts'; import { type ApplicationDeliveryRecord } from './outbox-types.ts'; /** How many due-index entries a non-mutating due-work observation looks past. */ export declare const DUE_HEAD_LOOKAHEAD = 8; /** * Recompute an inline payload's digest and fail closed on a mismatch. A * reference payload is handed over unverified, with the stored digest. * * @throws {PersistedDataCorruptError} When a stored inline payload no longer * matches the digest enqueue recorded for it. */ export declare function verifyClaimedPayload(runtime: OutboxRuntime, record: ApplicationDeliveryRecord): Promise; /** * Lease the earliest due delivery to one attempt. * * Only a lost compare-and-swap counts toward contention; housekeeping that * discarded an orphaned entry is progress. */ export declare function claimNextDelivery(runtime: OutboxRuntime, options?: { readonly signal?: AbortSignal | undefined; }): Promise;