/**
 * Devbox image protocol-version handshake (Decision #14).
 *
 * Closes T13 — cross-namespace protocol skew between CLI and overridden
 * devbox image (e.g. atlas devbox v0.5 + CLI 0.2 with new host-cp wire
 * format). Without this handshake, a CLI/devbox version mismatch
 * silently corrupts; with it, the CLI refuses to start the world and
 * exits with a named code + actionable remedy.
 *
 * Contract: every devbox image declares `LABEL olam.protocol.versions=
 * "<comma-separated-major-list>"` (see docs/architecture/devbox-contract.md
 * §1). The CLI carries a compiled-in `OLAM_PROTOCOL_VERSIONS_SUPPORTED`
 * list and demands non-empty intersection with the image's declaration
 * post-pull, before any container is started.
 */
/**
 * Protocol versions this CLI release knows how to drive.
 *
 * **Bump procedure**:
 *   1. When the CLI ↔ host-cp wire format gains a backward-incompatible
 *      change, append the new version to this list.
 *   2. Update `packages/adapters/src/docker/devbox.Dockerfile` to set
 *      `LABEL olam.protocol.versions="<old>,<new>"` during the
 *      deprecation window (typically 2 minor releases).
 *   3. Drop the old version from this list once the deprecation window
 *      closes.
 *
 * **Compatibility rule**: a CLI MAY support newer versions than its
 * devbox declares — pick the highest mutually-supported version at
 * handshake time. Empty intersection → refuse with EXIT_PROTOCOL_MISMATCH.
 */
export declare const OLAM_PROTOCOL_VERSIONS_SUPPORTED: readonly number[];
/**
 * Parse the value of `olam.protocol.versions` LABEL into a sorted,
 * deduplicated list of major-version integers. Tolerates whitespace,
 * empty strings, and malformed entries (silently skipped — the CLI's
 * empty-intersection check handles "image declares nothing valid").
 */
export declare function parseProtocolVersionsLabel(labelValue: string | undefined | null): number[];
export interface ProtocolHandshake {
    readonly overlap: number[];
    readonly imageVersions: number[];
    readonly cliVersions: readonly number[];
    readonly compatible: boolean;
    readonly remedy: string;
}
/**
 * Check whether the image's declared protocol versions overlap with the
 * CLI's supported list. Returns the overlap (empty when incompatible)
 * plus a named-remedy string for stderr emission on `compatible: false`.
 *
 * The remedy names BOTH version sets so the operator can see exactly
 * why the handshake failed and which CLI version pins they should try.
 */
export declare function checkProtocolOverlap(imageVersions: readonly number[], cliVersions?: readonly number[]): ProtocolHandshake;
/**
 * Read the `olam.protocol.versions` LABEL from a docker image via
 * `docker inspect`. Returns the parsed version list (empty if the label
 * is absent or malformed — the caller routes that into
 * `checkProtocolOverlap` which produces the missing-LABEL remedy).
 *
 * Exposed as a separate function so tests can stub the docker call by
 * passing a mock implementation through `dockerInspect` (see test file).
 */
export interface DockerInspectFn {
    (imageRef: string): {
        exitCode: number;
        stdout: string;
        stderr: string;
    };
}
export interface InspectResult {
    readonly imageRef: string;
    readonly versions: number[];
    readonly inspectFailed: boolean;
    readonly inspectError: string | undefined;
}
export declare function inspectImageProtocolVersions(imageRef: string, dockerInspect?: DockerInspectFn): InspectResult;
//# sourceMappingURL=protocol-version.d.ts.map