/** * build.sh manifest → image-index projection (IMAGE-API-DESIGN.md §1/§3, pool design §6). * * `sandbox-manifest.json` is the replay-sufficient build record; the index row is its queryable projection + * the push-time facts (registry repo + runtime digest). This module is the SINGLE pure mapping used by both the * one-time seed and the P3 atomic-publish pipeline — kept side-effect-free so it is unit-tested without a DB. */ import type { ImageIndexUpsert, ImageNestedBuildMode, ImageStatus } from "../plugins/store-contracts.js"; /** Project the manifest's `nestedBuild` (string posture OR bool) → the enum (center contract). */ export declare function nestedBuildModeOf(v: string | boolean | undefined): ImageNestedBuildMode; /** The fields of build.sh's `sandbox-manifest.json` this projection reads (a superset is fine; extras ignored). */ export interface BuildManifest { /** "custom" for `--bands` builds; the real profile is then the tag's repo part. */ profile?: string; bands?: string[]; /** e.g. "code-flutter:dev-20260619". */ tag?: string; digest?: string; generatorVersion?: string; recipeGitSha?: string; buildDate?: string; toolchainVersions?: Record; capabilities?: { browser?: boolean; db?: boolean; nestedBuild?: string | boolean; podContract?: { devShm?: string; securityCtx?: string; }; }; owner?: string; visibility?: string; sizeBytes?: number; } /** The push-time facts the manifest cannot know (the registry repo + the runtime-pinned digest + lifecycle). */ export interface ManifestProjectOpts { /** Registry repo the digest lives in, e.g. "docker.io/claybobby/code-flutter" (historically SWR — deprecated). */ repo: string; /** Runtime-pinned digest (the registry RepoDigest after push); falls back to the manifest digest pre-push. */ digest?: string; /** Lifecycle status to register with (default "published" — the seed runs post-verify). */ status?: ImageStatus; /** sha256 of the manifest blob (the replay anchor). */ manifestSha?: string | null; sizeBytes?: number | null; signed?: boolean; } /** Parse a docker-style size ("64m" / "512M" / "1g") → MB. Undefined on an unparseable / absent value. */ export declare function shmToMB(v: string | undefined): number | undefined; /** --bands builds record profile="custom", so the tag's repo part ("code-flutter:tag" → "code-flutter") wins. */ export declare function profileFromManifest(m: BuildManifest): string; /** Pure projection: a build.sh manifest + the push-time facts → an index upsert. */ export declare function manifestToIndexEntry(m: BuildManifest, opts: ManifestProjectOpts): ImageIndexUpsert; //# sourceMappingURL=manifest.d.ts.map