import type { Condition, JsonObject, JsonValue } from './deploy'; import { type DeploymentPlan, type PlannedStage, type PlannedStep } from './deploy-plan'; export type PlanStepStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'skipped' | 'compensated' | 'manual-intervention'; export type ActionFailureKind = 'network' | 'timeout' | 'provider-unavailable' | 'rate-limited' | 'conflict' | 'refused' | 'failed'; export declare class DeploymentActionError extends Error { readonly kind: ActionFailureKind; constructor(kind: ActionFailureKind, message: string); } export interface ActionExecutionResult { outputs?: JsonObject; changed?: boolean; evidence?: JsonObject; } export interface ActionContext { plan: DeploymentPlan; workflow: string; stage: PlannedStage; step: PlannedStep; inputs: Readonly>; resolved: JsonObject; attempt: number; signal: AbortSignal; } export type ActionHandler = (context: ActionContext) => Promise; export interface StepExecutionRecord { id: string; stage: string; action: string; status: PlanStepStatus; attempts: number; startedAtTs?: number; finishedAtTs?: number; outputs: JsonObject; changed: boolean; error?: { kind: ActionFailureKind; message: string; }; evidence?: JsonObject; } export interface PlanRunResult { workflow: string; ok: boolean; status: 'succeeded' | 'failed' | 'manual-intervention'; steps: readonly StepExecutionRecord[]; } interface EvaluationState { inputs: Readonly>; steps: Map; plan: DeploymentPlan; execution?: Readonly>; } export declare function evaluateCondition(value: Condition, state: EvaluationState): boolean; export interface RunDeploymentPlanOptions { plan: DeploymentPlan | unknown; workflow: string; inputs?: Readonly>; /** Secret-free exact placement context supplied by the authenticated control plane. */ execution?: Readonly>; actions: Readonly>; now?: () => number; sleep?: (ms: number) => Promise; lock?: (group: string, limit: number, run: () => Promise) => Promise; /** Control-plane placement filter; false records a deterministic skip. */ shouldRun?: (step: PlannedStep) => boolean; /** Emits each secret-free terminal record for durable control-plane progress. */ onStep?: (record: StepExecutionRecord) => Promise; } export declare function runDeploymentPlan(options: RunDeploymentPlanOptions): Promise; export {};