/** * Cross-session memory storage — public API. * * As of S90 (GH #294), persistence routes through a MemoryBackend so the * memory module no longer writes JSON directly. Behavior: * * - If `.slope/slope.db` exists, SqliteMemoryBackend is used. On first * open it imports any existing `.slope/memories.json` into the store * and renames the JSON to `.bak` (one-time migration). * - Otherwise JsonMemoryBackend is used (legacy default for repos that * haven't initialized the SQLite store). * * Public API signatures are unchanged — callers (auto-memory hooks, the * memory CLI command, briefing) keep working without `await`. */ import type { MemoryBackend } from './memory-backend.js'; import type { Memory, MemoriesFile, MemoryCategory, MemorySource, MemorySearchOptions } from './memory-types.js'; export type { Memory, MemoriesFile, MemoryCategory, MemorySource, MemorySearchOptions } from './memory-types.js'; export { validateMemoryRow as validateMemory } from './memory-validation.js'; export declare function detectSecret(text: string): string | null; export declare class SecretDetectedError extends Error { pattern: string; constructor(pattern: string); } export declare function clearMemoryBackendCache(): void; export declare function getMemoryBackend(cwd: string): MemoryBackend; export declare function loadMemories(cwd: string): MemoriesFile; export declare function saveMemories(cwd: string, data: MemoriesFile): void; export declare function addMemory(cwd: string, text: string, options?: { category?: MemoryCategory; weight?: number; source?: MemorySource; sourceSessionId?: string; /** Set true to bypass secret detection. Default false. */ allowSecrets?: boolean; }): Memory; export declare function removeMemory(cwd: string, id: string): boolean; export declare function updateMemory(cwd: string, id: string, updates: Partial>): Memory | null; export declare function searchMemories(cwd: string, options?: MemorySearchOptions): Memory[]; export declare function getMemoryById(cwd: string, id: string): Memory | undefined; //# sourceMappingURL=memory.d.ts.map