import type { FetchLike } from './service.js'; export type ArkmeDesktopBridgeAction = 'device.lock.status' | 'device.lock.bind' | 'device.lock.lock' | 'device.lock.unlock' | 'device.lock.sync' | 'device.lock.logout' | 'device.lock.cleanup' | 'capabilities.get' | 'lifecycle.get' | 'notification.show' | 'badge.applySnapshot' | 'account.scope.attest' | 'account.scope.prepare' | 'account.scope.commit' | 'account.scope.abort'; export type ArkmeDesktopBridgeOutcome = 'accepted' | 'duplicate' | 'unsupported' | 'native-failed' | 'expired' | 'rate-limited'; export interface ArkmeDesktopBridgeConfig { endpoint: string; token: string; sessionId: string; } export interface ArkmeDesktopNotificationPayload { idempotencyKey: string; kind: 'chat.message'; occurredAtMillis: number; expiresAtMillis: number; presentation: { title: string; body: string; }; activation: { kind: 'chat-source'; sourceRef: string; sourceKey?: string; }; } export interface ArkmeDesktopBadgeSnapshotPayload { generation: number; revision: number; count: number; } export interface ArkmeDesktopNotificationDispatchResult { /** True only when no native side effect was attempted, so Browser fallback is safe. */ fallbackToBrowser: boolean; outcome: ArkmeDesktopBridgeOutcome | 'unavailable'; } /** * Resolve the native bridge only when the complete, client-injected contract is * present. Partial or non-loopback configuration is rejected as unavailable; * no credential is ever sent to a caller-controlled origin. */ export declare function arkmeDesktopBridgeConfigFromEnv(env: Readonly>): ArkmeDesktopBridgeConfig | undefined; export declare function requestArkmeDesktopBridge(config: ArkmeDesktopBridgeConfig, fetchImpl: FetchLike, action: ArkmeDesktopBridgeAction, payload: object, timeoutMs?: number): Promise>; export declare class ArkmeDesktopAttentionBridge { private readonly config; private readonly fetchImpl; private capabilities?; private badgeRevision; private badgeSourceRevision; private badgeGeneration; private lastBadgeCount; private badgeMutationTail; constructor(config?: ArkmeDesktopBridgeConfig | undefined, fetchImpl?: FetchLike, badgeGeneration?: number); available(): boolean; showNotification(payload: ArkmeDesktopNotificationPayload): Promise; applyBadgeSummary(summary: { count: number; revision: number; }): Promise; resetBadgeCount(): Promise; private applyBadgeSnapshotSerial; private readCapabilities; private request; } /** Samples optional native lifecycle facts without delaying the Host session poll. */ export declare function createDesktopLifecycleReader(fetchImpl: FetchLike): (() => Promise<{ resumeGeneration: number; suspended: boolean; } | undefined>); //# sourceMappingURL=desktop-attention-bridge.d.ts.map