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

117 lines • 3.5 kB
/** * Intelligent Sub-Agent Orchestrator * * Automatically delegates tasks to specialized AI-Debug sub-agents when available, * with elegant fallback to direct tool execution when sub-agents are unavailable. * * Features: * - Automatic agent availability detection * - Intelligent task classification and agent selection * - Graceful fallback to direct tool execution * - Context preservation and token optimization * - Performance monitoring and optimization */ export interface SubAgentCapability { agentType: string; specialization: string; averageTimeMinutes: string; contextSavingsTokens: number; capabilities: string[]; keywordTriggers: string[]; fallbackTools: string[]; } export interface TaskClassification { taskType: string; keywords: string[]; priority: 'high' | 'medium' | 'low'; estimatedComplexity: 'simple' | 'moderate' | 'complex'; requiresSubAgent: boolean; recommendedAgent?: string; fallbackStrategy: 'direct' | 'simplified' | 'manual'; } export interface DelegationResult { success: boolean; usedSubAgent: boolean; agentType?: string; contextSavedTokens?: number; fallbackReason?: string; executionTimeMs: number; result?: any; } export declare class IntelligentSubAgentOrchestrator { private logger; private subAgentCapabilities; private availableAgents; private lastAvailabilityCheck; private availabilityCheckCooldown; private delegationStats; constructor(); /** * Initialize known sub-agent capabilities based on AI-Debug documentation */ private initializeAgentCapabilities; /** * Check if sub-agents are currently available */ checkSubAgentAvailability(): Promise<boolean>; /** * Classify a task to determine the best execution strategy */ classifyTask(taskDescription: string, context?: any): TaskClassification; /** * Automatically execute a task using the best available strategy */ executeTask(taskDescription: string, options?: any): Promise<DelegationResult>; /** * Delegate a task to a specific sub-agent */ private delegateToSubAgent; /** * Execute fallback strategy when sub-agents are unavailable */ private executeFallbackStrategy; /** * Generic fallback for unhandled task types */ private executeGenericFallback; /** * Execute an AI-Debug tool (placeholder for actual implementation) */ private executeAIDebugTool; /** * Estimate task complexity based on description analysis */ private estimateTaskComplexity; /** * Determine task priority based on keywords */ private determinePriority; /** * Determine the best fallback strategy */ private determineFallbackStrategy; /** * Update delegation statistics for performance monitoring */ private updateDelegationStats; /** * Get performance statistics for monitoring and optimization */ getDelegationStats(): Map<string, { attempts: number; successes: number; avgTime: number; successRate: number; }>; /** * Get current orchestrator status */ getStatus(): { subAgentsAvailable: boolean; availableAgents: string[]; totalCapabilities: number; delegationStats: any; lastAvailabilityCheck: Date; }; } //# sourceMappingURL=intelligent-sub-agent-orchestrator.d.ts.map