import type { AddMemoryInput, ImpressionScanResult, MemoryChunk, RecallInput, RecallResult, SummaryRecord, StoredMemory, UpdateMemoryInput } from "../types/memory.js"; import type { SemanticRecallEngineConfig } from "../types/plugins.js"; /** Includes a recovery copy if an adapter fails during compensation. Do not log its contents. */ export declare class MemoryWriteError extends Error { readonly recoverySnapshot: StoredMemory | null; readonly recoveryErrors: unknown[]; readonly memoryId: string; constructor(message: string, cause: unknown, recoverySnapshot: StoredMemory | null, recoveryErrors: unknown[], memoryId: string); } /** A successor cleanup failure is explicit; inspect both IDs before retrying. */ export declare class MemorySupersedeError extends Error { readonly memoryId: string; readonly replacementId: string; readonly recoveryErrors: unknown[]; constructor(cause: unknown, memoryId: string, replacementId: string, recoveryErrors: unknown[]); } export declare class SemanticRecallEngine { private readonly config; private readonly familiarityLayer; private readonly summaryLayer; private readonly chunkLayer; private readonly chunker; private readonly summaryGenerator; private readonly thresholds; private readonly scoringStrategy; private readonly cueAliases; private readonly embeddingScopes; private mutationQueue; private mutate; constructor(config: SemanticRecallEngineConfig); addMemory(input: AddMemoryInput): Promise<{ id: string; }>; private writeMemory; private prepareMemory; private snapshot; private commitMemory; recall(query: RecallInput | string): Promise; private recallInternal; scanImpressions(query: RecallInput | string): Promise; private scanImpressionsInternal; getSummary(id: string): Promise; getChunks(id: string): Promise; /** Explicit full raw-content retrieval; never loaded by prompt projection automatically. */ getRawContent(id: string): Promise; updateMemory(id: string, input: UpdateMemoryInput): Promise<{ id: string; }>; /** Replace a live memory with a new ID. No historical redirect is stored by this optional engine. */ supersedeMemory(id: string, replacement: AddMemoryInput): Promise<{ id: string; supersededId: string; }>; deleteMemory(id: string): Promise; private deleteInternal; }