import { cacheManager } from './cache'; import { ConversationState } from '../types'; /** * Performance optimization utilities and caching layer */ /** * Conversation cache for frequently accessed conversations */ export declare const conversationCacheOrig: import("./cache").ICache; /** * Expert output cache for reusable expert responses */ export declare const expertOutputCacheOrig: import("./cache").ICache; /** * Document generation cache for templates and generated content */ export declare const documentCacheOrig: import("./cache").ICache; /** * Performance monitoring utilities */ declare class PerformanceMonitorImpl { private static timers; private static metrics; /** * Start a performance timer */ static startTimer(name: string): void; /** * End a performance timer and record the duration */ static endTimer(name: string): number; /** * Get performance statistics for a timer */ static getStats(name: string): { count: number; average: number; min: number; max: number; p95: number; } | null; /** * Get all performance statistics */ static getAllStats(): Record; /** * Clear all performance data */ static clear(): void; } /** * Memory management utilities */ declare class MemoryManagerImpl { private static gcThreshold; private static lastGC; /** * Check memory usage and trigger GC if needed */ static checkMemoryUsage(): void; /** * Clear all caches to free memory */ static clearCaches(): void; /** * Get current memory statistics */ static getMemoryStats(): { heapUsed: number; heapTotal: number; external: number; rss: number; cacheStats: Record; }; } /** * Resource pool for managing limited resources */ declare class ResourcePoolImpl { private createResource; private destroyResource; private maxSize; private acquireTimeoutMs; private available; private inUse; private waitingQueue; constructor(createResource: () => T | Promise, destroyResource: (resource: T) => void | Promise, maxSize: number, acquireTimeoutMs?: number); /** * Acquire a resource from the pool */ acquire(): Promise; /** * Release a resource back to the pool */ release(resource: T): Promise; /** * Destroy a single resource and remove it from the pool */ destroySingle(resource: T): Promise; /** * Get pool statistics */ getStats(): { available: number; inUse: number; waiting: number; total: number; maxSize: number; }; /** * Destroy all resources and clear the pool */ destroy(): Promise; } /** * Performance decorator for automatic timing */ declare function measurePerformance(name?: string): (target: any, propertyName: string, descriptor: PropertyDescriptor) => PropertyDescriptor; /** * Cache decorator for automatic caching */ declare function cached(cacheName: string, ttlMs?: number): (target: any, propertyName: string, descriptor: PropertyDescriptor) => PropertyDescriptor; export declare const PerformanceMonitor: typeof PerformanceMonitorImpl; export declare const MemoryManager: typeof MemoryManagerImpl; export declare const ResourcePool: typeof ResourcePoolImpl; export type { ResourcePoolImpl }; export { cacheManager, conversationCacheOrig as conversationCache, expertOutputCacheOrig as expertOutputCache, documentCacheOrig as documentCache, measurePerformance, cached }; //# sourceMappingURL=index.d.ts.map