Appearance
Core subpath exports
@open-matrix/core/package.json declares an exports map (package.json:23-324) that gates which paths consumers can import from. The map allows the root barrel and a precise list of deep subpaths. This page is the table of every subpath, what it provides, and the import idiom to use.
How to read the table
Each row gives:
- Subpath — the string after
@open-matrix/core/.... - Headline export — the most-used named export, for orientation. Subpaths often re-export several names; consult the source file or
index.tsfor the full list. - When to use — which audiences and contexts the subpath is for.
The root barrel
| Subpath | Imports |
|---|---|
@open-matrix/core | The root barrel. Re-exports everything in src/index.ts. Default import path for application code. |
ts
import {
MatrixActor, MatrixRuntime, MatrixActorHtmlElement,
InMemoryTransport, InMemoryBroker, NatsTransport, createTransport,
RequestReply, requestReply,
resolveConfiguredPackageConfig, deepMergeConfig,
ActivityFrame, isTerminalPhase,
TopicRouter, MxEnvelope,
} from '@open-matrix/core';If you don't have a specific reason to use a deep subpath, use the root barrel.
Core actor surface
| Subpath | Headline export |
|---|---|
core/MatrixActor | MatrixActor (the actor base class) |
core/IRecordStoreProvider | IRecordStoreProvider, RECORD_STORE_PROVIDER_KEY |
core/security/ICapabilityToken | ICapabilityToken |
core/security/ISecurityRealm | ISecurityRealm |
core/security/ITopicClaim | ITopicClaim |
core/security/SecurityRealm | SecurityRealm, DEFAULT_SECURITY_POLICY |
core/security/TopicClaimRegistry | TopicClaimRegistry |
core/security/defaults | Default security policy values |
Use the deep subpath when you only need a single class and want bundlers to tree-shake aggressively (for browser webapps that target small bundles).
Engine layer
| Subpath | Headline export |
|---|---|
engine/core/IMatrixContext | IMatrixContext (interface) |
engine/core/MatrixContext | MatrixContext (class) |
engine/messaging/TopicRouter | TopicRouter (subject computation) |
engine/remoting/ComponentProxy | ComponentProxy |
engine/remoting/IIntrospectResult | IIntrospectResult |
engine/remoting/ITransportAdapter | ITransportAdapter, TransportAdapter (alias) |
engine/remoting/RequestReply | RequestReply, requestReply |
engine/utils/NameUtils | NameUtils, toHandlerCase |
engine/* is the messaging plumbing. Use these subpaths when implementing transports or middleware. Application actors usually import everything from the root barrel.
Framework layer (browser-side)
| Subpath | Headline export |
|---|---|
framework/MatrixActorHtmlElement | MatrixActorHtmlElement (the browser actor base) |
framework/ActivityFrame | ActivityFrame, ActivityPhase, isTerminalPhase |
framework/IStateStore | IStateStore, STATE_STORE_KEY |
framework/PageManifest | PageManifest, PageManifestEntry, buildCodeRef, createEmptyManifest, addManifestEntry, removeManifestEntry |
framework/components/MxSplit | MxSplit (split-pane primitive) |
framework/components/MxTheme | MxTheme (theme propagation) |
framework/components/MxTopicTag | MxTopicTag (topic display) |
framework/components/index | All shell primitives via a barrel |
UI packages typically import the elements they need directly:
ts
import { MxSplit } from '@open-matrix/core/framework/components/MxSplit';Runtime layer
| Subpath | Headline export |
|---|---|
runtime/MatrixRuntime | MatrixRuntime |
runtime/ComponentFactory | createFromSchema, ICreateResult, ICreateOptions |
runtime/InstanceBootstrapContext | InstanceBootstrapContext |
runtime/InstanceBootstrapRefs | InstanceBootstrapRefs |
runtime/MountedInstanceMetadata | MountedInstanceMetadata |
runtime/PackageConfigResolver | resolveConfiguredPackageConfig, deepMergeConfig, IPackageConfigContract, IPackageConfigProviderDeclaration |
Use these when building a runner (a custom Host Service equivalent) or testing runtime-level behaviour.
Transports
| Subpath | Headline export |
|---|---|
transport/InMemoryBroker | InMemoryBroker |
transport/InMemoryTransport | InMemoryTransport, InMemoryTransportOptions |
transport/NatsTransport | NatsTransport, INatsTransportOptions, INatsLikeConnection, INatsLikeMsg, INatsLikeSubscription |
transport/TransportProxy | TransportProxy |
Use when constructing transports yourself (tests, bespoke runners). Application code uses the transport the runtime provides.
Browser bootstrap
| Subpath | Headline export |
|---|---|
browser/AppReadySignal | AppReadySignal |
browser/BrowserProfileTrace | BrowserProfileTrace |
browser/HostedRuntimeRecovery | HostedRuntimeRecovery |
browser/HostedRuntimeTarget | HostedRuntimeTarget |
browser/MatrixDSLHost | MatrixDSLHost (the bootstrap host element) |
Flow / orchestration
| Subpath | Headline export |
|---|---|
flow/FlowBuilder | FlowBuilder |
flow/FlowEngine | FlowEngine |
flow/FlowPlan | IFlowPlan, cloneFlowPlan |
flow/FlowTypes | Flow stage type unions |
flow/viewers | Flow viewer barrel |
flow/viewers/ViewTypeRegistry | ViewTypeRegistry |
LISP
| Subpath | Headline export |
|---|---|
lisp | The LISP-on-protocol runtime barrel |
lisp/vlm | The VLM submodule |
Note: LISP and membrane subpaths are exported but treated as experimental. Surface may move; APIs may change without a full deprecation cycle.
Serialization
| Subpath | Headline export |
|---|---|
serialization | Top-level serialization helpers |
serialization/IComponentSchema | IComponentSchema |
Compatibility shims
| Subpath | Note |
|---|---|
_node-compat | DOM stubs for Node imports. Imported automatically by the root barrel. |
core/MatrixActor.js | .js alias of core/MatrixActor. Compatibility for tools that produce .js import specifiers. |
runtime/MatrixRuntime.js | Same — .js alias. |
runtime/InstanceBootstrapContext.js | Same. |
runtime/InstanceBootstrapRefs.js | Same. |
runtime/MountedInstanceMetadata.js | Same. |
engine/remoting/RequestReply.js | Same. |
transport/InMemoryBroker.js | Same. |
transport/InMemoryTransport.js | Same. |
transport/NatsTransport.js | Same. |
The .js aliases exist because some downstream toolchains (notably TypeScript projects with moduleResolution: "node" plus relative .js imports) write the literal .js extension into the import specifier. The aliases keep them resolving.
Picking root barrel vs deep subpath
| Situation | Pattern |
|---|---|
| Application actor or webapp | Root barrel. import { MatrixActor, ... } from '@open-matrix/core'. |
| Bundler-sensitive browser library | Deep subpath. Smaller dependency graph for tree-shaking. |
| Test that builds a runtime by hand | Either. Deep subpath is fine for transport modules; root barrel is fine for everything else. |
| Building a transport or runner | Deep subpath into engine/, runtime/, transport/. |
See also
- Public API ledger — the named exports per subpath.
- SDK package layout — the source-tree map this maps to.
- Stability levels — which exports are stable.
Source:
projects/matrix-3/packages/core/package.json:23-324(exportsmap, full).