/** * Type definitions for token optimization */ import type { CacheConfig, CachedContent, CacheMetrics, LRUCacheConfig } from './caching/cache-types.js'; export interface OptimizationResult { optimized: boolean; originalContent: string; optimizedContent?: string; originalTokens: number; optimizedTokens?: number; savings?: { tokens: number; percentage: number; withCaching?: number; }; format?: 'json' | 'csv' | 'yaml' | 'unknown'; reason?: string; cachedContent?: CachedContent; cacheMetrics?: CacheMetrics; } export interface ToolMetadata { toolName: string; contentType?: string; size: number; modelId?: string; } export interface StructuredData { type: 'json' | 'csv' | 'yaml'; data: Record | unknown[]; confidence: number; } export interface OptimizationConfig { enabled: boolean; minTokensThreshold: number; minSavingsThreshold: number; maxProcessingTime: number; skipToolPatterns?: string[]; caching?: CacheConfig; multilingual?: { enabled: boolean; defaultLanguage: string; }; resultCache?: LRUCacheConfig; } export interface TokenStats { totalRequests: number; optimizedRequests: number; tokensBeforeOptimization: number; tokensAfterOptimization: number; totalSavings: number; averageSavingsPercentage: number; cacheHits?: number; cacheMisses?: number; cacheHitRate?: number; estimatedCacheSavings?: number; } export type { CacheConfig, CachedContent, CacheMetrics, LRUCacheConfig, LRUCacheStats } from './caching/cache-types.js'; //# sourceMappingURL=types.d.ts.map