/** * The adapter runner for the application delivery outbox (WFT-85): one due * delivery claimed, durably marked `attempting`, handed to the configured * transport, and settled on what the transport reported. The bounded drain * that repeats it lives in `outbox-drain.ts`. * * The runner never trusts the adapter's completion as a disposition. It * validates the outcome, then commits the matching transition fenced on the * attempt token and the `attempting` bytes; only that commit moves the record. * A thrown adapter error is an unknown outcome, because the request may have * left the process. When the attempt deadline elapses while the send is in * flight the runner stops waiting, treats the result as unknown, and aborts * the adapter's signal as it releases the attempt. * * @module core/outbox-runner */ import type { ApplicationDeliveryAdapter, OutboxDeliverResult } from './outbox-contract.ts'; import { type OutboxRuntime } from './outbox-internals.ts'; /** * Claim the earliest due delivery, run it through the adapter, and settle it. * * The `attempting` commit happens before the adapter is called; a claim whose * begin is refused (cancelled or reclaimed between the two) is released * without calling the transport. */ export declare function deliverNext(runtime: OutboxRuntime, options?: { readonly signal?: AbortSignal | undefined; }): Promise; /** The configured adapter, or the caller-mistake diagnostic when there is none. */ export declare function requireAdapter(runtime: OutboxRuntime): ApplicationDeliveryAdapter;