/**
 * Pipeline orchestrator — sequences steps and short-circuits on failure.
 *
 * This replaces the 1,672-line executePipeline() in pipeline-action.ts
 * with declarative step sequencing. Each step is run through the
 * StepRunner which provides uniform timing, precondition checking,
 * error handling, and logging.
 *
 * When a jobId is present in the config (API-triggered evaluations),
 * the orchestrator emits progress updates to the Content Lake after
 * each step completes. This enables the GET /v1/jobs/:jobId polling
 * endpoint to show real-time progress.
 */
import { type AppContext, type PipelineResult, type PipelineStep, type StepResult } from "../_vendor/ailf-core/index.d.ts";
/**
 * Run a sequence of pipeline steps, short-circuiting on required step failure.
 *
 * Optional steps (step.optional === true) may fail without stopping
 * the pipeline. Required step failures cause an immediate abort.
 *
 * When ctx.config.jobId is set, emits progress updates to the Content
 * Lake after each step completes.
 */
export declare function orchestratePipeline(ctx: AppContext, steps: PipelineStep[]): Promise<PipelineResult>;
/**
 * Find the first optional pipeline step that returned `status: "failed"`
 * in step-array order. Returns the diagnostic shape the API job document
 * already accepts (`{ message, step }`), or null when no optional step
 * failed.
 *
 * Required-step failures don't reach this code path — the orchestrator
 * aborts before completion when a required step fails. This helper is
 * the bridge between "step ran and failed" and the wire signal that
 * external `--remote` consumers use to distinguish a clean completion
 * from a degraded one.
 *
 * @see docs/design-docs/optional-step-failure-surfacing.md
 */
export declare function getFirstOptionalFailure(steps: readonly PipelineStep[], results: Record<string, StepResult>): {
    message: string;
    step: string;
} | null;
