/**
 * Task Planner
 *
 * Decomposes complex requests into a DAG of sub-tasks using LLM.
 * Estimates complexity, cost, and duration.
 */
import { EventEmitter } from 'events';
import { TaskGraph, PlannedTask } from './task-graph.js';
export interface TaskPlan {
    id: string;
    mainGoal: string;
    tasks: PlannedTask[];
    estimatedComplexity: 'low' | 'medium' | 'high';
    estimatedTokens: number;
    createdAt: Date;
}
export interface PlannerConfig {
    /** Minimum complexity to trigger planning */
    complexityThreshold: number;
    /** Max tasks in a plan */
    maxTasks: number;
    /** Enable auto-delegation to subagents */
    autoDelegation: boolean;
}
export declare class TaskPlanner extends EventEmitter {
    private config;
    constructor(config?: Partial<PlannerConfig>);
    /**
     * Determine if a request needs planning (vs direct execution)
     */
    needsPlanning(request: string): boolean;
    /**
     * Create a plan from a request using LLM decomposition
     */
    createPlan(request: string, decompose: (prompt: string) => Promise<string>): Promise<TaskPlan>;
    /**
     * Parse LLM decomposition response into PlannedTask array
     */
    private parseDecomposition;
    /**
     * Estimate overall complexity
     */
    private estimateComplexity;
    /**
     * Build a TaskGraph from a plan
     */
    buildGraph(plan: TaskPlan): TaskGraph;
}
export declare function getTaskPlanner(config?: Partial<PlannerConfig>): TaskPlanner;
export declare function resetTaskPlanner(): void;
