/** * Agent - Main orchestrator for the SENSE → THINK → ACT loop * * The Agent continuously observes screen state (SENSE), makes decisions via LLM (THINK), * and executes actions (ACT) until task completion or termination conditions are met. * * Responsibilities: * - Initialize all subsystems (Memory, Perception, LLM, Executor, FileSystem, Voice) * - Execute SENSE → THINK → ACT loop * - Track state (steps, failures, stopped flag) * - Handle loop termination conditions * - Emit events for monitoring * - Implement error recovery strategies */ import { AgentConfig, AgentState, AgentResult, AgentHistory } from '../types'; import { MemoryManager } from '../memory/MemoryManager'; import { FileSystem } from '../memory/FileSystem'; export declare class Agent { private config; private settings; private nativeModule; private fileSystem; private memoryManager; private perception; private llmClient; private actionExecutor; private voiceManager?; private clarificationAgent?; private dialogueManager?; private state; private history; private currentTask; private lastTapCoordinates?; private triggerFlash; constructor(config: AgentConfig); /** * Run the agent with a given task * Executes SENSE → THINK → ACT loop until completion or termination * * @param task - Natural language task description * @param maxSteps - Optional override for max steps * @returns AgentResult with success status, message, and history */ run(task: string, maxSteps?: number): Promise; /** * Stop the agent manually * Sets stopped flag to terminate loop after current step */ stop(): void; /** * Get current agent state */ getState(): AgentState; /** * Get complete execution history */ getHistory(): AgentHistory[]; /** * Get current task */ getCurrentTask(): string; /** * Get file system instance */ getFileSystem(): FileSystem; /** * Get memory manager instance */ getMemoryManager(): MemoryManager; /** * Record a step in the history */ private recordStep; /** * Handle LLM failure with error recovery */ private handleLLMFailure; /** * Delay helper */ private delay; } //# sourceMappingURL=Agent.d.ts.map