/**
 * Config Hot-Reload Types
 *
 * Type definitions for the configuration hot-reload system.
 */
import { EventEmitter } from 'events';
/**
 * Subsystem identifiers that can be reloaded
 */
export type SubsystemId = 'model' | 'tools' | 'policies' | 'plugins' | 'memory' | 'mcp' | 'skills' | 'security';
/**
 * Configuration change event
 */
export interface ConfigChange {
    subsystem: SubsystemId;
    path: string;
    oldValue: unknown;
    newValue: unknown;
    timestamp: number;
}
/**
 * Configuration snapshot for comparison
 */
export interface ConfigSnapshot {
    timestamp: number;
    hash: string;
    data: Record<string, unknown>;
}
/**
 * Subsystem reloader function type
 */
export type SubsystemReloader = (change: ConfigChange) => Promise<ReloadResult>;
/**
 * Result of a subsystem reload
 */
export interface ReloadResult {
    success: boolean;
    subsystem: SubsystemId;
    duration: number;
    error?: string;
    rollback?: boolean;
}
/**
 * Watcher configuration
 */
export interface WatcherConfig {
    /** Debounce delay in milliseconds */
    debounceMs: number;
    /** Paths to watch */
    paths: string[];
    /** Whether to watch recursively */
    recursive: boolean;
    /** File patterns to ignore */
    ignorePatterns: string[];
    /** Whether to reload on startup */
    reloadOnStart: boolean;
}
/**
 * Default watcher configuration
 */
export declare const DEFAULT_WATCHER_CONFIG: WatcherConfig;
/**
 * Hot-reload events
 */
export interface HotReloadEvents {
    'config:changed': (changes: ConfigChange[]) => void;
    'config:reloading': (subsystems: SubsystemId[]) => void;
    'config:reloaded': (results: ReloadResult[]) => void;
    'config:error': (error: Error, subsystem?: SubsystemId) => void;
    'watcher:started': (paths: string[]) => void;
    'watcher:stopped': () => void;
}
/**
 * Typed event emitter for hot-reload events
 */
export declare class HotReloadEmitter extends EventEmitter {
    emit<K extends keyof HotReloadEvents>(event: K, ...args: Parameters<HotReloadEvents[K]>): boolean;
    on<K extends keyof HotReloadEvents>(event: K, listener: HotReloadEvents[K]): this;
    once<K extends keyof HotReloadEvents>(event: K, listener: HotReloadEvents[K]): this;
    off<K extends keyof HotReloadEvents>(event: K, listener: HotReloadEvents[K]): this;
}
/**
 * Subsystem reload priority (lower = reload first)
 */
export declare const SUBSYSTEM_PRIORITY: Record<SubsystemId, number>;
/**
 * Subsystem dependencies (reload these after the key subsystem)
 */
export declare const SUBSYSTEM_DEPENDENCIES: Partial<Record<SubsystemId, SubsystemId[]>>;
