import type { SessionManager } from "../session/session-manager.js"; export declare const MEMORY_RECALL_ENTRY_TYPE = "memory_recall"; /** * Hidden message reporting what changed in a reused recall's memories. Its details * ({@link MemoryRecallChangesDetails}) carry the memories still current, so the * report and its bookkeeping reach the transcript together, only once delivered. */ export declare const MEMORY_RECALL_CHANGES_MESSAGE_TYPE = "memory-recall-changes"; /** One memory in a recall block, as last reported to the model. */ export interface RecalledMemory { id: string; /** The memory's text as the model last saw it: the recall preview, clipped. */ text: string; /** The block's token budget cut this memory: `text` is the visible prefix only. */ cut?: true; } export interface PersistedRecall { /** Recall block, `""` when the recall found nothing. */ text: string; /** Memories the block holds that are still current as far as the model knows. */ memories: RecalledMemory[]; } /** Details of a {@link MEMORY_RECALL_CHANGES_MESSAGE_TYPE} message. */ export interface MemoryRecallChangesDetails { scope: string; /** The reused recall's memories still current after the report. */ memories: RecalledMemory[]; } /** * The latest recall for `scope` on the current branch that a turn followed, with the * memories still current per the latest change report delivered after it. Undefined * when the branch needs a fresh recall: none was recorded since the last context * reset, or no turn followed one (a branch that edits the first prompt asks a * different question). */ export declare function findPersistedRecall(sessionManager: Pick, scope: string): PersistedRecall | undefined; /** Records a fresh recall. */ export declare function persistRecall(sessionManager: Pick, scope: string, recall: PersistedRecall): void;