import { AIEngine } from '../ai/ai-engine'; import { ActionPlan, BrowserManager, ActionEngine as IActionEngine, PageState, TaskContext, TaskResult } from '../types'; import { ExecutionLogger } from '../utils/execution-logger'; import { StepContextManager } from './analysis/step-context'; /** * Core ActionEngine implementation that orchestrates task execution * * PLANNING ARCHITECTURE: * - Uses UnifiedPlanner for ALL task execution (hierarchical planning by default) * - No more planning decision logic - hierarchical is always used * - Consistent behavior across all interfaces (API, MCP, CLI, Direct) * * EXECUTION FLOW: * 1. Receive natural language instruction * 2. Capture current page state for context * 3. Use UnifiedPlanner.planAndExecute() for hierarchical planning and execution * 4. Handle navigation-aware tasks through NavigationHandler when needed * 5. Return structured results with logging and streaming */ export declare class ActionEngine implements IActionEngine { private browserManager; private unifiedPlanner; private aiEngine; private stepContextManager; private contextualAnalyzer?; private actionExecutor; private stepRefinementManager; private navigationHandler; private planExecutionManager; constructor(browserManager: BrowserManager, aiEngine: AIEngine); /** * Main entry point - execute a natural language instruction */ executeTask(objective: string, context?: TaskContext): Promise; /** * Execute task using UnifiedPlanner (always hierarchical planning) */ private executeWithUnifiedPlanning; /** * Parse natural language instruction into structured action plan * Uses UnifiedPlanner for consistent hierarchical planning */ parseInstruction(instruction: string): Promise; /** * Execute a structured action plan with dynamic refinement and context awareness */ executeActionPlan(plan: ActionPlan, logger?: ExecutionLogger): Promise; /** * Get step context manager for external access */ getStepContextManager(): StepContextManager; /** * Export current execution context */ exportExecutionContext(): string; /** * Capture current page state for context */ captureState(): Promise; /** * Check if an instruction contains navigation requirements */ checkNavigationRequired(instruction: string): Promise; }