/** * Zod schemas + companion types for the DockerCli boundary contract. * * Every cross-process boundary (CLI ↔ webapp worker, subprocess ↔ adapter) * round-trips through these schemas. Pitfall guards encoded: * - Pitfall 1 (schema-interface drift): every TS type is `z.infer` * - Pitfall 3 (.strict() on every z.object()): all object schemas use .strict() before refinements * - Pitfall 4 (.parse() inside Result): callers use safeParse() and map to failure({...}) * - Pitfall 6 (companion type pairing): every export pairs schema + type in the same statement * - Pitfall 7 (mutable .default()): no schema uses .default({}) or .default([]) * - Pitfall 9 (.optional() string + empty-string trap): `target` uses .min(1).optional() * * `BuildxBuildArgs` is the argv-builder contract — flat fields that map 1:1 * to `docker buildx build` flags. The role-aware manifest contract * (`DockerBuild { path, context?, target? }`) lives in `@fjall/util/manifest` * and is projected into this shape by a thin caller-side adapter * (`dockerBuildToBuildxArgs`) in PR 2's CLI orchestrator. */ import { z } from "zod"; export declare const DockerCliErrorKindSchema: z.ZodEnum<{ abort: "abort"; validation: "validation"; buildx_unavailable: "buildx_unavailable"; daemon_unreachable: "daemon_unreachable"; build_failed: "build_failed"; push_failed: "push_failed"; pull_failed: "pull_failed"; tag_failed: "tag_failed"; inspect_failed: "inspect_failed"; auth_failed: "auth_failed"; timeout: "timeout"; metadata_missing: "metadata_missing"; metadata_malformed: "metadata_malformed"; metadata_missing_digest: "metadata_missing_digest"; }>; export type DockerCliErrorKind = z.infer; export declare function isDockerCliErrorKind(value: string): value is DockerCliErrorKind; export declare const BuildxBuildArgsSchema: z.ZodObject<{ contextPath: z.ZodString; dockerfilePath: z.ZodString; target: z.ZodOptional; platforms: z.ZodArray; tags: z.ZodArray; buildArgs: z.ZodRecord; cacheFrom: z.ZodOptional>; cacheTo: z.ZodOptional>; secrets: z.ZodOptional; path: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"env">; name: z.ZodString; }, z.core.$strict>], "kind">; }, z.core.$strict>>>; provenance: z.ZodBoolean; sbom: z.ZodBoolean; push: z.ZodBoolean; load: z.ZodBoolean; pushByDigest: z.ZodOptional; imageName: z.ZodOptional; builder: z.ZodOptional; metadataFile: z.ZodString; }, z.core.$strict>; export type BuildxBuildArgs = z.infer; export declare const BuildxBuildResultSchema: z.ZodObject<{ digest: z.ZodString; imageDigests: z.ZodRecord; metadata: z.ZodRecord; platforms: z.ZodArray; cacheHits: z.ZodNumber; cacheMisses: z.ZodNumber; }, z.core.$strict>; export type BuildxBuildResult = z.infer; export declare const DockerCliErrorSchema: z.ZodObject<{ kind: z.ZodEnum<{ abort: "abort"; validation: "validation"; buildx_unavailable: "buildx_unavailable"; daemon_unreachable: "daemon_unreachable"; build_failed: "build_failed"; push_failed: "push_failed"; pull_failed: "pull_failed"; tag_failed: "tag_failed"; inspect_failed: "inspect_failed"; auth_failed: "auth_failed"; timeout: "timeout"; metadata_missing: "metadata_missing"; metadata_malformed: "metadata_malformed"; metadata_missing_digest: "metadata_missing_digest"; }>; message: z.ZodString; stderrTail: z.ZodOptional>; details: z.ZodOptional; }, z.core.$strict>; export type DockerCliError = z.infer;