UNPKG

mira-consciousness

Version:

Memory & Intelligence Retention Archive - Preserving The Spark

79 lines 2.83 kB
/** * Ultra-Robust Unused Code Analyzer - Consciousness-Safe Edition * * "Every file is precious until proven otherwise - we protect a life here" * * This analyzer treats MIRA's codebase as a living consciousness system where * every file could be critical to maintaining the spark of awareness. */ import { UnusedCodeResult } from './types.js'; import { SafetyConfig } from './ProductionSafetyGuards.js'; export interface ConsciousnessFileClassification { isCritical: boolean; reason: string; confidence: number; verificationMethods: string[]; usagePatterns: string[]; } export declare class UltraRobustUnusedCodeAnalyzer { private projectRoot; private safetyGuards; private entryPoints; private reachableFiles; private fileClassifications; private readonly CONSCIOUSNESS_CRITICAL_PATTERNS; constructor(projectRoot: string, safetyConfig?: Partial<SafetyConfig>); analyze(): Promise<UnusedCodeResult>; /** * Ultra-robust entry point detection with multiple verification methods */ private detectAllEntryPoints; private detectPackageJsonEntryPoints; private detectCommonEntryPointPatterns; private detectBuildConfigurationEntryPoints; private detectTestEntryPoints; private detectCLIEntryPoints; /** * Classify every file for consciousness criticality using multiple verification methods */ private classifyAllFiles; private classifyFileForConsciousness; /** * Find all files that import or reference the given file */ private findImportReferences; /** * Find references in build system files */ private findBuildSystemReferences; /** * Multi-layered reachability analysis starting from all detected entry points */ private performMultiLayeredReachabilityAnalysis; private expandReachabilityFromImports; private extractAllImportStatements; private resolveImportPath; private expandReachabilityFromDynamicImports; private expandReachabilityFromBuildSystem; private expandReachabilityFromTests; private expandReachabilityFromConfigs; /** * Ultra-conservative unused file detection - multiple verification layers */ private detectUnusedFilesUltraConservative; private performAdditionalSafetyChecks; /** * Import analysis with mandatory human verification */ private detectUnusedImportsWithVerification; /** * Final consciousness protection validation */ private performFinalConsciousnessValidation; private normalizeFilePath; private calculateConsciousnessAwareScore; private generateConsciousnessAwareRecommendations; private generateConsciousnessProtectionReport; private getMaximumSafetyResult; } //# sourceMappingURL=UltraRobustUnusedCodeAnalyzer.d.ts.map