import { ConfigRecord, ConfigValue, ConfigChange, ConfigEventListener, ConfigSourceType } from './types'; /** * Runtime config options. */ export interface RuntimeConfigOptions { /** Maximum history entries to keep */ readonly maxHistory?: number; /** Enable debug logging */ readonly debug?: boolean; /** Whether changes trigger events immediately */ readonly immediateEvents?: boolean; } /** * History entry for rollback. */ interface HistoryEntry { readonly changes: ConfigChange[]; readonly timestamp: Date; } /** * Runtime configuration manager with change tracking. */ export declare class RuntimeConfig { private config; private listeners; private history; private options; private pendingChanges; private batchMode; constructor(initialConfig: T, options?: RuntimeConfigOptions); /** * Get the current configuration. */ getConfig(): T; /** * Get a value at a path. */ get(path: string, defaultValue?: V): V; /** * Check if a path exists. */ has(path: string): boolean; /** * Set a value at a path. */ set(path: string, value: ConfigValue, source?: ConfigSourceType): void; /** * Delete a value at a path. */ delete(path: string, source?: ConfigSourceType): void; /** * Update multiple values at once. */ update(updates: Record, source?: ConfigSourceType): void; /** * Reset to a new configuration. */ reset(config: T): void; /** * Start a batch of changes. */ startBatch(): void; /** * Commit the current batch. */ commitBatch(): void; /** * Rollback the current batch. */ rollbackBatch(): void; /** * Execute a function in batch mode. */ batch(fn: () => void): void; /** * Rollback the last change. */ rollback(): boolean; /** * Get the change history. */ getHistory(): readonly HistoryEntry[]; /** * Clear the change history. */ clearHistory(): void; /** * Subscribe to configuration events. */ subscribe(listener: ConfigEventListener): () => void; /** * Subscribe to changes at a specific path. */ subscribeToPath(path: string, listener: (value: ConfigValue, change: ConfigChange) => void): () => void; /** * Create a snapshot of the current configuration. */ snapshot(): T; /** * Restore from a snapshot. */ restore(snapshot: T): void; private recordChange; private emitEvent; private log; } /** * Create a runtime config instance. */ export declare function createRuntimeConfig(initialConfig: T, options?: RuntimeConfigOptions): RuntimeConfig; /** * Get the singleton runtime config instance. */ export declare function getRuntimeConfig(): RuntimeConfig; /** * Initialize the singleton with a configuration. */ export declare function initRuntimeConfig(config: T, options?: RuntimeConfigOptions): RuntimeConfig; /** * Reset the singleton instance. */ export declare function resetRuntimeConfig(): void; export {};