ObjectStackObjectStack

Kernel Services Checklist

Complete inventory of ObjectStack kernel services with protocol methods, implementation status, and development requirements.

Kernel Services Checklist

The ObjectStack protocol defines 17 kernel services registered via the CoreServiceName enum. Each service maps to a set of protocol methods (57 total), governed by the ObjectStackProtocol interface.

Key architecture principle: The kernel itself only provides data and metadata (framework). Everything else — including auth and automation — is delivered by plugins. The current @objectstack/objectql package is an example kernel implementation to get the basic API running; production kernels will be rebuilt as new plugins.

Last Updated: February 2026

  • ✅ Implemented — 18 protocol methods (kernel-provided)
  • ⚠️ Framework — metadata (in-memory registry, DB persistence pending)
  • 🟡 In Development — auth (plugin structure complete, logic planned)
  • ❌ Plugin Required — 38 protocol methods (to be delivered by plugins)

Architecture Overview

┌─────────────────────────────────────────────────────────┐
│                     Kernel Layer                         │
│  ┌──────────────────┐  ┌──────────────────────────────┐ │
│  │  metadata (⚠️)   │  │  data + analytics (✅)       │ │
│  │  In-memory only   │  │  ObjectQL example kernel     │ │
│  │  DB persistence   │  │  Will be rebuilt as plugins  │ │
│  │  pending          │  │                              │ │
│  └──────────────────┘  └──────────────────────────────┘ │
├─────────────────────────────────────────────────────────┤
│                    Plugin Layer                           │
│  All other services: auth, automation, workflow, ui,     │
│  realtime, notification, ai, i18n, graphql, search,     │
│  file-storage, cache, queue, job                         │
│                                                          │
│  Discovery API reports: enabled/unavailable/degraded     │
│  per service so clients adapt their UI accordingly       │
└─────────────────────────────────────────────────────────┘

Service Overview

#Service NameCriticalityMethodsStatusProvider
1metadatarequired7⚠️ FrameworkKernel (in-memory)
2datarequired9✅ Implemented@objectstack/objectql
3analyticsoptional2✅ Implemented@objectstack/objectql
4authrequired🟡 In Development@objectstack/plugin-auth
5uioptional5❌ Plugin RequiredTBD plugin
6workflowoptional5❌ Plugin RequiredTBD plugin
7automationoptional1❌ Plugin RequiredTBD plugin
8realtimeoptional6❌ Plugin RequiredTBD plugin
9notificationoptional7❌ Plugin RequiredTBD plugin
10aioptional4❌ Plugin RequiredTBD plugin
11i18ncore3✅ Built-in (in-memory fallback)@objectstack/service-i18n
12file-storageoptional❌ Plugin RequiredTBD plugin
13searchoptional❌ Plugin RequiredTBD plugin
14cachecore❌ Plugin RequiredTBD plugin
15queuecore❌ Plugin RequiredTBD plugin
16jobcore❌ Plugin RequiredTBD plugin
17graphqloptional❌ Plugin RequiredTBD plugin

Criticality Levels

  • required: System cannot start without this service
  • core: Falls back to in-memory implementation with a warning if missing
  • optional: Feature disabled; API returns 501 Not Implemented if missing

1. metadata Service ⚠️ Framework

Service Name: metadata · Criticality: required
Implementation: Kernel — SchemaRegistry (in-memory)
Route Mounts: /api/v1/meta, /api/v1, /api/v1/packages

Protocol Methods

MethodSignatureStatus
getDiscoveryGetDiscoveryRequest → GetDiscoveryResponse
getMetaTypesGetMetaTypesRequest → GetMetaTypesResponse
getMetaItemsGetMetaItemsRequest → GetMetaItemsResponse
getMetaItemGetMetaItemRequest → GetMetaItemResponse
saveMetaItemSaveMetaItemRequest → SaveMetaItemResponse
getMetaItemCachedGetMetaItemCachedRequest → GetMetaItemCachedResponse
getUiViewGetUiViewRequest → GetUiViewResponse

Current Limitations

The metadata service is a framework — it works with an in-memory SchemaRegistry loaded from YAML/TS config files at startup.

GapDescriptionPriority
DB PersistenceMetadata is only in memory; no save-to-database path existsP0
Multi-instance SyncNo mechanism to share metadata changes across instancesP1
Migration / VersioningNo schema diff or migration toolingP1
Hot ReloadMetadata changes require restartP2

Discovery: Per-Service Status

The discovery endpoint returns a services map so clients know what is available:

{
  "services": {
    "metadata": {
      "enabled": true, "status": "degraded",
      "route": "/api/v1/meta", "provider": "kernel",
      "message": "In-memory registry; DB persistence pending"
    },
    "data": {
      "enabled": true, "status": "available",
      "route": "/api/v1/data", "provider": "kernel"
    },
    "auth": {
      "enabled": false, "status": "unavailable",
      "message": "Install an auth plugin to enable"
    }
  }
}

2. data Service ✅ Implemented

Service Name: data · Criticality: required
Implementation: @objectstack/objectqlObjectQL (IDataEngine)
Route Mount: /api/v1/data

@objectstack/objectql is an example kernel implementation to get the basic data API running. Future production kernels will be developed as separate plugins.

Protocol Methods

MethodSignatureStatus
findDataFindDataRequest → FindDataResponse
getDataGetDataRequest → GetDataResponse
createDataCreateDataRequest → CreateDataResponse
updateDataUpdateDataRequest → UpdateDataResponse
deleteDataDeleteDataRequest → DeleteDataResponse
batchDataBatchDataRequest → BatchDataResponse
createManyDataCreateManyDataRequest → CreateManyDataResponse
updateManyDataUpdateManyDataRequest → UpdateManyDataResponse
deleteManyDataDeleteManyDataRequest → DeleteManyDataResponse

Driver Support

DriverPackageCRUDAggregationReady
InMemory@objectstack/driver-memoryDev/Test
PostgreSQLTBD
MySQLTBD
MongoDBTBD
SQLiteTBD

3. analytics Service ✅ Implemented

Service Name: analytics · Criticality: optional
Implementation: @objectstack/objectql (driver-level capability)
Route Mount: /api/v1/analytics

Protocol Methods

MethodSignatureStatus
analyticsQueryAnalyticsQueryRequest → AnalyticsResultResponse
getAnalyticsMetaGetAnalyticsMetaRequest → AnalyticsMetadataResponse

Features

  • Cube semantic queries: measures / dimensions / filters → ObjectQL aggregation
  • Auto-generated metadata from SchemaRegistry (numeric → sum/avg, date → time dimensions)

4. auth Service ❌ Plugin Required

Service Name: auth · Criticality: required
Route Mount: /api/v1/auth — only exposed when a plugin registers the auth service

The kernel does NOT handle auth. Install an auth plugin to enable authentication. Without it, the discovery response shows auth: { enabled: false, status: "unavailable" }.

Plugin Requirements

The auth service covers both authentication (identity) and authorization (permissions). There is no separate permission service in CoreServiceName.

ModuleAreaDescriptionPriority
Identity ProviderAuthenticationJWT issuance/verification, session managementP0
User CRUDAuthenticationCreate / read / update / delete usersP0
Role ManagementAuthenticationRole definitions, role-user associationsP0
Permission EngineAuthorizationObject-level and field-level permissionsP0
OAuth2 / OIDCAuthenticationThird-party login (Google, GitHub, etc.)P1
Sharing RulesAuthorizationRecord-level sharing and visibilityP1
Row-Level SecurityAuthorizationAutomatic query filtering by user contextP1
Multi-tenancyAuthenticationSpace / Tenant isolationP1
Territory ManagementAuthorizationData territory assignment and accessP2
SCIMAuthenticationEnterprise user provisioning protocolP2

Spec Files: identity.zod.ts, role.zod.ts, organization.zod.ts, auth-config.zod.ts, tenant.zod.ts


5–7. Business Services ❌ Plugin Required

5. ui Service — 5 methods

listViews, getView, createView, updateView, deleteView
View CRUD, layout engine, action registry, permission filtering.

6. workflow Service — 5 methods

getWorkflowConfig, getWorkflowState, workflowTransition, workflowApprove, workflowReject
State machine engine, approval processes, audit trail.

7. automation Service — 1 method

triggerAutomation
Trigger engine, event triggers from ObjectQL hooks, flow executor, scheduled triggers.


8–11. Communication Services ❌ Plugin Required

8. realtime — 6 methods

realtimeConnect, realtimeDisconnect, realtimeSubscribe, realtimeUnsubscribe, setPresence, getPresence

9. notification — 7 methods

registerDevice, unregisterDevice, getNotificationPreferences, updateNotificationPreferences, listNotifications, markNotificationsRead, markAllNotificationsRead

10. ai — 4 methods

aiNlq, aiChat, aiSuggest, aiInsights

11. i18n — 3 methods

getLocales, getTranslations, getFieldLabels

Service Name: i18n · Criticality: core
Implementations: @objectstack/service-i18n (production — file-based) · Built-in in-memory fallback · Dev Plugin (in-memory stub)
Route Mount: /api/v1/i18n
Contract: II18nService in @objectstack/spec/contracts

Service Registration

The i18n service is a core built-in service with automatic in-memory fallback. If no plugin registers the service, the kernel automatically injects an in-memory implementation during startup:

EnvironmentProviderRegistration
ProductionI18nServicePluginFile-based FileI18nAdapter loads JSON locale files from disk
Built-in FallbackKernelIn-memory Map-backed stub, auto-injected when no plugin provides i18n
DevelopmentDevPluginIn-memory Map-backed stub, supports loadTranslations()
Mock / MSWMswPluginRoutes via HttpDispatcher.dispatch() catch-all — requires one of the above
// Production (overrides built-in fallback)
kernel.use(new I18nServicePlugin({ defaultLocale: 'en', localesDir: './i18n' }));

// Development (automatic — DevPlugin registers i18n stub for all 17 core services)
kernel.use(new DevPlugin());

// No plugin required — kernel auto-injects in-memory fallback if none registered
const kernel = new ObjectKernel();
await kernel.bootstrap(); // i18n service available via built-in fallback

Discovery & Handler Consistency

The Discovery API (/api/v1 or /.well-known/objectstack) and the i18n route handler (/api/v1/i18n/*) both use the same async resolution chain to detect i18n availability:

getServiceAsync() → getService() → context.getService() → services Map

This ensures that discovery.services.i18n.status always matches the actual runtime behavior — a service registered via any mechanism (sync Map, async factory, or context) will be reported correctly in both places.

The locale field in the discovery response is populated from the actual i18n service:

  • locale.default — from i18nService.getDefaultLocale() (falls back to 'en')
  • locale.supported — from i18nService.getLocales() (falls back to [default])

AppPlugin Auto-Loading

When an app bundle includes an i18n config and translations array, AppPlugin automatically loads the translation data into the i18n service during the start phase:

export default defineStack({
  manifest: { id: 'com.example.crm', namespace: 'crm' },
  i18n: { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'] },
  translations: [CrmTranslations],   // TranslationBundle[]
});

AppPlugin will:

  1. Set the default locale via i18nService.setDefaultLocale()
  2. Call i18nService.loadTranslations(locale, data) for each locale in every bundle
  3. Skip gracefully if no i18n service is registered (no errors, just a debug log)

REST API Endpoints

MethodPathDescription
GET/api/v1/i18n/localesList available locales
GET/api/v1/i18n/translations/:localeGet all translations for a locale
GET/api/v1/i18n/labels/:object/:localeGet translated field labels for an object

12–17. Infrastructure Services ❌ Plugin Required

ServiceDescription
file-storageUnified upload/download/delete. Drivers: local FS, S3, MinIO.
searchFull-text search. Drivers: in-memory, Elasticsearch, Meilisearch.
cacheGeneral-purpose cache. Drivers: in-memory LRU, Redis.
queueMessage queue. Drivers: in-memory, BullMQ / Redis Streams.
jobScheduled task execution. Cron-based, concurrency control.
graphqlAuto-generate GraphQL schema from Object metadata.

Phase 1: Foundation (P0)

PluginDescription
plugin-authIdentity engine — JWT, sessions, user CRUD, roles
plugin-uiView CRUD — core low-code capability
plugin-cacheGeneral-purpose cache — performance infrastructure
Metadata DBSolve metadata persistence (SchemaRegistry → database)

Phase 2: Business Engine (P1)

PluginDescription
plugin-workflowState machine + approval process
plugin-automationTriggers + flow orchestration
plugin-i18nInternationalization
plugin-storageFile storage (local + S3)
DB driversPostgreSQL, MySQL, MongoDB, SQLite

Phase 3: Advanced Capabilities (P2)

PluginDescription
plugin-realtimeWebSocket / SSE real-time push
plugin-notificationNotification engine
plugin-aiNLQ, chat, suggestions, insights
plugin-graphqlGraphQL API endpoint
plugin-searchFull-text search
plugin-jobScheduled tasks
plugin-queueMessage queue

Plugin Implementation Pattern

import type { Plugin } from '@objectstack/core';

export const authPlugin: Plugin = {
  name: 'plugin-auth',
  provides: ['auth'], // CoreServiceName value
  
  async init(ctx) {
    const engine = ctx.getService<IDataEngine>('data');
    const authService = new AuthServiceImpl(engine);
    ctx.registerService('auth', authService);
  },
  
  async start(ctx) {
    const auth = ctx.getService<IAuthService>('auth');
    await auth.onReady();
  },
  
  async stop(ctx) {
    const auth = ctx.getService<IAuthService>('auth');
    await auth.shutdown();
  },
};

When a plugin registers a service, the discovery endpoint automatically updates:

  • services.auth.enabledtrue, status"available", route"/api/v1/auth"
  • routes.auth"/api/v1/auth" appears in routes
  • features capability flags update accordingly

Next Steps

On this page