
Platform
An ontology-based, agent-native runtime for governed business applications. The platform owns the mechanics of mutation; verticals plug in their domain ontology.
The one-line invariant
Every mutation passes through one pipeline
UI click, AI agent call, signed-token request, scheduled worker — every domain mutation in a Fabric app travels the same path. There are no exceptions.
Actor
→ ActionInvocation
→ PolicyEvaluation
→ StateMachine
→ Handler / Saga
→ AdapterInvocation
→ AssetEvent
→ ProjectionWhat's in the box
A runtime, not a framework
Six contracts make up the platform. Everything else is a vertical concern.
Action pipeline
A single entry point for mutation. Triggers, policies, state machines, handlers, sagas, projections.
Governance
Policies are evaluated at every checkpoint. Audit trails are emitted as evidence — not retrofitted.
Events as evidence
Every state change is an immutable AssetEvent. Projections derive read models; replay rebuilds them.
Entities & invariants
Entities define structure; invariants are policy-checked at the boundary, not buried in handlers.
Agent-native by design
Agents and humans both call invokeAction. Policy treats them identically — capabilities, not bypasses.
Vertical extensions
Plug in your domain ontology with a FabricModule manifest. The platform owns mechanics, you own meaning.
Call paths
Three ways in. No fourth path.
Every mutation reaches invokeAction through one of three paths — each with its own auth model, all with the same policy gate.
01
Authenticated session
A logged-in user. Permissions checked against the active session.
02
Verified external token
Signed magic-link or webhook. Token verified before invoke.
03
System / agent / scheduled
Internal worker, AI agent with credential scopes, or cron sweep.
What `@fabric/platform` is
Portable. Boundary-tested. Yours to bind.
- Zero runtime dependencies.
- No database client. No ORM.
- No vertical vocabulary in the core.
- Every contract parameterised by
TDbso you bind your own persistence client. - A boundary test keeps the platform clean: vertical names, Prisma, and concrete database imports fail CI if they leak in.