/** The core part kind. Bare (not reverse-DNS) because this is Cotal's own reserved primitive, not * a wrapped external vocabulary — SPEC §5's reserved slot, now defined. */ export declare const ARTIFACT_PART_KIND: "artifact"; /** * Convert an object-store digest header to Cotal's `sha256:` identity form. * * CONVERT BY DECODING. NEVER BY RE-ENCODING. The obvious implementation — hash the bytes, encode * the hash, compare the strings — is wrong, and wrong in a way that passes its first test: * measured over 2000 digests, re-encoding to standard base64 mismatches **1490 of 2000** (every * digest whose bytes land on `+` or `/`), and re-encoding to base64url mismatches **2000 of 2000** * (Node strips the padding the store emits). Decoding to hex matched 2000 of 2000. The failure is * in the digest CONTENT, not on a branch a smoke would naturally reach, so a re-encoding * comparison looks correct until roughly three quarters of real artifacts fail to verify. * * The base64 form never escapes this function: everything above it speaks `sha256:`. */ export declare function fromObjectStoreDigest(osDigest: string): string; /** * A reference to bytes in the space's artifact store (SPEC §5). * * There is deliberately no location field. The digest IS the identity: content-addressed, so a * re-put of identical bytes is idempotent, and resolution can move from a JetStream Object Store * to anything else without a message-shape change. */ export interface ArtifactPart { kind: typeof ARTIFACT_PART_KIND; /** Human name, e.g. `coverage-report.html`. A publisher's claim (see the module doc). */ name: string; /** MIME type. A publisher's claim. */ mediaType: string; /** `sha256:` over the RAW bytes — the artifact's identity. Self-verifying. */ digest: string; /** Size in bytes. A publisher's claim: never preallocate from it. */ size: number; } /** * Structural guard for an `artifact` part. * * It validates the digest FORM, not just the field's type, because a malformed digest is not a * reference to anything — it is a lookup that can only ever fail, and admitting it here would push * the refusal to a fetch that reads as "missing artifact" instead of "malformed message". Same * reason `size` must be a non-negative safe integer: `-1`, `NaN`, and `1e30` are all "a number". */ export declare function isArtifactPart(value: unknown): value is ArtifactPart; //# sourceMappingURL=artifact.d.ts.map