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

87 lines 3.23 kB
/** * Hierarchical Mode Configuration * * When enabled, only exposes 5 orchestrator tools instead of 279 individual tools */ export const DEFAULT_HIERARCHICAL_CONFIG = { enabled: false, // Disable hierarchical mode to show all 279+ tools orchestratorOnly: false, // Show both orchestrators AND individual tools hybridMode: false, // Show ALL tools, not just essentials essentialTools: [ // Core debugging tools that AIs need direct access to 'inject_debugging', 'take_screenshot', 'get_console_logs', 'get_network_activity', 'monitor_realtime', 'simulate_user_action', 'get_debug_report', 'run_audit', 'analyze_with_ai', 'close_session', // TDD tools 'enable_tdd_mode', 'run_tests_with_coverage', 'test_impact_analysis', 'regression_detection', 'close_tdd_session' ], subAgentTimeout: 30000, // 30 seconds parallelExecution: true, maxConcurrentAgents: 3, preserveMainContext: true, summaryLevel: 'detailed', // Provide detailed output, not just summaries tokenBudget: { mainAgent: 4000, subAgents: 12000 } }; // Environment variable support export function loadHierarchicalConfig() { const config = { ...DEFAULT_HIERARCHICAL_CONFIG }; console.error('🔍 Loading hierarchical config...'); console.error(` Default enabled: ${DEFAULT_HIERARCHICAL_CONFIG.enabled}`); console.error(` AI_DEBUG_HIERARCHICAL_MODE env: ${process.env.AI_DEBUG_HIERARCHICAL_MODE}`); console.error(` AI_DEBUG_HYBRID_MODE env: ${process.env.AI_DEBUG_HYBRID_MODE}`); // Check environment variables if (process.env.AI_DEBUG_HIERARCHICAL_MODE === 'true') { config.enabled = true; config.orchestratorOnly = true; console.error(' ⚠️ Hierarchical mode ENABLED by environment variable'); } else if (process.env.AI_DEBUG_HIERARCHICAL_MODE === 'false') { config.enabled = false; console.error(' ✅ Hierarchical mode explicitly disabled by environment'); } if (process.env.AI_DEBUG_HYBRID_MODE === 'true') { config.hybridMode = true; config.orchestratorOnly = false; // Essential tools for hybrid mode config.essentialTools = [ 'inject_debugging', 'take_screenshot', 'get_debug_report', 'run_audit', 'list_tools' ]; } if (process.env.AI_DEBUG_SUMMARY_LEVEL) { config.summaryLevel = process.env.AI_DEBUG_SUMMARY_LEVEL; } console.error(' Final config:', { enabled: config.enabled, orchestratorOnly: config.orchestratorOnly, hybridMode: config.hybridMode }); return config; } // Feature flags for gradual rollout export const HIERARCHICAL_FEATURES = { // Phase 1: Basic orchestration BASIC_ORCHESTRATION: true, // Phase 2: Smart routing INTELLIGENT_ROUTING: true, // Phase 3: Multi-agent collaboration MULTI_AGENT_COLLAB: false, // Phase 4: Learning from patterns PATTERN_LEARNING: false, // Phase 5: Automatic optimization AUTO_OPTIMIZATION: false }; //# sourceMappingURL=hierarchical-mode.js.map