export interface DaemonReceipt { readonly id: string; readonly text: string; readonly at: number; readonly deliveredAt?: number | undefined; } export interface ReceiptStoreIo { read(path: string): string | null; write(path: string, contents: string): void; } export declare const realReceiptStoreIo: ReceiptStoreIo; /** Formats a timestamp as the local HH:MM wall-clock time for receipt text. */ export declare function formatReceiptTime(timestamp: number): string; export declare class DaemonReceiptStore { private readonly path; private readonly io; private readonly now; private receipts; constructor(path: string, options?: { io?: ReceiptStoreIo; now?: () => number; }); /** * Both bounds in one place: drop receipts older than MAX_RECEIPT_AGE_MS, then * keep at most MAX_KEPT_RECEIPTS (newest last, so the cap drops the oldest). * Idempotent, running it on an already-bounded list changes nothing. */ private applyBounds; /** Record a receipt: logged immediately, persisted for the next surface. */ record(text: string): DaemonReceipt; /** All receipts, newest last (delivered and undelivered). */ list(): readonly DaemonReceipt[]; /** * Undelivered receipts for a consuming /status read (`?receipts=consume`); * marks them delivered so a receipt is surfaced to the first CONSUMING * reader exactly once. Callers serving a non-consuming read must not call * this, that is what keeps identity probes receipt-neutral. */ consumeUndelivered(): readonly DaemonReceipt[]; private persist; } //# sourceMappingURL=receipts.d.ts.map