/** An obligation with no committed event behind it (a refused accept, P3.9): the whole message is journalled, so * the obligation exists before the first delivery attempt and a restart can still send it. */ export interface OwedRecord { t: 'owed'; key: string; at: string; /** The store's event sequence when it was recorded (orders it among the derived obligations). */ seq: number; kind: string; audience: 'producer' | 'lead'; to: string; subject: string; body: string; doc: string; version: number; } export type JournalRecord = { t: 'delivered'; key: string; at: string; receipt: string; again?: true; adopted?: true; } | { t: 'failed'; key: string; at: string; error: string; } | OwedRecord; export interface KeyState { deliveredAt?: string; /** Failed delivery attempts recorded for the key (it is delivered or exhausted once this reaches the bound). */ failures: number; lastError?: string; redeliveries: number; } export declare class NoticeJournal { readonly path: string; private readonly states; private readonly owedList; private tornTail; constructor(path: string); state(key: string): KeyState; /** The journalled obligations, in the order they were recorded. */ owed(): readonly OwedRecord[]; private apply; /** Record one outcome durably. Throws on an I/O error; the in-memory state is then left unchanged. */ append(r: JournalRecord): void; } //# sourceMappingURL=notice-journal.d.ts.map