/** * Semantic Graph Interfaces * SOLID Principles: Interface Segregation - Separate interfaces for different responsibilities */ import { FileInfo } from '../../../monitoring/file-scanning/file-scanner-interfaces'; export type NodeType = 'Code' | 'Documentation' | 'BusinessConcept' | 'UIComponent' | 'TestCase' | 'Interaction' | 'Session' | 'Project' | 'Request'; export type RelationshipType = 'IMPORTS' | 'USES' | 'IMPLEMENTS' | 'DESCRIBES' | 'TESTS' | 'DEFINES' | 'RELATES_TO' | 'DEPENDS_ON' | 'CONTAINS' | 'EXTENDS' | 'CONFIGURES' | 'CALLS' | 'OVERRIDES' | 'INHERITS_FROM' | 'AGGREGATES' | 'COMPOSES' | 'ACCESSES' | 'MODIFIES' | 'INSTANTIATES' | 'TYPE_OF' | 'RETURNS'; export interface GraphNode { id: string; type: NodeType; properties: Record; name: string; filePath?: string; startLine?: number; endLine?: number; } export interface GraphRelationship { fromId: string; toId: string; type: RelationshipType; properties?: Record; } export interface SemanticGraphData { entities: GraphNode[]; relationships: GraphRelationship[]; fileNodes: Map; stats: { totalFiles: number; totalEntities: number; totalRelationships: number; byLanguage: Record; }; } export interface IntegratedSemanticResult extends SemanticGraphData { processingStrategy: { treeSitterFiles: number; claudeProxyFiles: number; fallbackFiles: number; totalProcessingTime: number; }; qualityMetrics: { completeness: number; accuracy: number; consistency: number; coverage: number; }; } export interface GraphBuilderConfig { useTreeSitter: boolean; useClaudeProxy: boolean; preferTreeSitter: boolean; maxClaudeConcurrency: number; treeSitterLanguages: string[]; skipLargeFiles: boolean; maxFileSize: number; } export interface SearchResult { nodes: GraphNode[]; relationships: GraphRelationship[]; stats: { totalResults: number; relevantNodes: number; searchTime: number; }; } export interface ImpactAnalysisResult { affectedNodes: GraphNode[]; relationships: GraphRelationship[]; impact: { codeFiles: number; documentation: number; tests: number; uiComponents: number; }; riskLevel: 'low' | 'medium' | 'high' | 'critical'; } export interface CrossReferenceResult { concept: GraphNode; relatedCode: GraphNode[]; relatedDocs: GraphNode[]; relatedUI: GraphNode[]; relatedTests: GraphNode[]; } export interface SearchContext { includeTypes?: NodeType[]; maxDepth?: number; domain?: string; language?: string; } export interface IFileProcessingService { buildGraphFromFiles(files: FileInfo[]): Promise; filterFiles(files: FileInfo[]): FileInfo[]; categorizeFiles(files: FileInfo[]): { treeSitter: FileInfo[]; claude: FileInfo[]; fallback: FileInfo[]; }; } export interface IGraphStorageService { initialize(): Promise; addNode(type: NodeType, properties: Record): Promise; addRelationship(fromId: string, toId: string, type: RelationshipType, properties?: Record): Promise; batchCreateNodes(nodes: Array<{ type: NodeType; properties: Record; }>): Promise; searchNodes(query: string, context?: SearchContext): Promise; findRelatedNodes(nodeId: string, maxDepth?: number): Promise; updateNodeProperty(nodeId: string, propertyName: string, propertyValue: string): Promise; close(): Promise; } export interface IGraphQueryService { searchNodes(query: string, context?: SearchContext): Promise; findRelatedNodes(nodeId: string, maxDepth?: number): Promise; findPathBetweenNodes(fromId: string, toId: string): Promise; getNodesByType(type: NodeType): Promise; analyzeImpact(nodeId: string): Promise; performCrossReference(concept: string): Promise; performSemanticSearch(query: string, context?: SearchContext): Promise; findCrossReferences(nodeId: string): Promise; } export interface IGraphProcessor { processFiles(files: FileInfo[]): Promise; } export interface IQualityAnalyzer { calculateQualityMetrics(result: any, categories: any): any; calculateRelevanceScore(node: GraphNode, keywords: string[]): number; } export interface IIndexManagementService { ensureIndexes(): Promise; optimizeIndexes(): Promise; getIndexStatus(): Promise; } //# sourceMappingURL=index.d.ts.map