export interface CalibrationSample {
    id: string;
    model: string;
    /** ISO timestamp */
    timestamp: string;
    /** The model's stated confidence (0.0–1.0) */
    predictedConfidence: number;
    /** Whether the prediction was actually correct */
    actuallyCorrect: boolean;
    /** Optional: what kind of task this was */
    taskType?: string;
}
export interface CalibrationBucket {
    /** Lower bound of the confidence range, e.g. 0.8 */
    rangeStart: number;
    /** Upper bound, e.g. 0.9 */
    rangeEnd: number;
    /** Number of samples in this bucket */
    count: number;
    /** Average predicted confidence in this bucket */
    avgPredicted: number;
    /** Actual accuracy in this bucket (fraction correct) */
    actualAccuracy: number;
    /** Gap: avgPredicted - actualAccuracy */
    gap: number;
}
export interface CalibrationReport {
    model: string;
    totalSamples: number;
    /** Brier score: mean of (predicted - actual)^2. Lower = better. 0.0 = perfect. */
    brierScore: number;
    /** Expected Calibration Error: weighted average |gap| across buckets */
    ece: number;
    /** Overconfidence ratio: fraction of samples where confidence > accuracy */
    overconfidenceRatio: number;
    buckets: CalibrationBucket[];
    /** ISO timestamp of when this report was generated */
    generatedAt: string;
}
/** Append a sample to `<projectDir>/.harness/calibration/<model>.jsonl`. */
export declare function recordSample(projectDir: string, sample: CalibrationSample): Promise<void>;
/** Read all samples for a model. Returns [] if file absent. */
export declare function loadSamples(projectDir: string, model: string): Promise<CalibrationSample[]>;
/** Pure computation. Default 10 buckets. */
export declare function computeCalibration(samples: CalibrationSample[], model: string, bucketCount?: number): CalibrationReport;
/** Load samples for a model and compute its calibration report. */
export declare function generateReport(projectDir: string, model: string): Promise<CalibrationReport>;
/** Scan calibration dir and generate a report for every model found. */
export declare function generateAllReports(projectDir: string): Promise<CalibrationReport[]>;
/** Render a compact Markdown block for system prompt injection. */
export declare function renderCalibrationBlock(report: CalibrationReport): string;
//# sourceMappingURL=confidenceCalibration.d.ts.map