/** * ActionExecutor - Executes actions by calling native module methods * Handles all 19 action types with proper error handling */ import { Action } from './types'; import { ActionResult, ScreenState } from '../types'; import { AccessibilityModule } from '../native/AccessibilityModule'; import { FileSystem } from '../memory/FileSystem'; import { ToolRegistry } from './ToolRegistry'; /** * VoiceManager interface (placeholder until VoiceManager is implemented) */ interface VoiceManager { speak(message: string): Promise; ask(question: string): Promise; } /** * IntentRegistry interface (placeholder until IntentRegistry is implemented) */ interface IntentRegistry { launchIntent(intentName: string, parameters: Record): Promise; } export declare class ActionExecutor { private nativeModule; private fileSystem; private voiceManager?; private intentRegistry?; private dynamicToolGenerator; private circuitBreaker; private mcpAdapter; private actionMetrics; constructor(nativeModule: AccessibilityModule, fileSystem: FileSystem, voiceManager?: VoiceManager | undefined, intentRegistry?: IntentRegistry | undefined); /** * Execute a single action and return the result */ execute(action: Action, screenState: ScreenState): Promise; /** * Internal execution method (wrapped by circuit breaker) */ private executeInternal; private executeTapElement; private executeLongPressElement; private executeTapElementInputTextAndEnter; private executeType; private executeSwipeDown; private executeSwipeUp; private executeBack; private executeHome; private executeSwitchApp; private executeWait; private executeOpenApp; private executeSearchGoogle; private executeWriteFile; private executeAppendFile; private executeReadFile; private executeSpeak; private executeAsk; private executeLaunchIntent; private executeDone; private handleError; private executeTakeScreenshot; private executeGetClipboard; private executeSetClipboard; private executeGetInstalledApps; private executeGetCurrentApp; private executeSendNotification; private executeListFiles; private executeDeleteFile; private executeGenerateTool; /** * Get all available dynamic tools (for prompt building) */ getDynamicTools(): import("./DynamicToolGenerator").DynamicTool[]; /** * Get all available tools (predefined + dynamic + MCP) */ getAllAvailableTools(): { predefined: import("./ToolRegistry").ToolSpec[]; dynamic: import("./DynamicToolGenerator").DynamicTool[]; mcp: import("./ToolRegistry").ToolSpec[]; }; /** * Get tool registry for documentation generation */ getToolRegistry(): typeof ToolRegistry; /** * Register an MCP tool */ registerMCPTool(tool: Parameters[0]): void; /** * Execute an MCP tool */ executeMCPTool(toolName: string, params: Record, screenState: ScreenState): Promise; /** * Get action execution metrics */ getMetrics(): Record; /** * Get circuit breaker state */ getCircuitBreakerState(): { state: string; failureCount: number; lastFailureTime: number; }; /** * Reset circuit breaker */ resetCircuitBreaker(): void; /** * Get MCP tool call history */ getMCPHistory(limit?: number): { toolName: string; params: Record; result: import("./MCPToolAdapter").MCPToolResult; timestamp: number; duration: number; }[]; /** * Generate tool documentation */ generateToolDocumentation(): string; private delay; private recordMetric; } export {}; //# sourceMappingURL=ActionExecutor.d.ts.map