From 8f1725c31c3d553a5fbce2a401ed11cd512a56d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:09:58 +0000 Subject: [PATCH 1/2] Initial plan From 92b0ce4c46e7c69be4eccf880db66a8851edca71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:13:56 +0000 Subject: [PATCH 2/2] Add gateway and adapter package types to manifest schema Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- .../references/system/manifest/Manifest.mdx | 2 +- .../json-schema/hub/ComposerResponse.json | 5 +- .../spec/json-schema/system/Manifest.json | 5 +- packages/spec/src/system/manifest.test.ts | 80 ++++++++++++++++++- packages/spec/src/system/manifest.zod.ts | 13 +-- 5 files changed, 96 insertions(+), 9 deletions(-) diff --git a/content/docs/references/system/manifest/Manifest.mdx b/content/docs/references/system/manifest/Manifest.mdx index 2d411d92f..f4633e993 100644 --- a/content/docs/references/system/manifest/Manifest.mdx +++ b/content/docs/references/system/manifest/Manifest.mdx @@ -9,7 +9,7 @@ description: Manifest Schema Reference | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique package identifier (reverse domain style) | | **version** | `string` | ✅ | Package version (semantic versioning) | -| **type** | `Enum<'app' \| 'plugin' \| 'driver' \| 'module'>` | ✅ | Type of package | +| **type** | `Enum<'app' \| 'plugin' \| 'driver' \| 'module' \| 'objectql' \| 'gateway' \| 'adapter'>` | ✅ | Type of package | | **name** | `string` | ✅ | Human-readable package name | | **description** | `string` | optional | Package description | | **permissions** | `string[]` | optional | Array of required permission strings | diff --git a/packages/spec/json-schema/hub/ComposerResponse.json b/packages/spec/json-schema/hub/ComposerResponse.json index 003cda741..bc7f6a74a 100644 --- a/packages/spec/json-schema/hub/ComposerResponse.json +++ b/packages/spec/json-schema/hub/ComposerResponse.json @@ -25,7 +25,10 @@ "app", "plugin", "driver", - "module" + "module", + "objectql", + "gateway", + "adapter" ], "description": "Type of package" }, diff --git a/packages/spec/json-schema/system/Manifest.json b/packages/spec/json-schema/system/Manifest.json index ef7dd8499..6e0998b92 100644 --- a/packages/spec/json-schema/system/Manifest.json +++ b/packages/spec/json-schema/system/Manifest.json @@ -19,7 +19,10 @@ "app", "plugin", "driver", - "module" + "module", + "objectql", + "gateway", + "adapter" ], "description": "Type of package" }, diff --git a/packages/spec/src/system/manifest.test.ts b/packages/spec/src/system/manifest.test.ts index 0512bc64b..0b6b3eb20 100644 --- a/packages/spec/src/system/manifest.test.ts +++ b/packages/spec/src/system/manifest.test.ts @@ -39,7 +39,7 @@ describe('ManifestSchema', () => { }); it('should accept all package types', () => { - const types = ['app', 'plugin', 'driver', 'module'] as const; + const types = ['app', 'plugin', 'driver', 'module', 'objectql', 'gateway', 'adapter'] as const; types.forEach(type => { const manifest = { @@ -258,6 +258,84 @@ describe('ManifestSchema', () => { expect(() => ManifestSchema.parse(utilModule)).not.toThrow(); }); + + it('should accept objectql engine manifest', () => { + const objectqlEngine: ObjectStackManifest = { + id: 'com.objectstack.engine.objectql', + version: '2.0.0', + type: 'objectql', + name: 'ObjectQL Engine', + description: 'Core data layer implementation with query AST and validation', + }; + + expect(() => ManifestSchema.parse(objectqlEngine)).not.toThrow(); + }); + + it('should accept gateway manifest for GraphQL', () => { + const graphqlGateway: ObjectStackManifest = { + id: 'com.objectstack.gateway.graphql', + version: '1.0.0', + type: 'gateway', + name: 'GraphQL Gateway', + description: 'GraphQL API protocol gateway for ObjectStack', + permissions: [ + 'system.api.configure', + ], + }; + + expect(() => ManifestSchema.parse(graphqlGateway)).not.toThrow(); + }); + + it('should accept gateway manifest for REST', () => { + const restGateway: ObjectStackManifest = { + id: 'com.objectstack.gateway.rest', + version: '1.0.0', + type: 'gateway', + name: 'REST API Gateway', + description: 'RESTful API protocol gateway for ObjectStack', + }; + + expect(() => ManifestSchema.parse(restGateway)).not.toThrow(); + }); + + it('should accept adapter manifest for Express', () => { + const expressAdapter: ObjectStackManifest = { + id: 'com.objectstack.adapter.express', + version: '4.0.0', + type: 'adapter', + name: 'Express Adapter', + description: 'Express.js HTTP server adapter for ObjectStack runtime', + configuration: { + title: 'Express Server Settings', + properties: { + port: { + type: 'number', + default: 3000, + description: 'HTTP server port', + }, + corsEnabled: { + type: 'boolean', + default: true, + description: 'Enable CORS middleware', + }, + }, + }, + }; + + expect(() => ManifestSchema.parse(expressAdapter)).not.toThrow(); + }); + + it('should accept adapter manifest for Hono', () => { + const honoAdapter: ObjectStackManifest = { + id: 'com.objectstack.adapter.hono', + version: '1.0.0', + type: 'adapter', + name: 'Hono Adapter', + description: 'Hono ultrafast HTTP server adapter for ObjectStack runtime', + }; + + expect(() => ManifestSchema.parse(honoAdapter)).not.toThrow(); + }); }); describe('Reverse Domain Notation', () => { diff --git a/packages/spec/src/system/manifest.zod.ts b/packages/spec/src/system/manifest.zod.ts index dbc5a7b28..c8030a61d 100644 --- a/packages/spec/src/system/manifest.zod.ts +++ b/packages/spec/src/system/manifest.zod.ts @@ -20,12 +20,15 @@ export const ManifestSchema = z.object({ /** * Type of the package in the ObjectStack ecosystem. - * - app: Standalone application - * - plugin: Extension to ObjectOS - * - driver: Low-level integration driver - * - module: Reusable code module + * - app: Business application package + * - plugin: General-purpose functionality extension + * - driver: Southbound interface - Database/external service adapter (Postgres, MongoDB, S3) + * - module: Reusable code library/shared module + * - objectql: Core engine - Data layer implementation + * - gateway: Northbound interface - API protocol entry point (GraphQL, REST, RPC, OData) + * - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless) */ - type: z.enum(['app', 'plugin', 'driver', 'module']).describe('Type of package'), + type: z.enum(['app', 'plugin', 'driver', 'module', 'objectql', 'gateway', 'adapter']).describe('Type of package'), /** * Human-readable name of the package.