/**
 * Cache token tracking plugin (cache_read and cache_creation).
 *
 * Respects the dedup flag from TurnCounterPlugin.
 */
import type { Middleware, MiddlewareContext, MiddlewareStore, SDKMessage } from '../types';
/** Matches SDK usage.cache_creation (ephemeral 5m vs 1h for pricing). */
export interface CacheCreationBreakdown {
    ephemeral_5m_input_tokens: number;
    ephemeral_1h_input_tokens: number;
}
export interface CacheData {
    phaseRead: number;
    phaseCreation: number;
    totalRead: number;
    totalCreation: number;
    totalCreation5m: number;
    totalCreation1h: number;
    phaseSnapshots: Array<{
        phase: string;
        cacheReadTokens: number;
        cacheCreationTokens: number;
        /** When present, use for pricing (5m vs 1h rates). */
        cacheCreation5m: number;
        cacheCreation1h: number;
    }>;
}
export declare class CacheTrackerPlugin implements Middleware {
    readonly name = "cache";
    private phaseRead;
    private phaseCreation;
    private phaseCreation5m;
    private phaseCreation1h;
    private totalRead;
    private totalCreation;
    private totalCreation5m;
    private totalCreation1h;
    private phaseSnapshots;
    private currentPhase;
    onMessage(message: SDKMessage, ctx: MiddlewareContext, store: MiddlewareStore): void;
    onPhaseTransition(fromPhase: string, toPhase: string, _ctx: MiddlewareContext, store: MiddlewareStore): void;
    onFinalize(_resultMessage: SDKMessage, _totalDurationMs: number, _ctx: MiddlewareContext, store: MiddlewareStore): void;
    private getData;
}
