export type ProcessStatus = 'running' | 'stopped' | 'failed'; export interface ManagedProcess { processId: string; pid: number; command: string; cwd: string; status: ProcessStatus; startedAt: number; exitCode: number | null; } export interface StartOptions { command: string; cwd?: string; env?: Record; } export declare function startManagedProcess(opts: StartOptions): ManagedProcess; export declare function stopManagedProcess(processId: string, signal?: 'SIGTERM' | 'SIGKILL'): boolean; export declare function getManagedProcess(processId: string): ManagedProcess | null; export declare function getProcessLogs(processId: string, limit?: number, offset?: number): string[]; export declare function listManagedProcesses(): ManagedProcess[]; export declare function removeManagedProcess(processId: string): boolean; /** Poll ring buffer until regex match or timeout — used by WaitForOutput. */ export declare function watchForOutput(processId: string, pattern: string | RegExp, timeoutMs: number): Promise<{ matched: boolean; line: string | null; elapsedMs: number; }>;