UNPKG

mcp-adr-analysis-server

Version:

MCP server for analyzing Architectural Decision Records and project architecture

87 lines 3.04 kB
/** * Memory Relationship Mapper * * Intelligent relationship mapping utility for creating connections between * memory entities across different tools. Enables troubleshooting sessions * to reference environment snapshots, deployment assessments to validate * against ADRs, and builds comprehensive project knowledge graph. */ import { MemoryEntityManager } from './memory-entity-manager.js'; import { MemoryRelationship } from '../types/memory-entities.js'; export interface CrossToolRelationshipConfig { temporalThreshold: number; contextSimilarityThreshold: number; confidenceThreshold: number; enableInferenceLearning: boolean; } export interface RelationshipInferenceResult { suggestedRelationships: Array<{ sourceId: string; targetId: string; type: MemoryRelationship['type']; confidence: number; reasoning: string; evidence: string[]; }>; conflicts: Array<{ description: string; entityIds: string[]; severity: 'low' | 'medium' | 'high'; recommendation: string; }>; } export declare class MemoryRelationshipMapper { private memoryManager; private logger; private config; constructor(memoryManager: MemoryEntityManager, config?: Partial<CrossToolRelationshipConfig>); /** * Create all cross-tool relationships across the knowledge graph */ createCrossToolRelationships(): Promise<RelationshipInferenceResult>; /** * Link troubleshooting sessions to environment snapshots */ private linkTroubleshootingToEnvironment; /** * Link deployment assessments to ADR compliance */ private linkDeploymentToADRs; /** * Link security patterns to architectural decisions */ private linkSecurityToArchitecture; /** * Link failure patterns to troubleshooting sessions */ private linkFailuresToTroubleshooting; /** * Link environment snapshots to deployment assessments */ private linkEnvironmentToDeployment; /** * Auto-create relationships with high confidence scores */ private autoCreateHighConfidenceRelationships; private queryEntitiesByType; private findTemporallyRelatedEnvironments; private calculateEnvironmentSessionConfidence; private calculateAdrComplianceScore; private calculateSecurityArchitectureConfidence; private hasSecurityArchitectureRelation; private hasFailureSessionMatch; private calculateFailureSessionConfidence; private hasEnvironmentDeploymentRelation; private calculateEnvironmentDeploymentConfidence; private getTemporalOverlap; private getEnvironmentMatch; private getContextSimilarity; private getTechnicalStackOverlap; private getArrayOverlap; private getTemporalProximityScore; private getErrorSignatureSimilarity; private getEnvironmentOverlap; private getConfigurationOverlap; private extractArchitectureDomain; } //# sourceMappingURL=memory-relationship-mapper.d.ts.map