interface FileManifestEntry { /** Relative path from ~/.ldm/ (e.g. "agents/cc-mini/memory/daily/2026-03-05.md") */ path: string; /** SHA-256 hex hash of file contents */ sha256: string; /** File size in bytes */ size: number; } interface FileManifest { version: number; generatedAt: string; /** Total number of files */ fileCount: number; entries: FileManifestEntry[]; } interface FileDelta { /** Files to create or update on the node */ upsert: Array<{ path: string; sha256: string; }>; /** Files to delete on the node */ delete: string[]; } interface FileSyncState { lastSync: string | null; lastManifestHash: string | null; filesTransferred: number; filesDeleted: number; } /** Generate a manifest of all files under ~/.ldm/. */ declare function generateManifest(): FileManifest; /** Compare Core manifest against local files. Returns what needs to change. */ declare function compareManifest(coreManifest: FileManifest): FileDelta; declare function loadFileSyncState(): FileSyncState; declare function saveFileSyncState(state: FileSyncState): void; /** Core pushes manifest + changed files to relay "files" channel. */ declare function pushFileSync(): Promise<{ manifest: number; files: number; }>; /** Node pulls files from relay and applies changes. */ declare function pullFileSync(): Promise<{ imported: number; deleted: number; }>; export { type FileDelta, type FileManifest, type FileManifestEntry, type FileSyncState, compareManifest, generateManifest, loadFileSyncState, pullFileSync, pushFileSync, saveFileSyncState };