/**
 * `olam bootstrap` — the SOLE on-ramp for olam's image stack.
 *
 * Phase C of the olam-fresh-install-self-bootstrap epic, implementing
 * the centerpiece of the user goal: `npm install -g @pleri/olam-cli &&
 * olam init && olam bootstrap` lands the operator at a working stack
 * with all three images pulled by digest, protocol-version handshake
 * verified, and services started + authenticated.
 *
 * Steps:
 *   1. docker info smoke (fail-fast with remedy if daemon missing).
 *   2. Parallel pull 3 images by digest from image-digests.json
 *      (shipped in the npm tarball by Phase B). Retry-throttle-coalesce
 *      pattern adopted from packages/auth-client (withCredential +
 *      coalesce.ts) per Decision #16: in-flight Map deduplicates
 *      concurrent identical-digest pulls; bounded retry.
 *   3. For each pulled image, run `docker inspect` + checkProtocolOverlap
 *      (Decision #14 handshake). Refuse on no-overlap.
 *   4. olam host-cp start (no-ops if already running).
 *   5. olam auth up (idempotent).
 *   6. olam auth login (interactive PKCE — 5-min timeout, "still
 *      waiting" reprint every 60s, Ctrl+C cancellation).
 *   7. Optional --with-smoke: olam create --workspace smoke
 *      --task "smoke test".
 *
 * Idempotent re-run: when all images present + matching digests +
 * services healthy, prints a brief status table and exits 0 in ≤30s.
 */
import type { Command } from 'commander';
import { pullImageWithRetry, realDocker, type DockerImpl, type DockerCommandResult, type PullPolicy } from '@olam/adapters';
export { pullImageWithRetry, realDocker, type DockerImpl, type DockerCommandResult, type PullPolicy, };
export interface ImageDigests {
    readonly 'host-cp': string;
    readonly auth: string;
    readonly devbox: string;
    /**
     * devbox-slim Phase A: the :base variant of olam-devbox. Optional for
     * backward compat with older tarballs published before the split. When
     * present, upgrade.ts also tags `olam-devbox:base` locally so the new
     * `DEFAULT_DEVBOX_IMAGE = olam-devbox:base` resolves without a manual
     * pull.
     */
    readonly 'devbox-base'?: string;
    /** Added in Phase B mcp-auth-publish; optional for backward compat with older tarballs. */
    readonly 'mcp-auth'?: string;
    /**
     * Added in olam-kg-service-container-v2 Phase B; optional for backward
     * compat with older tarballs. Container ships bge-small-en-v1.5 + persistent
     * HTTP classifier on :9997 (see packages/kg-service/Dockerfile).
     */
    readonly 'kg-service'?: string;
    /**
     * Added in G1 source-free-install-gaps fix; optional for backward compat
     * with older tarballs. When absent, memory-service-container.ts falls back
     * to MEMORY_SERVICE_PUBLISHED_TAG (:latest) with a printWarning.
     */
    readonly 'memory-service'?: string;
    readonly $registry?: string;
    readonly $published_version?: string;
}
export interface BootstrapOpts {
    readonly withSmoke: boolean;
    readonly skipAuthLogin: boolean;
    /** Skip postgres-singleton bring-up (Phase A of olam-hybrid-shared-postgres). */
    readonly skipPostgresSingleton?: boolean;
    /** Skip agent-memory bring-up. Phase B substrate: starts the Docker container
     *  via `MemoryServiceContainerController` (memory-service-as-docker-peripheral). */
    readonly skipMemory?: boolean;
    /** Skip olam-kg-service pull + start (Phase B of olam-kg-service-container-v2). */
    readonly skipKgService?: boolean;
    readonly registry?: string;
    /** k3d cluster name (default: olam-host). */
    readonly k3sCluster?: string;
    /** Auto-install missing tools via brew on macOS. */
    readonly autoInstall?: boolean;
    /** Skip the observability stack install (Loki + Promtail + Grafana + Prom + Kyverno). */
    readonly skipObservability?: boolean;
    /** Cluster already exists; skip k3d cluster create. */
    readonly skipClusterCreate?: boolean;
}
/** Image-digests.json schema validation + load. */
export declare function loadImageDigests(installRootDir?: string): ImageDigests;
export interface BootstrapResult {
    readonly exitCode: number;
    readonly summary: string;
}
export interface BootstrapDeps {
    readonly docker?: DockerImpl;
    readonly digests?: ImageDigests;
    readonly registry?: string;
    /** Subprocess shell-out for `olam <command>` (host-cp/auth). Default: real spawnSync. */
    readonly runOlamSubcommand?: (args: readonly string[]) => DockerCommandResult;
    /**
     * Override the config path the substrate-dispatch reads. Tests pin
     * `host.substrate: 'compose'` via this hook so the bootstrap flow stays
     * on the compose path even after the package-wide default flipped to
     * 'kubernetes' (feat/cli-bootstrap-k3s-default).
     */
    readonly configPath?: string;
}
export declare function runBootstrap(opts: BootstrapOpts, deps?: BootstrapDeps): Promise<BootstrapResult>;
export declare function registerBootstrap(program: Command): void;
//# sourceMappingURL=bootstrap.d.ts.map