@objectstack/spec 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/api/index.d.mts +1 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +28 -159
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/index.mjs +27 -158
  6. package/dist/api/index.mjs.map +1 -1
  7. package/dist/{index-XO8S5zL2.d.ts → index-BvKdac5U.d.ts} +144 -111
  8. package/dist/{index-CgljqRyc.d.mts → index-CR1mxRt5.d.mts} +8 -9
  9. package/dist/{index-BIc5QtGI.d.mts → index-Ch3NLQeS.d.mts} +144 -111
  10. package/dist/{index-DpraDphg.d.ts → index-op6pEi6m.d.ts} +8 -9
  11. package/dist/index.d.mts +3 -15
  12. package/dist/index.d.ts +3 -15
  13. package/dist/index.js +27 -159
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +27 -159
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/system/index.d.mts +1 -1
  18. package/dist/system/index.d.ts +1 -1
  19. package/dist/system/index.js +0 -3
  20. package/dist/system/index.js.map +1 -1
  21. package/dist/system/index.mjs +0 -3
  22. package/dist/system/index.mjs.map +1 -1
  23. package/json-schema/api/ApiCapabilities.json +0 -5
  24. package/json-schema/api/ApiRoutes.json +1 -6
  25. package/json-schema/api/Discovery.json +40 -11
  26. package/json-schema/api/DispatcherConfig.json +0 -1
  27. package/json-schema/api/DispatcherRoute.json +0 -1
  28. package/json-schema/api/GetDiscoveryResponse.json +1 -11
  29. package/json-schema/api/RestApiEndpoint.json +1 -2
  30. package/json-schema/api/RestApiPluginConfig.json +2 -4
  31. package/json-schema/api/RestApiRouteCategory.json +1 -2
  32. package/json-schema/api/RestApiRouteRegistration.json +2 -4
  33. package/json-schema/api/RouterConfig.json +0 -6
  34. package/json-schema/api/ServiceInfo.json +41 -0
  35. package/json-schema/system/CoreServiceName.json +0 -1
  36. package/json-schema/system/KernelServiceMap.json +0 -1
  37. package/json-schema/system/ServiceConfig.json +0 -1
  38. package/json-schema/system/ServiceStatus.json +0 -1
  39. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9682,8 +9682,6 @@ var CoreServiceName = z59.enum([
9682
9682
  // GraphQL API Engine
9683
9683
  "analytics",
9684
9684
  // BI & Semantic Layer
9685
- "hub",
9686
- // Multi-tenant & Marketplace Management
9687
9685
  "realtime",
9688
9686
  // WebSocket & PubSub
9689
9687
  "job",
@@ -9722,7 +9720,6 @@ var ServiceRequirementDef = {
9722
9720
  automation: "optional",
9723
9721
  graphql: "optional",
9724
9722
  analytics: "optional",
9725
- hub: "optional",
9726
9723
  realtime: "optional",
9727
9724
  notification: "optional",
9728
9725
  ai: "optional",
@@ -20801,7 +20798,6 @@ __export(api_exports, {
20801
20798
  DEFAULT_DATA_CRUD_ROUTES: () => DEFAULT_DATA_CRUD_ROUTES,
20802
20799
  DEFAULT_DISCOVERY_ROUTES: () => DEFAULT_DISCOVERY_ROUTES,
20803
20800
  DEFAULT_DISPATCHER_ROUTES: () => DEFAULT_DISPATCHER_ROUTES,
20804
- DEFAULT_HUB_ROUTES: () => DEFAULT_HUB_ROUTES,
20805
20801
  DEFAULT_I18N_ROUTES: () => DEFAULT_I18N_ROUTES,
20806
20802
  DEFAULT_METADATA_ROUTES: () => DEFAULT_METADATA_ROUTES,
20807
20803
  DEFAULT_NOTIFICATION_ROUTES: () => DEFAULT_NOTIFICATION_ROUTES,
@@ -20990,6 +20986,7 @@ __export(api_exports, {
20990
20986
  SaveMetaItemRequestSchema: () => SaveMetaItemRequestSchema,
20991
20987
  SaveMetaItemResponseSchema: () => SaveMetaItemResponseSchema,
20992
20988
  SchemaDefinition: () => SchemaDefinition,
20989
+ ServiceInfoSchema: () => ServiceInfoSchema,
20993
20990
  SessionResponseSchema: () => SessionResponseSchema,
20994
20991
  SessionSchema: () => SessionSchema2,
20995
20992
  SessionUserSchema: () => SessionUserSchema,
@@ -21195,12 +21192,25 @@ var ApiCapabilitiesSchema = z104.object({
21195
21192
  websockets: z104.boolean().default(false),
21196
21193
  files: z104.boolean().default(true),
21197
21194
  analytics: z104.boolean().default(false).describe("Is the Analytics/BI engine enabled?"),
21198
- hub: z104.boolean().default(false).describe("Is Hub management enabled?"),
21199
21195
  ai: z104.boolean().default(false).describe("Is the AI engine enabled?"),
21200
21196
  workflow: z104.boolean().default(false).describe("Is the Workflow engine enabled?"),
21201
21197
  notifications: z104.boolean().default(false).describe("Is the Notification service enabled?"),
21202
21198
  i18n: z104.boolean().default(false).describe("Is the i18n service enabled?")
21203
21199
  });
21200
+ var ServiceInfoSchema = z104.object({
21201
+ /** Whether the service is enabled and available */
21202
+ enabled: z104.boolean(),
21203
+ /** Current operational status */
21204
+ status: z104.enum(["available", "unavailable", "degraded", "stub"]).describe(
21205
+ "available = fully operational, unavailable = not installed, degraded = partial, stub = placeholder that throws"
21206
+ ),
21207
+ /** Route path (only present if enabled) */
21208
+ route: z104.string().optional().describe("e.g. /api/v1/analytics"),
21209
+ /** Implementation provider name */
21210
+ provider: z104.string().optional().describe('e.g. "objectql", "plugin-redis", "driver-memory"'),
21211
+ /** Human-readable reason if unavailable */
21212
+ message: z104.string().optional().describe('e.g. "Install plugin-workflow to enable"')
21213
+ });
21204
21214
  var ApiRoutesSchema = z104.object({
21205
21215
  /** Base URL for Object CRUD (Data Protocol) */
21206
21216
  data: z104.string().describe("e.g. /api/v1/data"),
@@ -21208,16 +21218,14 @@ var ApiRoutesSchema = z104.object({
21208
21218
  metadata: z104.string().describe("e.g. /api/v1/meta"),
21209
21219
  /** Base URL for UI Configurations (Views, Menus) */
21210
21220
  ui: z104.string().optional().describe("e.g. /api/v1/ui"),
21211
- /** Base URL for Authentication */
21212
- auth: z104.string().describe("e.g. /api/v1/auth"),
21221
+ /** Base URL for Authentication (plugin-provided) */
21222
+ auth: z104.string().optional().describe("e.g. /api/v1/auth"),
21213
21223
  /** Base URL for Automation (Flows/Scripts) */
21214
21224
  automation: z104.string().optional().describe("e.g. /api/v1/automation"),
21215
21225
  /** Base URL for File/Storage operations */
21216
21226
  storage: z104.string().optional().describe("e.g. /api/v1/storage"),
21217
21227
  /** Base URL for Analytics/BI operations */
21218
21228
  analytics: z104.string().optional().describe("e.g. /api/v1/analytics"),
21219
- /** Base URL for Hub Management (Multi-tenant/Marketplace) */
21220
- hub: z104.string().optional().describe("e.g. /api/v1/hub"),
21221
21229
  /** GraphQL Endpoint (if enabled) */
21222
21230
  graphql: z104.string().optional().describe("e.g. /graphql"),
21223
21231
  /** Base URL for Package Management */
@@ -21248,6 +21256,14 @@ var DiscoverySchema = z104.object({
21248
21256
  supported: z104.array(z104.string()),
21249
21257
  timezone: z104.string()
21250
21258
  }),
21259
+ /**
21260
+ * Per-service status map.
21261
+ * Clients use this to determine which features are available,
21262
+ * show/hide UI elements, and display appropriate messages.
21263
+ */
21264
+ services: z104.record(z104.string(), ServiceInfoSchema).optional().describe(
21265
+ "Per-service availability map keyed by CoreServiceName"
21266
+ ),
21251
21267
  /**
21252
21268
  * Custom metadata key-value pairs for extensibility
21253
21269
  */
@@ -21651,7 +21667,6 @@ var RouterConfigSchema = z107.object({
21651
21667
  automation: z107.string().default("/automation").describe("Automation Protocol"),
21652
21668
  storage: z107.string().default("/storage").describe("Storage Protocol"),
21653
21669
  analytics: z107.string().default("/analytics").describe("Analytics Protocol"),
21654
- hub: z107.string().default("/hub").describe("Hub Management Protocol"),
21655
21670
  graphql: z107.string().default("/graphql").describe("GraphQL Endpoint"),
21656
21671
  ui: z107.string().default("/ui").describe("UI Metadata Protocol (Views, Layouts)"),
21657
21672
  workflow: z107.string().default("/workflow").describe("Workflow Engine Protocol"),
@@ -21667,7 +21682,6 @@ var RouterConfigSchema = z107.object({
21667
21682
  automation: "/automation",
21668
21683
  storage: "/storage",
21669
21684
  analytics: "/analytics",
21670
- hub: "/hub",
21671
21685
  graphql: "/graphql",
21672
21686
  ui: "/ui",
21673
21687
  workflow: "/workflow",
@@ -24898,8 +24912,7 @@ var DEFAULT_DISPATCHER_ROUTES = [
24898
24912
  { prefix: "/api/v1/data", service: "data", criticality: "required" },
24899
24913
  { prefix: "/api/v1/auth", service: "auth", criticality: "required" },
24900
24914
  // Optional Services (plugin-provided)
24901
- { prefix: "/api/v1/packages", service: "hub" },
24902
- { prefix: "/api/v1/hub", service: "hub" },
24915
+ { prefix: "/api/v1/packages", service: "metadata" },
24903
24916
  { prefix: "/api/v1/ui", service: "ui" },
24904
24917
  { prefix: "/api/v1/workflow", service: "workflow" },
24905
24918
  { prefix: "/api/v1/analytics", service: "analytics" },
@@ -24937,10 +24950,8 @@ var RestApiRouteCategory = z124.enum([
24937
24950
  // Notification management
24938
24951
  "ai",
24939
24952
  // AI operations (NLQ, chat)
24940
- "i18n",
24953
+ "i18n"
24941
24954
  // Internationalization
24942
- "hub"
24943
- // Hub and package management
24944
24955
  ]);
24945
24956
  var RestApiEndpointSchema = z124.object({
24946
24957
  /**
@@ -26113,148 +26124,6 @@ var DEFAULT_ANALYTICS_ROUTES = {
26113
26124
  { name: "error_handler", type: "error", enabled: true, order: 200 }
26114
26125
  ]
26115
26126
  };
26116
- var DEFAULT_HUB_ROUTES = {
26117
- prefix: "/api/v1/hub",
26118
- service: "hub",
26119
- category: "hub",
26120
- methods: [
26121
- "listSpaces",
26122
- "createSpace",
26123
- "installPlugin",
26124
- "listPackages",
26125
- "getPackage",
26126
- "installPackage",
26127
- "uninstallPackage",
26128
- "enablePackage",
26129
- "disablePackage"
26130
- ],
26131
- authRequired: true,
26132
- endpoints: [
26133
- {
26134
- method: "GET",
26135
- path: "/spaces",
26136
- handler: "listSpaces",
26137
- category: "hub",
26138
- public: false,
26139
- summary: "List spaces",
26140
- description: "Returns all hub spaces accessible to the current user",
26141
- tags: ["Hub"],
26142
- cacheable: true,
26143
- cacheTtl: 300
26144
- },
26145
- {
26146
- method: "POST",
26147
- path: "/spaces",
26148
- handler: "createSpace",
26149
- category: "hub",
26150
- public: false,
26151
- summary: "Create space",
26152
- description: "Creates a new hub space",
26153
- tags: ["Hub"],
26154
- requestSchema: "CreateSpaceRequestSchema",
26155
- responseSchema: "SpaceResponseSchema",
26156
- permissions: ["hub.space.create"],
26157
- cacheable: false
26158
- },
26159
- {
26160
- method: "POST",
26161
- path: "/plugins/install",
26162
- handler: "installPlugin",
26163
- category: "hub",
26164
- public: false,
26165
- summary: "Install plugin into space",
26166
- description: "Installs a plugin into the current space",
26167
- tags: ["Hub"],
26168
- requestSchema: "InstallPluginRequestSchema",
26169
- responseSchema: "InstallPluginResponseSchema",
26170
- permissions: ["hub.plugin.install"],
26171
- cacheable: false
26172
- },
26173
- {
26174
- method: "GET",
26175
- path: "/packages",
26176
- handler: "listPackages",
26177
- category: "hub",
26178
- public: false,
26179
- summary: "List installed packages",
26180
- description: "Returns all installed packages with optional status filter",
26181
- tags: ["Hub", "Packages"],
26182
- responseSchema: "ListPackagesResponseSchema",
26183
- cacheable: false
26184
- },
26185
- {
26186
- method: "GET",
26187
- path: "/packages/:id",
26188
- handler: "getPackage",
26189
- category: "hub",
26190
- public: false,
26191
- summary: "Get package details",
26192
- description: "Returns details of a specific installed package",
26193
- tags: ["Hub", "Packages"],
26194
- responseSchema: "GetPackageResponseSchema",
26195
- cacheable: false
26196
- },
26197
- {
26198
- method: "POST",
26199
- path: "/packages",
26200
- handler: "installPackage",
26201
- category: "hub",
26202
- public: false,
26203
- summary: "Install package",
26204
- description: "Installs a new package from manifest or registry",
26205
- tags: ["Hub", "Packages"],
26206
- requestSchema: "InstallPackageRequestSchema",
26207
- responseSchema: "InstallPackageResponseSchema",
26208
- permissions: ["hub.package.install"],
26209
- cacheable: false
26210
- },
26211
- {
26212
- method: "DELETE",
26213
- path: "/packages/:id",
26214
- handler: "uninstallPackage",
26215
- category: "hub",
26216
- public: false,
26217
- summary: "Uninstall package",
26218
- description: "Removes an installed package",
26219
- tags: ["Hub", "Packages"],
26220
- responseSchema: "UninstallPackageResponseSchema",
26221
- permissions: ["hub.package.uninstall"],
26222
- cacheable: false
26223
- },
26224
- {
26225
- method: "POST",
26226
- path: "/packages/:id/enable",
26227
- handler: "enablePackage",
26228
- category: "hub",
26229
- public: false,
26230
- summary: "Enable package",
26231
- description: "Enables a disabled package",
26232
- tags: ["Hub", "Packages"],
26233
- responseSchema: "EnablePackageResponseSchema",
26234
- permissions: ["hub.package.manage"],
26235
- cacheable: false
26236
- },
26237
- {
26238
- method: "POST",
26239
- path: "/packages/:id/disable",
26240
- handler: "disablePackage",
26241
- category: "hub",
26242
- public: false,
26243
- summary: "Disable package",
26244
- description: "Disables an installed package without removing it",
26245
- tags: ["Hub", "Packages"],
26246
- responseSchema: "DisablePackageResponseSchema",
26247
- permissions: ["hub.package.manage"],
26248
- cacheable: false
26249
- }
26250
- ],
26251
- middleware: [
26252
- { name: "auth", type: "authentication", enabled: true, order: 10 },
26253
- { name: "validation", type: "validation", enabled: true, order: 20 },
26254
- { name: "response_envelope", type: "transformation", enabled: true, order: 100 },
26255
- { name: "error_handler", type: "error", enabled: true, order: 200 }
26256
- ]
26257
- };
26258
26127
  var DEFAULT_AUTOMATION_ROUTES = {
26259
26128
  prefix: "/api/v1/automation",
26260
26129
  service: "automation",
@@ -26306,7 +26175,6 @@ function getDefaultRouteRegistrations() {
26306
26175
  DEFAULT_AI_ROUTES,
26307
26176
  DEFAULT_I18N_ROUTES,
26308
26177
  DEFAULT_ANALYTICS_ROUTES,
26309
- DEFAULT_HUB_ROUTES,
26310
26178
  DEFAULT_AUTOMATION_ROUTES
26311
26179
  ];
26312
26180
  }