import type { StorybookBrowserRunnerDeps } from './types.mts'; /** Upper bound on the rendered sample, so a huge process tree cannot flood the log. */ export declare const MAX_SAMPLE_BYTES = 4096; type ProcessRow = { args: string; cpu: string; pgid: number; pid: number; ppid: number; rssKb: number; stat: string; }; type Exec = (file: string, args: string[], options: { encoding: 'utf8'; maxBuffer: number; timeout: number; }) => string; /** * Parses `ps -axww -o pid=,ppid=,pgid=,rss=,pcpu=,stat=,args=` output and keeps the processes of one * process group plus their descendants: Playwright launches the browser detached, in its own group. */ export declare function parseProcessGroupRows(psOutput: string, processGroupId: number): ProcessRow[]; /** Chromium's `--type=`, `browser` for a main Chromium binary, else the executable name. */ export declare function processRole(args: string): string; /** One line per process (largest first): never argv, capped at MAX_SAMPLE_BYTES. */ export declare function renderProcessGroupSample(psOutput: string, processGroupId: number): string; /** Default sampler: portable `ps -axww` (full-width args), filtered by pgid and descendants (never `ps -g`). */ export declare function samplePsProcessGroup(processGroupId: number, exec?: Exec): string; /** Best effort: writes the sample, or one line naming why it failed, and never throws. */ export declare function writeProcessGroupSample(deps: Pick, processGroupId: number | undefined): void; export {};