import { type Result } from '@forgeax/engine-rhi'; import type { AssetError, CatalogDelta, CatalogDiagnostic, CatalogEntry } from '@forgeax/engine-types'; import type { CatalogSource } from '../catalog-source'; export interface CatalogReplicaSnapshot { readonly version: number; readonly entries: readonly CatalogEntry[]; readonly stale: boolean; readonly diagnostics: readonly CatalogDiagnostic[]; } type SnapshotResult = Result; type CatalogDeltaListener = (delta: CatalogDelta) => void; /** * One authoritative catalog read model owned by AssetRegistry. * * The source subscription is installed before the first enumeration. Deltas * observed during that baseline read are buffered and folded afterwards, so * an early publication cannot disappear between the two operations. */ export declare class CatalogReplica { private readonly source; private readonly listeners; private readonly entries; private pendingBeforeBaseline; private pendingDuringReconcile; private unsubscribe; private startPromise; private baselineReady; private version; private stale; private diagnostics; private currentSnapshot; private readonly expectedScope; constructor(source: CatalogSource); subscribe(listener: CatalogDeltaListener): () => void; snapshot(): CatalogReplicaSnapshot; /** Read an accepted row without materializing or sorting the full observation. */ get(guid: string): CatalogEntry | undefined; /** * Adopt an already accepted baseline without reading the source again. * * AssetRegistry uses this when a URL-backed pack index was loaded before a * CatalogSource was attached. The replica still subscribes before exposing * the baseline, so later deltas retain the same ordering and validation * semantics as a normal `start()`. */ seed(entries: readonly CatalogEntry[]): void; dispose(): void; start(): Promise; reconcile(): Promise; private loadBaseline; private receive; private fold; private safeDelta; private publish; private makeSnapshot; } export {}; //# sourceMappingURL=catalog-state.d.ts.map