/** * Working Memory Store * * A key-value store for facts, decisions, and context that persists * across conversation boundaries. Enables Claude to "remember" things * explicitly and retrieve them later. */ import type { Database } from "better-sqlite3"; import type { WorkingMemoryItem, RememberOptions, RecallOptions, SemanticRecallOptions, SemanticRecallResult } from "./types.js"; export declare class WorkingMemoryStore { private db; constructor(db: Database); /** * Store a fact/decision/context in working memory */ remember(options: RememberOptions): WorkingMemoryItem; /** * Recall a specific item by key */ recall(key: string, projectPath: string): WorkingMemoryItem | null; /** * Recall items matching options */ recallMany(options: RecallOptions): WorkingMemoryItem[]; /** * Semantic search across working memory using FTS */ recallRelevant(options: SemanticRecallOptions): SemanticRecallResult[]; /** * Forget (delete) a memory item by key */ forget(key: string, projectPath: string): boolean; /** * Forget all items for a project */ forgetAll(projectPath: string): number; /** * List all memory items for a project */ list(projectPath: string, options?: { tags?: string[]; limit?: number; offset?: number; }): WorkingMemoryItem[]; /** * Get count of items for a project */ count(projectPath: string): number; /** * Get a single item by ID */ private getById; /** * Convert database row to WorkingMemoryItem */ private rowToItem; /** * Clean up expired items */ private cleanupExpired; /** * Insert into FTS index */ private insertFts; /** * Update FTS index */ private updateFts; /** * Delete from FTS index */ private deleteFts; /** * Escape FTS query for safe matching */ private escapeFtsQuery; /** * Normalize BM25 rank to a similarity score (0-1) * BM25 returns negative scores, lower is better */ private normalizeRank; } //# sourceMappingURL=WorkingMemoryStore.d.ts.map