import type { StatePaths } from '../../core/execution/locations.js'; import { type RunLogEvent, type RunJudgeStage, type RunPromptArtifact } from './run-log-cache.js'; import type { WorkflowResumePoint } from '../../core/models/index.js'; export declare class RunOccurrenceNotFoundError extends Error { /** * Create an error for a run occurrence that cannot be found. */ constructor(); } export interface RunOccurrenceOutcome { readonly matchedRuleIndex?: number; readonly condition?: string; readonly nextStep?: string; readonly returnValue?: string; readonly matchedRuleMethod?: string; readonly matchMethod?: string; readonly provider?: string; readonly providerSource?: string; readonly model?: string; readonly modelSource?: string; readonly judgeStages?: readonly RunJudgeStage[]; readonly outputPreview?: string; } interface RunMeta { readonly runSlug: string; readonly task: string; readonly workflow: string; readonly status: string; readonly startTime: string; readonly reportDirectory: string; readonly logsDirectory: string; readonly currentStep?: string; readonly currentIteration?: number; readonly iterations?: number; readonly phase?: number; readonly updatedAt?: string; readonly endTime?: string; readonly reason?: string; readonly resumePoint?: WorkflowResumePoint; readonly failure?: { readonly step: string; readonly error: string; }; } interface RunsRootSnapshot { readonly directory: string; readonly fingerprint: { readonly dev: number; readonly ino: number; }; } type RunStoreLocation = StatePaths; /** * Read and summarize the runs in the configured runs directory. * * @param location - Run store filesystem locations * @returns Run summaries and warnings for entries that fail to load for non-`ENOENT` reasons. An initially missing runs directory without an expected fingerprint returns `{ runs: [], warnings: [] }`; an individual `ENOENT` entry is omitted without a warning * @throws Error if the runs directory cannot be validated or read, its expected fingerprint does not match, or its identity changes during the read. An initial missing runs directory is tolerated only when no expected fingerprint is supplied */ export declare function readRunCollection(location: RunStoreLocation): Promise<{ runs: { slug: string; task: string; workflow: string; status: string; startTime: string; currentStep: string | undefined; currentIteration: number | undefined; updatedAt: string | undefined; }[]; warnings: string[]; }>; /** * Read one report file while validating the run-root snapshot around filesystem access. * * @param location - Run store location * @param snapshot - Run-root snapshot to validate * @param root - Validated report directory * @param path - Report path under the report directory * @returns The loaded report record, or an omitted record when the file exceeds the size limit * @throws Error if the report path or run-root snapshot is invalid, or the file cannot be read */ declare function readReport(location: RunStoreLocation, snapshot: RunsRootSnapshot, root: string, path: string): Promise<{ filename: string; content: string; omitted: boolean; }>; export interface RunOccurrenceArtifacts { readonly reports: readonly Awaited>[]; readonly prompts: readonly RunPromptArtifact[]; readonly promptsTruncated: boolean; readonly omittedPromptCount: number; readonly outcome?: RunOccurrenceOutcome; } export declare function readRunDetail(location: RunStoreLocation, slug: string): Promise<{ events: readonly RunLogEvent[]; history: readonly RunLogEvent[]; historyTruncated: boolean; graphSummary: import("./run-log-cache.js").RunLogGraphSummary; warnings: readonly string[]; meta: RunMeta; reports: { filename: string; content: string; omitted: boolean; }[]; }>; export declare function readRunOccurrenceArtifacts(location: RunStoreLocation, slug: string, occurrenceId: string): Promise; export declare function resolveRunWatchDirectories(location: RunStoreLocation, slug: string): Promise; export {}; //# sourceMappingURL=run-store.d.ts.map