import type { Session } from '../types/index.js'; import type { ExtractedValueStore } from './extract/store.js'; /** * Preloads relevant extracted facts into the system prompt before each LLM call. * * This is NOT a tool the LLM calls. It is a Runtime-level middleware that: * 1. Takes the user's latest message as a search query * 2. Loads cross-session facts from `ExtractedValueStore` (slug `facts`) * 3. Formats matching facts as a markdown section * 4. Truncates the output to fit within the allocated token budget * * The maxTokens parameter is mandatory. If the formatted output exceeds * maxTokens, memories are dropped in lowest-relevance-first order until * the output fits. */ export declare function preloadMemoryContext(store: ExtractedValueStore, session: Session, userInput: string, maxTokens: number): Promise;