Snapshot for
@system-core/core0.8.x. Current docs live at /.
platform
Generated Reference
Cross-cutting platform primitives for events, hooks, plugins, observability, policy, queueing, tenancy, and versioning. This page is generated from core/platform/index.ts against package version 0.8.1 on the 0.8 docs line.
Import
ts
import { createTypedEventBus, createHookRegistry, createPluginRegistry } from '@system-core/core/platform'Entry
| Field | Value |
|---|---|
| Import path | @system-core/core/platform |
| Package export | ./platform |
| Source entry | core/platform/index.ts |
| Exported symbols | 80 |
| Runtime file | ./dist/platform.js |
| Types file | ./dist/platform.d.ts |
Use This Surface When
- Use this when you need typed events, hook registries, or plugin primitives directly.
- Reach for platform APIs to extend the runtime without importing internal files.
- Treat platform as the owner of cross-cutting behavior rather than scattering extensions through app code.
Public Surface
Functions
| Export | Kind | Source |
|---|---|---|
createAuditPlugin | function | core/platform/plugins.ts |
createBullMqQueue | function | core/platform/queue.ts |
createConsoleObservability | function | core/platform/observability.ts |
createHookRegistry | function | core/platform/hooks.ts |
createInProcessQueue | function | core/platform/queue.ts |
createOtelObservability | function | core/platform/observability.ts |
createPgBossQueue | function | core/platform/queue.ts |
createPluginRegistry | function | core/platform/plugins.ts |
createPolicyRegistry | function | core/platform/policy.ts |
createPrismaMigrationStore | function | core/platform/versioning.ts |
createScheduler | function | core/platform/scheduler.ts |
createScopedDeps | function | core/platform/tenancy.ts |
createSearchPlugin | function | core/platform/plugins.ts |
createTypedEventBus | function | core/platform/events.ts |
getAsyncLocalStorage | function | core/platform/tenancy.ts |
getCurrentTenant | function | core/platform/tenancy.ts |
installTenantMiddleware | function | core/platform/tenancy.ts |
isValidWebhookUrl | function | core/platform/events.ts |
ownerOrAdmin | function | core/platform/policy.ts |
requiresPermission | function | core/platform/policy.ts |
rollbackMigration | function | core/platform/versioning.ts |
runMigrations | function | core/platform/versioning.ts |
runWithTenant | function | core/platform/tenancy.ts |
sameTenant | function | core/platform/policy.ts |
validateTenantId | function | core/platform/tenancy.ts |
Consts
| Export | Kind | Source |
|---|---|---|
allow | const | core/platform/policy.ts |
CORE_VERSION | const | core/platform/versioning.ts |
deny | const | core/platform/policy.ts |
globalHooks | const | core/platform/hooks.ts |
nullObservability | const | core/platform/observability.ts |
TENANT_SCOPED_MODELS | const | core/platform/tenancy.ts |
Interfaces
| Export | Kind | Source |
|---|---|---|
AuditPluginOptions | interface | core/platform/plugins.ts |
BackgroundQueueAdapter | interface | core/platform/queue.ts |
BullMqQueueOptions | interface | core/platform/queue.ts |
CanChain | interface | core/platform/policy.ts |
CheckChain | interface | core/platform/policy.ts |
EventPayloads | interface | core/platform/events.ts |
HookEntry | interface | core/platform/hooks.ts |
HookRegistry | interface | core/platform/hooks.ts |
JobContext | interface | core/platform/queue.ts |
JobPayload | interface | core/platform/queue.ts |
LogContext | interface | core/platform/observability.ts |
MetricOptions | interface | core/platform/observability.ts |
Migration | interface | core/platform/versioning.ts |
MigrationDeps | interface | core/platform/versioning.ts |
MigrationPrismaClient | interface | core/platform/versioning.ts |
MigrationRecord | interface | core/platform/versioning.ts |
MigrationReport | interface | core/platform/versioning.ts |
MigrationStoreDeps | interface | core/platform/versioning.ts |
ObservabilityAdapter | interface | core/platform/observability.ts |
OnChain | interface | core/platform/policy.ts |
OtelDeps | interface | core/platform/observability.ts |
PgBossQueueOptions | interface | core/platform/queue.ts |
Plugin | interface | core/platform/plugins.ts |
PluginContext | interface | core/platform/plugins.ts |
PluginRegistry | interface | core/platform/plugins.ts |
PolicyContext | interface | core/platform/policy.ts |
PolicyDefinition | interface | core/platform/policy.ts |
PolicyRegistry | interface | core/platform/policy.ts |
PolicyUser | interface | core/platform/policy.ts |
QueueAdapter | interface | core/platform/scheduler.ts |
SchedulerController | interface | core/platform/scheduler.ts |
SchedulerOptions | interface | core/platform/scheduler.ts |
SearchPluginOptions | interface | core/platform/plugins.ts |
SpanOptions | interface | core/platform/observability.ts |
TenantContext | interface | core/platform/tenancy.ts |
TypedEventBus | interface | core/platform/events.ts |
TypedEventBusOptions | interface | core/platform/events.ts |
WebhookConfig | interface | core/platform/events.ts |
Types
| Export | Kind | Source |
|---|---|---|
EventType | type | core/platform/events.ts |
HookFn | type | core/platform/hooks.ts |
HookName | type | core/platform/hooks.ts |
JobHandler | type | core/platform/queue.ts |
LifecycleStage | type | core/platform/hooks.ts |
LogLevel | type | core/platform/observability.ts |
PolicyAction | type | core/platform/policy.ts |
PolicyHandler | type | core/platform/policy.ts |
SchedulerMode | type | core/platform/scheduler.ts |
TenantScopedModel | type | core/platform/tenancy.ts |
TypedEventListener | type | core/platform/events.ts |