/**
 * RunContext — the set of fields that describe an AILF pipeline run.
 *
 * This is the single source of truth for run-description data. Both
 * `RunManifest.context` (in GCS, written by FinalizeRunStep) and
 * `ReportProvenance` (in Content Lake, built by PublishReportStep)
 * carry this shape. `ReportProvenance extends RunContext` to
 * structurally enforce parity — adding a field here becomes a
 * compile-time failure until every consumer threads it through.
 *
 * Fields are alphabetized to match the surrounding codebase convention
 * (see `ReportProvenance` in `@sanity/ailf-core`).
 *
 * @see docs/decisions/D0032-run-anchored-artifact-store.md
 * @see docs/design-docs/run-artifact-store.md (§ Drift Prevention)
 */
import type { EvalMode, LiteracyVariant } from "./eval-modes.js";
import type { RunClassification, RunExecutor, RunHost, RunLineage, RunOwner, RunTool } from "./run-classification.js";
import type { RunTrigger } from "./run-trigger.js";
export interface RunContext {
    /** Which feature areas were evaluated */
    areas: string[];
    /**
     * How this run should be treated for reporting and trend tracking.
     * Orthogonal to `trigger` (mechanism). Defaults to `"adhoc"` when
     * unannotated — only the scheduled workflow mints `"official"`.
     *
     * @see docs/decisions/D0037-run-classification-and-ownership-taxonomy.md
     */
    classification: RunClassification;
    /**
     * Evaluation fingerprint — SHA-256 of all inputs that affect eval output.
     * Used for cross-environment cache lookup (CI → Content Lake).
     */
    evalFingerprint?: string;
    /** Who/what actually invoked the run. May or may not match `owner`. */
    executor: RunExecutor;
    /** Git metadata (when run from CI) */
    git?: {
        branch: string;
        prNumber?: number;
        repo: string;
        sha: string;
    };
    /** Grader model used for scoring */
    graderModel: string;
    /** Platform/CI metadata for debugging flakes. */
    host?: RunHost;
    /** Free-form searchable tags — release IDs, regression hunts, experiments. */
    labels?: string[];
    /** Links to related runs (re-runs, comparison partners, API parent job). */
    lineage?: RunLineage;
    /** Evaluation mode */
    mode: EvalMode;
    /** Models under evaluation */
    models: {
        id: string;
        label: string;
    }[];
    /** Which team (and optionally individual) this run is attributable to. */
    owner: RunOwner;
    /** Human-authored "why I ran this" — useful for Content Lake archaeology. */
    purpose?: string;
    /** Documentation source configuration */
    source: {
        baseUrl: string;
        dataset?: string;
        name: string;
        perspective?: string;
        projectId?: string;
    };
    /** Specific task IDs evaluated when scoped to a subset */
    taskIds?: string[];
    /** Which AILF/Node ran the eval — for cross-version trend compatibility. */
    tool?: RunTool;
    /** What initiated this run */
    trigger: RunTrigger;
    /**
     * Literacy mode variant — `baseline`, `agentic`, `observed`, or `full`.
     * Only meaningful when `mode === "literacy"`; absent for other modes.
     * Surfaced on `ReportProvenance` so dashboards can disambiguate which
     * variant produced a given report.
     */
    variant?: LiteracyVariant;
}
