/** * [WHO]: readJson, writeJson, deriveNameFromContent, deriveSummaryFromContent, ensureDir * [FROM]: Depends on node:fs, node:fs/promises, node:path, ./types.js * [TO]: Consumed by packages/mem-core/src/index.ts * [HERE]: packages/mem-core/src/store.ts - persistence layer for JSON storage, 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; /** Derive a short name (≤30 chars) from content text */ declare function deriveNameFromContent(content: string): string; /** Derive a summary (≤150 chars) from content text, breaking at sentence boundary */ declare function deriveSummaryFromContent(content: string): string; 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; export { deriveNameFromContent, deriveSummaryFromContent };