import { type JsonValue } from "../kernel/json.js"; import { type Database } from "./database.js"; export interface OutboxRecord { id: number; kind: string; scopeId: string | null; dedupeKey: string; payload: T; createdAt: number; attempts: number; } /** Persist one post-commit fact. Repeating an identical key is idempotent; * changing any immutable byte under the same key is a conflict. */ export declare function enqueueOutbox(db: Database, input: { kind: string; scopeId?: string | null; dedupeKey: string; payload: T; createdAt?: number; }): void; /** Atomically claim a bounded retry batch. A crash leaves it pending; the next * claim retries it. The daemon is the sole dispatcher, so attempt increment is * the durable claim receipt and no lease table is needed. */ export declare function claimOutbox(kind: string, limit?: number, db?: Database): OutboxRecord[]; export declare function completeOutbox(id: number, completedAt?: number, db?: Database): boolean; //# sourceMappingURL=outbox.d.ts.map