/** * The bounded maintenance pass for the application delivery outbox (WFT-85): * recovering lapsed leases and retiring terminal receipts past retention. * * Nothing here runs on a hidden timer under `backgroundTasks: 'manual'`. A * pass walks the delivery keyspace in pages of `maintenanceBatchSize`, up to * {@link OUTBOX_MAINTENANCE_MAX_PAGES} pages per call, carrying its cursor to * the next call when the cap cuts it short. * * Unlike the mailbox, the outbox has no `accepted → available` release step: * the due index is time-keyed, so a delivery becomes claimable by the clock * alone, without a maintenance write. * * @module core/outbox-maintenance */ import type { OutboxMaintenanceReport } from './outbox-contract.ts'; import { type OutboxRuntime } from './outbox-internals.ts'; /** The time-keyed indexes encode `…:<16-digit instant>:`. */ export declare function parseSortableInstant(key: string, prefix: string): number | null; /** * Run one bounded maintenance pass: recover lapsed leases and retire terminal * receipts past retention. * * A corrupt record halts the pass with `PersistedDataCorruptError`: an outbox * whose durable state is untrustworthy must not keep recovering and parking * deliveries around the damage. */ export declare function runOutboxMaintenance(runtime: OutboxRuntime, now: number, stop?: AbortSignal): Promise;