Skip to content

Commit e19d235

Browse files
Copilothotlong
andcommitted
Update documentation for @objectstack/spec v0.4.1
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 0e38798 commit e19d235

File tree

3 files changed

+75
-16
lines changed

3 files changed

+75
-16
lines changed

docs/SPEC_REFACTORING.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Overview
44

5-
This document describes the refactoring of ObjectOS to align with the [@objectstack/spec](https://github.com/objectstack-ai/spec) protocol version 0.3.3.
5+
This document describes the alignment of ObjectOS with the [@objectstack/spec](https://github.com/objectstack-ai/spec) protocol.
6+
7+
**Current Version:** v0.4.1 (Updated: 2026-01-27)
8+
**Previous Version:** v0.3.3
69

710
## What is @objectstack/spec?
811

@@ -24,31 +27,34 @@ The specification is organized into five namespaces:
2427
- `Query` (AST), `Driver` (Interface), `Datasource`
2528
- `Permission`, `Sharing`, `Flow`
2629

27-
### 2. Kernel Protocol (`@objectstack/spec/kernel`)
28-
*Plugin System & Runtime*
29-
- `Manifest` - Plugin configuration
30+
### 2. System Protocol (`@objectstack/spec/system`)
31+
*Plugin System, Runtime Infrastructure & Security*
32+
- `Manifest` - Plugin configuration with contribution points
3033
- `Plugin` - Lifecycle hooks (onInstall, onEnable, onDisable, onUninstall)
31-
- `Context` - Runtime context available to plugins
34+
- `Context` - Runtime context available to plugins (KernelContext, PluginContextData)
3235
- `Logger` - Structured logging
33-
34-
### 3. System Protocol (`@objectstack/spec/system`)
35-
*Runtime Infrastructure & Security*
3636
- `Audit` - Audit logging and event tracking
3737
- `Events` - Event bus and handlers
3838
- `Job` - Scheduled jobs and background tasks
39-
- `Translation` - I18n support
4039

41-
### 4. UI Protocol (`@objectstack/spec/ui`)
40+
**Note:** In v0.4.1, the Kernel Protocol was merged into the System Protocol for better organization.
41+
42+
### 3. UI Protocol (`@objectstack/spec/ui`)
4243
*Presentation & Interaction*
4344
- `App`, `Page`, `View` (Grid/Kanban)
4445
- `Dashboard` (Widgets), `Report`
4546
- `Action` (Triggers)
4647

47-
### 5. API Protocol (`@objectstack/spec/api`)
48+
### 4. API Protocol (`@objectstack/spec/api`)
4849
*Connectivity & Contracts*
4950
- `Contract` (DTOs), `Endpoint` (Gateway)
5051
- `Discovery` (Metadata), `Realtime` (Socket)
5152

53+
### 5. Auth Protocol (`@objectstack/spec/auth`)
54+
*Authentication & Authorization*
55+
- `User`, `Session`, `Role`
56+
- `Permission`, `Token`
57+
5258
## Changes Made
5359

5460
### 1. Dependencies

packages/kernel/CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# @objectos/kernel
22

3+
## 0.2.1 (2026-01-27)
4+
5+
### Minor Changes
6+
7+
- **Protocol Upgrade**: Upgraded to @objectstack/spec v0.4.1
8+
- Updated all imports from `@objectstack/spec/kernel` to `@objectstack/spec/system`
9+
- Plugin manifest schema updated to use `objects` glob patterns instead of inline `definitions`
10+
- Added support for `contributes` section for extension points (actions, events, field types, etc.)
11+
- Improved namespace organization following the new protocol structure
12+
13+
### Breaking Changes
14+
15+
- **Manifest Schema**: The plugin manifest structure has changed in v0.4.1
16+
- `definitions.objects` is no longer supported
17+
- Use `objects: ['./objects/*.object.yml']` glob patterns to reference object files
18+
- Use `contributes` section to register actions, events, and other extension points
19+
20+
### Migration Guide
21+
22+
If you have existing plugins, update your manifest from:
23+
24+
```typescript
25+
// Old (v0.3.3)
26+
const manifest = {
27+
id: 'com.example.plugin',
28+
version: '1.0.0',
29+
type: 'plugin',
30+
name: 'My Plugin',
31+
definitions: {
32+
objects: {
33+
my_object: { /* inline definition */ }
34+
}
35+
}
36+
};
37+
```
38+
39+
To:
40+
41+
```typescript
42+
// New (v0.4.1)
43+
const manifest = {
44+
id: 'com.example.plugin',
45+
version: '1.0.0',
46+
type: 'plugin',
47+
name: 'My Plugin',
48+
objects: ['./objects/*.object.yml'], // Reference files with glob patterns
49+
contributes: {
50+
actions: [{ name: 'myAction', label: 'My Action' }],
51+
events: ['my_object.created']
52+
}
53+
};
54+
```
55+
356
## 0.2.0 (2026-01-17)
457

558
### Minor Changes

packages/kernel/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The core runtime engine for ObjectOS - a metadata-driven platform built on the [
66

77
`@objectos/kernel` is the execution engine that powers ObjectOS. It extends ObjectQL with application-specific capabilities, providing:
88

9-
- **Spec-Compliant Types**: Built on `@objectstack/spec` for protocol consistency
9+
- **Spec-Compliant Types**: Built on `@objectstack/spec` v0.4.1 for protocol consistency
1010
- **Metadata Processing**: Parse and validate object definitions, apps, and data files
1111
- **Plugin Lifecycle**: Standardized hooks (onInstall, onEnable, onDisable, onUninstall)
1212
- **Permission Enforcement**: Apply role-based access control and field-level security
@@ -15,11 +15,11 @@ The core runtime engine for ObjectOS - a metadata-driven platform built on the [
1515

1616
## Protocol Compliance
1717

18-
This package implements the **@objectstack/spec** protocol:
18+
This package implements the **@objectstack/spec v0.4.1** protocol:
1919

20-
- **Kernel Protocol** (`@objectstack/spec/kernel`): Plugin lifecycle, manifests, context
20+
- **System Protocol** (`@objectstack/spec/system`): Plugin lifecycle, manifests, context, kernel infrastructure
2121
- **Data Protocol** (`@objectstack/spec/data`): Object schemas, fields, queries
22-
- **System Protocol** (`@objectstack/spec/system`): Audit, events, jobs
22+
- **API Protocol** (`@objectstack/spec/api`): REST/GraphQL contracts, endpoints, discovery
2323

2424
All TypeScript types are imported from the spec to ensure consistency across the ecosystem.
2525

@@ -28,7 +28,7 @@ import type {
2828
PluginDefinition,
2929
PluginContextData,
3030
ObjectStackManifest
31-
} from '@objectstack/spec/kernel';
31+
} from '@objectstack/spec/system';
3232

3333
import type {
3434
ServiceObject,

0 commit comments

Comments
 (0)