/**
 * Pipeline action — resolves CLI options and orchestrates pipeline steps.
 *
 * This file is the thin CLI-to-orchestrator bridge. The bulk of execution
 * logic lives in packages/eval/src/orchestration/.
 *
 * Responsibilities:
 * - Resolve CLI flags into typed ResolvedOptions
 * - Delegate to the PipelineOrchestrator for step execution
 *
 * @see packages/eval/src/orchestration/ for the step-based pipeline
 */
import { type ImpactSummary } from "../pipeline/reverse-mapping.js";
import type { DebugOptions, EvalMode } from "../pipeline/types.js";
import { type Diagnosis, type ReportStorePort, type SynthesisCostTelemetry } from "../_vendor/ailf-core/index.d.ts";
import type { PipelineCliOptions } from "./run.js";
export interface ResolvedOptions {
    allowedOriginArgs: string[];
    areaOption?: string;
    beforeOption?: string;
    changedDocsOption?: string;
    compareBaseline?: string;
    compareEnabled: boolean;
    compareThreshold?: number;
    concurrency?: number;
    datasetOverride?: string;
    debug?: DebugOptions;
    dryRun: boolean;
    gapAnalysisEnabled: boolean;
    graderReplications?: number;
    /**
     * Replications per borderline judgment for the GRAD-04 intra-grader
     * consensus pass. Sourced from `.ailf/config.yaml`'s
     * `execution.borderlineReplications`.
     */
    borderlineReplications?: number;
    /** Grader context policy from `.ailf/config.yaml` `grader.context` */
    graderContext?: "rubric-only" | "with-docs";
    headerArgs: string[];
    impactSummary?: ImpactSummary;
    mode: EvalMode;
    /** Literacy variant — set when the user passes a legacy mode name */
    variant?: string;
    noAutoScope: boolean;
    noCache: boolean;
    noRemoteCache: boolean;
    /** Base directory for user-facing pipeline output artifacts (always resolved). */
    outputDir: string;
    outputPath?: string;
    perspectiveOverride?: string;
    projectIdOverride?: string;
    promptfooUrl?: string;
    publishEnabled: boolean;
    /** True when --publish or --no-publish was explicitly passed by the user. */
    publishExplicit: boolean;
    publishTag?: string;
    reportDataset?: string;
    reportProjectId?: string;
    sanityDocumentArgs: string[];
    searchMode: string;
    skipEval: boolean;
    skipFetch: boolean;
    source?: string;
    studioOriginOverride?: string;
    remote: boolean;
    repoTasksPath?: string;
    /** Phase 6 / DIAG-06: post-run diagnosis summary policy. Precedence
     * resolution (CLI flag > env > config > auto) lives in
     * shouldRunPostSummary() — this field carries only the config-file
     * signal so the helper has a single typed input.
     */
    summaryOnRun?: "auto" | "always" | "never";
    taskOption?: string;
    tagOption?: string[];
    taskSourceType?: "content-lake" | "repo";
    urlArgs: string[];
    apiUrl: string;
    apiKey?: string;
    /** D0033 / W0049 — unified artifact surface (W0050 wires it into writer). */
    artifactsDisabled: boolean;
    artifactsDir?: string;
    artifactsDryRun: boolean;
    artifactsExclude?: readonly string[];
    /** D0037 / W0069 caller envelope — surfaces only on --remote today. */
    classificationOption?: string;
    ownerTeamOption?: string;
    ownerIndividualOption?: string;
    purposeOption?: string;
    labelOptions: string[];
}
/**
 * Pure option resolution — computes ResolvedOptions from CLI flags without
 * any side effects. Safe to call from --explain without mutating process.env.
 *
 * Exported so the plan builder can call it independently.
 */
export declare function computeResolvedOptions(opts: PipelineCliOptions): ResolvedOptions;
/**
 * Determine whether the post-run diagnosis summary hook should fire.
 *
 * 4-level precedence chain (D0054):
 *   Level 1 — CLI flag (absolute): if `cliOpts.summary` is boolean, use it.
 *   Level 2 — AILF_INTERPRET_ON_RUN env var (absolute): strict "1"/"0" parse;
 *             anything else falls through (T-06-11 spoofing mitigation).
 *   Level 3 — config `summary.onRun` (absolute): "always" → true; "never" → false;
 *             "auto" or absent falls through to level 4.
 *   Level 4 — default always-on: diagnosis is a first-class output produced
 *             for every pipeline run unless explicitly opted out at levels 1–3.
 */
export declare function shouldRunPostSummary(cliOpts: PipelineCliOptions, resolvedOnRun: "auto" | "always" | "never" | undefined): boolean;
export declare function buildSynthesisTelemetry(diagnosis: Diagnosis): SynthesisCostTelemetry;
/**
 * Run post-pipeline hooks after the pipeline completes.
 *
 * Fires after orchestratePipeline() + writePipelineResult() (D6-02).
 * Hook failure prints to stderr but does NOT change exit code (D6-03).
 * Fires whenever shouldRunPostSummary returns true (D0054 — default on).
 *
 * @param ctx - App context (composition root wiring)
 * @param result - Pipeline result (includes reportId when published)
 * @param args - Hook options (cliOpts, summaryOnRun from config, optional runnerFactory for tests)
 */
export declare function runPostPipelineHooks(ctx: {
    reportStore?: ReportStorePort;
}, result: {
    success: boolean;
    reportId?: string;
}, args: {
    cliOpts: PipelineCliOptions;
    summaryOnRun?: "auto" | "always" | "never";
    /** Override runner factory for tests — avoids vi.mock of composition root */
    runnerFactory?: (ctx: unknown) => {
        run(opts: unknown): Promise<Diagnosis>;
    };
}): Promise<void>;
/**
 * Execute the evaluation pipeline.
 *
 * 1. Resolve CLI options into typed ResolvedOptions
 * 2. Build AppContext (composition root wires adapters)
 * 3. Build step sequence from context
 * 4. Delegate to the PipelineOrchestrator
 */
export declare function executePipeline(cliOpts: PipelineCliOptions): Promise<void>;
