import { ToolOutputManager } from './tool-output-manager'; export interface ConversationCacheConfig { /** Maximum number of conversations to keep in memory (default: 100) */ maxConversations?: number; /** Time-to-live for conversations in milliseconds (default: 2 hours) */ ttlMs?: number; /** Probability of triggering cleanup on each access (default: 0.1 = 10%) */ cleanupProbability?: number; /** Whether to enable debug logging (default: false) */ enableLogging?: boolean; } export interface ConversationInfo { id: string; ageMinutes: number; hasCache: boolean; toolOutputCount?: number; } export interface ConversationCacheStatus { totalConversations: number; conversations: ConversationInfo[]; config: { maxConversations: number; ttlHours: number; cleanupProbability: number; }; } export interface ChatMessage { role: string; content: string; [key: string]: unknown; } /** * ConversationCache manages ToolOutputManager instances per conversation, * providing persistent caching across requests within the same conversation * while maintaining isolation between different conversations. */ export declare class ConversationCache { private conversationCaches; private conversationTimestamps; private config; constructor(config?: ConversationCacheConfig); /** * Simple hash function that works in both browser and Node.js */ private simpleHash; /** * Get or create a ToolOutputManager for the given conversation ID. */ getToolOutputManager(conversationId: string): Promise; /** * Clean up old conversations based on TTL and max conversation limits. */ private cleanupOldConversations; /** * Get status information about the conversation cache. */ getStatus(): Promise; /** * Manually clear all conversations from the cache. */ clearAll(): void; /** * Get the current configuration. */ getConfig(): Required; }