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
76 lines • 2.42 kB
TypeScript
export interface ExtractionCandidate {
moduleName: string;
functions: string[];
dependencies: string[];
cohesionScore: number;
extractionPriority: 'high' | 'medium' | 'low';
}
export interface AnalysisMetrics {
cyclomaticComplexity: number;
totalLines: number;
functionCount: number;
}
export interface ExtractionRecommendation {
moduleName: string;
priority: 'high' | 'medium' | 'low';
estimatedLines: number;
reasoning: string;
}
export interface AnalysisResult {
extractionCandidates: ExtractionCandidate[];
metrics: AnalysisMetrics;
recommendations: ExtractionRecommendation[];
reason?: string;
}
export interface ModuleTemplate {
moduleCode: string;
testCode: string;
integrationCode: string;
}
export interface ExtractionProgress {
totalViolations: number;
totalExcessLines: number;
priorityOrder: string[];
}
/**
* AST-based tool for analyzing TypeScript files and identifying natural module boundaries
* Follows the proven TDD extraction pattern from successful modular extractions
*/
export declare class ExtractionAnalyzer {
private fileSystem;
constructor(fileSystem?: {
readFileSync: (path: string, encoding?: string) => string;
statSync: (path: string) => {
size: number;
};
});
/**
* Analyze a TypeScript file and identify potential module extraction candidates
*/
analyzeFile(filePath: string): Promise<AnalysisResult>;
/**
* Generate module template code following proven patterns from successful extractions
*/
generateModuleTemplate(candidate: ExtractionCandidate): ModuleTemplate;
/**
* Analyze extraction progress across multiple files
*/
analyzeExtractionProgress(filePaths: string[]): Promise<ExtractionProgress>;
private performASTAnalysis;
private extractFunctions;
private analyzeDependencies;
private calculateMetrics;
private groupFunctionsByModule;
private findConnectedFunctions;
private createExtractionCandidate;
private generateModuleName;
private determineExtractionPriority;
private createRecommendation;
private generateModuleCode;
private generateTestCode;
private generateIntegrationCode;
private countLines;
private hasValidTypeScriptContent;
private hasSimilarNaming;
}
//# sourceMappingURL=extraction-analyzer.d.ts.map