import type { FilesystemProvider } from "../infra/filesystem-provider.js"; import type { AggregateGraphNode } from "./replay.js"; export declare const HISTORICAL_ALIASES_SCHEMA_VERSION = "1.0.0"; export declare const HISTORICAL_ALIASES_FILE = "governance/historical-aliases.json"; export type AggregateKind = AggregateGraphNode["kind"]; export interface HistoricalAlias { /** Canonical aggregate kind */ kind: AggregateKind; /** Canonical aggregate id */ canonicalId: string; /** Event ids that are known aliases of the canonical identity */ aliasEventIds: string[]; /** Historical program this alias belongs to, if any */ historicalProgram?: string; } export interface HistoricalProgram { id: string; name: string; description: string; immutable: boolean; } export interface HistoricalAliasRegistry { schemaVersion: typeof HISTORICAL_ALIASES_SCHEMA_VERSION; description?: string; /** Key = `${kind}:${canonicalId}` */ canonicalIdentities: Record; historicalPrograms: Record; } export declare function identityKey(kind: AggregateKind, id: string): string; export declare function createEmptyHistoricalAliasRegistry(): HistoricalAliasRegistry; export declare function isKnownAlias(registry: HistoricalAliasRegistry, kind: AggregateKind, id: string, eventId?: string): boolean; export declare function getCanonicalId(registry: HistoricalAliasRegistry, kind: AggregateKind, id: string): string | undefined; export declare function loadHistoricalAliasRegistry(fs: FilesystemProvider): Promise; export declare function saveHistoricalAliasRegistry(fs: FilesystemProvider, registry: HistoricalAliasRegistry): Promise;