UNPKG

dev3000

Version:

AI-powered development tools with browser monitoring and MCP server integration

80 lines 2.42 kB
import { WebSocket } from "ws"; export interface CDPEvent { method: string; params: Record<string, unknown>; timestamp: number; sessionId?: string; } export interface CDPConnection { ws: WebSocket; sessionId: string | null; nextId: number; } export declare class CDPMonitor { private browser; private connection; private debugPort; private eventHandlers; private profileDir; private screenshotDir; private logger; private debug; private browserPath?; private isShuttingDown; private pendingRequests; private networkIdleTimer; private pluginReactScan; private cdpUrl; private lastScreenshotTime; private minScreenshotInterval; private chromePids; private onWindowClosedCallback; private appServerPort?; private mcpServerPort?; constructor(profileDir: string, screenshotDir: string, logger: (source: string, message: string) => void, debug?: boolean, browserPath?: string, pluginReactScan?: boolean, appServerPort?: string, mcpServerPort?: string); private debugLog; /** * Check if a URL should be monitored (i.e., it's from the user's app server, not dev3000's MCP server or external sites) */ private shouldMonitorUrl; start(): Promise<void>; getCdpUrl(): string | null; getChromePids(): number[]; setOnWindowClosedCallback(callback: (() => void) | null): void; private discoverChromePids; private createLoadingPage; private setupRuntimeCrashMonitoring; private launchChrome; private connectToCDP; private sendCDPCommand; private enableCDPDomains; private setupEventHandlers; private onCDPEvent; private handleCDPMessage; navigateToApp(port: string): Promise<void>; private setupInteractionTracking; private startInteractionPolling; private scheduleNetworkIdleScreenshot; private takeScreenshot; executeInteraction(interaction: { type: string; coordinates?: { x: number; y: number; }; key?: string; code?: string; modifiers?: Record<string, unknown>; to?: { x: number; y: number; }; from?: { x: number; y: number; }; }): Promise<void>; shutdown(): Promise<void>; private killInstanceChromeProcesses; } //# sourceMappingURL=cdp-monitor.d.ts.map