/** * TokenEstimator — singleton wrapper around js-tiktoken (cl100k_base). * * Provides accurate token counting for Korean + English text. * Falls back to byte-length heuristic if WASM init fails or during loading. * * Uses dynamic import to avoid blocking vitest fork initialization. */ /** * Initialize the encoder asynchronously. Safe to call multiple times. */ export declare function initTokenEstimator(): Promise; /** * Count tokens in text. Uses js-tiktoken if available, else byte fallback. */ export declare function countTokens(text: string): number; /** * Check if text exceeds a token limit. */ export declare function exceedsLimit(text: string, limit: number): boolean; /** * Check whether the real encoder is active (vs fallback). */ export declare function isEncoderActive(): boolean; /** * Reset singleton state (for testing). */ export declare function resetTokenEstimator(): void; /** * Force fallback mode (for testing). */ export declare function forceFallbackMode(): void; //# sourceMappingURL=token-estimator.d.ts.map