export declare const HISTORY_CONTEXT_MARKER = "[Chat messages since your last reply - for context]"; export declare const DEFAULT_GROUP_HISTORY_LIMIT = 50; /** * Evict oldest keys from a history map when it exceeds MAX_HISTORY_KEYS. * Uses Map's insertion order for LRU-like behavior. */ export declare function evictOldHistoryKeys(historyMap: Map, maxKeys?: number): void; export type HistoryEntry = { sender: string; body: string; timestamp?: number; messageId?: string; }; export declare function buildHistoryContext(params: { historyText: string; currentMessage: string; lineBreak?: string; }): string; export declare function appendHistoryEntry(params: { historyMap: Map; historyKey: string; entry: T; limit: number; }): T[]; export declare function recordPendingHistoryEntry(params: { historyMap: Map; historyKey: string; entry: T; limit: number; }): T[]; export declare function recordPendingHistoryEntryIfEnabled(params: { historyMap: Map; historyKey: string; entry?: T | null; limit: number; }): T[]; export declare function buildPendingHistoryContextFromMap(params: { historyMap: Map; historyKey: string; limit: number; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; }): string; export declare function buildHistoryContextFromMap(params: { historyMap: Map; historyKey: string; limit: number; entry?: HistoryEntry; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; excludeLast?: boolean; }): string; export declare function clearHistoryEntries(params: { historyMap: Map; historyKey: string; }): void; export declare function clearHistoryEntriesIfEnabled(params: { historyMap: Map; historyKey: string; limit: number; }): void; export declare function buildHistoryContextFromEntries(params: { entries: HistoryEntry[]; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; excludeLast?: boolean; }): string;