import type { ProfilesFile } from '../domain/agents/profile-manager.js'; export declare const PROFILES_FILE: string; export declare class ProfileRepo { private readonly _repo; private readonly _filePath; private _syncCache; constructor(filePath?: string); read(): Promise; /** * Synchronous read for legacy sync callers (profile-manager.ts public API). * First call reads from disk; subsequent calls serve from cache. save()/mutate() * update the cache on success so sync readers see fresh data. */ readSync(): ProfilesFile; save(data: ProfilesFile): Promise; mutate(fn: (cur: ProfilesFile) => { next: ProfilesFile; result: R; }): Promise; /** Drop the in-memory cache so the next read() fetches from disk. Test hook. */ invalidate(): void; /** Wait for any in-flight mutate() to complete. For graceful SIGTERM drain. */ flush(): Promise; } export declare const profileRepo: ProfileRepo; export declare function setAdminNotifier(fn: (text: string) => void): void; /** * Watch profiles.json for external edits and hot-reload the cache. * Mirrors the pattern used by startMachineRegistryWatcher() in dispatch-utils.ts. * * Returns a stop function — call it to tear down the watcher (e.g. in tests or SIGTERM). * * @param repo ProfileRepo instance to invalidate on change (defaults to singleton). * @param filePath Path to watch (defaults to PROFILES_FILE). */ export declare function startProfileWatcher(repo?: ProfileRepo, filePath?: string): () => void;