UNPKG

mcp-adr-analysis-server

Version:

MCP server for analyzing Architectural Decision Records and project architecture

86 lines 3.58 kB
/** * MCP Tool for guided troubleshooting workflow * Provides systematic troubleshooting with ADR/TODO alignment * Integrates with other MCP tools for comprehensive analysis * Enhanced with memory integration and intelligent decision capabilities * * @deprecated This module contains legacy OpenRouter execution functions. * As of Phase 5 CE-MCP migration, this tool returns state machine directives * instead of making direct OpenRouter API calls. * * For CE-MCP mode, use createTroubleshootGuidedWorkflowDirective() from * src/tools/ce-mcp-tools.ts instead. See ADR-014 for architecture details. * * This module is retained for: * - Legacy mode support (EXECUTION_MODE=full) * - Hybrid mode fallback (when CE-MCP directive execution fails) */ import { z } from 'zod'; import { MemoryEntityManager } from '../utils/memory-entity-manager.js'; import { EnhancedLogger } from '../utils/enhanced-logging.js'; declare const TroubleshootSchema: z.ZodObject<{ operation: z.ZodEnum<{ full_workflow: "full_workflow"; generate_test_plan: "generate_test_plan"; analyze_failure: "analyze_failure"; }>; failure: z.ZodOptional<z.ZodObject<{ failureType: z.ZodEnum<{ test_failure: "test_failure"; deployment_failure: "deployment_failure"; build_failure: "build_failure"; runtime_error: "runtime_error"; performance_issue: "performance_issue"; security_issue: "security_issue"; other: "other"; }>; failureDetails: z.ZodObject<{ command: z.ZodOptional<z.ZodString>; exitCode: z.ZodOptional<z.ZodNumber>; errorMessage: z.ZodString; stackTrace: z.ZodOptional<z.ZodString>; logOutput: z.ZodOptional<z.ZodString>; environment: z.ZodOptional<z.ZodString>; timestamp: z.ZodOptional<z.ZodString>; affectedFiles: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strip>; context: z.ZodOptional<z.ZodObject<{ recentChanges: z.ZodOptional<z.ZodString>; reproducible: z.ZodOptional<z.ZodBoolean>; frequency: z.ZodOptional<z.ZodString>; impact: z.ZodOptional<z.ZodEnum<{ medium: "medium"; low: "low"; high: "high"; critical: "critical"; }>>; }, z.core.$strip>>; }, z.core.$strip>>; projectPath: z.ZodOptional<z.ZodString>; adrDirectory: z.ZodDefault<z.ZodString>; todoPath: z.ZodDefault<z.ZodString>; }, z.core.$strip>; type TroubleshootArgs = z.infer<typeof TroubleshootSchema>; /** * Dependencies for TroubleshootingMemoryManager (enables DI and mocking) * Uses concrete types for full compatibility with existing implementations * @see Issue #310 - Dependency injection for improved testability */ export interface TroubleshootingMemoryManagerDeps { memoryManager?: MemoryEntityManager; logger?: EnhancedLogger; } /** * Enhanced troubleshooting workflow with memory integration and intelligent decision triggering */ export declare function troubleshootGuidedWorkflowEnhanced(args: TroubleshootArgs & { enableMemoryIntegration?: boolean; solutionEffectiveness?: number; resolutionTimeMinutes?: number; }): Promise<any>; /** * Main troubleshooting workflow function (original implementation) */ export declare function troubleshootGuidedWorkflow(args: TroubleshootArgs): Promise<any>; export {}; //# sourceMappingURL=troubleshoot-guided-workflow-tool.d.ts.map