/**
 * Subsystem Reloader
 *
 * Handles reloading of individual subsystems when configuration changes.
 * Supports rollback on failure and dependency-aware reload ordering.
 */
import type { SubsystemId, SubsystemReloader, ConfigChange, ReloadResult } from './types.js';
/**
 * Subsystem reloader registry
 */
declare class ReloaderRegistry {
    private reloaders;
    private rollbackHandlers;
    /**
     * Register a reloader for a subsystem
     */
    register(subsystem: SubsystemId, reloader: SubsystemReloader, rollbackHandler?: (change: ConfigChange) => Promise<void>): void;
    /**
     * Unregister a reloader
     */
    unregister(subsystem: SubsystemId): void;
    /**
     * Get a reloader for a subsystem
     */
    get(subsystem: SubsystemId): SubsystemReloader | undefined;
    /**
     * Get a rollback handler
     */
    getRollback(subsystem: SubsystemId): ((change: ConfigChange) => Promise<void>) | undefined;
    /**
     * Check if a subsystem has a reloader
     */
    has(subsystem: SubsystemId): boolean;
    /**
     * Get all registered subsystems
     */
    getRegisteredSubsystems(): SubsystemId[];
}
declare const registry: ReloaderRegistry;
/**
 * Register a subsystem reloader
 */
export declare function registerReloader(subsystem: SubsystemId, reloader: SubsystemReloader, rollbackHandler?: (change: ConfigChange) => Promise<void>): void;
/**
 * Unregister a subsystem reloader
 */
export declare function unregisterReloader(subsystem: SubsystemId): void;
/**
 * Sort subsystems by priority and dependencies
 */
export declare function sortByPriority(subsystems: SubsystemId[]): SubsystemId[];
/**
 * Get all subsystems that need to be reloaded (including dependencies)
 */
export declare function getReloadOrder(subsystems: SubsystemId[]): SubsystemId[];
/**
 * Reload all affected subsystems
 */
export declare function reloadSubsystems(changes: ConfigChange[], options?: {
    rollbackOnFailure?: boolean;
    stopOnFirstError?: boolean;
    parallel?: boolean;
}): Promise<ReloadResult[]>;
/**
 * Check if all required reloaders are registered
 */
export declare function hasAllReloaders(subsystems: SubsystemId[]): boolean;
/**
 * Get missing reloaders for subsystems
 */
export declare function getMissingReloaders(subsystems: SubsystemId[]): SubsystemId[];
/**
 * Create a no-op reloader (for subsystems that don't need special handling)
 */
export declare function createNoOpReloader(subsystem: SubsystemId): SubsystemReloader;
/**
 * Create a simple reloader from a callback
 */
export declare function createSimpleReloader(subsystem: SubsystemId, callback: (newValue: unknown) => Promise<void>): SubsystemReloader;
export { registry as _registry };
