import { Message, Tool } from "../clients/types";
import { MessageProcessorFunction } from "../services/MessageProcessor";
import { ToolsService } from "../services";
import { JsonSchema, JsonCompressorStorage } from "./JsonCompressor";
export interface KeyInfo {
    key: string;
    size: number;
    preview: string;
    tokens?: number;
    type?: string;
    depth?: number;
    childKeys?: string[];
    nextChunkKey?: string;
}
export declare class TokenCompressor implements JsonCompressorStorage {
    private storage;
    private keyPrefix;
    private toolName;
    private compressionThreshold;
    private characterLimit;
    maxTokens: number;
    private jsonCompressor;
    constructor(toolsService?: ToolsService);
    estimateTokens(text: string): number;
    setCompressionThreshold(threshold: number): void;
    private setMaxTokens;
    tryParseJson(content: string): any | null;
    compressStringInChunks(content: string, path?: string): string;
    private isAlreadyCompressed;
    compressContent(content: string, path?: string): string;
    compressJsonProperties(obj: any, path?: string): any;
    generateKey(): string;
    compressMessage(message: Message): Promise<void>;
    createProcessor(filterFn?: (msg: Message) => boolean): MessageProcessorFunction;
    retrieveString(key: string): string | null;
    storeString(key: string, value: string): void;
    clearStorage(): void;
    getStorageKeys(): string[];
    getStorageSize(): number;
    registerTool(toolsService?: ToolsService): void;
    getSchema(key: string): JsonSchema | null;
    getCompressedProperties(key: string): any | null;
    getFullObject(mainObj: any, compressedKey: string): any;
    extractKeys(content: string): string[];
    getKeyChain(key: string): KeyInfo[];
}
export declare const expandTokensDefinition: Tool;
