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

90 lines • 2.83 kB
import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { ToolHandler, BaseToolHandler } from './base-handler.js'; /** * Registry for managing tool handlers in a modular architecture */ export declare class HandlerRegistry { private handlers; private toolToHandlerMap; private toolsMap; private lazyLoadingEnabled; private projectAwareLoadingEnabled; /** * Register a new handler and its tools */ registerHandler(handler: ToolHandler | BaseToolHandler): void; /** * Check if any tools in a handler require external dependencies */ private handlerRequiresDependencies; /** * Get all registered tools */ getAllTools(): Tool[]; /** * Get a specific tool by name (supports aliases) */ getTool(toolName: string): Tool | undefined; /** * Check if a tool exists (supports aliases) */ hasTool(toolName: string): boolean; /** * Handle a tool request by routing to the appropriate handler (supports aliases) */ handleTool(toolName: string, args: any, sessions: Map<string, any>): Promise<any>; /** * Initialize all handlers that have an initialize method */ initializeAll(): Promise<void>; /** * Get handler for a specific tool (useful for testing) */ getHandlerForTool(toolName: string): ToolHandler | undefined; /** * Set lazy loading enabled/disabled */ setLazyLoadingEnabled(enabled: boolean): void; /** * Get lazy loading statistics */ getLazyLoadingStats(): { enabled: boolean; lazyHandlers: number; totalHandlers: number; toolsWithDependencies: string[]; }; /** * Get count of registered handlers */ getHandlerCount(): number; /** * Get count of registered tools */ getToolCount(): number; /** * Register all feedback-driven handlers * Addresses comprehensive user feedback from Phoenix LiveView, Flutter, and Python projects * Enhanced with TDD support based on Cycle 22 user breakthrough */ static createWithFeedbackHandlers(): Promise<HandlerRegistry>; /** * Enhanced tool validation with dependency checking * Integrates with ToolDependencyManager for better user experience */ validateToolWithDependencies(toolName: string, sessionState: any): Promise<{ isValid: boolean; validationMessage: string; suggestions: string[]; }>; /** * Get enhanced error information for tool failures */ getEnhancedErrorInfo(toolName: string, error: Error, sessionId?: string): Promise<{ errorType: string; rootCause: string; actionableSteps: string[]; relatedTools: string[]; }>; } //# sourceMappingURL=handler-registry.d.ts.map