import type { HubClientRecord, HubUINotifyPayload, HubUIShowWindowPayload, SessionRecord } from "@cline/shared"; export interface HubUIClientOptions { address: string; authToken?: string; clientId?: string; clientType?: string; displayName?: string; } /** * A lightweight hub client for UI/notification concerns. * Used by the menu bar app and other UI clients to send/receive * UI events (notifications, show window, client tracking). */ export declare class HubUIClient { private readonly client; constructor(options: HubUIClientOptions); connect(): Promise; close(): void; dispose(): Promise; getClientId(): string; /** * Send a notification request to the hub. * The hub will broadcast a "ui.notify" event to all subscribers (e.g. the menu bar app). */ sendNotify(payload: HubUINotifyPayload): Promise; /** * Request the hub to broadcast a "ui.show_window" event to all subscribers. */ sendShowWindow(payload?: HubUIShowWindowPayload): Promise; listClients(): Promise; listSessions(limit?: number): Promise; /** * Subscribe to UI-relevant hub events. * Returns an unsubscribe function. */ subscribeUI(handlers: { onNotify?: (payload: HubUINotifyPayload) => void; onShowWindow?: (payload: HubUIShowWindowPayload) => void; onClientRegistered?: (payload: Record) => void; onClientDisconnected?: (payload: Record) => void; onSessionCreated?: (payload: Record) => void; onSessionUpdated?: (payload: Record) => void; onSessionDetached?: (payload: Record) => void; }): () => void; }