Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/docs/redirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ export const docsRedirects = [
// folder moves (wildcards — keep after exact entries)
['/docs/guides/runtime-services/:path*', '/docs/kernel/runtime-services/:path*'],
['/docs/guides/contracts/:path*', '/docs/kernel/contracts/:path*'],
// ObjectOS layer-name retirement: the System Protocol section is now "kernel"
// (:path* matches zero or more segments, so this also covers the bare URL)
['/docs/protocol/objectos/:path*', '/docs/protocol/kernel/:path*'],
// safety net for anything else under retired sections — keep last
['/docs/guides/:path*', '/docs'],
];
Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/data-flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ flowchart LR
How data changes propagate to connected clients in real time.

<Callout type="warn">
**Implementation status:** This diagram (and the `emit(...)` → `EB->>WS` broadcast step in the Write Flow diagram above) shows the target design. The realtime service that ships today is an **in-memory pub/sub adapter** (`InMemoryRealtimeAdapter` in `@objectstack/service-realtime`), delivered to JS clients via **long-polling** (`RealtimeAPI` in `@objectstack/client`) — no WebSocket transport is wired up yet. The adapter also only matches subscriptions by `object` and `eventTypes`; per-field `filter` conditions (e.g. `{ project: 'prj_1' }`) are accepted in the request shape but are not yet enforced server-side. See [Real-Time Protocols](/docs/protocol/objectos/realtime-protocol) for the full implementation-status breakdown.
**Implementation status:** This diagram (and the `emit(...)` → `EB->>WS` broadcast step in the Write Flow diagram above) shows the target design. The realtime service that ships today is an **in-memory pub/sub adapter** (`InMemoryRealtimeAdapter` in `@objectstack/service-realtime`), delivered to JS clients via **long-polling** (`RealtimeAPI` in `@objectstack/client`) — no WebSocket transport is wired up yet. The adapter also only matches subscriptions by `object` and `eventTypes`; per-field `filter` conditions (e.g. `{ project: 'prj_1' }`) are accepted in the request shape but are not yet enforced server-side. See [Real-Time Protocols](/docs/protocol/kernel/realtime-protocol) for the full implementation-status breakdown.
</Callout>

```mermaid
Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ See [Actions as Tools](/docs/ai/actions-as-tools) for the `run_action` bridge an
- [Error Catalog](/docs/api/error-catalog) — the full list of error codes
- [Wire Format](/docs/api/wire-format) — request/response envelopes on the wire

Spec: [HTTP API](/docs/protocol/objectos/http-protocol), [Real-Time Protocols](/docs/protocol/objectos/realtime-protocol)
Spec: [HTTP API](/docs/protocol/kernel/http-protocol), [Real-Time Protocols](/docs/protocol/kernel/realtime-protocol)

Schema reference: [API](/docs/references/api)

Expand Down
2 changes: 1 addition & 1 deletion content/docs/automation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Rule of thumb: model *state* with workflows, model *steps* with flows, use hooks

## Related

- **Spec:** [State Machine (Lifecycle)](/docs/protocol/objectql/state-machine), [Runtime Capabilities](/docs/protocol/objectos/runtime-capabilities)
- **Spec:** [State Machine (Lifecycle)](/docs/protocol/objectql/state-machine), [Runtime Capabilities](/docs/protocol/kernel/runtime-capabilities)
- **Schema reference:** [Automation](/docs/references/automation)
- **Neighbors:** validation rules that block bad data live in [Data Modeling](/docs/data-modeling/validation); who may trigger an automation is governed by [Permissions & Identity](/docs/permissions); the services hooks call (email, queue, storage…) are documented in [Kernel & Services](/docs/kernel/runtime-services).
2 changes: 1 addition & 1 deletion content/docs/concepts/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ The three protocols are **loosely coupled** but **tightly integrated**:

- [ObjectQL: Data Protocol](/docs/protocol/objectql) - Full data protocol specification
- [ObjectUI: UI Protocol](/docs/protocol/objectui) - Full view protocol specification
- [Kernel: System Protocol](/docs/protocol/objectos) - Full control protocol specification
- [Kernel: System Protocol](/docs/protocol/kernel) - Full control protocol specification
- [Developer Guide](/docs/getting-started/quick-start) - Build your first ObjectStack application

---
Expand Down
4 changes: 2 additions & 2 deletions content/docs/kernel/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The ObjectKernel runtime — plugin host, event bus, service regist

# 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](/docs/protocol/objectos) 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 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](/docs/protocol/kernel) 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

Expand Down Expand Up @@ -40,6 +40,6 @@ The kernel is ObjectStack's runtime: it loads your metadata artifact, hosts plug

## Related

- **Spec:** [System Lifecycle](/docs/protocol/objectos/lifecycle), [Runtime Capabilities](/docs/protocol/objectos/runtime-capabilities), [Metadata Service](/docs/protocol/objectos/metadata-service)
- **Spec:** [System Lifecycle](/docs/protocol/kernel/lifecycle), [Runtime Capabilities](/docs/protocol/kernel/runtime-capabilities), [Metadata Service](/docs/protocol/kernel/metadata-service)
- **Schema reference:** [Kernel](/docs/references/kernel), [System](/docs/references/system), [Contracts](/docs/references/contracts)
- **Neighbors:** building and packaging plugins is covered in [Plugins & Packages](/docs/plugins); running the kernel in production is covered in [Deployment & Operations](/docs/deployment).
2 changes: 1 addition & 1 deletion content/docs/plugins/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ObjectStack is built on a **microkernel architecture** where nearly everything b
- **[Package Overview](/docs/plugins/packages)** — All ObjectStack packages, services, drivers, plugins, and adapters
- **[Adding a Metadata Type](/docs/plugins/adding-a-metadata-type)** — Register a new metadata type in the Studio Metadata Admin
- Schema reference: [Kernel](/docs/references/kernel)
- Spec: [Plugin Package Specification](/docs/protocol/objectos/plugin-spec)
- Spec: [Plugin Package Specification](/docs/protocol/kernel/plugin-spec)

---

Expand Down
2 changes: 1 addition & 1 deletion content/docs/protocol/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The ObjectStack Protocol defines three interconnected layers that together descr
<Cards>
<Card icon={<Database />} title="ObjectQL: Data Protocol" href="/docs/protocol/objectql" description="Schema definitions, field types, state machines, query syntax, and data security." />
<Card icon={<Layout />} title="ObjectUI: UI Protocol" href="/docs/protocol/objectui" description="Server-driven UI contracts for layouts, widgets, forms, and actions." />
<Card icon={<Cpu />} title="Kernel: System Protocol" href="/docs/protocol/objectos" description="Runtime lifecycle, HTTP/realtime protocols, plugins, configuration, and i18n." />
<Card icon={<Cpu />} title="Kernel: System Protocol" href="/docs/protocol/kernel" description="Runtime lifecycle, HTTP/realtime protocols, plugins, configuration, and i18n." />
</Cards>

## Design Principles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -898,4 +898,4 @@ ObjectStack configuration resolution:
- **Boot-time validation** using Zod schemas
- **Inspection tools** for debugging config issues

**Next:** Learn about internationalization in [i18n Standard](/docs/protocol/objectos/i18n-standard).
**Next:** Learn about internationalization in [i18n Standard](/docs/protocol/kernel/i18n-standard).
Original file line number Diff line number Diff line change
Expand Up @@ -1047,12 +1047,12 @@ for (let i = 0; i < 1000000; i++) {
icon={<Radio />}
title="HTTP API"
description="Learn REST endpoint conventions and CRUD operations"
href="/docs/protocol/objectos/http-protocol"
href="/docs/protocol/kernel/http-protocol"
/>
<Card
icon={<Zap />}
title="Real-Time Protocols"
description="Implement WebSocket subscriptions and event streaming"
href="/docs/protocol/objectos/realtime-protocol"
href="/docs/protocol/kernel/realtime-protocol"
/>
</Cards>
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ X-RateLimit-Reset: 1705324800
}
```

See [Error Handling](/docs/protocol/objectos/error-handling) for more details.
See [Error Handling](/docs/protocol/kernel/error-handling) for more details.

## Best Practices

Expand Down Expand Up @@ -923,12 +923,12 @@ if (!response.ok) {
icon={<Zap />}
title="Real-Time Protocols"
description="Learn WebSocket subscriptions and event streaming"
href="/docs/protocol/objectos/realtime-protocol"
href="/docs/protocol/kernel/realtime-protocol"
/>
<Card
icon={<AlertCircle />}
title="Error Handling"
description="Master error codes and debugging strategies"
href="/docs/protocol/objectos/error-handling"
href="/docs/protocol/kernel/error-handling"
/>
</Cards>
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,25 @@ Traditional enterprise platforms tightly couple infrastructure concerns with bus
<Card
icon={<Layers />}
title="Lifecycle Management"
href="/docs/protocol/objectos/lifecycle"
href="/docs/protocol/kernel/lifecycle"
description="Boot sequence, plugin installation, zero-downtime upgrades, rollback strategies"
/>
<Card
icon={<Package />}
title="Plugin Specification"
href="/docs/protocol/objectos/plugin-spec"
href="/docs/protocol/kernel/plugin-spec"
description="Manifest structure, dependency graph, versioning semantics, distribution format"
/>
<Card
icon={<Cog />}
title="Configuration Resolution"
href="/docs/protocol/objectos/config-resolution"
href="/docs/protocol/kernel/config-resolution"
description="Merge strategies, precedence rules, environment overrides, tenant isolation"
/>
<Card
icon={<Globe />}
title="i18n Standard"
href="/docs/protocol/objectos/i18n-standard"
href="/docs/protocol/kernel/i18n-standard"
description="Translation bundles, locale resolution, date/number formatting, dynamic loading"
/>
</Cards>
Expand Down Expand Up @@ -491,25 +491,25 @@ const message = context.i18n.t('slack.button.send');
<Card
icon={<Layers />}
title="Learn Lifecycle Management"
href="/docs/protocol/objectos/lifecycle"
href="/docs/protocol/kernel/lifecycle"
description="Understand boot sequence, installation, upgrade strategies, and rollback procedures"
/>
<Card
icon={<Package />}
title="Build Your First Plugin"
href="/docs/protocol/objectos/plugin-spec"
href="/docs/protocol/kernel/plugin-spec"
description="Create a plugin manifest, define dependencies, and implement lifecycle hooks"
/>
<Card
icon={<Cog />}
title="Master Configuration"
href="/docs/protocol/objectos/config-resolution"
href="/docs/protocol/kernel/config-resolution"
description="Learn merge strategies, environment overrides, and tenant-specific settings"
/>
<Card
icon={<Globe />}
title="Internationalize Your App"
href="/docs/protocol/objectos/i18n-standard"
href="/docs/protocol/kernel/i18n-standard"
description="Add multi-language support with translation bundles and locale resolution"
/>
</Cards>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,4 +792,4 @@ ObjectStack lifecycle management provides:
- **Automatic Rollback:** Failed upgrades auto-revert to previous version
- **Health Monitoring:** Built-in health checks validate system state

**Next:** Learn how to define plugin manifests in [Plugin Specification](/docs/protocol/objectos/plugin-spec).
**Next:** Learn how to define plugin manifests in [Plugin Specification](/docs/protocol/kernel/plugin-spec).
Original file line number Diff line number Diff line change
Expand Up @@ -952,4 +952,4 @@ Plugin packages in ObjectStack:
- **Lifecycle-aware:** Hooks for install, upgrade, boot, and uninstall
- **NPM-compatible:** Distribute via NPM or `.osplugin` archives

**Next:** Learn how configuration is resolved in [Configuration Resolution](/docs/protocol/objectos/config-resolution).
**Next:** Learn how configuration is resolved in [Configuration Resolution](/docs/protocol/kernel/config-resolution).
Original file line number Diff line number Diff line change
Expand Up @@ -1026,12 +1026,12 @@ WebSocket messages are rate-limited:
icon={<Radio />}
title="HTTP Protocol"
description="Learn REST endpoint conventions and CRUD operations"
href="/docs/protocol/objectos/http-protocol"
href="/docs/protocol/kernel/http-protocol"
/>
<Card
icon={<AlertCircle />}
title="Error Handling"
description="Master error codes and debugging strategies"
href="/docs/protocol/objectos/error-handling"
href="/docs/protocol/kernel/error-handling"
/>
</Cards>
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,6 @@ export function SemanticSearch() { /* ... */ }

- [ObjectQL Reference](/docs/protocol/objectql)
- [ObjectUI Reference](/docs/protocol/objectui)
- [ObjectStack Reference](/docs/protocol/objectos)
- [ObjectStack Reference](/docs/protocol/kernel)
- [API Discovery](/docs/references/api/discovery)
- [Driver Capabilities](/docs/references/data/driver)
2 changes: 1 addition & 1 deletion content/docs/protocol/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"diagram",
"objectql",
"objectui",
"objectos",
"kernel",
"knowledge",
"backward-compatibility"
]
Expand Down
2 changes: 1 addition & 1 deletion content/docs/protocol/objectui/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -566,5 +566,5 @@ Using ObjectUI to build applications?
### Related Protocols

- **[ObjectQL (Data Protocol)](/docs/protocol/objectql)** - Define objects and queries
- **[ObjectOS (System Protocol)](/docs/protocol/objectos)** - Runtime configuration
- **[ObjectOS (System Protocol)](/docs/protocol/kernel)** - Runtime configuration
- **[UI Reference](/docs/references/ui)** - Complete API reference
33 changes: 31 additions & 2 deletions content/docs/references/data/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ API Operations Enum
## TypeScript Usage

```typescript
import { ApiMethod, Index, ObjectAccessConfig, ObjectCapabilities, ObjectExternalBinding, ObjectFieldGroup, ObjectOwnershipEnum, ObjectRequiredPermissions, PerOperationRequiredPermissions, SoftDeleteConfig, TenancyConfig, VersioningConfig } from '@objectstack/spec/data';
import type { ApiMethod, Index, ObjectAccessConfig, ObjectCapabilities, ObjectExternalBinding, ObjectFieldGroup, ObjectOwnershipEnum, ObjectRequiredPermissions, PerOperationRequiredPermissions, SoftDeleteConfig, TenancyConfig, VersioningConfig } from '@objectstack/spec/data';
import { ApiMethod, Index, Lifecycle, LifecycleClass, ObjectAccessConfig, ObjectCapabilities, ObjectExternalBinding, ObjectFieldGroup, ObjectOwnershipEnum, ObjectRequiredPermissions, PerOperationRequiredPermissions, SoftDeleteConfig, TenancyConfig, VersioningConfig } from '@objectstack/spec/data';
import type { ApiMethod, Index, Lifecycle, LifecycleClass, ObjectAccessConfig, ObjectCapabilities, ObjectExternalBinding, ObjectFieldGroup, ObjectOwnershipEnum, ObjectRequiredPermissions, PerOperationRequiredPermissions, SoftDeleteConfig, TenancyConfig, VersioningConfig } from '@objectstack/spec/data';

// Validate data
const result = ApiMethod.parse(data);
Expand Down Expand Up @@ -58,6 +58,35 @@ const result = ApiMethod.parse(data);
| **partial** | `string` | optional | Partial index condition (SQL WHERE clause for conditional indexes) |


---

## Lifecycle

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **class** | `Enum<'record' \| 'audit' \| 'telemetry' \| 'transient' \| 'event'>` | ✅ | Persistence contract: record (business truth, permanent) | audit (compliance ledger) | telemetry (high-freq log) | transient (ephemeral state) | event (bus messages). |
| **retention** | `Object` | optional | Age-based retention window enforced by the LifecycleService Reaper. |
| **ttl** | `Object` | optional | Per-row TTL auto-expiry (transient/event classes). |
| **storage** | `Object` | optional | Physical storage strategy for high-frequency telemetry (LifecycleService Rotator). |
| **archive** | `Object` | optional | Cold-store archival (LifecycleService Archiver) — audit-class hot→cold hand-off. |
| **reclaim** | `boolean` | optional | Run driver space reclamation (SQLite incremental_vacuum) after sweeping this object. Default true for non-record classes. |


---

## LifecycleClass

### Allowed Values

* `record`
* `audit`
* `telemetry`
* `transient`
* `event`


---

## ObjectAccessConfig
Expand Down
1 change: 1 addition & 0 deletions content/docs/references/identity/position.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const result = Position.parse(data);
| **name** | `string` | ✅ | Unique position name (lowercase snake_case) |
| **label** | `string` | ✅ | Display label (e.g. VP of Sales) |
| **description** | `string` | optional | |
| **delegatable** | `boolean` | ✅ | ADR-0091 D3: holders may self-service delegate this position, time-boxed (default false). |


---
Expand Down
2 changes: 2 additions & 0 deletions content/docs/references/kernel/execution-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const result = ExecutionContext.parse(data);
| **positions** | `string[]` | ✅ | |
| **principalKind** | `Enum<'human' \| 'agent' \| 'service' \| 'guest' \| 'system'>` | optional | |
| **audience** | `Enum<'internal' \| 'external'>` | optional | |
| **posture** | `Enum<'PLATFORM_ADMIN' \| 'TENANT_ADMIN' \| 'MEMBER' \| 'EXTERNAL'>` | optional | ADR-0095 D2 posture rung — PLATFORM_ADMIN crosses the tenant wall where object posture permits; TENANT_ADMIN sees all rows in the org; MEMBER gets business RLS; EXTERNAL sees only explicitly shared rows. |
| **onBehalfOf** | `Object` | optional | |
| **permissions** | `string[]` | ✅ | |
| **systemPermissions** | `string[]` | optional | |
Expand All @@ -65,6 +66,7 @@ const result = ExecutionContext.parse(data);
| **rlsMembership** | `Record<string, string[]>` | optional | |
| **isSystem** | `boolean` | ✅ | |
| **skipTriggers** | `boolean` | optional | |
| **skipAutomations** | `boolean` | optional | |
| **oauthScopes** | `string[]` | optional | |
| **accessToken** | `string` | optional | |
| **transaction** | `any` | optional | |
Expand Down
Loading