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
111 lines • 2.52 kB
TypeScript
/**
* WebSocket Automation Server
* Zero-latency bidirectional automation with real-time streaming
*/
import { EventEmitter } from 'events';
import { NativeAction } from './native-automation-executor.js';
export interface AutomationCommand {
id: string;
type: 'execute' | 'stream' | 'batch' | 'subscribe' | 'unsubscribe';
action?: NativeAction;
actions?: NativeAction[];
event?: string;
data?: any;
}
export interface AutomationResponse {
id: string;
success: boolean;
duration_ms?: number;
result?: any;
error?: string;
cached?: boolean;
}
export interface StreamEvent {
type: 'mouse' | 'keyboard' | 'screen' | 'performance';
data: any;
timestamp: number;
}
export declare class WebSocketAutomationServer extends EventEmitter {
private wss;
private clients;
private commandQueue;
private activeStreams;
private performanceMetrics;
private readonly PORT;
private readonly HEARTBEAT_INTERVAL;
constructor();
/**
* Start the WebSocket server
*/
start(): Promise<void>;
/**
* Handle new WebSocket connection
*/
private handleNewConnection;
/**
* Handle automation command
*/
private handleCommand;
/**
* Execute single action with caching
*/
private executeAction;
/**
* Execute batch of actions
*/
private executeBatch;
/**
* Start streaming automation events
*/
private startStreaming;
/**
* Subscribe to automation events
*/
private subscribeToEvents;
/**
* Unsubscribe from events
*/
private unsubscribeFromEvents;
/**
* Handle client disconnection
*/
private handleDisconnection;
/**
* Send response to client
*/
private sendResponse;
/**
* Send stream event to client
*/
private sendStreamEvent;
/**
* Send error to client
*/
private sendError;
/**
* Record latency metrics
*/
private recordLatency;
/**
* Get average latency for client
*/
private getAverageLatency;
/**
* Start heartbeat monitoring
*/
private startHeartbeat;
/**
* Generate unique client ID
*/
private generateClientId;
/**
* Get server status
*/
getStatus(): any;
/**
* Stop the server
*/
stop(): void;
}
export declare const wsAutomationServer: WebSocketAutomationServer;
//# sourceMappingURL=websocket-automation-server.d.ts.map