import { Agent } from '../core/agent'; import { RunOptions, RunResult } from '../core/types'; import { Plan, PlanTask, PlannerInterface, PlanOptions } from './planner-interface'; /** * Default planner implementation that uses the LLM to break down tasks */ export declare class DefaultPlanner implements PlannerInterface { private logger; constructor(); /** * Creates a plan by asking the LLM to break down a complex task * * @param task - The complex task to plan for * @param agent - The agent creating the plan * @param options - Optional planning configuration * @returns Promise resolving to the created plan */ createPlan(task: string, agent: Agent, options?: PlanOptions): Promise; /** * Executes a plan sequentially * * @param plan - The plan to execute * @param agent - The agent executing the plan * @param options - The original run options * @returns Promise resolving to the execution result */ executePlan(plan: Plan, agent: Agent, options: RunOptions): Promise; /** * Updates a task's status and result * * @param plan - The plan containing the task * @param taskId - ID of the task to update * @param status - New status * @param result - Optional result from the task * @param error - Optional error message * @returns The updated plan */ updateTaskStatus(plan: Plan, taskId: string, status: PlanTask['status'], result?: string, error?: string): Plan; /** * Checks if a plan needs to be revised based on execution results * * @param plan - The current plan * @param agent - The agent executing the plan * @returns Promise resolving to a boolean indicating if replanning is needed */ shouldReplan(plan: Plan, agent: Agent): Promise; /** * Creates a revised plan based on execution results so far * * @param originalPlan - The original plan that needs revision * @param agent - The agent creating the revised plan * @returns Promise resolving to the revised plan */ replan(originalPlan: Plan, agent: Agent): Promise; /** * Simple parser to extract tasks from the LLM's planning response * In a real system, you'd want a more robust implementation * * @param response - The LLM's response to the planning prompt * @returns Array of task descriptions */ private parseTasksFromResponse; }