export type StreamKind = "stdout" | "stderr"; export interface MonitorConfig { id: string; command: string; cwd?: string; include?: RegExp; exclude?: RegExp; captureStderr: boolean; reportExit: boolean; maxEventsPerWindow: number; windowMs: number; } export interface MonitorEvent { monitorId: string; command: string; kind: StreamKind | "exit" | "flood"; line: string; } export interface MonitorHandle { config: MonitorConfig; startedAt: number; eventCount: number; stop(reason: string): void; } type Emit = (event: MonitorEvent) => void; export declare function startMonitor(config: MonitorConfig, emit: Emit): MonitorHandle; export declare function stopMonitor(id: string, _reason: string): boolean; export declare function listMonitors(): Array<{ id: string; command: string; uptimeMs: number; eventCount: number; }>; export declare function stopAllMonitors(): number; export declare function safeRegExp(source: string | undefined, flags?: string): RegExp | undefined; export {}; //# sourceMappingURL=monitor.d.ts.map