Kernel & Services
The ObjectKernel runtime — plugin host, event bus, service registry, and the versioned services.* APIs your hooks and plugins call.
Kernel & Services
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.
How it fits together
- 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.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, … inpackages/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.
What's in this module
Kernel Architecture
ObjectKernel lifecycle and design
Events & Hooks
Kernel-level extension points
Service Registry
How services are registered and resolved
Kernel Services Checklist
Every kernel service at a glance
Runtime Service APIs
The services.* surface with versioning guarantees
Service Contracts
The interfaces services implement
Cluster Semantics
Multi-node runtime behavior
Related
- Spec: System Lifecycle, Runtime Capabilities, Metadata Service
- Schema reference: Kernel, System, Contracts
- Neighbors: building and packaging plugins is covered in Plugins & Packages; running the kernel in production is covered in Deployment & Operations.