import { MiniMaxClient } from '../minimax/client.js'; import { ToolResult } from '../types/index.js'; import { BashTool } from '../tools/index.js'; export interface ActionStep { id: string; description: string; command: string; expectedOutcome: string; verificationCriteria: string[]; status: 'pending' | 'running' | 'completed' | 'failed'; result?: ToolResult; verified?: boolean; reasoning?: string; } export interface ActionPlan { id: string; originalTask: string; steps: ActionStep[]; currentStepIndex: number; status: 'planning' | 'executing' | 'verifying' | 'completed' | 'failed'; overallResult?: string; createdAt: Date; completedAt?: Date; } export interface VerificationResult { verified: boolean; reasoning: string; confidence: number; suggestions?: string[]; } export declare class ActionPlanner { private miniMaxClient; private bash; constructor(miniMaxClient: MiniMaxClient, bash: BashTool); /** * IOEEA Loop Phase 1: INVESTIGATE * Analyze the task and current environment to understand what needs to be done */ investigate(task: string): Promise<{ analysis: string; prerequisites: string[]; potentialChallenges: string[]; suggestedApproach: string; }>; /** * IOEEA Loop Phase 2: OBSERVE * Gather current state information to inform planning */ observe(): Promise<{ gitStatus?: string; fileStructure?: string; environment?: string; recentHistory?: string; }>; /** * IOEEA Loop Phase 3: EVALUATE & PLAN * Create a structured action plan based on investigation and observation */ createActionPlan(task: string, investigation: any, observations: any): Promise; /** * IOEEA Loop Phase 4: EXECUTE * Execute the action plan step by step with verification */ executeAndVerify(plan: ActionPlan): Promise; /** * IOEEA Loop Phase 5: ACT/ADAPT * Based on execution results, suggest improvements or next actions */ adapt(plan: ActionPlan): Promise<{ success: boolean; nextActions: string[]; learnedLessons: string[]; suggestions: string[]; }>; private executeStep; private verifyStep; private parseInvestigationResponse; private parseVerificationResponse; private parseAdaptationResponse; }