import { type ChildProcess } from "child_process";
import { BackgroundTask } from "../types/processes.js";
import { Container } from "../utils/container.js";
export interface BackgroundTaskManagerCallbacks {
    onBackgroundTasksChange?: (tasks: BackgroundTask[]) => void;
}
export interface BackgroundTaskManagerOptions {
    callbacks?: BackgroundTaskManagerCallbacks;
    workdir: string;
}
export declare class BackgroundTaskManager {
    private container;
    private tasks;
    private nextId;
    private callbacks;
    private workdir;
    constructor(container: Container, options: BackgroundTaskManagerOptions);
    private get notificationQueue();
    private notifyTasksChange;
    generateId(): string;
    addTask(task: BackgroundTask): void;
    getTask(id: string): BackgroundTask | undefined;
    getAllTasks(): BackgroundTask[];
    startShell(command: string, timeout?: number): {
        id: string;
        child: ChildProcess;
        detach: () => void;
    };
    adoptProcess(child: ChildProcess, command: string, initialStdout?: string, initialStderr?: string): string;
    getOutput(id: string, filter?: string): {
        stdout: string;
        stderr: string;
        status: string;
        outputPath?: string;
        type: string;
        exitCode?: number;
    } | null;
    stopTask(id: string): boolean;
    cleanup(): void;
}
//# sourceMappingURL=backgroundTaskManager.d.ts.map