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: 2 additions & 1 deletion packages/spec/PROTOCOL_MAP.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -155,6 +155,8 @@ This document serves as the **Grand Map** of the ObjectStack specification. It l
| File | Status | Description |
| :--- | :--- | :--- |
| [`protocol.zod.ts`](src/api/protocol.zod.ts) | ⭐ | **Stack Protocol**. valid requests and responses for the platform. |
| [`dispatcher.zod.ts`](src/api/dispatcher.zod.ts) | ⭐ | **HttpDispatcher**. Route-to-service mapping for API routing. |
| [`discovery.zod.ts`](src/api/discovery.zod.ts) | ⭐ | **Service Discovery**. Service registration and API routes discovery. |

CopilotAIFeb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PROTOCOL_MAP marks discovery.zod.ts as “Service registration and API routes discovery”, but src/api/discovery.zod.ts only defines a discovery response (routes + feature flags + locale). Consider rewording this row to avoid implying an unmodeled “service registration” protocol (or link that concept to kernel/service-registry.zod.ts if that’s what you mean).

Suggested change
|[`discovery.zod.ts`](src/api/discovery.zod.ts)||**Service Discovery**. Service registration and API routes discovery. |
|[`discovery.zod.ts`](src/api/discovery.zod.ts)||**API Discovery Response**. Describes available API routes, feature flags, and locale metadata. |

Copilot uses AI. Check for mistakes.
Comment on lines 157 to +159

CopilotAIFeb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says Phase 1 infrastructure (schemas + tests) already existed and that only PROTOCOL_MAP needed updates, but this PR also modifies/adds many packages/spec/json-schema/** artifacts (e.g., new DispatcherConfig/DispatcherRoute schemas and CoreServiceName enum expansions). Please either update the PR description to reflect the additional non-doc changes, or drop the generated schema changes if they’re unintended.

Copilot uses AI. Check for mistakes.
| [`endpoint.zod.ts`](src/api/endpoint.zod.ts) | | **API Endpoints**. REST API route definitions. |
| [`graphql.zod.ts`](src/api/graphql.zod.ts) | | **GraphQL**. Schema and resolver configuration. |
| [`rest-server.zod.ts`](src/api/rest-server.zod.ts) | | **REST Server**. REST-specific server settings. |
Expand All@@ -166,7 +168,6 @@ This document serves as the **Grand Map** of the ObjectStack specification. It l
| [`router.zod.ts`](src/api/router.zod.ts) | | **Routing**. API Gateway routing rules. |
| [`http-cache.zod.ts`](src/api/http-cache.zod.ts) | | **HTTP Cache**. Cache-Control headers and CDNs. |
| [`errors.zod.ts`](src/api/errors.zod.ts) | | **Error Handling**. Standard error response formats. |
| [`discovery.zod.ts`](src/api/discovery.zod.ts) | | **Service Discovery**. Service registration for microservices. |
| [`metadata.zod.ts`](src/api/metadata.zod.ts) | | **Metadata API**. Endpoints for schema retrieval. |
| [`odata.zod.ts`](src/api/odata.zod.ts) | | **OData**. OData protocol support. |
| [`batch.zod.ts`](src/api/batch.zod.ts) | | **Batch API**. Bulk request processing. |
Expand Down
20 changes: 20 additions & 0 deletions packages/spec/json-schema/api/ApiCapabilities.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,26 @@
"type": "boolean",
"default": false,
"description": "Is Hub management enabled?"
},
"ai": {
"type": "boolean",
"default": false,
"description": "Is the AI engine enabled?"
},
"workflow": {
"type": "boolean",
"default": false,
"description": "Is the Workflow engine enabled?"
},
"notifications": {
"type": "boolean",
"default": false,
"description": "Is the Notification service enabled?"
},
"i18n": {
"type": "boolean",
"default": false,
"description": "Is the i18n service enabled?"
}
},
"additionalProperties": false
Expand Down
40 changes: 32 additions & 8 deletions packages/spec/json-schema/api/ApiRoutes.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,39 +6,63 @@
"properties": {
"data": {
"type": "string",
"description": "e.g. /api/data"
"description": "e.g. /api/v1/data"
},
"metadata": {
"type": "string",
"description": "e.g. /api/meta"
"description": "e.g. /api/v1/meta"
},
"ui": {
"type": "string",
"description": "e.g. /api/ui"
"description": "e.g. /api/v1/ui"
},
"auth": {
"type": "string",
"description": "e.g. /api/auth"
"description": "e.g. /api/v1/auth"
},
"automation": {
"type": "string",
"description": "e.g. /api/automation"
"description": "e.g. /api/v1/automation"
},
"storage": {
"type": "string",
"description": "e.g. /api/storage"
"description": "e.g. /api/v1/storage"
},
"analytics": {
"type": "string",
"description": "e.g. /api/analytics"
"description": "e.g. /api/v1/analytics"
},
"hub": {
"type": "string",
"description": "e.g. /api/hub"
"description": "e.g. /api/v1/hub"
},
"graphql": {
"type": "string",
"description": "e.g. /graphql"
},
"packages": {
"type": "string",
"description": "e.g. /api/v1/packages"
},
"workflow": {
"type": "string",
"description": "e.g. /api/v1/workflow"
},
"realtime": {
"type": "string",
"description": "e.g. /api/v1/realtime"
},
"notifications": {
"type": "string",
"description": "e.g. /api/v1/notifications"
},
"ai": {
"type": "string",
"description": "e.g. /api/v1/ai"
},
"i18n": {
"type": "string",
"description": "e.g. /api/v1/i18n"
}
},
"required": [
Expand Down
30 changes: 30 additions & 0 deletions packages/spec/json-schema/api/CompileManifestResponse.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -412,6 +412,36 @@
"additionalProperties": false
},
"description": "Query Function contributions"
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"prefix": {
"type": "string",
"pattern": "^\\/",
"description": "API path prefix"
},
"service": {
"type": "string",

CopilotAIFeb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contributes.routes[].service is typed as a free-form string here as well. If this field is meant to integrate with HttpDispatcher routing, it should be constrained to the same CoreServiceName enum used by DispatcherRoute.service, otherwise invalid service names will pass manifest compilation but fail at routing time.

Suggested change
"type": "string",
"$ref": "#/definitions/CoreServiceName",

Copilot uses AI. Check for mistakes.
"description": "Service name this plugin provides"
},
"methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "Protocol method names implemented (e.g. [\"aiNlq\", \"aiChat\"])"
}
},
"required": [
"prefix",
"service"
],
"additionalProperties": false
},
"description": "API route contributions to HttpDispatcher"
}
},
"additionalProperties": false,
Expand Down
30 changes: 30 additions & 0 deletions packages/spec/json-schema/api/DisablePackageResponse.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -353,6 +353,36 @@
"additionalProperties": false
},
"description": "Query Function contributions"
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"prefix": {
"type": "string",
"pattern": "^\\/",
"description": "API path prefix"
},
"service": {
"type": "string",
"description": "Service name this plugin provides"
},
"methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "Protocol method names implemented (e.g. [\"aiNlq\", \"aiChat\"])"
}
},
"required": [
"prefix",
"service"
],
"additionalProperties": false
},
"description": "API route contributions to HttpDispatcher"
}
},
"additionalProperties": false,
Expand Down
60 changes: 52 additions & 8 deletions packages/spec/json-schema/api/Discovery.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,39 +23,63 @@
"properties": {
"data": {
"type": "string",
"description": "e.g. /api/data"
"description": "e.g. /api/v1/data"
},
"metadata": {
"type": "string",
"description": "e.g. /api/meta"
"description": "e.g. /api/v1/meta"
},
"ui": {
"type": "string",
"description": "e.g. /api/ui"
"description": "e.g. /api/v1/ui"
},
"auth": {
"type": "string",
"description": "e.g. /api/auth"
"description": "e.g. /api/v1/auth"
},
"automation": {
"type": "string",
"description": "e.g. /api/automation"
"description": "e.g. /api/v1/automation"
},
"storage": {
"type": "string",
"description": "e.g. /api/storage"
"description": "e.g. /api/v1/storage"
},
"analytics": {
"type": "string",
"description": "e.g. /api/analytics"
"description": "e.g. /api/v1/analytics"
},
"hub": {
"type": "string",
"description": "e.g. /api/hub"
"description": "e.g. /api/v1/hub"
},
"graphql": {
"type": "string",
"description": "e.g. /graphql"
},
"packages": {
"type": "string",
"description": "e.g. /api/v1/packages"
},
"workflow": {
"type": "string",
"description": "e.g. /api/v1/workflow"
},
"realtime": {
"type": "string",
"description": "e.g. /api/v1/realtime"
},
"notifications": {
"type": "string",
"description": "e.g. /api/v1/notifications"
},
"ai": {
"type": "string",
"description": "e.g. /api/v1/ai"
},
"i18n": {
"type": "string",
"description": "e.g. /api/v1/i18n"
}
},
"required": [
Expand DownExpand Up@@ -93,6 +117,26 @@
"type": "boolean",
"default": false,
"description": "Is Hub management enabled?"
},
"ai": {
"type": "boolean",
"default": false,
"description": "Is the AI engine enabled?"
},
"workflow": {
"type": "boolean",
"default": false,
"description": "Is the Workflow engine enabled?"
},
"notifications": {
"type": "boolean",
"default": false,
"description": "Is the Notification service enabled?"
},
"i18n": {
"type": "boolean",
"default": false,
"description": "Is the i18n service enabled?"
}
},
"additionalProperties": false
Expand Down
95 changes: 95 additions & 0 deletions packages/spec/json-schema/api/DispatcherConfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
{
"$ref": "#/definitions/DispatcherConfig",
"definitions": {
"DispatcherConfig": {
"type": "object",
"properties": {
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"prefix": {
"type": "string",
"pattern": "^\\/",
"description": "URL path prefix for routing (e.g. /api/v1/data)"
},
"service": {
"type": "string",
"enum": [
"metadata",
"data",
"auth",
"file-storage",
"search",
"cache",
"queue",
"automation",
"graphql",
"analytics",
"hub",
"realtime",
"job",
"notification",
"ai",
"i18n",
"ui",
"workflow"
],
"description": "Target core service name"
},
"authRequired": {
"type": "boolean",
"default": true,
"description": "Whether authentication is required"
},
"criticality": {
"type": "string",
"enum": [
"required",
"core",
"optional"
],
"default": "optional",
"description": "Service criticality level for unavailability handling"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required permissions for this route namespace"
}
},
"required": [
"prefix",
"service"
],
"additionalProperties": false
},
"description": "Route-to-service mappings"
},
"fallback": {
"type": "string",
"enum": [
"404",
"proxy",
"custom"
],
"default": "404",
"description": "Behavior when no route matches"
},
"proxyTarget": {
"type": "string",
"format": "uri",
"description": "Proxy target URL when fallback is \"proxy\""
}
},
"required": [
"routes"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Loading