/**
 * Context size tracking plugin (context tokens in/out per phase).
 *
 * Context tokens out = sum of input + cache_read + cache_creation from the
 * last assistant message's usage (per-turn, NOT aggregate).
 * Context tokens in = previous phase's context tokens out.
 */
import type { Middleware, MiddlewareContext, MiddlewareStore, SDKMessage } from '../types';
export interface ContextSizeData {
    /** Per-phase context size snapshots */
    phaseSnapshots: Array<{
        phase: string;
        contextTokensIn?: number;
        contextTokensOut?: number;
        freshContext: boolean;
    }>;
}
export declare class ContextSizeTrackerPlugin implements Middleware {
    readonly name = "contextSize";
    private phaseSnapshots;
    private lastContextTokensOut?;
    onPhaseTransition(fromPhase: string, _toPhase: string, ctx: MiddlewareContext, store: MiddlewareStore): void;
    onFinalize(_resultMessage: SDKMessage, _totalDurationMs: number, ctx: MiddlewareContext, store: MiddlewareStore): void;
    private computeContextTokensOut;
    private getData;
}
