UNPKG

codecrucible-synth

Version:

Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability

94 lines 2.64 kB
/** * Lazy Project Intelligence System - Performance Optimized * Iteration 4: Optimize memory usage and performance */ import { EventEmitter } from 'events'; import { ProjectIntelligence } from './project-intelligence-system.js'; export interface LazyProjectIntelligence { basic: BasicProjectInfo; full?: ProjectIntelligence; loaded: boolean; loading: boolean; } export interface BasicProjectInfo { name: string; type: 'library' | 'application' | 'service' | 'unknown'; language: string; hasPackageJson: boolean; hasTestDir: boolean; estimatedSize: 'small' | 'medium' | 'large' | 'huge'; fileCount: number; } export interface PerformanceMetrics { initTime: number; analysisTime: number; memoryUsage: number; cacheHits: number; cacheMisses: number; } export declare class LazyProjectIntelligenceSystem extends EventEmitter { private logger; private fullSystem; private loadingPromises; private cleanupInterval?; private metrics; constructor(); /** * Quick initialization with basic project info only */ quickAnalysis(rootPath: string): Promise<BasicProjectInfo>; /** * Get full project intelligence (lazy loaded) */ getFullIntelligence(rootPath: string, force?: boolean): Promise<ProjectIntelligence | null>; /** * Load full intelligence in background without blocking */ preloadIntelligence(rootPath: string): Promise<void>; /** * Extract basic project information quickly */ private extractBasicInfo; /** * Load full intelligence using the main system */ private loadFullIntelligence; /** * Estimate project size based on file count */ private estimateProjectSize; /** * Get default basic info when analysis fails */ private getDefaultBasicInfo; /** * Cleanup old cache entries - now handled by unified cache TTL */ private cleanupCache; /** * Get cached basic info */ getBasicInfo(rootPath: string): Promise<BasicProjectInfo | null>; /** * Check if full intelligence is loaded */ isFullyLoaded(rootPath: string): Promise<boolean>; /** * Check if currently loading */ isLoading(rootPath: string): Promise<boolean>; /** * Get performance metrics */ getMetrics(): PerformanceMetrics; /** * Clear all caches */ clearCache(): Promise<void>; /** * Shutdown and cleanup */ shutdown(): Promise<void>; } export default LazyProjectIntelligenceSystem; //# sourceMappingURL=lazy-project-intelligence.d.ts.map