export declare const IDENTITY_FILENAME = "memo.identity.yaml"; /** One element's persisted identity. */ export interface ElementIdentity { shortId?: string; uuid?: string; } /** `package::name` → identity. */ export type IdentityRegistry = Record; /** The registry key for an element. */ export declare function identityKey(element: { id: string; package?: string; }): string; /** * Read the registry. A missing file is an empty registry, not an error: the * first build of a project legitimately has no prior identities. */ export declare function readIdentityRegistry(projectRoot: string): IdentityRegistry; /** * Write the registry, preserving entries whose elements are no longer present. * * Retired entries are what stop a number being reused, so they are kept rather * than pruned. They are cheap, and dropping them is the one change that would * make the file unsafe. */ export declare function writeIdentityRegistry(projectRoot: string, assigned: IdentityRegistry, prior?: IdentityRegistry): void; /** Serialize to the same hand-written YAML subset the lockfile uses. */ export declare function serializeIdentityRegistry(registry: IdentityRegistry): string; /** Parse the registry (hand-written for the simple two-field format). */ export declare function parseIdentityRegistry(content: string): IdentityRegistry; /** * The prior `shortId` assignments for one prefix family, as * `assignSequentialShortIds` expects them: element id → shortId. * * Keys are un-qualified here because assignment happens per prefix over element * ids; the qualified key is only the persistence form. */ export declare function priorShortIds(registry: IdentityRegistry): Map; //# sourceMappingURL=identity-registry.d.ts.map