import type { ServerOperation } from './allure-operations';
import { AllureTaskClient } from './allure-task-client';
type TaskFn = () => Promise<unknown>;
export interface TaskManagerOptions {
    taskTimeout?: number;
    overallTimeout?: number;
    maxParallel?: number;
}
/**
 * Task Manager
 *
 * Queues and executes tasks. Supports both:
 * - Legacy function-based tasks (executed locally)
 * - Serializable operations (sent to remote server via client)
 */
export declare class TaskManager {
    private entityQueues;
    private semaphore;
    private client;
    private options;
    constructor(options?: TaskManagerOptions);
    /**
     * Set the client for remote task execution
     */
    setClient(client: AllureTaskClient): void;
    /**
     * Schedule queue processing on next tick (deferred to not block current execution)
     */
    private scheduleProcessQueue;
    /**
     * Add a legacy function-based task
     * @deprecated Use addOperation for new code
     */
    addTask(entityId: string | undefined, task: TaskFn): void;
    /**
     * Add a serializable operation to be executed on the server
     */
    addOperation(entityId: string | undefined, operation: ServerOperation): void;
    processQueue(entityId: string): Promise<void>;
    private runWithTimeout;
    flushAllTasks(): Promise<void>;
    flushAllTasksForQueue(entityId: string): Promise<void>;
}
export {};
