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; /** * Get run counts grouped by test case ID (single bulk query) */ getRunCountsByTestCase(): Promise>; /** * 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; /** * Get a single report by ID */ getReportById(reportId: string): Promise; /** * Batch-fetch reports by id in a SINGLE request (vs N getReportById calls). * Returned map is keyed by the requested reportId (the storage doc id). */ getReportsByIds(reportIds: string[]): Promise>; /** * Delete a report and its annotations */ deleteReport(reportId: string): Promise; /** * Partial update of a report * Used for updating trace-mode runs after traces become available */ updateReport(reportId: string, updates: Partial): Promise; /** * Get total count of reports */ getReportCount(): Promise; /** * Get report count for a specific test case */ getReportCountByTestCase(testCaseId: string): Promise; /** * Get runs for a benchmark */ getByBenchmark(benchmarkId: string, size?: number): Promise; /** * Get runs for a specific benchmark run config */ getByBenchmarkRun(benchmarkId: string, runId: string, size?: number): Promise; /** * 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; /** @deprecated Use getByBenchmarkRun instead */ getByExperimentRun(experimentId: string, runId: string, size?: number): Promise; /** * Add an annotation to a report */ addAnnotation(reportId: string, annotation: Omit): Promise; /** * Update an existing annotation */ updateAnnotation(reportId: string, annotationId: string, updates: Partial): Promise; /** * Delete an annotation */ deleteAnnotation(reportId: string, annotationId: string): Promise; /** * Get all annotations for a report */ getAnnotationsByReport(reportId: string): Promise; /** * Search reports with complex filtering */ searchReports(query: SearchQuery): Promise; /** * 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