/**
 * Usage calculator
 * Calculates token breakdown by category
 */
import type { AISDKCoreTool, Message } from '../types/core.js';
import type { Tokenizer } from '../types/tokenization.js';
import type { TokenBreakdown } from '../types/usage.js';
/**
 * Calculate token breakdown from messages
 * @param messages - Messages to calculate breakdown for
 * @param tokenizer - Tokenizer instance (used as fallback if getTokens not provided)
 * @param getTokens - Optional cached token counting function for performance
 */
export declare function calculateTokenBreakdown(messages: Message[], tokenizer: Tokenizer, getTokens?: (message: Message) => number): TokenBreakdown;
/**
 * Estimate tokens for the native tool definitions actually sent to the model.
 *
 * A flat per-tool constant is wildly inaccurate because real schemas vary by an
 * order of magnitude — a tiny tool with one string param versus an MCP tool with
 * a deeply nested schema and long field descriptions. Here we serialize each
 * tool's name, description and JSON input schema and tokenize that, which tracks
 * the real prompt far more closely and shrinks the gap between the streaming
 * estimate and the provider-reported count.
 *
 * Any tool whose JSON schema can't be resolved synchronously (a promise-backed
 * `FlexibleSchema`) falls back to the flat per-tool constant so the figure is
 * never worse than the old behaviour for that tool.
 */
export declare function calculateToolDefinitionsTokensFromDefs(tools: Record<string, AISDKCoreTool>, tokenizer: Tokenizer): number;
/**
 * Get status color based on percentage used
 */
export declare function getUsageStatusColor(percentUsed: number): 'success' | 'warning' | 'error';
/**
 * Format token count with thousands separator
 */
export declare function formatTokenCount(tokens: number): string;
//# sourceMappingURL=calculator.d.ts.map