import { calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";

//#region src/domains/run/utils/token-estimator.ts
const CHARS_PER_TOKEN = 4;
/**
* Estimates the number of tokens in a text string using character-based approximation.
*
* @param text - The text to estimate tokens for
* @returns Estimated token count (approximately text.length / 4)
*/
function estimateTokens(text) {
	if (!text) return 0;
	return Math.ceil(text.length / CHARS_PER_TOKEN);
}

//#endregion
export { calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };