export interface ManifestEntry { fileId: string; contentHash: string; lastSyncedAt: string; } export interface ManifestState { version: number; entries: Record; } export interface ManifestStore { upsertEntry(trackingKey: string, entry: ManifestEntry): void; removeEntry(trackingKey: string): void; getEntry(trackingKey: string): ManifestEntry | null; getState(): ManifestState; flush(): void; } export interface CreateManifestStoreOptions { debounceMs?: number; } export declare function manifestPath(localPath: string): string; export declare function loadManifest(localPath: string): ManifestState; /** * Persists the in-memory manifest state to disk. * * PERFORMANCE & SAFETY NOTES: * 1. Atomic Writes: We write to `.compound-sync/manifest.json.tmp` first, * then use `fs.renameSync` to overwrite the actual manifest. This ensures * that if the daemon crashes mid-write, we do not corrupt the JSON. * 2. Unsorted Keys: We do not sort the object keys before calling * `JSON.stringify()`. Sorting requires significant CPU overhead for large * workspaces. The in-memory object map is the source of truth; disk * order does not matter. * 3. Synchronous I/O: All disk operations use `*Sync` APIs. A flush blocks * the Node event loop briefly; see docs/features/sync/sync-manifest-design.md. */ export declare function saveManifest(localPath: string, manifestState: ManifestState): void; export declare function createManifestStore(localPath: string, { debounceMs }?: CreateManifestStoreOptions): ManifestStore; //# sourceMappingURL=manifest.d.ts.map