export interface UnifiedConfigFileContext { type: TType; directoryPath: string; fileName: string; filePath: string; content: string; } export interface UnifiedConfigFileCandidate { directoryPath: string; fileName: string; filePath: string; } export interface UnifiedConfigDefinition { type: TType; directories: ReadonlyArray; discoverFiles?: (directoryPath: string) => Promise>; includeFile?: (fileName: string, filePath: string) => boolean; parseFile: (context: UnifiedConfigFileContext) => TItem; resolveId: (item: TItem, context: UnifiedConfigFileContext) => string; } export interface UnifiedConfigWatcherOptions { debounceMs?: number; emitParseErrors?: boolean; } export interface UnifiedConfigRecord { type: TType; id: string; item: TItem; filePath: string; } export type UnifiedConfigWatcherEvent = { kind: "upsert"; record: UnifiedConfigRecord; } | { kind: "remove"; type: TType; id: string; filePath: string; } | { kind: "error"; type: TType; error: unknown; filePath?: string; }; export declare class UnifiedConfigFileWatcher { private readonly definitions; private readonly debounceMs; private readonly emitParseErrors; private readonly listeners; private readonly recordsByType; private readonly watchersByDirectory; private readonly baseTypesByDirectory; private watchedTypesByDirectory; private readonly discoveredDirectoriesByType; private readonly definitionsByType; private readonly pendingTypes; private flushTimer; private refreshQueue; private started; constructor(definitions: ReadonlyArray>, options?: UnifiedConfigWatcherOptions); subscribe(listener: (event: UnifiedConfigWatcherEvent) => void): () => void; start(): Promise; stop(): void; refreshAll(): Promise; refreshType(type: TType): Promise; getSnapshot(type: TType): Map>; getAllSnapshots(): Map>>; private emit; private enqueueRefresh; private startDirectoryWatchers; private syncDirectoryWatchers; private scheduleFlush; private refreshTypeInternal; private loadDefinition; private buildDesiredTypesByDirectory; private readDirectoryFileCandidates; }