import { type MemoryRecallCallArgs } from "./context.js"; import type { MemoryBranches } from "./lineage.js"; import type { ExpandSessionSelection, ExpandedSessionEntry, NormalizedEntry } from "./normalize.js"; import type { MemoryCoverage } from "./index.js"; import type { SearchResult } from "./search.js"; import { type SourceObservation } from "./source-observation.js"; export type CanonicalExpansionSelection = ExpandSessionSelection & { before?: number; after?: number; }; export interface ResolvedExpansionSelection { entries: ExpandedSessionEntry[]; canonical: CanonicalExpansionSelection; anchorIndex: number | null; } export interface ExpansionSnapshot { file: string; branches: MemoryBranches; sourceHash: string; lineageFingerprint: string; observation: SourceObservation; entries: readonly NormalizedEntry[]; selections: Map; touchedAt: number; } export interface RecallContinuationCache { key: string; result: SearchResult; coverage: MemoryCoverage; requestArgs: MemoryRecallCallArgs; observations: readonly SourceObservation[]; touchedAt: number; } export declare const recallContinuationKey: (args: MemoryRecallCallArgs) => string; export declare const expansionSelectionKey: (selection: CanonicalExpansionSelection) => string; export declare class MemoryRequestCache { private recallContinuation; private readonly expansionSnapshots; cachedRecallContinuation(key: string, observations: readonly SourceObservation[] | null): RecallContinuationCache | undefined; rememberRecallContinuation(cached: RecallContinuationCache): void; forgetRecallContinuation(cached: RecallContinuationCache): void; cachedExpansionSnapshot(file: string, branches: MemoryBranches, observation: SourceObservation | null): ExpansionSnapshot | undefined; rememberExpansionSnapshot(snapshot: ExpansionSnapshot): void; rememberExpansionSelection(snapshot: ExpansionSnapshot, keys: readonly string[], selection: ResolvedExpansionSelection): void; forgetExpansionSnapshot(snapshot: ExpansionSnapshot): void; } export type RecallRequestCache = Pick; export type ExpansionRequestCache = Pick; //# sourceMappingURL=request-cache.d.ts.map