import type { PartnerReply } from '../channel-message.js'; import type { PartnerStore } from '../store.js'; export declare class NotificationDeferredError extends Error { constructor(); } type Target = { channelId: string; userId: string; }; export interface NotificationDeliveryRecord { id: string; companionId: string; createdAt: number; completedAt?: number; supersededAt?: number; idleTextDigest?: string; reply: PartnerReply; targets: (Target & { sentParts: number[]; lastAttemptAt?: number; lastError?: string; retrySafe?: boolean; })[]; } /** Compare the whole autonomous text regardless of how the same words were segmented. */ export declare function idleTextDigest(reply: PartnerReply): string | undefined; export interface DeliveryTiming { storeMs: number; partMs: number; totalMs: number; commits: number; } type Send = (target: Target, reply: PartnerReply, part: (index: number, send: () => Promise) => Promise) => Promise; /** Freeze recipients and payload for each logical notification. Persist each acknowledged part. * A lost remote acknowledgement may still cause a duplicate; channels do not offer exactly-once delivery. */ export declare class NotificationDelivery { private store; private running; constructor(store: PartnerStore); deliver(id: string, companionId: string, targets: () => Target[], reply: PartnerReply, send: Send, observe?: (timing: DeliveryTiming) => void): Promise; private execute; } export {}; //# sourceMappingURL=notification-delivery.d.ts.map