import type { Command } from 'commander';
interface ProcessRow {
    pid: string;
    user: string;
    cpu: string;
    mem: string;
    started: string;
    state: string;
    command: string;
}
type SortKey = 'cpu' | 'mem' | 'pid';
/**
 * Parse docker top stdout into ProcessRow[].
 * Accepts two formats:
 *   1. JSON: {"Titles":[...],"Processes":[[...],...]}  (HTTP API / docker daemon)
 *   2. Tabular text with a header line                 (bare CLI spawnSync path)
 *
 * The tabular format uses stime (single-word start time like "10:00" or "Feb11")
 * to avoid multi-word timestamp parsing issues.
 */
export declare function parseDockerTop(stdout: string): ProcessRow[];
export declare function sortRows(rows: ProcessRow[], key: SortKey): ProcessRow[];
/**
 * Machine-readable shape emitted by `olam ps --json`. Numeric fields are
 * coerced from the string columns docker top hands us so downstream
 * consumers (jq filters, dashboards) don't have to re-parse — `NaN`
 * collapses to `0` to keep the contract total.
 */
export interface ProcessJson {
    pid: number;
    user: string;
    cpu: number;
    mem: number;
    started: string;
    state: string;
    command: string;
}
export interface PsJson {
    world: string;
    container: string;
    sort: SortKey;
    count: number;
    processes: ProcessJson[];
}
/**
 * Pure JSON serialiser for `olam ps --json`. Kept separate from the
 * docker spawn so the wire contract is unit-testable without process I/O
 * (mirrors `renderWorldList` in list.ts).
 */
export declare function renderPsJson(rows: ProcessRow[], meta: {
    world: string;
    container: string;
    sort: SortKey;
}): string;
export declare function registerPs(program: Command): void;
export {};
//# sourceMappingURL=ps.d.ts.map