import { type Result } from '@forgeax/engine-rhi'; import { AssetError, type CatalogDelta, type CatalogEntry, type ImportTransport, type ResourceRevision, type RuntimeAssetBinding } from '@forgeax/engine-types'; export type CatalogListener = (delta: CatalogDelta) => void; /** Read-only catalog source backed by static entries or a canonical URL. */ export interface CatalogSource { enumerate(): Promise>; /** Ask the producer for one GUID and its published siblings; enumeration remains navigation-only. */ get?(guid: string): Promise>; subscribe(listener: CatalogListener): () => void; /** Bind one immutable publication through Pack, artifacts and decode. The closure owns its bytes. */ openPackage?(packageUrl: string): typeof globalThis.fetch | undefined; /** Same-domain immutable data; ordinary Registry domain/reference checks still apply. */ /** Canonical transport authority when this source is URL-backed. */ readonly url?: string; /** Producer revision required before a source may expose its entries. */ readonly expectedRevision?: ResourceRevision; readonly expectedScope?: Pick; } /** * Create a read-only catalog source while preserving the schema SSOT. * * Static and fetched sources use the same `CatalogEntry` and revision fields; * an expected revision rejects unverified data before it reaches consumers. */ export declare function createCatalogSource(options: { readonly url?: string; readonly entries?: readonly CatalogEntry[]; readonly fetch?: typeof globalThis.fetch; readonly expectedRevision?: ResourceRevision; readonly expectedScope?: Pick; readonly subscribe?: (listener: CatalogListener) => () => void; readonly importTransport?: ImportTransport; }): CatalogSource; export interface CatalogHotChannel { on(event: string, listener: (data: unknown) => void): void; off(event: string, listener: (data: unknown) => void): void; } /** Fold `forgeax:catalog-delta` into an open catalog source. Invalid deltas leave the replica unchanged. */ export declare function createCatalogHotSubscription(hot: CatalogHotChannel | undefined): (listener: CatalogListener) => () => void; //# sourceMappingURL=catalog-source.d.ts.map