import { BaseServiceError } from "../../types/errors/ServiceError.js"; import type { DeployParams } from "../../types/params.js"; /** * The deployment's lease was denied at a stack boundary (§5.3): the server has * released or superseded this deployment (cancelled, swept, adopted by another * runner, or force-released) while the engine was mid-flight. The engine aborts * BEFORE starting the named stack's first mutating CloudFormation operation — * already-completed stacks stand. The message is surface-neutral (no CLI flags * or commands) and built from static literals + the stack name, so there is * nothing to mask. */ export declare class LeaseDeniedError extends BaseServiceError { readonly stackName: string; constructor(message: string, stackName: string); } /** Which mutating operation the gate protects — drives the denial wording. */ export type LeaseGateOperation = "deploy" | "destroy"; /** * Stack-boundary lease gate (§5.3). Called immediately before a stack's first * mutating CloudFormation operation. Returns a typed {@link LeaseDeniedError} * when the lease is denied (the caller must abort without starting the stack), * or `undefined` when the deploy may proceed. * * Consumes the resolved gate resolver + shutdown signal rather than the whole * `DeployParams`. Fails OPEN: a `"unknown"` verdict (the liveness probe could * not reach the server) proceeds, because a lease is a liveness signal and * CloudFormation's own ClientRequestToken is the fencing backstop. An absent * resolver is a no-op gate. */ export declare function assertLeaseBeforeStack(assertLeaseForStack: DeployParams["assertLeaseForStack"], stackName: string, abortSignal?: AbortSignal, operation?: LeaseGateOperation): Promise;