/**
 * pipeline/provenance.ts
 *
 * Builds `ReportProvenance` from data available during a pipeline run.
 *
 * `ReportProvenance extends RunContext` (D0032). This module derives
 * RunContext via `buildRunContext()` and attaches report-specific extras
 * (lineage, autoScope, promptfoo URLs, targetDocuments, runId). A single
 * derivation path for RunContext foreclosures drift between the run
 * manifest (GCS) and the report provenance (Content Lake).
 *
 * @see packages/eval/src/pipeline/run-context.ts — the shared derivation path
 * @see docs/decisions/D0032-run-anchored-artifact-store.md (§ Drift Prevention)
 */
import type { GeneralizedDocRef } from "../_vendor/ailf-core/index.d.ts";
import type { PromptfooUrlEntry, ReportAutoScope, ReportProvenance, RunId } from "./types.js";
import { type RunContextInput } from "./run-context.js";
/**
 * Inputs needed to build a ReportProvenance. Extends `RunContextInput` so
 * the RunContext derivation path is shared.
 */
export interface ProvenanceInput extends RunContextInput {
    /** Release auto-scope metadata (when perspective evaluation was scoped) */
    autoScope?: ReportAutoScope;
    /** SHA-256 hash of the doc context files (from cache system) */
    contextHash?: string;
    /**
     * Every eval sub-run's fingerprint (a FULL literacy run has two). Persisted
     * on `provenance.evalFingerprints` so `findByFingerprint` resolves the
     * report from any sub-run's fingerprint. The scalar `evalFingerprint`
     * (on `RunContextInput`) stays the last-computed one for back-compat.
     */
    evalFingerprints?: string[];
    /** @deprecated Use `promptfooUrls` — kept for backward compatibility */
    promptfooUrl?: string;
    /** Per-mode Promptfoo share URLs */
    promptfooUrls?: PromptfooUrlEntry[];
    /** Identity of the pipeline run that produced this report (D0032) */
    runId: RunId;
    /** Sanity document IDs targeted */
    sanityDocumentIds?: string[];
    /** Report ID that triggered this re-run (becomes lineage.rerunOf) */
    sourceReportId?: string;
    /** Baseline report this run was compared against (becomes lineage.comparedAgainst) */
    comparedAgainstReportId?: string;
    /** Doc refs injected into task context (doc-impact eval) */
    injectedContextDocs?: GeneralizedDocRef[];
}
/**
 * Build a ReportProvenance from pipeline context.
 *
 * RunContext fields (mode, areas, taskIds, models, graderModel, source,
 * evalFingerprint, trigger, git) come from `buildRunContext`. Report-
 * specific fields (autoScope, contextHash, lineage, promptfoo*, runId,
 * targetDocuments) are attached here.
 */
export declare function buildProvenance(input: ProvenanceInput): ReportProvenance;
