import { AIRunModel } from '../models/ai-run.model';
import { AIRun, AIRunOutcomeLabel, AIRunSource } from '../util/ai-run-evidence';
import { AIRunDatasetExport, AIRunDatasetExportOptions } from '../util/ai-run-evidence-eval';
export interface AIRunPersistenceResult {
    requested: number;
    upsertedCount: number;
    matchedCount: number;
    modifiedCount: number;
    ids: string[];
}
export interface AIRunQuery {
    source?: AIRunSource;
    outcome?: AIRunOutcomeLabel;
    sourceIds?: Record<string, string>;
    updatedAfter?: Date | string;
    updatedBefore?: Date | string;
    limit?: number;
    skip?: number;
    includeTrainingExamples?: boolean;
}
export interface AIRunSummary {
    total: number;
    bySource: Record<string, number>;
    byOutcome: Record<string, number>;
    byFailureClass: Record<string, number>;
    estimatedUsd: number;
    totalTokens: number;
}
export declare function resolveAIRunStableId(run: AIRun): string;
export declare function normalizeAIRunForPersistence(run: AIRun): AIRunModel;
export declare class AIRunEvidenceManager {
    static upsertRuns(runs: AIRun[]): Promise<AIRunPersistenceResult>;
    static findRuns(query?: AIRunQuery): Promise<AIRunModel[]>;
    static summarizeRuns(query?: AIRunQuery): Promise<AIRunSummary>;
    static exportRuns(query?: AIRunQuery, options?: AIRunDatasetExportOptions): Promise<AIRunDatasetExport>;
}
