/** * Component Registry Utilities * * Utilities for serialising Puck component configs into machine-readable * ComponentDescriptor objects, hashing them for change detection, and * building the RegistryIndex stored at /_registry/index. */ import { hashDescriptor, type ComponentDescriptor, type ComponentProvenance, type FieldAiMeta, type RegistryIndex, type SerializedField } from '@pantheon-systems/p1-content-validator'; export { hashDescriptor }; export type { ComponentDescriptor, ComponentProvenance, FieldAiMeta, RegistryIndex, SerializedField }; /** * Converts a Puck field definition to a JSON-serializable SerializedField. * Strips non-serializable properties (render functions, getItemSummary, etc.). * Recursively handles array.arrayFields and object.objectFields. */ export declare function serializeField(field: Record, name: string): SerializedField; /** * Extracts ComponentDescriptors from a Puck config object. * Optionally classifies provenance against an upstream Puck config. * * @param puckConfig - The site's Puck config (as passed to ) * @param upstreamConfig - Optional Custom Upstream's Puck config for provenance comparison */ export declare function extractDescriptors(puckConfig: unknown, upstreamConfig?: unknown): ComponentDescriptor[]; /** * Builds the RegistryIndex from a list of extracted descriptors. * * @param verifiedAt - Pass when a full per-component verification just ran, * to stamp the index with that confirmation time. Omit to * carry an existing value forward unchanged on a fast-path-only run. */ export declare function buildRegistryIndex(descriptors: ComponentDescriptor[], siteId: string, branchId: string, verifiedAt?: string): RegistryIndex;