import { type LayerDigests } from "@telorun/analyzer"; /** * Does the payload we are about to publish differ from what is already published * at this `metadata.version`? * * Bundling moves a module's dependency coupling from load time to build time. It * does not remove it: once `codec` — or `fastify`, or a transitive dependency the * lockfile alone moved — is copied into a module's bundle, that module's bytes * have changed while nothing under its own directory has. No path-scoped rule and * no version ledger can see that, so a fix silently ships to nobody. * * The artifact already carries the exact answer. Each layer's `integrity` is a * framing-independent digest of its contents, so comparing the layer we just * built against the one published under the same version decides the question * from the bytes themselves — it fires for a shared-library fix, a lockfile bump * and a sibling source edit alike, and it cannot fire spuriously, because * identical bytes hash identically. */ export interface LayerDrift { role: string; selector?: string; /** `integrity` recorded in the published `layers:` index, or `undefined` when * the published artifact ships no layer for this role/selector at all. */ published?: string; /** `integrity` of the layer built from the working copy, or `undefined` when * the build no longer produces this layer. */ built?: string; } import type { BuiltLayer } from "./module-payload.js"; export type { BuiltLayer }; /** * The per-layer integrity the registry serves at `@`, or * `null` when nothing is published there. * * The **registry's own numbers**, read off the published `layers:` index rather * than recomputed from anything local. That is what makes it the authority half * of the ledger's cache: `telo release verify` compares the committed digests * against these, and `--write` records these. */ export declare function readPublishedDigests(destination: string, version: string, registry: string): Promise; /** * Compare the built payload against the published one at the same version. * * Returns `null` when nothing is published at that ref — a new version, so there * is nothing to disagree with. Returns an empty array when the payloads match. */ export declare function findPayloadDrift(destination: string, version: string, built: readonly BuiltLayer[], registry: string): Promise; /** The message shown when the gate fires. It names the version to bump, because * that — not a re-push — is the fix: overwriting a published tag would change * what an existing pinned import resolves to. */ export declare function describeDrift(moduleRef: string, version: string, drift: LayerDrift[]): string; //# sourceMappingURL=payload-drift.d.ts.map