import type { EvaluationReport, RunAnnotation } from '../../types/index.js';
export interface SearchQuery {
    testCaseIds?: string[];
    dateRange?: {
        start: string;
        end: string;
    };
    agentNames?: string[];
    modelNames?: string[];
    minAccuracy?: number;
    status?: ('running' | 'completed' | 'failed')[];
    hasAnnotations?: boolean;
    annotationTags?: string[];
}
export interface GetReportsOptions {
    limit?: number;
    offset?: number;
    sortBy?: 'timestamp' | 'accuracy';
    order?: 'asc' | 'desc';
    fields?: string[];
}
declare class AsyncRunStorage {
    /**
     * Save a report/run
     */
    saveReport(report: EvaluationReport, options?: {
        experimentId?: string;
        experimentRunId?: string;
        iteration?: number;
    }): Promise<EvaluationReport>;
    /**
     * Get run counts grouped by test case ID (single bulk query)
     */
    getRunCountsByTestCase(): Promise<Record<string, number>>;
    /**
     * Get all reports for a specific test case
     */
    getReportsByTestCase(testCaseId: string, options?: GetReportsOptions): Promise<{
        reports: EvaluationReport[];
        total: number;
    }>;
    /**
     * Get all reports across all test cases
     */
    getAllReports(options?: GetReportsOptions): Promise<EvaluationReport[]>;
    /**
     * Get a single report by ID
     */
    getReportById(reportId: string): Promise<EvaluationReport | null>;
    /**
     * Delete a report and its annotations
     */
    deleteReport(reportId: string): Promise<boolean>;
    /**
     * Partial update of a report
     * Used for updating trace-mode runs after traces become available
     */
    updateReport(reportId: string, updates: Partial<EvaluationReport>): Promise<EvaluationReport | null>;
    /**
     * Get total count of reports
     */
    getReportCount(): Promise<number>;
    /**
     * Get report count for a specific test case
     */
    getReportCountByTestCase(testCaseId: string): Promise<number>;
    /**
     * Get runs for a benchmark
     */
    getByBenchmark(benchmarkId: string, size?: number): Promise<EvaluationReport[]>;
    /**
     * Get runs for a specific benchmark run config
     */
    getByBenchmarkRun(benchmarkId: string, runId: string, size?: number): Promise<EvaluationReport[]>;
    /**
     * Get all iterations for a test case in a benchmark
     */
    getIterations(benchmarkId: string, testCaseId: string, benchmarkRunId?: string): Promise<{
        runs: EvaluationReport[];
        total: number;
        maxIteration: number;
    }>;
    /** @deprecated Use getByBenchmark instead */
    getByExperiment(experimentId: string, size?: number): Promise<EvaluationReport[]>;
    /** @deprecated Use getByBenchmarkRun instead */
    getByExperimentRun(experimentId: string, runId: string, size?: number): Promise<EvaluationReport[]>;
    /**
     * Add an annotation to a report
     */
    addAnnotation(reportId: string, annotation: Omit<RunAnnotation, 'id' | 'timestamp' | 'reportId'>): Promise<RunAnnotation>;
    /**
     * Update an existing annotation
     */
    updateAnnotation(reportId: string, annotationId: string, updates: Partial<RunAnnotation>): Promise<boolean>;
    /**
     * Delete an annotation
     */
    deleteAnnotation(reportId: string, annotationId: string): Promise<boolean>;
    /**
     * Get all annotations for a report
     */
    getAnnotationsByReport(reportId: string): Promise<RunAnnotation[]>;
    /**
     * Search reports with complex filtering
     */
    searchReports(query: SearchQuery): Promise<EvaluationReport[]>;
    /**
     * Generate a unique report ID
     */
    generateReportId(): string;
    /**
     * Bulk create runs (for migration)
     */
    bulkCreate(runs: EvaluationReport[]): Promise<{
        created: number;
        errors: boolean;
    }>;
}
export declare const asyncRunStorage: AsyncRunStorage;
export declare const asyncReportStorage: AsyncRunStorage;
export {};
//# sourceMappingURL=asyncRunStorage.d.ts.map