import { type EvalPlanMetadata, type RunSummary, type ScopedDiagnostic, type TrialResult } from "../pipeline/plan.js"; import type { StimulusGraderConfig, EnvironmentConfig } from "../eval/types.js"; import type { PlanSnapshot } from "./manifest.js"; import type { TrialResultRecord } from "../reporting/jsonl-record.js"; /** Relative-keyed inputs to {@link renderOutcomeReport}. Every `evalFilePath` * and each result's `itemId` (the `shardKey`) must use the experiment-relative * eval-path convention so identity matching is machine-independent. */ export interface OutcomeReportInputs { /** Per-`(eval × variant × model)` metadata with relative `evalFilePath`. */ evals: EvalPlanMetadata[]; /** Per-stimulus grader configs, keyed by {@link stimulusGraderMapKey}. Only * presence/absence affects the report (a stimulus with no graders renders as * unscored), but the configs are carried in full from the snapshot. */ stimulusGraders: Map; /** Resolved per-stimulus environment, keyed by {@link stimulusGraderMapKey}. * Drives the per-stimulus Environment column. */ stimulusEnv: Map; /** Diagnostics with relative scope (or run-level, no scope). */ diagnostics: ScopedDiagnostic[]; /** Trial results with `itemId` set to the stable `shardKey`. */ results: TrialResult[]; } /** Map a persisted `trial-result` JSONL record back to a {@link TrialResult}, * keyed by its stable `shardKey` so summarization is machine-independent. * @throws if the record has no `shardKey` — merge requires every line to carry * one (plain `vally eval` output, which omits it, is not a merge input). */ export declare function trialRecordToResult(record: TrialResultRecord): TrialResult; /** Build {@link OutcomeReportInputs} from a plan snapshot and the run's trial * results (already keyed by `shardKey`). Used by both the unsharded runner and * merge so the two render paths cannot drift. */ export declare function outcomeInputsFromSnapshot(snapshot: PlanSnapshot, results: TrialResult[]): OutcomeReportInputs; /** * Render the experiment markdown report to `outputPath` and return the * whole-run {@link RunSummary} (so callers can derive per-variant pass/fail and * an exit code). Replays the reporter lifecycle from the reconstructed inputs: * `onRunStart` sizes the sections, a minimal `onTrialStart` per planned stimulus * seeds the Environment column, `onDiagnostics` attaches warnings, and one * `onEvalComplete` per eval delivers the summarized verdict before * `onRunComplete` writes the file. */ export declare function renderOutcomeReport(inputs: OutcomeReportInputs, outputPath: string): Promise; //# sourceMappingURL=report-from-artifacts.d.ts.map