/** * Injectable cloud I/O boundary for the *agnostic* capability implementations * that remain in core: the `docker` build/push client and the Neo4j bolt-port * probe. Every capability here that talks to a real tool goes through a * `CloudExecutor` instead of shelling out directly, so production code gets a * real, `child_process`/`net`-backed executor and tests get a * `MockCloudExecutor` (./__tests__/mock-cloud-executor.ts) that records calls * and returns canned results — no live docker, ever, in a test run. * * The AWS-specific clients (CloudFormation, ECS, Lambda, EMR, CodeDeploy, SSM * host, S3, CloudFront, snapshot, ECR) used to live here too. They now live in * the aws lexicon (`@intentius/chant-lexicon-aws/components`), contributed * through the capability-plugin seam — see docs/components/cloud-boundary. The * `docker` client stays in core because it is genuinely cloud-agnostic and * shared: `docker-build` (agnostic) uses it here, and the aws lexicon's * `publish-image` reuses the exported `realDocker` rather than duplicating it. */ import { exec } from "node:child_process"; export declare const execFileAsync: typeof exec.__promisify__; export interface DockerBuildArgs { context: string; dockerfile?: string; buildArgs?: Record; target?: string; /** Tag applied to the built image so it can be referenced by name (e.g. saved to a tarball). */ tag: string; } export interface DockerSaveArgs { /** Image reference to save (tag or digest). */ image: string; /** Destination tarball path. */ outFile: string; } export interface DockerLoadArgs { /** Tarball path to load. */ inFile: string; } export interface DockerTagArgs { source: string; target: string; } export interface DockerPushArgs { /** Fully qualified image reference to push (registry/repo:tag). */ image: string; } export interface DockerClient { /** Build an image from a Dockerfile; returns the built image's content digest. */ build(args: DockerBuildArgs): Promise<{ digest: string; }>; /** Save an image to an OCI/tarball archive on disk. */ save(args: DockerSaveArgs): Promise; /** Load an image tarball into the local docker store; returns the loaded image's digest. */ load(args: DockerLoadArgs): Promise<{ digest: string; }>; /** Tag a local image with an additional reference (e.g. before push). */ tag(args: DockerTagArgs): Promise; /** Push a tagged image to its registry; returns the pushed image's registry digest. */ push(args: DockerPushArgs): Promise<{ digest: string; }>; /** Inspect a remote image's manifest digest without pulling it (used to verify a promoted tag). */ remoteDigest(image: string): Promise; } export interface Neo4jProbeArgs { /** Cluster identifier — a comma-separated list of `host:port` bolt endpoints. */ cluster: string; } export interface Neo4jClusterClient { /** Probe every member's bolt port; returns how many are reachable/healthy. */ probe(args: Neo4jProbeArgs): Promise<{ healthyCount: number; total: number; }>; } export interface CloudExecutor { docker: DockerClient; neo4j: Neo4jClusterClient; } export declare const realDocker: DockerClient; /** Build a `CloudExecutor` that shells out to the real `docker` CLI and probes real bolt ports. Never used in tests. */ export declare function realCloudExecutor(): CloudExecutor; /** The default `CloudExecutor` each capability factory falls back to when none is supplied. */ export declare function defaultCloudExecutor(): CloudExecutor; /** Sleep for `ms`. Shared by every polling capability (`wait-*`) between attempts. */ export declare function sleep(ms: number): Promise; //# sourceMappingURL=cloud-executor.d.ts.map