UNPKG

bc-code-intelligence-mcp

Version:

BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows

91 lines 2.75 kB
/** * Hot Reload System for Development Experience * * Watches for configuration changes, layer updates, and code modifications * to provide instant feedback during development without server restart. */ import { EventEmitter } from 'events'; import { MultiContentLayerService } from '../services/multi-content-layer-service.js'; import { ConfigurationLoader } from '../config/config-loader.js'; export interface HotReloadEvent { type: 'config_changed' | 'layer_updated' | 'topic_changed' | 'index_rebuilt'; source: string; timestamp: number; details?: any; } export interface DevServerStats { uptime: number; reload_count: number; last_reload: number; watched_files: number; active_watchers: number; performance_impact: 'low' | 'medium' | 'high'; } export declare class HotReloadSystem extends EventEmitter { private readonly enabled; private readonly debounceMs; private readonly verboseLogging; private watchers; private layerService?; private configLoader?; private currentConfig?; private reloadCount; private startTime; private lastReload; private watchedPaths; private debounceTimers; constructor(enabled?: boolean, debounceMs?: number, verboseLogging?: boolean); /** * Initialize hot reload with layer service and config loader */ initialize(layerService: MultiContentLayerService, configLoader: ConfigurationLoader): Promise<void>; /** * Add custom file path to watch */ watchPath(path: string, eventType?: HotReloadEvent['type']): void; /** * Trigger manual reload for testing or forced updates */ triggerReload(reason?: string): Promise<void>; /** * Get development server statistics */ getStats(): DevServerStats; /** * Shutdown hot reload system and cleanup watchers */ shutdown(): Promise<void>; /** * Setup configuration file watcher */ private setupConfigurationWatcher; /** * Setup layer-specific watchers based on current configuration */ private setupLayerWatchers; /** * Handle configuration file changes */ private handleConfigurationFileChange; /** * Handle layer file changes */ private handleLayerChange; /** * Handle any file change with generic handling */ private handleFileChange; /** * Handle configuration changes and trigger appropriate reloads */ private handleConfigurationChange; /** * Debounce actions to prevent excessive reloading */ private debounceAction; /** * Emit reload event with consistent structure */ private emitReloadEvent; } //# sourceMappingURL=hot-reload.d.ts.map