import type { SessionEntry } from "./session-manager.ts";
/**
 * Providers only cache a prompt prefix above a model-specific minimum size, so a
 * zero cache read on a small prompt is not evidence of a lost cache. The report
 * uses one fixed threshold of 2,048 prompt tokens for every provider; smaller
 * prompts are never counted as full misses.
 */
export declare const MIN_CACHEABLE_PROMPT_TOKENS = 2048;
/** What provider failures cost a session: every provider response is one request. */
export interface SessionFailureReport {
    requests: number;
    erroredRequests: number;
    abortedRequests: number;
    failureShare: number;
    /** Wall time from each failed request's start to its recorded end. */
    failedDurationMs: number;
    /**
     * Retries that succeeded after a failure: the first successful response after
     * one or more failed requests within the same user turn (no user message in
     * between), whichever chain entry answered.
     */
    postFailureRequests: number;
    /** Those retries that read nothing from the prompt cache on a prompt of at least MIN_CACHEABLE_PROMPT_TOKENS. */
    postFailureFullMissRequests: number;
    /**
     * Uncached prompt tokens (input + cache writes) of those retries: what the retry
     * sent without a cache hit. The provider's usage report is exact; attributing the
     * miss to the failure is the report's reading of the sequence, not a provider fact.
     */
    postFailureFullMissInputTokens: number;
}
export declare function computeSessionFailureReport(entries: readonly SessionEntry[]): SessionFailureReport;
//# sourceMappingURL=session-failure-report.d.ts.map