/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
/**
 * ProcessManager — tracks background processes for a single GoodVibes runtime.
 *
 * Extracted from tools/exec/index.ts so that other modules (UI, agent system,
 * live-tail) can query running processes without importing the exec tool.
 */
export interface BackgroundProcess {
    id: string;
    pid: number;
    cmd: string;
    startTime: number;
    stdout: string[];
    stderr: string[];
    exitCode: number | null;
    done: boolean;
}
export interface BgCommandResult {
    cmd: string;
    exit_code: number | null;
    stdout: string;
    stderr: string;
    success: boolean;
    process_id?: string;
    pid?: number;
}
export declare class ProcessManager {
    private _counter;
    private _processes;
    private _procs;
    private newId;
    /**
     * Spawn a background process and start collecting its output.
     * Returns a BgCommandResult with the process_id and pid.
     */
    spawn(cmd: string, cwd: string | undefined, env: Record<string, string> | undefined): BgCommandResult;
    /** Get the status record for a background process, or undefined if not found. */
    getStatus(id: string): BackgroundProcess | undefined;
    /** Get the accumulated stdout/stderr for a background process. */
    getOutput(id: string): {
        stdout: string;
        stderr: string;
    } | undefined;
    /**
     * Stop a background process by ID.
     * Returns true if the process was found and stopped, false if unknown.
     */
    stop(id: string): boolean;
    /** List all tracked background processes with their status summaries. */
    list(): Array<{
        id: string;
        pid: number;
        cmd: string;
        status: string;
    }>;
    /**
     * Handle bg_status / bg_output / bg_stop / bg_list special commands.
     * Returns a BgCommandResult if the command was handled, null otherwise.
     */
    handleCommand(cmd: string): BgCommandResult | null;
}
//# sourceMappingURL=process-manager.d.ts.map