import { backendObservationStopped } from "./backend-task-recovery.js"; import type { DesktopNotification, DesktopTaskRecord } from "./desktop-state-store.js"; import type { DesktopSnapshot, DesktopThreadIdentity } from "./desktop-types.js"; export declare class DesktopTaskError extends Error { readonly code: string; readonly dispatchState?: "not_sent" | undefined; constructor(code: string, message: string, dispatchState?: "not_sent" | undefined); } export interface DesktopRecoveryInput { controllerSession: string; } export interface DesktopRecoveryHost { status(id: string): DesktopTaskRecord; update(id: string, operation: (task: DesktopTaskRecord) => void): DesktopTaskRecord; observe(target: DesktopThreadIdentity): Promise; applySnapshot(task: DesktopTaskRecord, snapshot: DesktopSnapshot, recover?: boolean): void; deliverPending(id: string, notificationId?: string): Promise; now(): Date; expire(task: DesktopTaskRecord): void; } export declare const desktopObservationStopped: typeof backendObservationStopped; export declare const desktopLive: (task: DesktopTaskRecord) => boolean; export declare function desktopUnresolvedSend(task: DesktopTaskRecord): boolean; export declare function desktopNotificationObsolete(task: DesktopTaskRecord, notification: DesktopNotification): boolean; export declare function suppressDesktopNotifications(task: DesktopTaskRecord, code: string, predicate?: (_notification: DesktopNotification) => boolean): void; export declare function createDesktopTaskRecovery(host: DesktopRecoveryHost): { close(id: string, input: DesktopRecoveryInput & { reason?: string; }): DesktopTaskRecord; unwatch(id: string, input: DesktopRecoveryInput): DesktopTaskRecord; recover(id: string, input: DesktopRecoveryInput): Promise; renew(id: string, input: DesktopRecoveryInput & { timeoutMs?: number; }): Promise; retryCallback(id: string, input: DesktopRecoveryInput & { notificationId?: string; }): Promise; };