/** * Path to the native-host status file. * This file is the single source of truth for "is the browser extension * connected and working?" It's written by the native host on every message * and on shutdown; the MCP read tools consult it to give accurate diagnostics * instead of generic "no logs found" boilerplate. */ export declare const NATIVE_HOST_STATUS_PATH: string; export declare class NativeHost { private sessionId; private logStream; private isStartingSession; private messageQueue; private processingQueue; private messageCount; private rateLimitWindowStart; private readonly MAX_MESSAGES_PER_SECOND; private readonly connectedAt; private firstHeartbeatAt; private lastHeartbeatAt; private lastActivityAt; private sessionsStarted; private readonly msgCount; private statusWriteScheduled; /** * Write the current status file atomically-ish (one JSON write). * Throttled to once per second to avoid disk thrash on hot message paths. */ private writeStatus; /** * Start the native messaging host * Reads JSON messages from stdin (sent by Chrome extension) */ start(): Promise; /** * Validate and sanitize URL * @param url The URL to validate * @returns Validated URL or undefined if invalid */ private validateUrl; /** * Validate and sanitize project directory path * For browser monitoring, try to detect the actual project directory from running terminal sessions * This ensures browser logs are grouped with the project they belong to */ private validateProjectDir; /** * Check and enforce rate limiting * @returns true if message should be processed, false if rate limit exceeded */ private checkRateLimit; /** * Process queued messages */ private processMessageQueue; /** * Handle a message from the Chrome extension */ private handleMessage; /** * Internal handler for processing a message */ private handleMessageInternal; /** * Start a new browser monitoring session */ private startSession; /** * End the current browser monitoring session */ private endSession; /** * Log a console message */ private logConsole; /** * Log a network request/response */ private logNetwork; /** * Log a JavaScript error */ private logError; /** * Log a performance metric */ private logPerformance; } //# sourceMappingURL=native-host.d.ts.map