TechFabricTechFabricPlatform
Platform referenceEntities

Entity model overview

The five registry types that constitute the Fabric ontology — and how they relate.

Fabric's "entities" are not database rows. They are typed identifiers in registries. Five registries make up the ontology surface:

RegistryHoldsSource
Object typesPascalCase names (Order)packages/platform/objects/index.ts
Subject typesStrings used by event subjectTypepackages/platform/events/index.ts
Event typesPascalCase past-tense namespackages/platform/events/index.ts
Action IDs<namespace>.<verb> stringspackages/platform/actions/index.ts
Policy IDs<id>.v<version> stringspackages/platform/policies/index.ts

A FabricModule populates these registries at app startup. Nothing else is allowed to write to them at runtime.

How they relate

identified by emits gated by transitions defined for about caused by ObjectType FabricIde.g. evt_01HYZ... Action Event Policy StateMachine ActionInvocation

Object types

A registered object type is a string the platform recognizes as a kind of entity. Validation rule: PascalCase alphanumeric (/^[A-Z][a-zA-Z0-9]*$/). Every event's subjectType must reference a registered subject type (which usually equals an object type).

The platform pre-registers a small set of cross-industry governance types and zero industry types. See built-ins.

Action IDs

Format: <namespace>.<snake_case_verb> — e.g. orders.submit. Validation regex: /^[a-z][a-z0-9-]*\.[a-z][a-z0-9_]*$/.

Two stability rules:

  • An action ID is permanent. Renaming it breaks every audit log row, every policy reference, every projection that filtered on it.
  • The action's version field is for implementation changes (handler logic, schema). The ID itself is immutable.

Event types

Format: PascalCase past-tense fact (PlanAccepted, LeadIngested). Registered via FabricModule.eventTypes. Schema versioning is per-event-type with an integer eventSchemaVersion on each envelope.

Policy IDs

Format: <id>.v<integer> — e.g. orders.payment_consent.v1. The version is part of the ID. A new version is a new policy. Old invocations remain bound to whichever version evaluated them.

State machines

Registered per entityType. A state machine is a graph of (from, to, causedByAction) transitions plus an optional guard predicate. The runtime calls validateTransition before atomic action handlers run.

States carry a StateClass:

type StateClass =
  | "initial"
  | "active"
  | "action_required"
  | "waiting"
  | "terminal"
  | "exception";
public enum StateClass
{
    Initial,
    Active,
    ActionRequired,
    Waiting,
    Terminal,
    Exception
}

Used by UI to render badges and by reporting to compute funnel/conversion metrics.

See also

On this page