export interface ProcessCpuRow { pid: number; ppid: number; cpuMs: number; } export type ProcessCpuReader = (rootPids: readonly number[]) => Promise; /** Root pids plus every descendant reachable through parent-pid edges. */ export declare function descendantsOf(rows: readonly Pick[], rootPids: readonly number[]): Set; /** Parse ps' [[dd-]hh:]mm:ss cumulative CPU-time form into milliseconds. */ export declare function parsePsTime(value: string): number | null; /** Sum cumulative CPU time for the roots and all descendants. Null means no matching process. */ export declare function sumCpuMs(rows: readonly ProcessCpuRow[], rootPids: readonly number[]): number | null; /** Parse PowerShell ConvertTo-Json output from Win32_Process. */ export declare function parseWindowsCpuRows(text: string): ProcessCpuRow[]; /** Parse `ps -A -o pid=,ppid=,time=` output. */ export declare function parsePsCpuRows(text: string): ProcessCpuRow[]; /** Real process-tree CPU reader. Null is no signal, never an idle verdict. */ export declare const defaultProcessCpuReader: ProcessCpuReader;