import type { BenchmarkResult, BenchmarkAssertionResult } from "./benchmark.js";
export interface HistorySummary {
    timestamp: string;
    filename: string;
    model: string;
    skillName: string;
    passRate: number;
    type: "benchmark" | "comparison" | "baseline" | "model-compare" | "improve" | "instruct" | "ai-generate" | "eval-generate";
    caseCount: number;
    totalDurationMs: number;
    totalTokens: number | null;
    totalCost?: number | null;
    provider?: string;
    verdict?: string;
}
export interface HistoryFilter {
    model?: string;
    type?: "benchmark" | "comparison" | "baseline" | "model-compare" | "improve" | "instruct" | "ai-generate" | "eval-generate";
    from?: string;
    to?: string;
}
export interface CaseHistoryEntry {
    timestamp: string;
    model: string;
    type: "benchmark" | "comparison" | "baseline" | "model-compare" | "improve" | "instruct" | "ai-generate" | "eval-generate";
    provider?: string;
    pass_rate: number;
    durationMs?: number;
    tokens?: number | null;
    inputTokens?: number | null;
    outputTokens?: number | null;
    assertions: BenchmarkAssertionResult[];
    baselinePassRate?: number;
}
export interface RegressionEntry {
    assertionId: string;
    evalId: number;
    evalName: string;
    previousStatus: boolean;
    currentStatus: boolean;
    change: "regression" | "improvement";
}
export declare function writeHistoryEntry(skillDir: string, result: BenchmarkResult & {
    type?: "benchmark" | "comparison" | "baseline" | "model-compare" | "improve" | "instruct" | "ai-generate" | "eval-generate";
}): Promise<string>;
export declare function deleteHistoryEntry(skillDir: string, timestamp: string): Promise<boolean>;
export declare function listHistory(skillDir: string, filter?: HistoryFilter): Promise<HistorySummary[]>;
export declare function readHistoryEntry(skillDir: string, timestamp: string): Promise<BenchmarkResult | null>;
export declare function getCaseHistory(skillDir: string, evalId: number, filter?: {
    model?: string;
}): Promise<CaseHistoryEntry[]>;
export interface StatsResult {
    totalRuns: number;
    totalCost: number | null;
    costPerRun: number | null;
    assertionStats: Array<{
        id: string;
        text: string;
        passRate: number;
        totalRuns: number;
        evalId: number;
        evalName: string;
    }>;
    modelStats: Array<{
        model: string;
        runs: number;
        avgPassRate: number;
        avgDurationMs: number;
        avgCost: number | null;
    }>;
    trendPoints: Array<{
        timestamp: string;
        passRate: number;
        model: string;
        cost?: number | null;
    }>;
}
export declare function computeStats(skillDir: string): Promise<StatsResult>;
export declare function computeRegressions(current: BenchmarkResult, previous: BenchmarkResult): RegressionEntry[];
