import { BuildEntryReport } from "every-plugin/build/artifact-names";
import { SourceRef, WorkspaceVersionManifest } from "every-plugin/version-manifest";
//#region src/services/deploy/version-manifest.d.ts
/** Read a workspace dist's build-report.json (ticket 01's entry-name report). */
declare function readBuildReport(distRoot: string): BuildEntryReport | null;
/**
 * Compose the workspace's version manifest from the dist build reports and
 * the **server-computed** SRI map of the upload response (MAP decision 6 —
 * SRI is authoritative from the storage boundary, never computed
 * client-side). Returns null when the dist predates hashed entry names
 * (no report, or the SRI map lacks the entry) — the deploy leg then aborts:
 * uploaded workspaces must pin.
 */
declare function composeWorkspaceVersionManifest(input: {
  report: BuildEntryReport;
  ssrReport?: BuildEntryReport | null;
  integrityMap: Record<string, string>;
  /** full per-file SRI map of the dist — recorded for the next deploy's diff */
  files?: Record<string, string>;
  /** source archive reference (publish.sourcePublish) — server-computed SRI */
  source?: SourceRef;
  /** the repo HEAD the build was produced from — best-effort, may be absent */
  gitSha?: string;
}): WorkspaceVersionManifest | null;
/**
 * Version-manifest slot resolution (atomic-deploys 04): a config slot's
 * `pin` ({ manifest, integrity }) resolves to the derived entry-level fields
 * every consumer needs. The cache is keyed by the full pin — the pinned
 * bytes are immutable, so a verified entry is cached for the process
 * lifetime and serves as last-known-good if the origin later fails; a fetch
 * or SRI failure with nothing cached propagates (a boot-time resolution
 * failure fails the deploy, which is the platform's rollback).
 */
interface ResolvedSlotVersion {
  /** Absolute URL of the content-hashed container entry. */
  entryUrl: string;
  entryIntegrity: string;
  /** Absolute URL of the hashed browser manifest (mf-manifest), when present. */
  browserManifestUrl?: string;
  /** Absolute URL of the content-hashed SSR entry, when present. */
  ssrEntryUrl?: string;
  ssrIntegrity?: string;
  /** Shared-singleton `name → version` the pinned build embedded (#546) —
   * stamped onto UI slots so the host's composition guard can detect a
   * platform skew before loading. */
  sharedVersions?: Record<string, string>;
  /** Full per-file digest map of the dist (object path → SRI), when the
   * pinned manifest carries one — the diff base for skip-unchanged uploads. */
  files?: Record<string, string>;
  /** Source archive reference from the pinned manifest (publish.sourcePublish). */
  source?: SourceRef;
}
interface SlotPin {
  /** versioned manifest filename, relative to the slot's production base */
  manifest: string;
  /** the manifest document's own SRI */
  integrity: string;
}
declare function clearSlotVersionCache(): void;
declare function resolveSlotVersion(input: {
  base: string;
  pin: SlotPin;
  fetchImpl?: typeof fetch;
}): Promise<ResolvedSlotVersion>;
//#endregion
export { ResolvedSlotVersion, SlotPin, clearSlotVersionCache, composeWorkspaceVersionManifest, readBuildReport, resolveSlotVersion };
//# sourceMappingURL=version-manifest.d.mts.map