/** * Cross-Language Dependency Graph Builder * Creates dependency graphs that span multiple programming languages */ import { DependencyGraph, CrossLanguageEntity, CrossReference } from '../../types/crossLanguage.js'; export interface GraphBuilderOptions { includeInternalDependencies?: boolean; includeExternalDependencies?: boolean; maxDepth?: number; excludeLanguages?: string[]; includeTestFiles?: boolean; clusterByPackage?: boolean; } export declare class DependencyGraphBuilder { private entities; private references; private options; constructor(options?: GraphBuilderOptions); /** * Build a comprehensive dependency graph */ buildGraph(entities: CrossLanguageEntity[], references: CrossReference[]): Promise; /** * Build a focused subgraph around specific entities */ buildSubgraph(targetEntityIds: string[], entities: CrossLanguageEntity[], references: CrossReference[], depth?: number): Promise; /** * Analyze dependency health and suggest improvements */ analyzeDependencyHealth(graph: DependencyGraph): Promise<{ healthScore: number; issues: DependencyIssue[]; suggestions: DependencySuggestion[]; }>; /** * Filter entities based on options */ private filterEntities; /** * Create graph nodes from entities */ private createNodes; /** * Create graph edges from references */ private createEdges; /** * Detect circular dependencies using DFS */ private detectCycles; /** * Calculate various graph metrics */ private calculateMetrics; /** * Find entities reachable within specified depth */ private findReachableEntities; /** * Apply package-based clustering to nodes */ private applyPackageClustering; /** * Calculate node weight based on various factors */ private calculateNodeWeight; /** * Determine cluster for an entity */ private determineCluster; /** * Extract package/module name from file path */ private extractPackageFromFile; /** * Build adjacency list from edges */ private buildAdjacencyList; /** * Build adjacency list from references */ private buildAdjacencyListFromReferences; /** * Calculate maximum depth from a node */ private calculateMaxDepth; /** * Count strongly connected components (simplified) */ private countStronglyConnectedComponents; /** * Find tightly coupled clusters */ private findTightlyCoupledClusters; /** * Find hub nodes with too many dependencies */ private findHubNodes; /** * Find orphaned nodes with no dependencies */ private findOrphanedNodes; /** * Calculate overall health score */ private calculateHealthScore; /** * Generate suggestion for breaking cycles */ private generateCycleSuggestion; /** * Check if a file is a test file */ private isTestFile; } export interface DependencyIssue { type: 'circular-dependency' | 'tight-coupling' | 'hub-nodes' | 'orphaned-nodes'; severity: 'critical' | 'warning' | 'suggestion'; description: string; affectedNodes: string[]; impact: 'high' | 'medium' | 'low'; } export interface DependencySuggestion { type: 'break-cycles' | 'reduce-coupling' | 'split-responsibilities' | 'review-orphans'; priority: 'high' | 'medium' | 'low'; description: string; implementation: string; } //# sourceMappingURL=DependencyGraphBuilder.d.ts.map