import { runCommand } from './host-mcp/platform.js'; export interface ProcNode { pid: number; ppid: number; pgid?: number; state?: string; cmd: string; } export declare const BENIGN_CMD_PATTERNS: readonly RegExp[]; export declare function isBenignCmd(cmd: string, patterns?: readonly RegExp[]): boolean; export declare function parseProcListUnix(stdout: string): ProcNode[]; export declare function parseProcListWin(jsonText: string): ProcNode[]; export declare function collectNonBenignDescendants(all: ProcNode[], rootPid: number, patterns?: readonly RegExp[]): ProcNode[]; export declare function listAllProcesses(): Promise; export declare function findLiveBackgroundTasks(rootPid: number, patterns?: readonly RegExp[]): Promise; export declare function parseProcListUnixWithGroup(stdout: string): ProcNode[]; export declare function isGroupLeaderReused(all: ProcNode[], pgid: number): boolean; export declare function collectNonBenignGroupMembers(all: ProcNode[], pgid: number, patterns?: readonly RegExp[]): ProcNode[]; export declare function findLiveGroupBackgroundTasks(pgid: number, patterns?: readonly RegExp[]): Promise; export declare function reapProcessTrees(pids: number[], graceMs?: number): Promise; export interface ExitObservableChild { readonly exitCode: number | null; readonly signalCode: NodeJS.Signals | null; once?(event: 'exit', listener: () => void): unknown; off?(event: 'exit', listener: () => void): unknown; } export declare function childHasExited(child: ExitObservableChild): boolean; export interface TerminateTreeOptions { child?: ExitObservableChild; } export declare function terminateWindowsProcessTree(rootPid: number, graceMs: number, options?: TerminateTreeOptions & { run?: typeof runCommand; sleep?: (ms: number) => Promise; }): Promise; export declare function terminateDetachedProcessTree(rootPid: number, graceMs?: number, options?: TerminateTreeOptions): Promise;