import { type KillResult, type ManagerEvent, type ProcessInfo, type StartOptions, type WriteResult } from "./process-types.js";
export interface ProcessManagerOptions {
    getConfiguredShellPath?: () => string | undefined;
}
export declare class ProcessManager {
    private processes;
    private counter;
    private readonly logDir;
    private readonly events;
    private watcher;
    private readonly getConfiguredShellPath;
    constructor(options?: ProcessManagerOptions);
    onEvent(listener: (event: ManagerEvent) => void): () => void;
    private emit;
    private transition;
    private ensureWatcherRunning;
    private stopWatcherIfIdle;
    private hasAliveishProcesses;
    private livenessTick;
    start(name: string, command: string, cwd: string, options?: StartOptions): ProcessInfo;
    list(): ProcessInfo[];
    get(id: string): ProcessInfo | null;
    find(query: string): ProcessInfo | null;
    getOutput(id: string, tailLines?: number): {
        stdout: string[];
        stderr: string[];
        status: string;
    } | null;
    getCombinedOutput(id: string, tailLines?: number): {
        type: "stdout" | "stderr";
        text: string;
    }[] | null;
    getFullOutput(id: string): {
        stdout: string;
        stderr: string;
    } | null;
    getLogFiles(id: string): {
        stdoutFile: string;
        stderrFile: string;
        combinedFile: string;
    } | null;
    kill(id: string, opts?: {
        signal?: NodeJS.Signals;
        timeoutMs?: number;
    }): Promise<KillResult>;
    writeToStdin(id: string, data: string, opts?: {
        end?: boolean;
    }): WriteResult;
    clearFinished(): number;
    shutdownKillAll(): void;
    stopWatcher(): void;
    cleanup(): void;
    getFileSize(id: string): {
        stdout: number;
        stderr: number;
    } | null;
    private readTailLines;
    private toProcessInfo;
}
