UNPKG

browser-connect-mcp

Version:

MCP server for browser DevTools and backend debugging - analyze console logs, network requests, and backend logs with AI assistance

49 lines 1.64 kB
import CDP from 'chrome-remote-interface'; interface LogEntry { timestamp: string; level?: string; message: string; metadata?: Record<string, any>; source: string; raw: string; } interface DebuggerEvent { type: 'paused' | 'console' | 'exception' | 'resumed'; timestamp: string; data: any; } interface DebuggerScript { scriptId: string; url: string; startLine: number; startColumn: number; endLine: number; endColumn: number; hash?: string; isModule?: boolean; } export declare class BackendManager { private static instance; private connections; private readonly MAX_LOGS_PER_SOURCE; private readonly MAX_DEBUGGER_EVENTS; private constructor(); static getInstance(): BackendManager; addLogs(source: string, logs: LogEntry[]): void; getLogs(source: string): LogEntry[]; addDebuggerConnection(key: string, client: CDP.Client): void; getDebuggerConnection(key: string): CDP.Client | undefined; addDebuggerEvent(key: string, event: DebuggerEvent): void; getDebuggerEvents(key: string): DebuggerEvent[]; addDebuggerScript(key: string, script: DebuggerScript): void; getDebuggerScripts(key: string): DebuggerScript[]; addBreakpoint(key: string, breakpointId: string, breakpoint: any): void; removeBreakpoint(key: string, breakpointId: string): void; getBreakpoints(key: string): any[]; disconnectDebugger(key: string): Promise<void>; clearLogs(source: string): void; getAllConnections(): string[]; getConnectionInfo(key: string): any; } export {}; //# sourceMappingURL=backend-manager.d.ts.map