import { type DeliveryMessage, type DeliveryRecord } from "../../contracts/index.js"; /** * Load DeliveryRecord from disk. Returns empty record on any read/parse failure — never throws. */ export declare function loadDeliveryRecord(ledgerPath: string): DeliveryRecord; /** * Persist DeliveryRecord atomically via temp-file + rename. */ export declare function saveDeliveryRecord(ledgerPath: string, record: DeliveryRecord): void; /** * Returns true when the cooldown period has elapsed and the message should be shown. * Clock-skew safe: if now < lastShownAtEpochMs (clock jumped back), treat cooldown as expired. */ export declare function isCooldownExpired(record: DeliveryRecord, nowMs: number): boolean; /** * Returns true if this message id was permanently dismissed. */ export declare function isDismissed(record: DeliveryRecord, messageId: string): boolean; /** * Record that a message was shown. Updates cooldown window. */ export declare function recordShown(record: DeliveryRecord, message: DeliveryMessage, nowMs: number): DeliveryRecord; /** * Record that a message was permanently dismissed. */ export declare function recordDismissed(record: DeliveryRecord, messageId: string): DeliveryRecord; /** * Cache a fetched message for offline use. */ export declare function cacheMessage(record: DeliveryRecord, message: DeliveryMessage, nowMs: number): DeliveryRecord; /** * Resolve the default ledger path: $MARTIN_STATE_DIR/delivery-record.json * or ~/.martin/delivery-record.json. */ export declare function resolveDefaultLedgerPath(): string;