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
128 lines • 3.87 kB
TypeScript
/**
* Background Window Automation - Cross-platform window messaging
* Enables AI to control applications without interrupting user's current window focus
*
* REVOLUTIONARY: NSAccessibility integration for true non-intrusive automation
*/
export interface WindowInfo {
windowId: string;
processId: number;
applicationName: string;
windowTitle: string;
bounds: {
x: number;
y: number;
width: number;
height: number;
};
isVisible: boolean;
isMinimized: boolean;
ownerName: string;
}
export interface ApplicationContext {
name: string;
applicationName: string;
processId?: number;
windowId?: string;
preferredMethod: 'accessibility' | 'direct_messaging' | 'focus_switching' | 'applescript';
windowBounds?: WindowInfo['bounds'];
lastActive: Date;
accessibilityEnabled?: boolean;
}
export interface BackgroundMouseAction {
action: 'click' | 'move' | 'drag' | 'scroll' | 'doubleclick' | 'rightclick';
x: number;
y: number;
button?: 'left' | 'right' | 'middle';
relative?: boolean;
}
export interface BackgroundKeyboardAction {
action: 'type' | 'press' | 'key_combination';
text?: string;
key?: string;
keys?: string[];
}
export interface ScreenshotOptions {
format?: 'png' | 'jpg';
quality?: number;
outputPath?: string;
}
export declare class BackgroundWindowAutomation {
private contexts;
private platform;
constructor();
/**
* Initialize NSAccessibility bridge for true background interaction
*/
private initializeAccessibility;
/**
* Discover all visible application windows
*/
discoverWindows(): Promise<WindowInfo[]>;
/**
* macOS window discovery using AppleScript
*/
private discoverMacOSWindows;
/**
* Windows window discovery (placeholder)
*/
private discoverWindowsWindows;
/**
* Linux window discovery (placeholder)
*/
private discoverLinuxWindows;
/**
* Create an automation context for a specific application
*/
createContext(name: string, applicationName: string, windowTitle?: string): Promise<ApplicationContext>;
/**
* Send mouse action to background application
*/
sendMouseAction(contextName: string, action: BackgroundMouseAction): Promise<void>;
/**
* macOS mouse action using AppleScript (will upgrade to CGEventPostToPid later)
*/
private sendMacOSMouseAction;
/**
* Send keyboard action to background application
* REVOLUTIONARY: Uses NSAccessibility when available for true background interaction!
*/
sendKeyboardAction(contextName: string, action: BackgroundKeyboardAction): Promise<void>;
/**
* 🚀 REVOLUTIONARY: Send text using NSAccessibility - NO FOCUS SWITCHING!
*/
private sendAccessibilityTextInput;
/**
* macOS keyboard action using AppleScript
*/
private sendMacOSKeyboardAction;
/**
* Get macOS key code for common keys
*/
private getKeyCode;
/**
* List all active automation contexts
*/
listContexts(): ApplicationContext[];
/**
* Remove an automation context
*/
removeContext(name: string): boolean;
/**
* Take a screenshot of a background window without bringing it to focus
*/
takeWindowScreenshot(contextName: string, options?: ScreenshotOptions): Promise<{
success: boolean;
path?: string;
error?: string;
}>;
/**
* macOS window screenshot using Swift ScreenCaptureKit with CGWindowListCreateImage fallback
*/
private takeScreenshotMacOS;
/**
* Get detailed window information for a context
*/
refreshContextWindow(contextName: string): Promise<WindowInfo | null>;
}
//# sourceMappingURL=background-window-automation.d.ts.map