/**
 * Plugin Hot Reload System
 *
 * Provides file watching and hot reloading capabilities for plugins.
 * Allows developers to see changes immediately without restarting.
 */
import { EventEmitter } from 'events';
import { PluginManifest } from './types.js';
/**
 * Hot reload configuration
 */
export interface HotReloadConfig {
    /** Enable hot reloading */
    enabled: boolean;
    /** Debounce delay in ms */
    debounceMs: number;
    /** File patterns to watch */
    watchPatterns: string[];
    /** File patterns to ignore */
    ignorePatterns: string[];
    /** Reload on manifest change */
    reloadOnManifestChange: boolean;
    /** Reload on source change */
    reloadOnSourceChange: boolean;
    /** Show notifications on reload */
    showNotifications: boolean;
}
/**
 * Default hot reload configuration
 */
export declare const DEFAULT_HOT_RELOAD_CONFIG: HotReloadConfig;
/**
 * Reload event data
 */
export interface ReloadEvent {
    pluginId: string;
    pluginPath: string;
    changedFile: string;
    changeType: 'add' | 'change' | 'unlink';
    timestamp: Date;
}
/**
 * Plugin Hot Reloader
 *
 * Watches plugin directories for changes and triggers reloads.
 */
export declare class PluginHotReloader extends EventEmitter {
    private config;
    private watchedPlugins;
    private reloadCallback;
    constructor(config?: Partial<HotReloadConfig>);
    /**
     * Set the reload callback function
     */
    onReload(callback: (pluginId: string) => Promise<void>): void;
    /**
     * Start watching a plugin directory
     */
    watch(pluginId: string, pluginPath: string, manifest: PluginManifest): void;
    /**
     * Stop watching a plugin
     */
    unwatch(pluginId: string): void;
    /**
     * Stop watching all plugins
     */
    unwatchAll(): void;
    /**
     * Handle file change event
     */
    private handleFileChange;
    /**
     * Trigger a plugin reload
     */
    private triggerReload;
    /**
     * Check if a file should be ignored
     */
    private shouldIgnore;
    /**
     * Check if a file matches watch patterns
     */
    private shouldWatch;
    /**
     * Simple glob pattern matching
     */
    private matchPattern;
    /**
     * Get list of watched plugins
     */
    getWatchedPlugins(): string[];
    /**
     * Check if a plugin is being watched
     */
    isWatching(pluginId: string): boolean;
    /**
     * Get watch status for a plugin
     */
    getWatchStatus(pluginId: string): {
        watching: boolean;
        lastReload?: Date;
        path?: string;
    };
    /**
     * Force reload a plugin
     */
    forceReload(pluginId: string): Promise<void>;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<HotReloadConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): HotReloadConfig;
    /**
     * Shutdown the hot reloader
     */
    shutdown(): void;
}
/**
 * Get hot reloader instance
 */
export declare function getPluginHotReloader(config?: Partial<HotReloadConfig>): PluginHotReloader;
/**
 * Reset hot reloader
 */
export declare function resetPluginHotReloader(): void;
export default PluginHotReloader;
