UNPKG

claude-computer-use-mcp

Version:

MCP server providing browser automation capabilities to Claude Code

76 lines 2.41 kB
import { BrowserController } from './browser-controller.js'; export interface ClaudeIntegrationConfig { enableSmartWaiting: boolean; enableContextualScreenshots: boolean; enableProgressTracking: boolean; enableWorkflowRecording: boolean; enableSemanticSelectors: boolean; } export interface WorkflowStep { step: number; action: string; selector?: string; value?: string; screenshot?: string; timestamp: number; success: boolean; error?: string; } export interface SmartWaitCondition { type: 'element' | 'text' | 'url' | 'network' | 'custom'; condition: string; timeout?: number; } export declare class ClaudeIntegration { private browserController; private config; private workflows; constructor(browserController: BrowserController, config?: Partial<ClaudeIntegrationConfig>); smartWait(sessionId: string, conditions: SmartWaitCondition[]): Promise<{ success: boolean; matchedCondition?: string; }>; contextualScreenshot(sessionId: string, context: string): Promise<{ screenshot: string; context: string; elements: Array<{ selector: string; text: string; bounds: any; }>; timestamp: number; }>; recordWorkflowStep(sessionId: string, action: string, details?: any): Promise<void>; getWorkflow(sessionId: string): Promise<WorkflowStep[]>; replayWorkflow(sessionId: string, workflow?: WorkflowStep[]): Promise<{ success: boolean; stepsCompleted: number; errors: string[]; }>; generateSemanticSelector(sessionId: string, element: string): Promise<{ selector: string; alternatives: string[]; confidence: number; }>; analyzePage(sessionId: string): Promise<{ title: string; url: string; interactiveElements: number; forms: number; images: number; links: number; pageStructure: any; accessibilityScore: number; suggestions: string[]; }>; handleError(sessionId: string, error: Error, context: any): Promise<{ error: string; suggestions: string[]; recoveryActions: Array<{ action: string; description: string; }>; }>; cleanup(sessionId: string): Promise<void>; } //# sourceMappingURL=claude-integration.d.ts.map