export interface ExclusiveInputTokenUsage { inputTokens: number; cacheReadTokens: number; cacheCreationTokens: number; } /** Provider counters are untrusted protocol input. Token metrics are integer counts. */ export declare function tokenCount(value: unknown): number; export declare function optionalTokenCount(value: unknown): number | undefined; /** Sum untrusted provider counters without exposing an unsafe integer. */ export declare function sumTokenCounts(...values: unknown[]): number; /** Validate and sum provider counters while preserving invalid/overflow as unknown. */ export declare function checkedSumTokenCounts(...values: unknown[]): number | undefined; export declare function nonNegativeMetric(value: unknown): number | undefined; /** * Split providers whose input total includes cache reads/writes into mutually * exclusive buckets. Invalid cache counters are bounded by the authoritative * input total so one malformed response cannot inflate cross-runtime totals. */ export declare function splitInclusiveInputTokens(rawInput: unknown, rawCacheRead: unknown, rawCacheCreation?: unknown): ExclusiveInputTokenUsage;