/** * Console Interceptor - Safely intercepts and captures console output * * Provides a clean abstraction for temporarily redirecting console.log and console.error * output during command execution. Ensures proper cleanup and prevents memory leaks. * * Used by MCP server to capture command output for structured responses. */ export declare class ConsoleInterceptor { private isActive; private originalError?; private originalLog?; private outputs; /** * Starts intercepting console output * Must be called before executing code that produces console output */ start(): void; /** * Stops intercepting console output and restores original console methods * Must be called in finally block to ensure cleanup even on errors */ stop(): void; /** * Gets all captured output as a single string * @returns Concatenated console output */ getOutput(): string; /** * Gets all captured output lines * @returns Array of individual output lines */ getOutputLines(): string[]; /** * Checks if interceptor is currently active * @returns true if intercepting console output */ isIntercepting(): boolean; /** * Clears captured output without stopping interception */ clear(): void; /** * Captures log output */ private captureLog; /** * Captures error output */ private captureError; } //# sourceMappingURL=console-interceptor.d.ts.map