/** * Weavetab — desktop/discovery.ts * Auto-discovery scanner for running Electron desktop applications. * * Detects: * 1. Active Electron instances with open CDP remote debugging ports * (Slack, Discord, VS Code, Notion, Obsidian, Linear, Cursor, etc.). * 2. Running Electron processes without remote debugging enabled, * providing actionable launch flags. * * Weavetab by fy2ne */ export interface DiscoveredElectronApp { name: string; port?: number; status: "debug_port_open" | "process_running_no_debug_port"; title?: string; webSocketDebuggerUrl?: string; browserVersion?: string; pid?: number; recommendation?: string; } export declare const COMMON_DEBUG_PORTS: number[]; /** * Fast probe of a potential CDP debug port on 127.0.0.1. * Resolves with version/target metadata if open, or null if unreachable. */ export declare function probeDebugPort(port: number, timeoutMs?: number): Promise<{ versionInfo: any; targets: any[]; } | null>; export declare function fetchTargets(port: number, timeoutMs?: number): Promise; /** * Infers an application name from CDP version and target metadata. */ export declare function identifyElectronAppName(versionInfo: any, targets: any[]): string; /** * Discovers running Electron apps on the host machine. * 1. Probes common and provided debug ports for open CDP listeners. * 2. Checks OS process list for running Electron apps lacking debug ports. */ export declare function discoverElectronApps(customPorts?: number[]): Promise; export declare function isValidElectronExecutablePath(execPath: string): boolean; export declare function resolveElectronExecutablePath(appName: string, configuredPath?: string): string | null;