/**
 * TTL Manager
 *
 * Tracks timestamps of tool calls for TTL-based pruning.
 * Tool call results are pruned after their TTL expires.
 */
import type { ToolCallTimestamp, PruningConfig } from './config.js';
/**
 * Manages TTL tracking for tool calls
 */
export declare class TTLManager {
    private config;
    private toolCalls;
    constructor(config?: Partial<PruningConfig>);
    /**
     * Register a tool call with current timestamp
     */
    registerToolCall(toolCallId: string, toolName: string, messageIndex: number): void;
    /**
     * Get all tool calls
     */
    getToolCalls(): ToolCallTimestamp[];
    /**
     * Get tool call by ID
     */
    getToolCall(toolCallId: string): ToolCallTimestamp | undefined;
    /**
     * Check if a tool call has expired
     */
    isExpired(toolCallId: string, now?: number): boolean;
    /**
     * Get all expired tool calls
     */
    getExpiredToolCalls(now?: number): ToolCallTimestamp[];
    /**
     * Get tool calls that are about to expire (within threshold)
     */
    getExpiringToolCalls(thresholdMs?: number, now?: number): ToolCallTimestamp[];
    /**
     * Mark a tool call as pruned
     */
    markPruned(toolCallId: string): void;
    /**
     * Mark multiple tool calls as pruned
     */
    markManyPruned(toolCallIds: string[]): void;
    /**
     * Get time remaining until expiry
     */
    getTimeRemaining(toolCallId: string, now?: number): number;
    /**
     * Get tool calls for a specific message
     */
    getToolCallsForMessage(messageIndex: number): ToolCallTimestamp[];
    /**
     * Get message indices that have expired tool calls
     */
    getExpiredMessageIndices(now?: number): number[];
    /**
     * Clean up old pruned entries
     */
    cleanup(maxAge?: number): void;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<PruningConfig>): void;
    /**
     * Get current TTL setting
     */
    getTTL(): number;
    /**
     * Get statistics
     */
    getStats(): {
        totalToolCalls: number;
        prunedCount: number;
        expiredCount: number;
        activeCount: number;
    };
    /**
     * Clear all tool calls
     */
    clear(): void;
}
/**
 * Get or create the TTLManager singleton
 */
export declare function getTTLManager(config?: Partial<PruningConfig>): TTLManager;
/**
 * Reset the TTLManager singleton
 */
export declare function resetTTLManager(): void;
