@ultrst-armada/kloks 1.4.3 → 1.4.4

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 (79) hide show
  1. package/package.json +8 -20
  2. package/packages/audio-midi/dist/index.d.ts +23 -14
  3. package/packages/audio-midi/dist/index.js +170 -45
  4. package/packages/audio-midi/kloks.manifest.json +8 -8
  5. package/packages/audio-midi/package.json +1 -1
  6. package/packages/backend/dist/{WebSocketTransport-CxUzUfwl.d.ts → WebSocketTransport-CHmkJ0tj.d.ts} +109 -2
  7. package/packages/backend/dist/auth/index.js +6 -6
  8. package/packages/backend/dist/chunk-5336MTXD.js +597 -0
  9. package/packages/backend/dist/{chunk-T3NYNBDC.js → chunk-5E6JRFUH.js} +201 -3
  10. package/packages/backend/dist/{chunk-XTWHEZWS.js → chunk-7B24ZWB3.js} +16 -1
  11. package/packages/backend/dist/{chunk-DZ4ZGIZM.js → chunk-JXUSBKJ2.js} +91 -654
  12. package/packages/backend/dist/{chunk-FO6WYLW4.js → chunk-KI3LHMUN.js} +133 -46
  13. package/packages/backend/dist/{chunk-4ZFXEFOE.js → chunk-MPYASJ5A.js} +2 -87
  14. package/packages/backend/dist/{chunk-KX3OTBQ3.js → chunk-OZDYAEH4.js} +0 -114
  15. package/packages/backend/dist/chunk-TY32TUNI.js +376 -0
  16. package/packages/backend/dist/chunk-VDROUXFT.js +116 -0
  17. package/packages/backend/dist/chunk-ZDH4XI7W.js +140 -0
  18. package/packages/backend/dist/client/index.d.ts +2 -3
  19. package/packages/backend/dist/connectivity/index.d.ts +18 -6
  20. package/packages/backend/dist/connectivity/index.js +3 -7
  21. package/packages/backend/dist/index.d.ts +3 -6
  22. package/packages/backend/dist/index.js +101 -91
  23. package/packages/backend/dist/krnl-services.d.ts +84 -7
  24. package/packages/backend/dist/krnl-services.js +40 -12
  25. package/packages/backend/dist/services/index.d.ts +4 -6
  26. package/packages/backend/dist/services/index.js +2 -2
  27. package/packages/backend/dist/srkl/index.js +6 -4
  28. package/packages/backend/dist/storage/index.js +7 -7
  29. package/packages/backend/dist/workspace/index.js +2 -2
  30. package/packages/backend/kloks.manifest.json +47 -45
  31. package/packages/backend/package.json +3 -8
  32. package/packages/client/package.json +1 -1
  33. package/packages/contracts/dist/index.js +5 -10
  34. package/packages/contracts/package.json +1 -1
  35. package/packages/functions/dist/index.d.ts +12 -1
  36. package/packages/functions/dist/index.js +132 -24
  37. package/packages/functions/package.json +1 -1
  38. package/packages/orchestrations/dist/index.d.ts +33 -31
  39. package/packages/orchestrations/dist/index.js +81 -203
  40. package/packages/orchestrations/kloks.manifest.json +10 -2
  41. package/packages/orchestrations/package.json +2 -2
  42. package/packages/services/dist/index.d.ts +51 -1
  43. package/packages/services/dist/index.js +234 -36
  44. package/packages/services/kloks.manifest.json +69 -33
  45. package/packages/services/package.json +1 -1
  46. package/packages/state-graph/dist/{BaseGraph-BvkSYOTw.d.ts → BaseGraph-Bd5F1NMP.d.ts} +1 -1
  47. package/packages/state-graph/dist/{BaseNode-DTcd3K1B.d.ts → BaseNode-DKpGXMy8.d.ts} +6 -0
  48. package/packages/state-graph/dist/{CompatibilityMatrix-Dj-tCWUA.d.ts → CompatibilityMatrix-TiEJ3j3_.d.ts} +1 -1
  49. package/packages/state-graph/dist/domain/index.d.ts +3 -3
  50. package/packages/state-graph/dist/domain/index.js +0 -1
  51. package/packages/state-graph/dist/index.d.ts +40 -8
  52. package/packages/state-graph/dist/index.js +214 -65
  53. package/packages/state-graph/dist/rules/index.d.ts +3 -3
  54. package/packages/state-graph/dist/rules/index.js +0 -1
  55. package/packages/state-graph/dist/spatial/index.d.ts +4 -4
  56. package/packages/state-graph/dist/spatial/index.js +0 -1
  57. package/packages/state-graph/dist/state/index.js +1 -3
  58. package/packages/state-graph/dist/store/index.d.ts +4 -4
  59. package/packages/state-graph/dist/store/index.js +0 -1
  60. package/packages/state-graph/dist/{types-VDoc4FIc.d.ts → types-D5kQSa65.d.ts} +2 -2
  61. package/packages/state-graph/kloks.manifest.json +26 -10
  62. package/packages/state-graph/package.json +2 -8
  63. package/packages/backend/dist/IdempotencyManager-B5MjK871.d.ts +0 -16
  64. package/packages/backend/dist/chunk-25Y7AVTP.js +0 -55
  65. package/packages/backend/dist/chunk-3EPY34R6.js +0 -67
  66. package/packages/backend/dist/chunk-7KNGX522.js +0 -220
  67. package/packages/backend/dist/chunk-FZKBTF34.js +0 -15
  68. package/packages/backend/dist/chunk-QGHDJGYS.js +0 -92
  69. package/packages/backend/dist/chunk-UPFKBBQI.js +0 -138
  70. package/packages/backend/dist/chunk-VQEFULWT.js +0 -88
  71. package/packages/backend/dist/execution/index.d.ts +0 -124
  72. package/packages/backend/dist/execution/index.js +0 -20
  73. package/packages/backend/dist/types-BERZJ93O.d.ts +0 -110
  74. package/packages/state-graph/dist/chunk-3RG5ZIWI.js +0 -10
  75. package/packages/state-graph/dist/chunk-Q5I42UX7.js +0 -0
  76. package/packages/state-graph/dist/chunk-ZTHBPV24.js +0 -267
  77. package/packages/state-graph/dist/execution/index.d.ts +0 -152
  78. package/packages/state-graph/dist/execution/index.js +0 -16
  79. /package/packages/state-graph/dist/{chunk-SHIBCPGQ.js → chunk-EW4ACSZB.js} +0 -0
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/@ultrst-armada+krnl@1.0.2/node_modules/@ultrst-armada/krnl/packages/core/dist/index.js
1
+ // ../../node_modules/.pnpm/@ultrst-armada+krnl@1.0.3/node_modules/@ultrst-armada/krnl/packages/core/dist/index.js
2
2
  import http from "http";
3
3
  var ServiceStateStore = class {
4
4
  state;
@@ -53,17 +53,37 @@ var ServiceEventBus = class {
53
53
  this.handlers.clear();
54
54
  }
55
55
  };
56
+ var TRANSITIONS = {
57
+ uninitialized: ["initializing"],
58
+ initializing: ["ready", "uninitialized"],
59
+ ready: ["starting"],
60
+ starting: ["running", "ready"],
61
+ running: ["stopping"],
62
+ stopping: ["stopped", "running"],
63
+ stopped: ["starting"]
64
+ };
56
65
  var LifecycleManager = class {
57
66
  status = "uninitialized";
58
67
  getStatus() {
59
68
  return this.status;
60
69
  }
61
- setStatus(next) {
70
+ canTransitionTo(next) {
71
+ return TRANSITIONS[this.status].includes(next);
72
+ }
73
+ transitionTo(next) {
74
+ if (!this.canTransitionTo(next)) {
75
+ throw new Error("[Lifecycle] Invalid transition '" + this.status + "' -> '" + next + "'.");
76
+ }
62
77
  this.status = next;
63
78
  }
79
+ setStatus(next) {
80
+ this.transitionTo(next);
81
+ }
64
82
  assertRunning(serviceName) {
65
83
  if (this.status !== "running") {
66
- throw new Error(`[Service:${serviceName}] Cannot invoke operation while status is '${this.status}' (expected 'running').`);
84
+ throw new Error(
85
+ "[Service:" + serviceName + "] Cannot invoke operation while status is '" + this.status + "' (expected 'running')."
86
+ );
67
87
  }
68
88
  }
69
89
  };
@@ -75,7 +95,7 @@ var ServiceInstance = class {
75
95
  this.version = definition.version;
76
96
  this.lifecycle = new LifecycleManager();
77
97
  this.eventBus = new ServiceEventBus();
78
- if (definition.state?.initial) {
98
+ if (definition.state) {
79
99
  this.stateStore = new ServiceStateStore(definition.state.initial);
80
100
  }
81
101
  }
@@ -86,46 +106,76 @@ var ServiceInstance = class {
86
106
  stateStore;
87
107
  eventBus;
88
108
  lifecycle;
109
+ initialized = false;
110
+ disposed = false;
89
111
  getDefinition() {
90
112
  return this.definition;
91
113
  }
114
+ getStatus() {
115
+ return this.lifecycle.getStatus();
116
+ }
92
117
  async start() {
93
- this.lifecycle.setStatus("starting");
94
- if (this.definition.lifecycle?.onInit) {
95
- await this.definition.lifecycle.onInit();
118
+ if (this.disposed) throw new Error("[Service:" + this.name + "] Cannot start a disposed service.");
119
+ const current = this.lifecycle.getStatus();
120
+ if (current === "running") return;
121
+ if (current === "initializing" || current === "starting" || current === "stopping") {
122
+ throw new Error("[Service:" + this.name + "] Cannot start while status is '" + current + "'.");
123
+ }
124
+ if (!this.initialized) {
125
+ this.lifecycle.transitionTo("initializing");
126
+ try {
127
+ await this.definition.lifecycle?.onInit?.();
128
+ this.initialized = true;
129
+ this.lifecycle.transitionTo("ready");
130
+ } catch (error) {
131
+ this.lifecycle.transitionTo("uninitialized");
132
+ throw error;
133
+ }
96
134
  }
97
- if (this.definition.lifecycle?.onStart) {
98
- await this.definition.lifecycle.onStart();
135
+ this.lifecycle.transitionTo("starting");
136
+ try {
137
+ await this.definition.lifecycle?.onStart?.();
138
+ this.lifecycle.transitionTo("running");
139
+ } catch (error) {
140
+ this.lifecycle.transitionTo("ready");
141
+ throw error;
99
142
  }
100
- this.lifecycle.setStatus("running");
101
143
  }
102
144
  async stop() {
103
- this.lifecycle.setStatus("stopping");
104
- if (this.definition.lifecycle?.onStop) {
105
- await this.definition.lifecycle.onStop();
145
+ const current = this.lifecycle.getStatus();
146
+ if (current === "stopped") return;
147
+ if (current !== "running") {
148
+ throw new Error("[Service:" + this.name + "] Cannot stop while status is '" + current + "'.");
106
149
  }
107
- if (this.definition.lifecycle?.onDispose) {
108
- await this.definition.lifecycle.onDispose();
150
+ this.lifecycle.transitionTo("stopping");
151
+ try {
152
+ await this.definition.lifecycle?.onStop?.();
153
+ this.lifecycle.transitionTo("stopped");
154
+ } catch (error) {
155
+ this.lifecycle.transitionTo("running");
156
+ throw error;
109
157
  }
110
- this.lifecycle.setStatus("stopped");
158
+ }
159
+ async dispose() {
160
+ if (this.disposed) return;
161
+ if (this.lifecycle.getStatus() === "running") await this.stop();
162
+ await this.definition.lifecycle?.onDispose?.();
163
+ this.disposed = true;
111
164
  }
112
165
  async call(op, input, ctx = {}) {
113
166
  this.lifecycle.assertRunning(this.name);
114
167
  const operation = this.definition.operations[op];
115
168
  if (!operation) {
116
- throw new Error(`[Service:${this.name}] Operation '${op}' not found.`);
169
+ throw new Error("[Service:" + this.name + "] Operation '" + op + "' not found.");
117
170
  }
118
171
  return await operation.handler(input, ctx);
119
172
  }
120
173
  getState() {
121
- if (!this.stateStore) {
122
- return Object.freeze({});
123
- }
124
- return this.stateStore.getState();
174
+ return this.stateStore?.getState() ?? Object.freeze({});
125
175
  }
126
176
  setState(mutation) {
127
177
  if (!this.stateStore) {
128
- this.stateStore = new ServiceStateStore(mutation);
178
+ this.stateStore = new ServiceStateStore({ ...mutation });
129
179
  return;
130
180
  }
131
181
  this.stateStore.setState(mutation);
@@ -142,10 +192,19 @@ var ServiceProxy = class {
142
192
  this.definition = definition;
143
193
  this.adapter = adapter;
144
194
  this.endpoint = endpoint;
195
+ if (!definition) {
196
+ throw new Error("[ServiceProxy] Missing service definition.");
197
+ }
198
+ if (!adapter || typeof adapter.send !== "function") {
199
+ throw new Error("[ServiceProxy:" + (definition.name || "unknown") + "] Missing or invalid protocol adapter.");
200
+ }
201
+ if (!endpoint || typeof endpoint.address !== "string" || endpoint.address.length === 0) {
202
+ throw new Error("[ServiceProxy:" + (definition.name || "unknown") + "] Missing or invalid endpoint descriptor.");
203
+ }
145
204
  this.id = definition.id;
146
205
  this.name = definition.name;
147
206
  this.version = definition.version;
148
- this.stateCache = definition.state?.initial || {};
207
+ this.stateCache = { ...definition.state?.initial ?? {} };
149
208
  }
150
209
  definition;
151
210
  adapter;
@@ -155,19 +214,56 @@ var ServiceProxy = class {
155
214
  version;
156
215
  stateCache;
157
216
  eventHandlers = /* @__PURE__ */ new Map();
217
+ lifecycle = new LifecycleManager();
218
+ disposed = false;
158
219
  getDefinition() {
159
220
  return this.definition;
160
221
  }
222
+ getStatus() {
223
+ return this.lifecycle.getStatus();
224
+ }
161
225
  async start() {
226
+ if (this.disposed) {
227
+ throw new Error("[ServiceProxy:" + this.name + "] Cannot start a disposed service proxy.");
228
+ }
229
+ const status = this.lifecycle.getStatus();
230
+ if (status === "running") return;
231
+ if (status === "stopping" || status === "starting" || status === "initializing") {
232
+ throw new Error("[ServiceProxy:" + this.name + "] Cannot start while status is '" + status + "'.");
233
+ }
234
+ if (status === "uninitialized") {
235
+ this.lifecycle.transitionTo("initializing");
236
+ this.lifecycle.transitionTo("ready");
237
+ }
238
+ this.lifecycle.transitionTo("starting");
239
+ this.lifecycle.transitionTo("running");
162
240
  }
163
241
  async stop() {
242
+ const status = this.lifecycle.getStatus();
243
+ if (status === "stopped") return;
244
+ if (status !== "running") {
245
+ throw new Error("[ServiceProxy:" + this.name + "] Cannot stop while status is '" + status + "'.");
246
+ }
247
+ this.lifecycle.transitionTo("stopping");
248
+ this.lifecycle.transitionTo("stopped");
249
+ }
250
+ async dispose() {
251
+ if (this.disposed) return;
252
+ if (this.lifecycle.getStatus() === "running") await this.stop();
253
+ this.disposed = true;
164
254
  }
165
255
  async call(op, input, ctx = {}) {
256
+ if (!this.definition.operations[op]) {
257
+ throw new Error("[ServiceProxy:" + this.name + "] Operation '" + op + "' not found.");
258
+ }
259
+ if (this.lifecycle.getStatus() !== "running") {
260
+ await this.start();
261
+ }
166
262
  if (!this.adapter.send) {
167
- throw new Error(`[ServiceProxy:${this.name}] Adapter does not support send().`);
263
+ throw new Error("[ServiceProxy:" + this.name + "] Adapter does not support send().");
168
264
  }
169
265
  const envelope = {
170
- id: `req-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
266
+ id: "req-" + Date.now() + "-" + Math.random().toString(36).slice(2, 7),
171
267
  type: "request",
172
268
  operation: op,
173
269
  payload: input,
@@ -175,7 +271,7 @@ var ServiceProxy = class {
175
271
  };
176
272
  const response = await this.adapter.send(this.endpoint, envelope);
177
273
  if (response.error) {
178
- throw new Error(`[ServiceProxy:${this.name}] Remote error: ${response.error}`);
274
+ throw new Error("[ServiceProxy:" + this.name + "] Remote error: " + response.error);
179
275
  }
180
276
  return response.payload;
181
277
  }
@@ -186,33 +282,93 @@ var ServiceProxy = class {
186
282
  this.stateCache = { ...this.stateCache, ...mutation };
187
283
  }
188
284
  on(event, handler) {
189
- if (!this.eventHandlers.has(event)) {
190
- this.eventHandlers.set(event, /* @__PURE__ */ new Set());
191
- }
285
+ if (!this.eventHandlers.has(event)) this.eventHandlers.set(event, /* @__PURE__ */ new Set());
192
286
  const handlers = this.eventHandlers.get(event);
193
287
  handlers.add(handler);
194
- return () => {
195
- handlers.delete(handler);
196
- };
288
+ return () => handlers.delete(handler);
197
289
  }
198
290
  emit(event, payload) {
199
291
  const handlers = this.eventHandlers.get(event);
200
- if (handlers) {
201
- for (const handler of Array.from(handlers)) {
292
+ if (!handlers) return;
293
+ for (const handler of Array.from(handlers)) {
294
+ try {
202
295
  handler(payload);
296
+ } catch (error) {
297
+ console.error("[ServiceProxy:" + this.name + "] Event handler error for '" + event + "':", error);
203
298
  }
204
299
  }
205
300
  }
206
301
  };
207
- function createServiceDefinition(definition) {
302
+ function assertRecord(value, field) {
303
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
304
+ throw new Error("[KrnlTS] Invalid service definition: '" + field + "' must be an object.");
305
+ }
306
+ }
307
+ function assertNonEmptyString(value, field) {
308
+ if (typeof value !== "string" || value.trim().length === 0) {
309
+ throw new Error("[KrnlTS] Invalid service definition: '" + field + "' must be a non-empty string.");
310
+ }
311
+ }
312
+ function validateServiceDefinition(definition) {
313
+ if (!definition || typeof definition !== "object") {
314
+ throw new Error("[KrnlTS] Invalid service definition: expected an object.");
315
+ }
316
+ assertNonEmptyString(definition.id, "id");
317
+ assertNonEmptyString(definition.name, "name");
318
+ assertNonEmptyString(definition.version, "version");
319
+ if (!definition.operations || typeof definition.operations !== "object") {
320
+ throw new Error("[Service:" + definition.name + "] Invalid operations: expected an object.");
321
+ }
322
+ for (const [key, operation] of Object.entries(definition.operations)) {
323
+ if (!operation || typeof operation !== "object") {
324
+ throw new Error("[Service:" + definition.name + "] Invalid operation '" + key + "'.");
325
+ }
326
+ assertNonEmptyString(operation.id, "operations." + key + ".id");
327
+ assertNonEmptyString(operation.name, "operations." + key + ".name");
328
+ if (operation.inputSchema !== void 0) assertRecord(operation.inputSchema, "operations." + key + ".inputSchema");
329
+ if (operation.outputSchema !== void 0) assertRecord(operation.outputSchema, "operations." + key + ".outputSchema");
330
+ if (typeof operation.handler !== "function") {
331
+ throw new Error("[Service:" + definition.name + "] Operation '" + key + "' must define a handler.");
332
+ }
333
+ }
334
+ for (const [key, event] of Object.entries(definition.events ?? {})) {
335
+ if (!event || typeof event !== "object") {
336
+ throw new Error("[Service:" + definition.name + "] Invalid event '" + key + "'.");
337
+ }
338
+ assertNonEmptyString(event.name, "events." + key + ".name");
339
+ }
340
+ for (const [key, schema] of Object.entries(definition.inputs ?? {})) assertRecord(schema, "inputs." + key);
341
+ for (const [key, schema] of Object.entries(definition.outputs ?? {})) assertRecord(schema, "outputs." + key);
342
+ if (definition.state?.schema !== void 0) assertRecord(definition.state.schema, "state.schema");
343
+ for (const capability of definition.capabilities ?? []) {
344
+ assertNonEmptyString(capability.id, "capability.id");
345
+ assertNonEmptyString(capability.name, "capability.name");
346
+ if (!Array.isArray(capability.protocols)) {
347
+ throw new Error("[Service:" + definition.name + "] Capability '" + capability.name + "' protocols must be an array.");
348
+ }
349
+ }
350
+ for (const dependency of definition.dependencies ?? []) {
351
+ assertNonEmptyString(dependency.serviceId, "dependency.serviceId");
352
+ }
208
353
  return definition;
209
354
  }
355
+ function createServiceDefinition(definition) {
356
+ return validateServiceDefinition(definition);
357
+ }
210
358
  function createService(definition) {
211
- return new ServiceInstance(definition);
359
+ return new ServiceInstance(validateServiceDefinition(definition));
212
360
  }
213
361
  function createServiceProxy(definition, adapter, endpoint) {
362
+ validateServiceDefinition(definition);
363
+ if (!adapter || typeof adapter.send !== "function") {
364
+ throw new Error("[ServiceProxy:" + definition.name + "] Adapter must implement send().");
365
+ }
366
+ if (!endpoint || typeof endpoint.address !== "string" || endpoint.address.length === 0) {
367
+ throw new Error("[ServiceProxy:" + definition.name + "] Endpoint must have an address.");
368
+ }
214
369
  return new ServiceProxy(definition, adapter, endpoint);
215
370
  }
371
+ var asyncHooks = globalThis.process?.getBuiltinModule?.("node:async_hooks");
216
372
  var HttpProtocolAdapter = class {
217
373
  protocol = "http";
218
374
  capabilities = {
@@ -1585,6 +1741,12 @@ var SystemDbClientServiceFacade = {
1585
1741
  return systemDbClientInstance.call(op, input);
1586
1742
  }
1587
1743
  };
1744
+ var krnlAuthClientServiceDefinition = AuthClientServiceDefinition;
1745
+ var krnlAuthClientServiceFacade = AuthClientServiceFacade;
1746
+ var krnlStorageClientServiceDefinition = StorageClientServiceDefinition;
1747
+ var krnlStorageClientServiceFacade = StorageClientServiceFacade;
1748
+ var krnlSystemDbClientServiceDefinition = SystemDbClientServiceDefinition;
1749
+ var krnlSystemDbClientServiceFacade = SystemDbClientServiceFacade;
1588
1750
 
1589
1751
  // src/index.ts
1590
1752
  var ServiceADefinition = createServiceDefinition({
@@ -1747,6 +1909,14 @@ var ServiceDDefinition = createServiceDefinition({
1747
1909
  protocol: ctx.protocol ?? "memory",
1748
1910
  timestamp: Date.now()
1749
1911
  })
1912
+ },
1913
+ uppercase: {
1914
+ id: "ServiceD.uppercase",
1915
+ name: "uppercase",
1916
+ protocols: ["http", "ws", "udp", "p2p"],
1917
+ handler: async (input) => ({
1918
+ result: (typeof input === "string" ? input : input?.text ?? "").toUpperCase()
1919
+ })
1750
1920
  }
1751
1921
  }
1752
1922
  });
@@ -1785,6 +1955,17 @@ var ServiceDFacade = {
1785
1955
  return defaultServiceD.call(op, input);
1786
1956
  }
1787
1957
  };
1958
+ var krnlServiceADefinition = ServiceADefinition;
1959
+ var krnlServiceAFacade = ServiceAFacade;
1960
+ var krnlServiceBDefinition = ServiceBDefinition;
1961
+ var krnlServiceBFacade = ServiceBFacade;
1962
+ var krnlCreateServiceB = createServiceB;
1963
+ var krnlServiceCDefinition = ServiceCDefinition;
1964
+ var krnlServiceCFacade = ServiceCFacade;
1965
+ var krnlCreateServiceC = createServiceC;
1966
+ var krnlServiceDDefinition = ServiceDDefinition;
1967
+ var krnlServiceDFacade = ServiceDFacade;
1968
+ var krnlExposeServiceD = exposeServiceD;
1788
1969
  export {
1789
1970
  AuthClientServiceDefinition,
1790
1971
  AuthClientServiceFacade,
@@ -1817,6 +1998,23 @@ export {
1817
1998
  deleteWorkspace,
1818
1999
  exposeServiceD,
1819
2000
  fetchWorkspaces,
2001
+ krnlAuthClientServiceDefinition,
2002
+ krnlAuthClientServiceFacade,
2003
+ krnlCreateServiceB,
2004
+ krnlCreateServiceC,
2005
+ krnlExposeServiceD,
2006
+ krnlServiceADefinition,
2007
+ krnlServiceAFacade,
2008
+ krnlServiceBDefinition,
2009
+ krnlServiceBFacade,
2010
+ krnlServiceCDefinition,
2011
+ krnlServiceCFacade,
2012
+ krnlServiceDDefinition,
2013
+ krnlServiceDFacade,
2014
+ krnlStorageClientServiceDefinition,
2015
+ krnlStorageClientServiceFacade,
2016
+ krnlSystemDbClientServiceDefinition,
2017
+ krnlSystemDbClientServiceFacade,
1820
2018
  loadDatabase,
1821
2019
  loginAdmin,
1822
2020
  loginUser,
@@ -14,17 +14,21 @@
14
14
  "export": "AuthClientServiceFacade",
15
15
  "facade": "AuthClientServiceFacade"
16
16
  },
17
- "ui": {
18
- "requirementMode": "required",
19
- "schema": "AuthServiceUISchema",
20
- "page": "Auth.ui",
21
- "section": "Auth.ui.LoginSection",
22
- "component": "AuthPage",
23
- "package": "@ultrst-armada/floks",
24
- "export": "ui"
17
+ "modes": [
18
+ "client",
19
+ "backend"
20
+ ],
21
+ "targets": {
22
+ "backend": [
23
+ "BackendFacade.services"
24
+ ]
25
25
  },
26
- "modes": ["client", "backend"],
27
- "targets": { "backend": ["BackendFacade.services"] }
26
+ "defaultFrontend": {
27
+ "component": "AuthPage",
28
+ "package": "@ultrst-armada/floks/ui",
29
+ "relationship": "recommended",
30
+ "requirementMode": "required"
31
+ }
28
32
  },
29
33
  {
30
34
  "id": "kloks.service.storage",
@@ -36,17 +40,21 @@
36
40
  "export": "StorageClientServiceFacade",
37
41
  "facade": "StorageClientServiceFacade"
38
42
  },
39
- "ui": {
40
- "requirementMode": "optional",
41
- "schema": "StorageServiceUISchema",
42
- "page": "Storage.ui",
43
- "section": "Storage.ui.TilesSection",
44
- "component": "WorkspaceTilesMenu",
45
- "package": "@ultrst-armada/floks",
46
- "export": "ui"
43
+ "modes": [
44
+ "client",
45
+ "backend"
46
+ ],
47
+ "targets": {
48
+ "backend": [
49
+ "BackendFacade.services"
50
+ ]
47
51
  },
48
- "modes": ["client", "backend"],
49
- "targets": { "backend": ["BackendFacade.services"] }
52
+ "defaultFrontend": {
53
+ "component": "WorkspaceTilesMenu",
54
+ "package": "@ultrst-armada/floks/ui",
55
+ "relationship": "recommended",
56
+ "requirementMode": "optional"
57
+ }
50
58
  },
51
59
  {
52
60
  "id": "kloks.service.systemDb",
@@ -58,11 +66,15 @@
58
66
  "export": "SystemDbClientServiceFacade",
59
67
  "facade": "SystemDbClientServiceFacade"
60
68
  },
61
- "ui": {
62
- "requirementMode": "none"
63
- },
64
- "modes": ["client", "backend"],
65
- "targets": { "backend": ["BackendFacade.services"] }
69
+ "modes": [
70
+ "client",
71
+ "backend"
72
+ ],
73
+ "targets": {
74
+ "backend": [
75
+ "BackendFacade.services"
76
+ ]
77
+ }
66
78
  },
67
79
  {
68
80
  "id": "service-a",
@@ -74,8 +86,14 @@
74
86
  "export": "ServiceAFacade",
75
87
  "facade": "ServiceAFacade"
76
88
  },
77
- "modes": ["backend"],
78
- "targets": { "backend": ["BackendFacade.services"] }
89
+ "modes": [
90
+ "backend"
91
+ ],
92
+ "targets": {
93
+ "backend": [
94
+ "BackendFacade.services"
95
+ ]
96
+ }
79
97
  },
80
98
  {
81
99
  "id": "service-b",
@@ -87,8 +105,14 @@
87
105
  "export": "ServiceBFacade",
88
106
  "facade": "ServiceBFacade"
89
107
  },
90
- "modes": ["backend"],
91
- "targets": { "backend": ["BackendFacade.services"] }
108
+ "modes": [
109
+ "backend"
110
+ ],
111
+ "targets": {
112
+ "backend": [
113
+ "BackendFacade.services"
114
+ ]
115
+ }
92
116
  },
93
117
  {
94
118
  "id": "service-c",
@@ -100,8 +124,14 @@
100
124
  "export": "ServiceCFacade",
101
125
  "facade": "ServiceCFacade"
102
126
  },
103
- "modes": ["backend"],
104
- "targets": { "backend": ["BackendFacade.services"] }
127
+ "modes": [
128
+ "backend"
129
+ ],
130
+ "targets": {
131
+ "backend": [
132
+ "BackendFacade.services"
133
+ ]
134
+ }
105
135
  },
106
136
  {
107
137
  "id": "service-d",
@@ -113,8 +143,14 @@
113
143
  "export": "ServiceDFacade",
114
144
  "facade": "ServiceDFacade"
115
145
  },
116
- "modes": ["backend"],
117
- "targets": { "backend": ["BackendFacade.services"] }
146
+ "modes": [
147
+ "backend"
148
+ ],
149
+ "targets": {
150
+ "backend": [
151
+ "BackendFacade.services"
152
+ ]
153
+ }
118
154
  }
119
155
  ]
120
156
  }
@@ -29,6 +29,6 @@
29
29
  "@kloks/state-graph": "workspace:*"
30
30
  },
31
31
  "devDependencies": {
32
- "@ultrst-armada/krnl": "^1.0.2"
32
+ "@ultrst-armada/krnl": "^1.0.3"
33
33
  }
34
34
  }
@@ -1,4 +1,4 @@
1
- import { N as NodePosition, a as NodeSize, b as BaseNode } from './BaseNode-DTcd3K1B.js';
1
+ import { N as NodePosition, a as NodeSize, b as BaseNode } from './BaseNode-DKpGXMy8.js';
2
2
  import { B as BaseConnection } from './BaseConnection-CMRrL6Fe.js';
3
3
 
4
4
  type DynamicState = 'INACTIVE' | 'ACTIVE' | 'PINNED_LIVE';
@@ -74,6 +74,12 @@ interface NodeDefinition {
74
74
  type: string;
75
75
  label: string;
76
76
  description?: string;
77
+ /** Automatic node-menu grouping category. */
78
+ category?: string;
79
+ /** Controls whether this node is discoverable from generic graph spawn menus. */
80
+ menu?: {
81
+ visible?: boolean;
82
+ };
77
83
  inputs?: HandleDefinition[];
78
84
  outputs?: HandleDefinition[];
79
85
  views?: string[];
@@ -1,4 +1,4 @@
1
- import { B as BaseHandle, H as HandleCategory } from './BaseNode-DTcd3K1B.js';
1
+ import { B as BaseHandle, H as HandleCategory } from './BaseNode-DKpGXMy8.js';
2
2
 
3
3
  interface CompatibilityRule {
4
4
  sourceCategory: HandleCategory;
@@ -1,8 +1,8 @@
1
- import { b as BaseNode, B as BaseHandle, e as BaseNodeProps, D as DataHandle, N as NodePosition } from '../BaseNode-DTcd3K1B.js';
2
- export { d as BaseHandleProps, C as ConnectionMode, f as CustomNode, H as HandleCategory, g as HandleDefinition, c as HandleDirection, h as HandleOffset, i as HandlePosition, j as NodeDefinition, a as NodeSize, V as ViewHandle } from '../BaseNode-DTcd3K1B.js';
1
+ import { b as BaseNode, B as BaseHandle, e as BaseNodeProps, D as DataHandle, N as NodePosition } from '../BaseNode-DKpGXMy8.js';
2
+ export { d as BaseHandleProps, C as ConnectionMode, f as CustomNode, H as HandleCategory, g as HandleDefinition, c as HandleDirection, h as HandleOffset, i as HandlePosition, j as NodeDefinition, a as NodeSize, V as ViewHandle } from '../BaseNode-DKpGXMy8.js';
3
3
  import { B as BaseConnection } from '../BaseConnection-CMRrL6Fe.js';
4
4
  export { a as BaseConnectionProps, S as SolidConnection, b as SolidConnectionProps, V as ViewLink, c as ViewLinkProps } from '../BaseConnection-CMRrL6Fe.js';
5
- export { B as BaseGraph, a as BaseViewWindow, b as BaseViewWindowProps, C as CustomGraph, c as CustomViewWindow, D as DEFAULT_GRAPH_SETTINGS, d as DynamicState, G as GraphSettings, e as GraphView, f as Group, L as Landmark } from '../BaseGraph-BvkSYOTw.js';
5
+ export { B as BaseGraph, a as BaseViewWindow, b as BaseViewWindowProps, C as CustomGraph, c as CustomViewWindow, D as DEFAULT_GRAPH_SETTINGS, d as DynamicState, G as GraphSettings, e as GraphView, f as Group, L as Landmark } from '../BaseGraph-Bd5F1NMP.js';
6
6
 
7
7
  interface GroupNodeProps extends Partial<BaseNodeProps> {
8
8
  innerNodes?: BaseNode[];
@@ -22,7 +22,6 @@ import {
22
22
  SolidConnection,
23
23
  ViewLink
24
24
  } from "../chunk-OYN4ZEZC.js";
25
- import "../chunk-3RG5ZIWI.js";
26
25
  export {
27
26
  BaseConnection,
28
27
  BaseGraph,