import { HierarchicalPlanner } from './hierarchical-planner'; import { ActionPlanner } from './action-planner'; import { AIEngine } from '../../ai/ai-engine'; import { TaskContext, ActionPlan, HierarchicalPlan } from '../../types'; /** * Unified Planner that always uses HierarchicalPlanner for planning * and ActionPlanner only for action execution (not planning) * * This ensures hierarchical planning is the default across all interfaces: * - API endpoints * - MCP server * - CLI tools * - Direct usage */ export declare class UnifiedPlanner { private hierarchicalPlanner; private actionPlanner; constructor(aiEngine: AIEngine); /** * Always use hierarchical planning for instruction planning * This is the main planning method that should be used everywhere */ planInstruction(instruction: string, context: TaskContext): Promise; /** * Execute a hierarchical plan using ActionPlanner for individual action execution */ executePlan(plan: HierarchicalPlan, executePlanFunction: (actionPlan: ActionPlan) => Promise): Promise; /** * Complete planning and execution in one call * This is the primary method for end-to-end task execution */ planAndExecute(instruction: string, context: TaskContext, executePlanFunction: (actionPlan: ActionPlan) => Promise): Promise; /** * Create a simple action plan using ActionPlanner (for individual step execution only) * This should only be used internally by HierarchicalPlanner for sub-plan creation */ createActionPlan(instruction: string, context: TaskContext): Promise; /** * Get the underlying ActionPlanner (for compatibility with existing code) */ getActionPlanner(): ActionPlanner; /** * Get the underlying HierarchicalPlanner (for compatibility with existing code) */ getHierarchicalPlanner(): HierarchicalPlanner; /** * Check if an instruction would use hierarchical planning * Note: This always returns true now since we always use hierarchical planning * Kept for backward compatibility */ shouldUseHierarchicalPlanning(instruction: string): Promise; }