The CRDT layer stores cross-model references as { modelId, globalId } pairs (FederationRecord.refs) and asks a resolver to translate
between local and global identifiers when needed. We deliberately
do NOT pull in @ifc-lite/renderer's FederationRegistry here —
apps that need it can wrap that class with this interface, and apps
that already use IFCX (where path UUIDs are globally unique) can
use the pass-through resolver shipped below.
Adapter for @ifc-lite/renderer's legacy STEP FederationRegistry:
import { federationRegistry } from '@ifc-lite/renderer';
import { type FederationResolver } from '@ifc-lite/collab';
FederationResolver(spec §10.1, AGENTS.md §4).The CRDT layer stores cross-model references as
{ modelId, globalId }pairs (FederationRecord.refs) and asks a resolver to translate between local and global identifiers when needed. We deliberately do NOT pull in@ifc-lite/renderer'sFederationRegistryhere — apps that need it can wrap that class with this interface, and apps that already use IFCX (where path UUIDs are globally unique) can use the pass-through resolver shipped below.Adapter for
@ifc-lite/renderer's legacy STEPFederationRegistry:import { federationRegistry } from '@ifc-lite/renderer'; import { type FederationResolver } from '@ifc-lite/collab';
const resolver: FederationResolver = { toGlobalId(modelId, expressId) { return String(federationRegistry.toGlobalId(modelId, Number(expressId))); }, fromGlobalId(globalId) { const r = federationRegistry.fromGlobalId(Number(globalId)); return r ? { modelId: r.modelId, globalId: String(r.expressId) } : null; }, getModelForGlobalId(globalId) { return federationRegistry.getModelForGlobalId(Number(globalId)); }, };