import type { NativeUsageRaw, NativeUsageUncertainty, NativeCacheWriteSplitReason, NativeInputUsageSource, NativeUsageSnapshot, NativeUsageTermination } from '@sentropic/llm-mesh'; import type { NativeSseFrame } from './native-sse.js'; import type { SettleUsage } from './flow.js'; export declare function isSafeNonNegativeInteger(n: unknown): n is number; export declare const NATIVE_CACHE_PRICING_POLICY: "anthropic-cache-2026-10-02"; /** Inspect actual outbound controls once; retain this boolean, never the request. */ export declare const nativeDefaultTtlEligible: (body: Readonly>) => boolean; export declare const validateNativeInputPriceUnits40: (physicalInput: unknown, units40: unknown, servedModelId: unknown, policy: unknown) => boolean; export declare const nativeCacheInputPriceUnits40: (state: NativeCumulativeUsageState, servedModelId: unknown) => number | undefined; export interface RawNativeUsageUpdate { readonly input_tokens?: number | null; readonly cache_read_input_tokens?: number | null; readonly cache_creation_input_tokens?: number | null; readonly cache_creation?: { readonly ephemeral_5m_input_tokens?: number | null; readonly ephemeral_1h_input_tokens?: number | null; } | null; readonly output_tokens?: number | null; readonly [key: string]: unknown; } export interface NativeCumulativeUsageState { readonly acceptedInputTokens: number; readonly acceptedCacheReadInputTokens: number; readonly acceptedCacheCreationInputTokens: number; readonly reportedCacheCreation5m?: number; readonly reportedCacheCreation1h?: number; readonly inferredCacheCreation1h?: number; readonly acceptedOutputTokens: number; readonly physicalInput: number; readonly physicalLowerBound: number; readonly inputUsageValidated: boolean; readonly inputUsageSource?: NativeInputUsageSource; readonly uncertaintyReason?: NativeUsageUncertainty; readonly cacheWriteSplitReason?: NativeCacheWriteSplitReason; readonly proofRevoked: boolean; readonly estimated: boolean; readonly messageDeltaInputDecreased: boolean; } export declare class NativeCumulativeUsageAccumulator { private u; private r; private w; private s5?; private s1?; private i1?; private o; private p; private plb; private valid; private source?; private reason?; private splitReason?; private revoked; private est; private anchored; private startSeen; private raw; private decreased; private defaultTtlEligible; private retainRaw; constructor(initial?: RawNativeUsageUpdate, opts?: { isStart?: boolean; defaultTtlEligible?: boolean; }); acceptStart(raw: RawNativeUsageUpdate, opts?: { isStart?: boolean; defaultTtlEligible?: boolean; }): boolean; applyDelta(delta?: RawNativeUsageUpdate | null, opts?: { defaultTtlEligible?: boolean; }): boolean; revoke(reason?: NativeUsageUncertainty): void; getState(): NativeCumulativeUsageState; getRawUsage(): NativeUsageRaw; } /** Sole native usage fold; terminal ownership and financial floors belong to the flow. */ export declare class NativeUsageObserver { readonly selectedModelId: string; private readonly defaultTtlEligible; readonly accumulator: NativeCumulativeUsageAccumulator; private stopped; private finalCandidate; private servedModelId?; private modelReason?; private fallbackPresent; private iterationsPresent; private inputModelId?; constructor(selectedModelId: string, defaultTtlEligible?: boolean); private validateInputPrice; private observeResponse; observeJson(body: Readonly>): void; observeFrame(frame: NativeSseFrame): void; snapshot(termination: NativeUsageTermination): NativeUsageSnapshot; } /** Financial projection of the same trusted pre-floor observer snapshot. */ export declare const nativeSnapshotUsage: (snapshot: NativeUsageSnapshot) => SettleUsage; //# sourceMappingURL=native-usage.d.ts.map