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
2 changes: 1 addition & 1 deletion content/docs/references/system/manifest/Manifest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
5 changes: 4 additions & 1 deletion packages/spec/json-schema/hub/ComposerResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"app",
"plugin",
"driver",
"module"
"module",
"objectql",
"gateway",
"adapter"
],
"description": "Type of package"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/spec/json-schema/system/Manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"app",
"plugin",
"driver",
"module"
"module",
"objectql",
"gateway",
"adapter"
],
"description": "Type of package"
},
Expand Down
80 changes: 79 additions & 1 deletion packages/spec/src/system/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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', () => {
Expand Down
13 changes: 8 additions & 5 deletions packages/spec/src/system/manifest.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading