/** * wait / verify family — poll until a deploy reaches a terminal or healthy * state. The *agnostic* members live here: `wait-cluster-healthy` (a Neo4j * bolt/quorum probe over the core `CloudExecutor`), and the HTTP waits * `wait-endpoint` / `health-gate` (over an injectable `fetch`). The * cloud-specific members — `wait-for-stack` (CloudFormation), * `wait-steady-state` (ECS), `wait-job` (EMR) — moved to the aws lexicon * alongside their executor clients (see docs/components/cloud-boundary). */ import type { Capability } from "../capability.js"; import { type CloudExecutor } from "./cloud-executor.js"; /** Minimal fetch surface the HTTP waits (`wait-endpoint`, `health-gate`) need — injectable for tests. */ type Fetcher = (url: string) => Promise<{ status: number; ok: boolean; }>; export interface WaitClusterHealthyInput { /** * Cluster identifier — a comma-separated list of `host:port` bolt * endpoints. Optional because a per-instance fan-out phase (e.g. the Neo4j * pilot) calls this once per instance without repeating the cluster's * member list on every step; when omitted, falls back to * `ctx.vars.clusterEndpoints` (env config resolved by the caller) or, * failing that, `ctx.component` as a single-endpoint identifier. */ cluster?: string; /** Minimum healthy member count required. */ size?: number; /** Require quorum (majority of expected members healthy) rather than an exact size. Default: false. */ quorum?: boolean; /** Poll interval in ms. Default: 5000. */ intervalMs?: number; /** Overall timeout in ms. Default: 5 minutes. */ timeoutMs?: number; } export interface WaitClusterHealthyOutput { /** Number of healthy members observed. */ healthyCount: number; } /** * Poll a multi-node cluster (e.g. Neo4j) via a bolt-port TCP probe until it * reports healthy: `size` members reachable (exact-count mode, used by a * cluster's seed instance) or a majority of the expected member list * (`quorum` mode, used once followers exist). No rollback: a health probe is * read-only. */ export declare function createWaitClusterHealthyCapability(executor?: CloudExecutor): Capability; /** Default `wait-cluster-healthy` capability, backed by the real `CloudExecutor`. */ export declare const waitClusterHealthyCapability: Capability; export interface WaitEndpointInput { /** URL to poll. */ url: string; /** Expected HTTP status codes. Default: [200]. */ expectStatus?: number[]; /** Poll interval in ms. Default: 5000. */ intervalMs?: number; /** Overall timeout in ms. */ timeoutMs?: number; } export interface WaitEndpointOutput { /** Observed status code on success. */ status: number; } /** Poll an HTTP(S) endpoint until it responds with an expected status. Cloud-agnostic. */ export declare function createWaitEndpointCapability(fetcher?: Fetcher): Capability; /** Default `wait-endpoint` capability, backed by the global `fetch`. */ export declare const waitEndpointCapability: Capability; export interface HealthGateInput { /** Health check path or full URL. */ path: string; /** Optional base URL (scheme + host) composed with `path` via `new URL(path, host)`. May be a cross-stack Wiring value; a bare host gets `http://` prepended. */ host?: string; /** Number of consecutive successes required. Default: 1. */ consecutiveSuccesses?: number; /** Poll interval in ms. Default: 5000. */ intervalMs?: number; } export interface HealthGateOutput { /** True once the health check passed the required consecutive count. */ healthy: boolean; } /** Block progression until a health check passes — the generic post-deploy verification gate. Cloud-agnostic. */ export declare function createHealthGateCapability(fetcher?: Fetcher): Capability; /** Default `health-gate` capability, backed by the global `fetch`. */ export declare const healthGateCapability: Capability; export {}; //# sourceMappingURL=wait-verify.d.ts.map