export declare const ENTRY_DELIMITER = "\n\u00A7\n"; export type MemoryTarget = "memory" | "user"; export type MemoryResult = Record; /** * Atomic write via temp `.mem_*` in the same directory + rename (Hermes). * Prefer project-local naming; do not use OS tmpdir for the final swap. */ export declare function atomicWriteText(path: string, content: string, tmpPrefix?: string): void; export type MemoryStoreOptions = { memoryDirectory: string; memoryCharLimit?: number; userCharLimit?: number; }; export declare class MemoryStore { memoryDirectory: string; memoryCharLimit: number; userCharLimit: number; memoryEntries: string[]; userEntries: string[]; private consolidationFailures; constructor(options: MemoryStoreOptions); pathFor(target: MemoryTarget): string; entriesFor(target: MemoryTarget): string[]; setEntries(target: MemoryTarget, entries: string[]): void; charLimit(target: MemoryTarget): number; charCount(target: MemoryTarget): number; resetConsolidationFailures(): void; private consolidationFailure; private successResponse; private batchError; static parseEntries(raw: string): string[]; static readRawChecked(path: string): { raw: string; readOk: boolean; }; private detectExternalDrift; /** * Re-read under lock. Returns null (ok), bak path (drift), or READ_FAILED. */ private reloadTarget; private saveToDisk; add(target: MemoryTarget, content: string): Promise; replace(target: MemoryTarget, oldText: string, newContent: string): Promise; remove(target: MemoryTarget, oldText: string): Promise; applyBatch(target: MemoryTarget, operations: Array>): Promise; /** Usage string for status (no contents). */ usageLabel(target: MemoryTarget): string; /** Load live entries from disk without mutation (for status). */ loadLiveFromDisk(): void; } //# sourceMappingURL=memory-store.d.ts.map