import { Readable } from 'node:stream'; export interface LaunchedProcess { pid: number; stderr: Readable; stop(): Promise; } export interface LaunchConfig { command: string; args: string[]; env?: Record; } /** * Pure process lifecycle manager. No MCP protocol dependency. * Handles spawn, ready detection, and graceful shutdown for locally-launched MCP servers. */ export declare class ProcessLauncher { /** * Launch a child process and return a handle for lifecycle management. */ static launch(config: LaunchConfig): LaunchedProcess; /** * Wait for a TCP port to become available (listening). * Probes the port every 200ms until connection succeeds or timeout. */ static waitForPort(host: string, port: number, timeout: number): Promise; /** * Wait for any of the given patterns to appear in the stderr stream. * Rejects if no pattern matches within timeout. */ static waitForReady(stderr: Readable, patterns: string[], timeout: number): Promise; } //# sourceMappingURL=process-launcher.d.ts.map