| title |
Kernel and services — the runtime core |
| navTitle |
Kernel & Services |
| description |
The ObjectKernel runtime — plugin host, event bus, service registry, and the versioned services.* APIs your hooks and plugins call. |
The kernel is ObjectStack's runtime: it loads your metadata artifact, hosts plugins, wires up services, and enforces the lifecycle that keeps the system stable. This module documents the ObjectOS layer in practice — the System Protocol is its normative spec. If you write hooks or plugins, this is where the capability surface you call — ctx.api, ctx.getService(...), and the services.* contract they implement — is documented.
- The ObjectKernel boots through a strict lifecycle and exposes a service registry; everything else — data engine, auth, storage — is a service registered by a plugin.
- Events & hooks are the kernel-level extension points plugins use to react to system activity.
- Runtime services (
services.*) are the stable, versioned API surface exposed to hook and action bodies:
| API |
Stability |
What it does |
services.data |
stable |
CRUD and queries with the caller's permission context |
services.sharing |
stable |
buildReadFilter, canEdit, canDelete, canManageShares, grant/revoke, listShares |
services.email |
stable |
send, sendTemplate |
services.sms |
stable |
Outbound SMS delivery through pluggable providers (Aliyun SMS, Twilio) |
services.push |
experimental |
Mobile push to APNs and FCM, turned on by requires: ['push'] |
services.queue |
stable |
Background work and queues |
services.settings |
stable |
App/environment settings |
services.storage |
stable |
File storage |
services.audit |
experimental |
Append-only audit sink (query history via services.data) |
- Service contracts (
IDataEngine, IAuthService, ICacheService, IMetadataService, IStorageService, … in packages/spec/src/contracts/) define what any implementation must provide, so services are swappable — the repo ships runtime service packages for cache, cluster, datasource, i18n, jobs, knowledge, messaging, realtime, and more.
- Cluster semantics define how the runtime behaves beyond a single node — including the per-partition locking the webhook outbox relies on.