UNPKG

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

101 lines • 3.38 kB
/** * AI-Debug ↔ Serena Integration Protocol * * Lightweight integration that enables seamless workflow between: * - AI-Debug: Runtime debugging, visual testing, performance analysis * - Serena: Static code analysis, semantic search, code generation * * Strategic Decision: NO code incorporation, YES ecosystem integration */ export interface DebugFinding { id: string; sessionId: string; timestamp: number; type: 'performance' | 'accessibility' | 'error' | 'security' | 'usability'; severity: 'low' | 'medium' | 'high' | 'critical'; title: string; description: string; location: { file?: string; line?: number; component?: string; selector?: string; }; evidence: { screenshot?: string; console_logs?: string[]; network_traces?: any[]; metrics?: Record<string, number>; }; recommendations: { action: 'analyze_code' | 'refactor' | 'generate_fix' | 'review_implementation'; context: string; files_to_examine?: string[]; search_patterns?: string[]; }; } export interface CrossToolSession { id: string; project_path: string; created_at: number; updated_at: number; ai_debug_session?: string; serena_active?: boolean; framework: string; primary_language: string; active_files: string[]; current_task: string; } export interface IntegrationWorkflow { phase: 'debug' | 'analyze' | 'fix' | 'validate'; tools_involved: ('ai-debug' | 'serena')[]; handoff_data: any; } /** * AI-Debug Integration Manager * Handles export of findings to Serena-compatible format */ export declare class SerenaIntegrationManager { /** * Export current debugging session findings for Serena analysis */ static exportFindings(sessionId: string): Promise<DebugFinding[]>; /** * Create shared session identifier that both tools can reference */ static generateSharedSessionId(projectPath: string): string; /** * Export session data in format that Serena can import */ static exportSessionContext(aiDebugSessionId: string): Promise<CrossToolSession>; /** * Generate Serena command suggestions based on AI-Debug findings */ static generateSerenaWorkflow(findings: DebugFinding[]): string[]; } /** * Complementary Workflow Documentation * * EXAMPLE WORKFLOW: * * 1. AI Debug Local: "Found performance issue in UserComponent.tsx:45" * → Export finding: session_abc123_performance_issue.json * * 2. Developer: Switch to Serena with exported context * → serena import session_abc123_performance_issue.json * * 3. Serena: "Analyzing UserComponent.tsx performance patterns..." * → find_symbol "UserComponent" src/ * → search_for_pattern "useMemo|useCallback" src/UserComponent.tsx * * 4. Serena: "Suggested fix: Memoize expensive calculation" * → replace_symbol_body "calculateExpensiveValue" "useMemo(() => {...}, [deps])" * * 5. AI Debug Local: "Validating fix with performance regression test..." * → inject_debugging url * → run_audit sessionId (performance category) * → take_screenshot for before/after comparison * * RESULT: Seamless debug → analyze → fix → validate cycle without tool coupling */ //# sourceMappingURL=serena-integration-protocol.d.ts.map