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); /** * Fire the onBackgroundTasksChange callback so UI consumers refresh. * Public so other managers (e.g. WorkflowManager) can trigger a refresh * when their state changes without mutating a background task. */ notifyTasksChange(): void; generateId(): string; addTask(task: BackgroundTask): void; getTask(id: string): BackgroundTask | undefined; getAllTasks(): BackgroundTask[]; startShell(command: string, timeout?: number, cwd?: string): { 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; }