/** * [INPUT]: file paths, data objects * [OUTPUT]: async JSON read/write with directory auto-creation * [POS]: Persistence layer — all other modules go through here */ import type { Episode, MemoryEntry, Meta, WorkEntry } from "./types.js"; export declare function readJson(path: string, fallback: T): Promise; export declare function writeJson(path: string, data: unknown): Promise; export declare function loadEntries(path: string): Promise; export declare function saveEntries(path: string, entries: MemoryEntry[], max: number, utilityFn: (e: MemoryEntry) => number): Promise; export declare function loadEpisodes(episodesDir: string): Promise; export declare function saveEpisode(episodesDir: string, ep: Episode): Promise; export declare function loadWork(path: string): Promise; export declare function saveWork(path: string, entries: WorkEntry[], max: number, utilityFn: (w: WorkEntry) => number): Promise; export declare function loadMeta(path: string): Promise;