Skip to content

Commit 6c114c0

Browse files
os-zhuangclaude
andauthored
refactor(spec): retire 'ObjectOS' from the spec's public surface — Kernel naming (#2963)
* refactor(spec): retire 'ObjectOS' from the spec's public surface — Kernel naming Completes the layer-name retirement (#2955) inside packages/spec: - Public API renames with deprecated aliases (kept one release): ObjectOSCapabilitiesSchema → KernelCapabilitiesSchema, ObjectOSCapabilities → KernelCapabilities, ObjectOSKernel → IKernel (PluginContext.os now typed IKernel). Alias identity is regression-tested. - TSDoc/comments: layer-actor wording now 'the ObjectStack runtime' / 'Kernel' (plugin contract, constants, environment-artifact). Product usages in the Cloud domain (ObjectOS Cloud, 'Register → Instant ObjectOS', app-store) are deliberately unchanged. - Test fixtures: discovery-response name fixture 'ObjectOS' → 'ObjectStack'. - references/: regenerated; only system/environment-artifact.mdx is from this change. The regen also surfaced 7 files of pre-existing drift (ADR-0091/0095 era) which are deliberately NOT included here — that drift belongs to the changes that caused it. - Changeset: minor, with FROM → TO migration notes. Verified: spec tsc --noEmit clean; vitest stack.test + api/protocol.test 113/113 green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162o68e5w3bpUBEVRQboUGG * fix(spec): keep ObjectOSKernel as an interface extension; commit api-surface snapshot The api-surface guard flagged interface→type as a removal (breaking). ObjectOSKernel is now '/** @deprecated */ interface ObjectOSKernel extends IKernel {}' — declaration merging and interface identity are preserved, so the surface records additions only: + KernelCapabilitiesSchema (const), + KernelCapabilities (type), + IKernel (interface). check:api-surface green after a full dist build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162o68e5w3bpUBEVRQboUGG --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent fdfe1d9 commit 6c114c0

12 files changed

Lines changed: 73 additions & 42 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
Retire the "ObjectOS" layer name from the spec's public surface — the control layer is the **Kernel**; ObjectOS now exclusively names the commercial runtime environment.
6+
7+
Renames (deprecated aliases kept for one release, so existing imports keep compiling):
8+
9+
- `ObjectOSCapabilitiesSchema``KernelCapabilitiesSchema`
10+
- `ObjectOSCapabilities` (type) → `KernelCapabilities`
11+
- `ObjectOSKernel` (interface) → `IKernel` (`PluginContext.os` is now typed as `IKernel`)
12+
13+
Migration: replace the old names with the new ones — a find/replace of the three identifiers above is sufficient; runtime behavior, schema shapes, and JSON output are unchanged. TSDoc and generated reference docs now say "the ObjectStack runtime" / "Kernel" instead of "ObjectOS" (product mentions like ObjectOS Cloud in the Cloud protocol domain are unchanged).

content/docs/references/system/environment-artifact.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Environment Artifact protocol schemas
99

1010
Defines the immutable envelope produced by `objectstack compile` and consumed
1111

12-
by ObjectOS at boot. The artifact carries everything an ObjectOS instance
12+
by the ObjectStack runtime at boot. The artifact carries everything a runtime instance
1313

1414
needs to hydrate an environment kernel without reading control-plane DB rows
1515

packages/spec/api-surface.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"ExpressionSchema (const)",
4545
"F (const)",
4646
"GUEST_POSITION (const)",
47+
"KernelCapabilities (type)",
48+
"KernelCapabilitiesSchema (const)",
4749
"MAP_SUPPORTED_FIELDS (const)",
4850
"METADATA_ALIASES (const)",
4951
"MIGRATIONS_BY_MAJOR (const)",
@@ -799,6 +801,7 @@
799801
"HttpServerConfig (type)",
800802
"HttpServerConfigInput (type)",
801803
"HttpServerConfigSchema (const)",
804+
"IKernel (interface)",
802805
"ISettingsCapability (interface)",
803806
"ISettingsClient (interface)",
804807
"InAppNotification (type)",

packages/spec/src/api/protocol.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ describe('GetDiscoveryResponseSchema (capabilities)', () => {
355355

356356
it('should accept full DiscoverySchema-compatible response', () => {
357357
const result = GetDiscoveryResponseSchema.safeParse({
358-
name: 'ObjectOS',
358+
name: 'ObjectStack',
359359
version: '1.0.0',
360360
environment: 'development',
361361
routes: { data: '/api/v1/data', metadata: '/api/v1/meta' },
@@ -366,7 +366,7 @@ describe('GetDiscoveryResponseSchema (capabilities)', () => {
366366
});
367367
expect(result.success).toBe(true);
368368
if (result.success) {
369-
expect(result.data.name).toBe('ObjectOS');
369+
expect(result.data.name).toBe('ObjectStack');
370370
expect(result.data.environment).toBe('development');
371371
}
372372
});

packages/spec/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export {
6363
ObjectStackCapabilitiesSchema,
6464
ObjectQLCapabilitiesSchema,
6565
ObjectUICapabilitiesSchema,
66+
KernelCapabilitiesSchema,
6667
ObjectOSCapabilitiesSchema
6768
} from './stack.zod';
6869

packages/spec/src/stack.test.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { describe, it, expect } from 'vitest';
22
import {
33
ObjectQLCapabilitiesSchema,
44
ObjectUICapabilitiesSchema,
5-
ObjectOSCapabilitiesSchema,
5+
KernelCapabilitiesSchema,
66
ObjectStackCapabilitiesSchema,
77
ObjectStackDefinitionSchema,
88
defineStack,
99
type ObjectQLCapabilities,
1010
type ObjectUICapabilities,
11-
type ObjectOSCapabilities,
11+
type KernelCapabilities,
1212
type ObjectStackCapabilities,
1313
type ObjectStackDefinitionInput,
1414
} from './stack.zod';
@@ -148,9 +148,14 @@ describe('ObjectUICapabilitiesSchema', () => {
148148
});
149149
});
150150

151-
describe('ObjectOSCapabilitiesSchema', () => {
152-
it('should accept valid ObjectOS capabilities with all features enabled', () => {
153-
const capabilities: ObjectOSCapabilities = {
151+
describe('KernelCapabilitiesSchema', () => {
152+
it('keeps the deprecated ObjectOS aliases pointing at the renamed exports', async () => {
153+
const mod = await import('./stack.zod');
154+
expect(mod.ObjectOSCapabilitiesSchema).toBe(mod.KernelCapabilitiesSchema);
155+
});
156+
157+
it('should accept valid kernel capabilities with all features enabled', () => {
158+
const capabilities: KernelCapabilities = {
154159
version: '1.0.0',
155160
environment: 'production',
156161
restApi: true,
@@ -183,20 +188,20 @@ describe('ObjectOSCapabilitiesSchema', () => {
183188
},
184189
};
185190

186-
expect(() => ObjectOSCapabilitiesSchema.parse(capabilities)).not.toThrow();
191+
expect(() => KernelCapabilitiesSchema.parse(capabilities)).not.toThrow();
187192
});
188193

189194
it('should require version and environment fields', () => {
190-
expect(() => ObjectOSCapabilitiesSchema.parse({})).toThrow();
195+
expect(() => KernelCapabilitiesSchema.parse({})).toThrow();
191196

192197
expect(() =>
193-
ObjectOSCapabilitiesSchema.parse({
198+
KernelCapabilitiesSchema.parse({
194199
version: '1.0.0',
195200
})
196201
).toThrow();
197202

198203
expect(() =>
199-
ObjectOSCapabilitiesSchema.parse({
204+
KernelCapabilitiesSchema.parse({
200205
version: '1.0.0',
201206
environment: 'development',
202207
})
@@ -205,7 +210,7 @@ describe('ObjectOSCapabilitiesSchema', () => {
205210

206211
it('should validate environment enum values', () => {
207212
expect(() =>
208-
ObjectOSCapabilitiesSchema.parse({
213+
KernelCapabilitiesSchema.parse({
209214
version: '1.0.0',
210215
environment: 'invalid',
211216
})
@@ -214,7 +219,7 @@ describe('ObjectOSCapabilitiesSchema', () => {
214219
const validEnvironments = ['development', 'test', 'staging', 'production'];
215220
validEnvironments.forEach((env) => {
216221
expect(() =>
217-
ObjectOSCapabilitiesSchema.parse({
222+
KernelCapabilitiesSchema.parse({
218223
version: '1.0.0',
219224
environment: env,
220225
})
@@ -223,7 +228,7 @@ describe('ObjectOSCapabilitiesSchema', () => {
223228
});
224229

225230
it('should use default values for boolean fields', () => {
226-
const result = ObjectOSCapabilitiesSchema.parse({
231+
const result = KernelCapabilitiesSchema.parse({
227232
version: '1.0.0',
228233
environment: 'development',
229234
});
@@ -236,7 +241,7 @@ describe('ObjectOSCapabilitiesSchema', () => {
236241
});
237242

238243
it('should accept optional limits object', () => {
239-
const withLimits = ObjectOSCapabilitiesSchema.parse({
244+
const withLimits = KernelCapabilitiesSchema.parse({
240245
version: '1.0.0',
241246
environment: 'production',
242247
limits: {
@@ -248,7 +253,7 @@ describe('ObjectOSCapabilitiesSchema', () => {
248253
expect(withLimits.limits?.maxObjects).toBe(500);
249254
expect(withLimits.limits?.apiRateLimit).toBe(100);
250255

251-
const withoutLimits = ObjectOSCapabilitiesSchema.parse({
256+
const withoutLimits = KernelCapabilitiesSchema.parse({
252257
version: '1.0.0',
253258
environment: 'development',
254259
});

packages/spec/src/stack.zod.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,16 +1229,16 @@ export function composeStacks(
12291229
/**
12301230
* 2. RUNTIME CAPABILITIES PROTOCOL (Dynamic)
12311231
* ----------------------------------------------------------------------
1232-
* Describes what the ObjectOS Platform *is* and *can do*.
1232+
* Describes what the ObjectStack platform *is* and *can do*.
12331233
* AI Agents read this to understand:
12341234
* - What APIs are available?
12351235
* - What features are enabled?
12361236
* - What limits exist?
1237-
*
1237+
*
12381238
* The capabilities are organized by subsystem for clarity:
12391239
* - ObjectQL: Data Layer capabilities
1240-
* - ObjectUI: User Interface Layer capabilities
1241-
* - ObjectOS: System Layer capabilities
1240+
* - ObjectUI: User Interface Layer capabilities
1241+
* - Kernel: System Layer capabilities
12421242
*/
12431243

12441244
/**
@@ -1322,17 +1322,17 @@ export const ObjectUICapabilitiesSchema = lazySchema(() => z.object({
13221322
}));
13231323

13241324
/**
1325-
* ObjectOS Capabilities Schema
1326-
*
1325+
* Kernel Capabilities Schema
1326+
*
13271327
* Defines capabilities related to the System Layer:
13281328
* - Runtime environment and platform features
13291329
* - API and integration capabilities
13301330
* - Security and multi-tenancy
13311331
* - System services (events, jobs, audit)
13321332
*/
1333-
export const ObjectOSCapabilitiesSchema = lazySchema(() => z.object({
1333+
export const KernelCapabilitiesSchema = lazySchema(() => z.object({
13341334
/** System Identity */
1335-
version: z.string().describe('ObjectOS Kernel Version'),
1335+
version: z.string().describe('Kernel version'),
13361336
environment: z.enum(['development', 'test', 'staging', 'production']),
13371337

13381338
/** API Surface */
@@ -1424,14 +1424,19 @@ export const ObjectStackCapabilitiesSchema = lazySchema(() => z.object({
14241424
/** User Interface Layer Capabilities (ObjectUI) */
14251425
ui: ObjectUICapabilitiesSchema.describe('UI Layer capabilities'),
14261426

1427-
/** System/Runtime Layer Capabilities (ObjectOS) */
1428-
system: ObjectOSCapabilitiesSchema.describe('System/Runtime Layer capabilities'),
1427+
/** System/Runtime Layer Capabilities (Kernel) */
1428+
system: KernelCapabilitiesSchema.describe('System/Runtime Layer capabilities'),
14291429
}));
14301430

14311431
export type ObjectQLCapabilities = z.infer<typeof ObjectQLCapabilitiesSchema>;
14321432
export type ObjectUICapabilities = z.infer<typeof ObjectUICapabilitiesSchema>;
1433-
export type ObjectOSCapabilities = z.infer<typeof ObjectOSCapabilitiesSchema>;
1433+
export type KernelCapabilities = z.infer<typeof KernelCapabilitiesSchema>;
14341434
export type ObjectStackCapabilities = z.infer<typeof ObjectStackCapabilitiesSchema>;
14351435

1436+
/** @deprecated Renamed — use {@link KernelCapabilitiesSchema}. The "ObjectOS" layer name is retired; ObjectOS now names the commercial runtime environment. */
1437+
export const ObjectOSCapabilitiesSchema = KernelCapabilitiesSchema;
1438+
/** @deprecated Renamed — use {@link KernelCapabilities}. */
1439+
export type ObjectOSCapabilities = KernelCapabilities;
1440+
14361441

14371442

packages/spec/src/system/constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* ObjectStack Convention Constants
55
*
66
* This package defines the "Law of Location" - where things must be in ObjectStack packages.
7-
* These paths are used by ObjectOS Runtime, ObjectStack CLI, and ObjectStudio IDE.
7+
* These paths are used by the ObjectStack runtime, CLI, and Studio IDE.
88
*
99
* Guiding Principle: "Strict Types, No Logic"
1010
* This package has NO database connections, NO UI components, and NO runtime business logic.

packages/spec/src/system/constants/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* These define the "Law of Location" - where things must be in ObjectStack packages.
66
*
77
* These paths are the source of truth used by:
8-
* - ObjectOS Runtime (to locate package components)
8+
* - the ObjectStack runtime (to locate package components)
99
* - ObjectStack CLI (to scaffold and validate packages)
1010
* - ObjectStudio IDE (to provide intelligent navigation and validation)
1111
*/

packages/spec/src/system/environment-artifact.zod.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { z } from 'zod';
66
* # Environment Artifact Format Protocol (v0)
77
*
88
* Defines the immutable envelope produced by `objectstack compile` and consumed
9-
* by ObjectOS at boot. The artifact carries everything an ObjectOS instance
9+
* by the ObjectStack runtime at boot. The artifact carries everything a runtime instance
1010
* needs to hydrate an environment kernel without reading control-plane DB rows
1111
* directly.
1212
*
@@ -49,7 +49,7 @@ export type EnvironmentArtifactHashAlgorithm = z.infer<typeof EnvironmentArtifac
4949

5050
/**
5151
* Content-addressable checksum of the canonical JSON-serialized artifact body
52-
* (everything except the `checksum` field itself). Used by ObjectOS to verify
52+
* (everything except the `checksum` field itself). Used by the runtime to verify
5353
* that the artifact bytes were not tampered with in transit and to key the
5454
* local artifact cache.
5555
*/
@@ -126,7 +126,7 @@ export type EnvironmentArtifactFunction = z.infer<typeof EnvironmentArtifactFunc
126126
// ==========================================
127127

128128
/**
129-
* Plugin/driver requirement entry. ObjectOS uses these to verify that the
129+
* Plugin/driver requirement entry. The runtime uses these to verify that the
130130
* runtime has every plugin the environment depends on before hydrating the kernel.
131131
* Configuration values live in **Deployment Config**, not in the artifact.
132132
*/
@@ -180,7 +180,7 @@ export type EnvironmentArtifactManifest = z.infer<typeof EnvironmentArtifactMani
180180
* artifact envelope to every domain schema bump.
181181
*
182182
* Treat this as a typed bag of arrays keyed by metadata category. Unknown
183-
* categories are passed through (`passthrough()`) so older ObjectOS builds can
183+
* categories are passed through (`passthrough()`) so older runtime builds can
184184
* boot newer artifacts safely if no breaking changes were made.
185185
*/
186186
export const EnvironmentArtifactMetadataSchema = z
@@ -247,7 +247,7 @@ export type EnvironmentArtifactPayloadRef = z.infer<typeof EnvironmentArtifactPa
247247
*
248248
* Produced by `objectstack compile`, served by the Environment Artifact API
249249
* (`GET /api/v1/cloud/environments/:environmentId/artifact`), and consumed by the
250-
* ObjectOS metadata loader to hydrate an environment kernel.
250+
* runtime metadata loader to hydrate an environment kernel.
251251
*
252252
* Required fields (v0):
253253
* - `schemaVersion`: tracks the envelope itself.
@@ -274,7 +274,7 @@ export const EnvironmentArtifactSchema = z
274274

275275
/**
276276
* Monotonic, content-addressable revision id assigned by the control plane
277-
* when the artifact is published. Used as a cache key by ObjectOS and as
277+
* when the artifact is published. Used as a cache key by the runtime and as
278278
* the rollback target by Studio.
279279
*/
280280
commitId: z.string().min(1).describe('Content-addressable revision id'),

0 commit comments

Comments
 (0)