/**
 * Pure model for Deploy pipeline stages — parse deploy.yml, map holds, assemble.
 * @module cli/ui-deploy-pipeline-model
 */
import { type JsonValue } from "../sync/json-path.js";
import type { ProbeResult } from "./ui-status.js";
/** Stable probe id consumed by the Deploy section hydration. */
export declare const DEPLOY_PIPELINE_PROBE_ID = "deploy-pipeline-stages";
/** One row in the Deploy pipeline stages table. */
export type DeployPipelineStage = {
    readonly [key: string]: JsonValue;
    readonly id: string;
    readonly name: string;
    readonly description: string;
    /** Configured GitHub environment name, or empty for workflow jobs. */
    readonly environment: string;
    /**
     * Active column: `true` = hold/job present, `false` = no hold,
     * `"unknown"` = cannot claim hold/no-hold without lying.
     */
    readonly active: boolean | "unknown";
    /** Required when `active` is false or unknown; empty otherwise. */
    readonly reason: string;
};
/** Structured value emitted by the deploy-pipeline-stages probe. */
export type DeployPipelineValue = {
    readonly [key: string]: JsonValue;
    readonly stages: DeployPipelineStage[];
};
/** One GitHub environment as returned by the Environments API. */
export type GithubEnvironmentInfo = {
    readonly name: string;
    readonly hasRequiredReviewers: boolean;
};
/** Result of listing GitHub environments — never invents a concrete hold. */
export type GithubEnvironmentsLookup = {
    readonly status: "ok";
    readonly environments: readonly GithubEnvironmentInfo[];
} | {
    readonly status: "not-authenticated";
    readonly message: string;
} | {
    readonly status: "error";
    readonly message: string;
};
/**
 * Extract ordered job stages from a deploy.yml document.
 * @param contents - Raw YAML text
 * @returns Workflow job stages in document order
 */
export declare function parseDeployWorkflowStages(contents: string): readonly DeployPipelineStage[];
/**
 * Map one configured environment onto a hold stage using live GH evidence.
 * @param environment - Configured environment name
 * @param lookup - Live environments API result
 * @returns Approval-hold stage that never false-greens
 */
export declare function mapEnvironmentHoldStage(environment: string, lookup: GithubEnvironmentsLookup): DeployPipelineStage;
/**
 * Interleave approval holds before the first release job (or append).
 * @param jobStages - Stages parsed from deploy.yml
 * @param holdStages - Per-environment approval hold stages
 * @returns Ordered pipeline stages for the console table
 */
export declare function assembleDeployPipelineStages(jobStages: readonly DeployPipelineStage[], holdStages: readonly DeployPipelineStage[]): readonly DeployPipelineStage[];
/**
 * Build the tri-state probe result from filesystem + live environment inputs.
 * @param workflow - deploy.yml contents, or null when absent
 * @param configuredEnvironments - Keys from github.environments
 * @param lookup - Live GitHub environments lookup
 * @returns Probe result — value, not-applicable, or unknown
 */
export declare function buildDeployPipelineResult(workflow: string | null, configuredEnvironments: readonly string[], lookup: GithubEnvironmentsLookup): ProbeResult<DeployPipelineValue>;
//# sourceMappingURL=ui-deploy-pipeline-model.d.ts.map