import * as Schema from "effect/Schema"; import { type ExtensionName, type ExtensionType, type ExtensionVisibility } from "../extensions/common.js"; import { type Handle } from "../extensions/handle.js"; import { VisibilityEvaluationSchema, VisibilityEvaluationUnavailableSchema } from "../publish/visibility.js"; import { type Version, type VersionRange } from "../version-constraints/version-constraints.js"; import { type DeprecationView } from "./schema.js"; export declare const PUBLICATION_SET_CONTRACT: "publication-set-v2"; export declare const MAX_PUBLICATION_SET_CANDIDATES = 100; export declare const Sha256HexSchema: Schema.String; export type Sha256Hex = typeof Sha256HexSchema.Type; export interface PublicationTarget { readonly owner: Handle; readonly type: ExtensionType; readonly name: ExtensionName; readonly version: Version; } export interface PackDependencyDescriptor { readonly owner: Handle; readonly type: Exclude; readonly name: ExtensionName; readonly range: VersionRange; } export declare const PublicationVisibilityInputSchema: Schema.Struct<{ readonly intent: Schema.NullOr; readonly source: Schema.Literals; readonly fingerprint: Schema.String; }>>; readonly request: Schema.NullOr>; }>; export type PublicationVisibilityInput = typeof PublicationVisibilityInputSchema.Type; export interface PublicationDescriptor { readonly target: PublicationTarget; readonly participation: "publish" | "verified-existing"; readonly archiveSha256Hex?: Sha256Hex | undefined; readonly visibility: PublicationVisibilityInput; readonly pack?: { readonly dependencies: ReadonlyArray; } | undefined; } export declare const PreviewPublicationSetRequestSchema: Schema.Struct<{ readonly contract: Schema.Literal<"publication-set-v2">; readonly candidates: Schema.$Array; readonly type: Schema.Literals; readonly name: Schema.brand; readonly version: Schema.brand; }>; readonly participation: Schema.Literals; readonly archiveSha256Hex: Schema.optional; readonly visibility: Schema.Struct<{ readonly intent: Schema.NullOr; readonly source: Schema.Literals; readonly fingerprint: Schema.String; }>>; readonly request: Schema.NullOr>; }>; readonly pack: Schema.optional; readonly type: Schema.Literals; readonly name: Schema.brand; readonly range: Schema.brand; }>>; }>>; }>>; }>; export interface PreviewPublicationSetRequest { readonly contract: typeof PUBLICATION_SET_CONTRACT; readonly candidates: ReadonlyArray; } export declare const PackDependencyFindingSchema: Schema.Struct<{ readonly kind: Schema.Literal<"advisory">; readonly ruleId: Schema.Literals; readonly severity: Schema.Literals; readonly reason: Schema.Literals; readonly dependency: Schema.Struct<{ readonly owner: Schema.brand; readonly type: Schema.Literals; readonly name: Schema.brand; readonly range: Schema.brand; }>; readonly effectiveVisibility: Schema.optional>; readonly lifecycle: Schema.optional>; readonly deprecation: Schema.optional; readonly message: Schema.String; readonly replacement: Schema.optional; readonly fqn: Schema.String; }>, Schema.Struct<{ readonly status: Schema.Literal<"unavailable">; readonly fqn: Schema.optional; }>]>>; }>, Schema.Struct<{ readonly deprecatedAt: Schema.decodeTo; readonly message: Schema.optional; readonly replacement: Schema.Union; readonly fqn: Schema.String; }>, Schema.Struct<{ readonly status: Schema.Literal<"unavailable">; readonly fqn: Schema.optional; }>]>; }>]>>; readonly location: Schema.Struct<{ readonly file: Schema.Literal<"pack.json">; }>; readonly path: Schema.Literal<"./pack.json">; readonly message: Schema.String; readonly suggestions: Schema.$Array; readonly url: Schema.optional; }>>; }>; export type PackDependencyFinding = typeof PackDependencyFindingSchema.Type; export declare const PreviewPublicationSetResponseSchema: Schema.Struct<{ readonly contract: Schema.Literal<"publication-set-v2">; readonly publicationSetDigest: Schema.String; readonly status: Schema.Literals; readonly candidates: Schema.$Array; readonly target: Schema.Struct<{ readonly owner: Schema.brand; readonly type: Schema.Literals; readonly name: Schema.brand; readonly version: Schema.brand; }>; readonly participation: Schema.Literals; readonly descriptorDigest: Schema.String; readonly visibility: Schema.Struct<{ readonly target: Schema.String; readonly intent: Schema.NullOr; readonly source: Schema.Literals; readonly fingerprint: Schema.String; }>>; readonly request: Schema.NullOr>; readonly resolved: Schema.NullOr; readonly disposition: Schema.Literal<"establish">; readonly source: Schema.Literals; }>, Schema.Struct<{ readonly value: Schema.Literals; readonly disposition: Schema.Literal<"preserve">; readonly source: Schema.Literal<"existing">; }>]>>; readonly actual: Schema.NullOr; readonly revision: Schema.NonEmptyString; }>>; readonly comparison: Schema.Literals; readonly findings: Schema.$Array; readonly severity: Schema.Literals; readonly message: Schema.String; }>>; }>; readonly condition: Schema.optional; }>, Schema.Struct<{ readonly kind: Schema.Literal<"unavailable">; readonly target: Schema.Struct<{ readonly owner: Schema.brand; readonly type: Schema.Literals; readonly name: Schema.brand; readonly version: Schema.brand; }>; readonly participation: Schema.Literals; readonly descriptorDigest: Schema.String; readonly code: Schema.Literal<"publish/target-unavailable">; readonly visibility: Schema.Struct<{ readonly target: Schema.String; readonly unavailable: Schema.Literal; readonly findings: Schema.$Array; readonly severity: Schema.Literals; readonly message: Schema.String; }>>; }>; }>]>>; readonly packs: Schema.$Array; readonly type: Schema.Literals; readonly name: Schema.brand; readonly version: Schema.brand; }>; readonly status: Schema.Literals; readonly findings: Schema.$Array; readonly ruleId: Schema.Literals; readonly severity: Schema.Literals; readonly reason: Schema.Literals; readonly dependency: Schema.Struct<{ readonly owner: Schema.brand; readonly type: Schema.Literals; readonly name: Schema.brand; readonly range: Schema.brand; }>; readonly effectiveVisibility: Schema.optional>; readonly lifecycle: Schema.optional>; readonly deprecation: Schema.optional; readonly message: Schema.String; readonly replacement: Schema.optional; readonly fqn: Schema.String; }>, Schema.Struct<{ readonly status: Schema.Literal<"unavailable">; readonly fqn: Schema.optional; }>]>>; }>, Schema.Struct<{ readonly deprecatedAt: Schema.decodeTo; readonly message: Schema.optional; readonly replacement: Schema.Union; readonly fqn: Schema.String; }>, Schema.Struct<{ readonly status: Schema.Literal<"unavailable">; readonly fqn: Schema.optional; }>]>; }>]>>; readonly location: Schema.Struct<{ readonly file: Schema.Literal<"pack.json">; }>; readonly path: Schema.Literal<"./pack.json">; readonly message: Schema.String; readonly suggestions: Schema.$Array; readonly url: Schema.optional; }>>; }>>; readonly resolutions: Schema.$Array; readonly type: Schema.Literals; readonly name: Schema.brand; readonly range: Schema.brand; }>; readonly effectiveVersion: Schema.brand; }>>; }>>; }>; export type PreviewPublicationSetResponse = typeof PreviewPublicationSetResponseSchema.Type; export type PublicationCandidateResult = PreviewPublicationSetResponse["candidates"][number]; export type PublicationPackResult = PreviewPublicationSetResponse["packs"][number]; export interface PublicationDependencyVersionSnapshot { readonly version: string; readonly status: string; readonly yanked: boolean; readonly purged: boolean; } export interface PublicationDependencySnapshot { readonly dependency: PackDependencyDescriptor; readonly exists: boolean; readonly visibility: string | null; readonly lifecycleState: string | null; readonly deprecation: DeprecationView | null; readonly versions: ReadonlyArray; } export type ProspectivePublicationCandidate = { readonly descriptor: PublicationDescriptor; readonly kind: "resolved"; readonly visibility: typeof VisibilityEvaluationSchema.Type; } | { readonly descriptor: PublicationDescriptor; readonly kind: "unavailable"; readonly visibility: typeof VisibilityEvaluationUnavailableSchema.Type; }; export declare const comparePublicationTargets: (left: PublicationTarget, right: PublicationTarget) => number; export declare const normalizePublicationDescriptor: (descriptor: PublicationDescriptor) => PublicationDescriptor; export declare const normalizePublicationSet: (descriptors: ReadonlyArray) => ReadonlyArray; export declare const publicationDescriptorDigest: (descriptor: PublicationDescriptor) => Sha256Hex; export declare const publicationSetDigest: (descriptors: ReadonlyArray) => Sha256Hex; export declare const archiveSha256Hex: (archive: Uint8Array) => Sha256Hex; export declare const publicationTargetKey: (target: PublicationTarget) => string; export declare const validatePublicationDescriptors: (descriptors: ReadonlyArray) => ReadonlyArray; export declare const evaluateProspectivePackDependencies: (input: { readonly packVisibility: ExtensionVisibility; readonly dependencies: ReadonlyArray; readonly snapshots: ReadonlyArray; readonly candidates: ReadonlyArray; }) => ReadonlyArray; export interface ProspectivePackDependencyState { readonly findings: ReadonlyArray; readonly resolutions: PublicationPackResult["resolutions"]; } /** * Evaluate dependency admission and expose the exact version an ordinary * Registry consumer would resolve from the same prospective snapshot. */ export declare const evaluateProspectivePackDependencyState: (input: { readonly packVisibility: ExtensionVisibility; readonly dependencies: ReadonlyArray; readonly snapshots: ReadonlyArray; readonly candidates: ReadonlyArray; }) => ProspectivePackDependencyState; export declare const validatePublicationSetResponse: (descriptors: ReadonlyArray, response: PreviewPublicationSetResponse) => PreviewPublicationSetResponse; //# sourceMappingURL=publication-set.d.ts.map