/** * Shared adapter helpers for web-dev-mcp framework adapters. * Extracted from duplicated code in Vite and Next.js adapters. * * Exported as '@winstonfassett/web-dev-mcp-gateway/helpers' */ export declare function setInternalLogging(value: boolean): void; export interface RegistrationPayload { id: string; type: string; port: number; pid: number; directory: string; } export interface RegistrationResult { serverId: string; logDir: string; } /** * Register a dev server with the gateway. Returns result on success, null on failure. */ export declare function registerWithGateway(gatewayUrl: string, payload: RegistrationPayload): Promise; /** * Register with gateway, retrying every 5s until successful. * Calls onRegistered callback once registered. */ export declare function registerWithRetry(gatewayUrl: string, payload: RegistrationPayload, onRegistered?: (result: RegistrationResult) => void): { cancel: () => void; }; /** * Patch console.log/warn/error/info/debug to forward to the gateway via WebSocket. */ export declare function patchConsole(gatewayUrl: string, serverId: string): Promise; export interface DevEventsHandle { send: (payload: any) => void; close: () => void; } /** * Connect to the gateway's dev-events WebSocket for build/HMR events. * Returns a handle to send events and close the connection. */ export declare function connectDevEvents(gatewayUrl: string, serverId: string): Promise; /** * Ensure the gateway is running. If not, spawn it as a detached process. * Returns once the gateway is reachable. */ export declare function ensureGateway(gatewayUrl: string): Promise; /** * Stop a previously auto-started gateway. */ export declare function stopGateway(gatewayUrl: string): boolean; //# sourceMappingURL=adapter-helpers.d.ts.map