/**
 * Parallel Agent Manager
 *
 * Session-based async agent execution with:
 * - Concurrency control per agent type
 * - Batched notifications
 * - Automatic cleanup
 *
 * This is the main facade that composes the specialized components.
 */
import type { PluginInput } from "@opencode-ai/plugin";
import { ConcurrencyController } from "./concurrency.js";
import { formatDuration } from "./format.js";
import type { ParallelTask } from "./interfaces/parallel-task.interface.js";
import type { LaunchInput } from "./interfaces/launch-input.interface.js";
import type { ResumeInput } from "./interfaces/resume-input.interface.js";
export type { ParallelTask };
export { formatDuration };
type OpencodeClient = PluginInput["client"];
export declare class ParallelAgentManager {
    private static _instance;
    private store;
    private client;
    private directory;
    private concurrency;
    private launcher;
    private resumer;
    private poller;
    private cleaner;
    private eventHandler;
    private constructor();
    static getInstance(client?: OpencodeClient, directory?: string): ParallelAgentManager;
    launch(input: LaunchInput): Promise<ParallelTask>;
    resume(input: ResumeInput): Promise<ParallelTask>;
    getTask(id: string): ParallelTask | undefined;
    getRunningTasks(): ParallelTask[];
    getAllTasks(): ParallelTask[];
    getTasksByParent(parentSessionID: string): ParallelTask[];
    cancelTask(taskId: string): Promise<boolean>;
    getResult(taskId: string): Promise<string | null>;
    setConcurrencyLimit(agentType: string, limit: number): void;
    getPendingCount(parentSessionID: string): number;
    getConcurrency(): ConcurrencyController;
    cleanup(): void;
    formatDuration: typeof formatDuration;
    handleEvent(event: {
        type: string;
        properties?: {
            sessionID?: string;
            info?: {
                id?: string;
            };
        };
    }): void;
    private findBySession;
    private handleTaskError;
    private recoverActiveTasks;
}
export declare const parallelAgentManager: {
    getInstance: typeof ParallelAgentManager.getInstance;
};
