import type { Message, Usage } from "@kenkaiiii/gg-ai";
/**
 * Set the active model name for token estimation.
 * Call this when the model changes so estimates use the correct ratio.
 * Switching models resets usage-based calibration (different tokenizer).
 */
export declare function setEstimatorModel(model: string): void;
/**
 * Feed an authoritative provider usage observation back into the estimator:
 * blends `chars / tokens` into the session ratio via EMA, clamped to sane
 * bounds. Every downstream estimate (compaction trigger, prune budgets)
 * sharpens as real usage data accumulates.
 */
export declare function calibrateEstimator(chars: number, tokens: number): void;
/** Current usage-calibrated chars-per-token ratio, or null before any observation. */
export declare function getCalibratedRatio(): number | null;
/**
 * Measure the text characters in a message history and whether it contains
 * image/video parts (which inflate tokens-per-char and would skew calibration).
 */
export declare function measureConversationChars(messages: Message[]): {
    chars: number;
    hasMedia: boolean;
};
/**
 * Calibrate from a provider usage report anchored to a message history using
 * its authoritative total input tokens (uncached + cache read/write). Skips
 * histories containing image/video parts.
 */
export declare function calibrateEstimatorFromUsage(history: Message[], usage: Usage): void;
export declare function estimateTokens(text: string): number;
export declare function estimateMessageTokens(message: Message): number;
export declare function estimateConversationTokens(messages: Message[]): number;
//# sourceMappingURL=token-estimator.d.ts.map