import type { ChildProcess } from 'node:child_process';
import type { RunningJobInfo } from '../job.js';
import { Future } from '../utils.js';
export interface ProcOpts {
    /** Timeout for process initialization in milliseconds. */
    initializeTimeout: number;
    /** Timeout for process shutdown in milliseconds. */
    closeTimeout: number;
    /** Memory usage warning threshold in megabytes. */
    memoryWarnMB: number;
    /** Memory usage limit in megabytes. */
    memoryLimitMB: number;
    /** Interval for health check pings in milliseconds. */
    pingInterval: number;
    /** Timeout waiting for pong response in milliseconds. */
    pingTimeout: number;
    /** Threshold for warning about unresponsive processes in milliseconds. */
    highPingThreshold: number;
}
export declare abstract class SupervisedProc {
    #private;
    proc?: ChildProcess;
    private memoryBaselineMB?;
    protected init: Future<void, Error>;
    constructor(initializeTimeout: number, closeTimeout: number, memoryWarnMB: number, memoryLimitMB: number, pingInterval: number, pingTimeout: number, highPingThreshold: number);
    abstract createProcess(): ChildProcess;
    abstract mainTask(child: ChildProcess): Promise<void>;
    protected abstract get processKind(): string;
    get started(): boolean;
    get isAlive(): boolean;
    get runningJob(): RunningJobInfo | undefined;
    start(): Promise<void>;
    run(): Promise<void>;
    join(): Promise<void>;
    initialize(): Promise<void>;
    close(): Promise<void>;
    launchJob(info: RunningJobInfo): Promise<void>;
    private getChildMemoryUsageMB;
    private get uptime();
    private shouldEmitMemoryWarning;
    private memoryLoggingFields;
    private clearTimers;
}
//# sourceMappingURL=supervised_proc.d.ts.map