ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
85 lines • 2.19 kB
TypeScript
/**
* Batch Automation Optimizer
* Dramatically improves computer control performance through batching and parallelization
*/
export interface AutomationAction {
type: 'click' | 'type' | 'key' | 'screenshot' | 'wait' | 'drag';
target?: {
x: number;
y: number;
};
text?: string;
keyCode?: number;
modifiers?: string[];
duration?: number;
path?: string;
from?: {
x: number;
y: number;
};
to?: {
x: number;
y: number;
};
}
export interface BatchResult {
success: boolean;
duration: number;
results: any[];
errors?: string[];
}
export declare class BatchAutomationOptimizer {
private actionQueue;
private isProcessing;
private cachedElements;
private readonly CACHE_TTL;
/**
* Add action to batch queue
*/
queueAction(action: AutomationAction): void;
/**
* Execute all queued actions as a single batch
*/
executeBatch(): Promise<BatchResult>;
/**
* Group actions by type for optimal execution
*/
private groupActionsByType;
/**
* Execute multiple screenshots in parallel
*/
private executeScreenshotsBatch;
/**
* Execute UI actions as a single AppleScript
*/
private executeUIActionsBatch;
/**
* Build optimized AppleScript combining multiple actions
*/
private buildOptimizedAppleScript;
/**
* Smart wait optimization - dynamic delays based on context
*/
smartWait(context: 'app_launch' | 'page_load' | 'animation' | 'quick'): Promise<void>;
/**
* Get cached delay for a context
*/
private getCachedDelay;
/**
* Cache UI element coordinates to avoid repeated lookups
*/
cacheElementPosition(elementId: string, x: number, y: number): void;
/**
* Get cached element position if still valid
*/
getCachedElementPosition(elementId: string): {
x: number;
y: number;
} | null;
/**
* Clear expired cache entries
*/
cleanCache(): void;
}
export declare const batchAutomation: BatchAutomationOptimizer;
//# sourceMappingURL=batch-automation-optimizer.d.ts.map