export interface TokenCount {
    tokens: number;
    words: number;
    characters: number;
}
export interface TokenCacheEntry<T = unknown> {
    key: string;
    value: T;
    hash: string;
    createdAt: number;
    expiresAt: number;
    hitCount: number;
    tokensSaved: number;
}
export interface TokenCacheConfig {
    defaultTtlMs: number;
    maxEntries: number;
    maxPersistentSizeMb: number;
    persistMinTtlMs: number;
}
export interface TokenCacheStats {
    hits: number;
    misses: number;
    entries: number;
    totalTokensSaved: number;
    hitRate: number;
}
export type CompressionStrategy = 'truncation' | 'extraction' | 'summary' | 'headTail' | 'codeOnly' | 'structureOnly';
export interface CompressionResult {
    compressed: string;
    originalTokens: number;
    compressedTokens: number;
    ratio: number;
    strategy: CompressionStrategy;
}
export interface DeduplicationResult {
    deduplicated: string;
    originalTokens: number;
    deduplicatedTokens: number;
    duplicatesRemoved: number;
    ratio: number;
}
export interface BatchRequest {
    toolName: string;
    inputs: unknown[];
    batchWindow: number;
    maxBatchSize: number;
}
export interface IncrementalResult {
    changed: boolean;
    delta: string;
    fullSize: number;
    deltaSize: number;
}
export interface TokenOptBudget {
    limit: number;
    consumed: number;
    remaining: number;
    warningThreshold: number;
    criticalThreshold: number;
    isOverBudget: boolean;
    consumptionByTool: Record<string, number>;
}
export interface TokenCostEstimate {
    tokens: number;
    model: string;
    inputCostUsd: number;
    outputCostUsd: number;
    totalCostUsd: number;
}
export interface OptimizationConfig {
    cacheEnabled: boolean;
    compressionEnabled: boolean;
    deduplicationEnabled: boolean;
    batchingEnabled: boolean;
    incrementalEnabled: boolean;
    budgetLimit: number | null;
}
export interface OptimizationReport {
    sessionId: string;
    totalTokensProcessed: number;
    totalTokensSaved: number;
    savingsPercent: number;
    cacheStats: TokenCacheStats;
    compressionRatio: number;
    deduplicationRatio: number;
    costWithoutOptimization: number;
    costWithOptimization: number;
}
export interface TokenUsageInput {
    period?: 'current_session' | 'last_hour' | 'today' | 'all_time';
    groupBy?: 'tool' | 'session';
}
export type TokenUsagePeriod = 'current_session' | 'last_hour' | 'today' | 'all_time';
export type TokenUsageGroupBy = 'tool' | 'session';
export interface TokenModelPricing {
    inputPerMToken: number;
    outputPerMToken: number;
}
export interface ToolTokenRecord {
    toolName: string;
    totalTokens: number;
    callCount: number;
    cacheHits: number;
    cacheMisses: number;
    tokensSaved: number;
}
export interface BatchEntry {
    input: unknown;
    timestamp: number;
}
export interface BatcherConfig {
    batchWindow: number;
    maxBatchSize: number;
}
export interface OptimizeInputResult {
    cached: boolean;
    cachedResult?: string;
    processedInput: string;
}
export interface TokenSavingsEstimate {
    estimatedTokensSaved: number;
    estimatedCostSavedUsd: number;
    breakdown: {
        behavioralPromptingTokens: number;
        sddDisciplineTokens: number;
    };
    assumption: {
        responseCompressionPct: number;
        avgTokensPerSession: number;
        specsCompletedWithoutRework: number;
    };
    generatedAt: string;
}
//# sourceMappingURL=token-optimization.d.ts.map