@foresthubai/workflow-core 0.4.3 → 0.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 (120) hide show
  1. package/LICENSE +202 -202
  2. package/NOTICE +14 -14
  3. package/README.md +63 -63
  4. package/dist/api/deployment.d.ts +67 -0
  5. package/dist/api/deployment.d.ts.map +1 -0
  6. package/dist/api/deployment.js +6 -0
  7. package/dist/api/deployment.js.map +1 -0
  8. package/dist/api/engine.d.ts +744 -0
  9. package/dist/api/engine.d.ts.map +1 -0
  10. package/dist/api/engine.js +6 -0
  11. package/dist/api/engine.js.map +1 -0
  12. package/dist/api/index.d.ts +4 -0
  13. package/dist/api/index.d.ts.map +1 -1
  14. package/dist/api/workflow.d.ts +17 -1
  15. package/dist/api/workflow.d.ts.map +1 -1
  16. package/dist/channel/Channel.d.ts +1 -1
  17. package/dist/channel/Channel.d.ts.map +1 -1
  18. package/dist/channel/Channel.js +1 -1
  19. package/dist/channel/Channel.js.map +1 -1
  20. package/dist/channel/ChannelDefinition.d.ts.map +1 -1
  21. package/dist/channel/ChannelDefinition.js +22 -0
  22. package/dist/channel/ChannelDefinition.js.map +1 -1
  23. package/dist/channel/serialization.d.ts.map +1 -1
  24. package/dist/channel/serialization.js +6 -0
  25. package/dist/channel/serialization.js.map +1 -1
  26. package/dist/deploy/index.d.ts +5 -1
  27. package/dist/deploy/index.d.ts.map +1 -1
  28. package/dist/deploy/index.js +2 -1
  29. package/dist/deploy/index.js.map +1 -1
  30. package/dist/deploy/inputs.d.ts +26 -0
  31. package/dist/deploy/inputs.d.ts.map +1 -0
  32. package/dist/deploy/inputs.js +12 -0
  33. package/dist/deploy/inputs.js.map +1 -0
  34. package/dist/deploy/requirements.d.ts +24 -0
  35. package/dist/deploy/requirements.d.ts.map +1 -1
  36. package/dist/deploy/requirements.js +61 -0
  37. package/dist/deploy/requirements.js.map +1 -1
  38. package/dist/deploy/spec.d.ts +32 -0
  39. package/dist/deploy/spec.d.ts.map +1 -0
  40. package/dist/deploy/spec.js +343 -0
  41. package/dist/deploy/spec.js.map +1 -0
  42. package/dist/node/OutputNode.js +2 -2
  43. package/dist/node/OutputNode.js.map +1 -1
  44. package/package.json +2 -2
  45. package/src/api/deployment.ts +67 -0
  46. package/src/api/engine.ts +744 -0
  47. package/src/api/index.ts +26 -11
  48. package/src/api/workflow.ts +17 -1
  49. package/src/channel/Channel.ts +11 -11
  50. package/src/channel/ChannelDefinition.ts +98 -76
  51. package/src/channel/index.ts +6 -6
  52. package/src/channel/serialization.ts +74 -68
  53. package/src/deploy/index.ts +14 -1
  54. package/src/deploy/inputs.ts +41 -0
  55. package/src/deploy/requirements.test.ts +61 -61
  56. package/src/deploy/requirements.ts +156 -41
  57. package/src/deploy/spec.test.ts +226 -0
  58. package/src/deploy/spec.ts +379 -0
  59. package/src/diagnostics/__fixtures__/diagnosticFixtures.ts +158 -158
  60. package/src/diagnostics/diagnostics.test.ts +878 -878
  61. package/src/diagnostics/diagnostics.ts +936 -936
  62. package/src/diagnostics/index.ts +11 -11
  63. package/src/edge/Edge.ts +23 -23
  64. package/src/edge/EdgeDefinition.ts +45 -45
  65. package/src/edge/EdgeType.ts +19 -19
  66. package/src/edge/index.ts +8 -8
  67. package/src/edge/serialization.ts +83 -83
  68. package/src/expression/index.ts +4 -4
  69. package/src/expression/parser.ts +362 -362
  70. package/src/expression/types.ts +30 -30
  71. package/src/function/FunctionDeclaration.ts +54 -54
  72. package/src/function/index.ts +3 -3
  73. package/src/function/serialization.ts +40 -40
  74. package/src/globals.d.ts +9 -9
  75. package/src/id/index.ts +8 -8
  76. package/src/index.ts +22 -22
  77. package/src/memory/Memory.ts +15 -15
  78. package/src/memory/MemoryDefinition.ts +16 -16
  79. package/src/memory/MemoryFileDefinition.ts +37 -37
  80. package/src/memory/MemoryRegistry.ts +35 -35
  81. package/src/memory/VectorDatabaseDefinition.ts +21 -21
  82. package/src/memory/index.ts +8 -8
  83. package/src/memory/serialization.ts +47 -47
  84. package/src/migration/index.ts +4 -4
  85. package/src/migration/migrate.test.ts +44 -44
  86. package/src/migration/migrate.ts +58 -58
  87. package/src/migration/migrations.ts +24 -24
  88. package/src/migration/version.ts +9 -9
  89. package/src/model/LLMModelDefinition.ts +12 -12
  90. package/src/model/Model.ts +39 -39
  91. package/src/model/ModelDefinition.ts +15 -15
  92. package/src/model/ModelRegistry.ts +33 -33
  93. package/src/model/index.ts +7 -7
  94. package/src/model/serialization.ts +30 -30
  95. package/src/node/AgentNode.ts +82 -82
  96. package/src/node/DataNode.ts +41 -41
  97. package/src/node/FunctionNode.ts +76 -76
  98. package/src/node/InputNode.ts +185 -185
  99. package/src/node/LogicNode.ts +33 -33
  100. package/src/node/MqttNode.ts +127 -127
  101. package/src/node/Node.ts +61 -61
  102. package/src/node/NodeDefinition.ts +37 -37
  103. package/src/node/NodeRegistry.ts +85 -85
  104. package/src/node/OutputNode.ts +87 -87
  105. package/src/node/ToolNode.ts +32 -32
  106. package/src/node/TriggerNode.ts +272 -272
  107. package/src/node/constants.ts +16 -16
  108. package/src/node/index.ts +26 -26
  109. package/src/node/methods.ts +278 -278
  110. package/src/node/serialization.ts +544 -544
  111. package/src/parameter/OutputParameter.ts +68 -68
  112. package/src/parameter/Parameter.ts +243 -243
  113. package/src/parameter/index.ts +33 -33
  114. package/src/variable/Variable.ts +10 -10
  115. package/src/variable/index.ts +16 -16
  116. package/src/variable/operations.ts +106 -106
  117. package/src/workflow/Workflow.ts +41 -41
  118. package/src/workflow/index.ts +3 -3
  119. package/src/workflow/serialization.test.ts +240 -240
  120. package/src/workflow/serialization.ts +242 -242
@@ -0,0 +1,744 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export type paths = Record<string, never>;
7
+ export type webhooks = Record<string, never>;
8
+ export interface components {
9
+ schemas: {
10
+ /** @description The engine's complete boot input, loaded once at startup from a single file — the engine is immutable, with no runtime hot-swap. Bundles the binding-free workflow, the deploy mapping that binds its logical resource ids to this environment, the resolved external-resource configs those bindings point at, and the device manifest (the hardware catalog the mapping resolves against). The deployment-scoped parts and the device-scoped manifest have different owners in the control plane; the renderer merges them into this one blob for the engine. A workflow is required — an engine exists only to run one. The engine still validates it at boot and fails fast if it is missing, since JSON unmarshalling does not enforce required fields. */
11
+ EngineConfig: {
12
+ workflow: components["schemas"]["Workflow"];
13
+ mapping?: components["schemas"]["DeploymentMapping"];
14
+ externalResources?: components["schemas"]["ExternalResources"];
15
+ manifest?: components["schemas"]["DeviceManifest"];
16
+ };
17
+ /** @description Binds a binding-free workflow's logical resource ids to concrete platform resources for one deploy, keyed by workflow resource id. The pool a binding's ref resolves against is determined by the workflow resource's type: hardware channels resolve against the boot DeviceManifest; MQTT channels and custom models against the deploy ExternalResources; RAG memory against the boot-configured backend (the ref is the collection id). */
18
+ DeploymentMapping: {
19
+ [key: string]: components["schemas"]["ResourceBinding"];
20
+ };
21
+ /** @description How one workflow resource binds to the environment. `ref` is the shared platform resource it points at (driver instance id, external resource id, or RAG collection id) — a sharing identity, so many workflow resources may share one ref and the engine builds it once. `index` is the optional per-channel physical sub-address within that resource: GPIO line, or ADC/PWM/DAC channel number. Absent for UART, MQTT, memory and models. */
22
+ ResourceBinding: {
23
+ /** @description Shared platform resource id this binds to. */
24
+ ref: string;
25
+ /** @description Per-channel physical sub-address within the driver (GPIO line / ADC-PWM-DAC channel). Omitted when the resource has no sub-address. */
26
+ index?: number;
27
+ };
28
+ /** @description Deploy-time configs for a workflow's non-device external resources (MQTT transports, custom-model providers, ...), keyed by the platform resource id the DeploymentMapping points at. Replaces the former NetworkManifest. Device-owned configs (drivers) stay in the boot DeviceManifest; this carries only deploy-delivered, swappable configs. */
29
+ ExternalResources: {
30
+ [key: string]: components["schemas"]["ExternalResourceConfig"];
31
+ };
32
+ /** @description Tagged union of deploy-time external-resource configs, discriminated by runtime kind (not by ownership — locality like on-device vs cloud lives inside an arm). New kinds extend this oneOf. */
33
+ ExternalResourceConfig: components["schemas"]["MQTTConnection"] | components["schemas"]["LLMProviderConfig"];
34
+ /** @description Resolved connection to a self-hosted/custom LLM endpoint the llmproxy doesn't ship. The engine registers it as an llmproxy provider for the workflow's custom model; the model's capabilities come from its declared workflow entry, so they are not repeated here. The bearer credential is NOT here — it is a secret, delivered out-of-band and injected at runtime (keyed by this resource's id), never stored in the deployment spec. */
35
+ LLMProviderConfig: {
36
+ /**
37
+ * @description discriminator enum property added by openapi-typescript
38
+ * @enum {string}
39
+ */
40
+ type: "selfhosted";
41
+ /** @description Base URL of the inference endpoint (http:// or https://). */
42
+ url: string;
43
+ /** @description Upstream model name the endpoint serves; defaults to the workflow model id when empty. */
44
+ model?: string;
45
+ };
46
+ /** @description Resolved connection metadata for an MQTT broker. The password is NOT here — it is a secret, delivered out-of-band and injected at runtime (keyed by this resource's id), never stored in the deployment spec. username is connection metadata (an identifier), not a credential, so it stays. */
47
+ MQTTConnection: {
48
+ /**
49
+ * @description discriminator enum property added by openapi-typescript
50
+ * @enum {string}
51
+ */
52
+ type: "mqtt";
53
+ brokerUrl: string;
54
+ clientId?: string;
55
+ username?: string;
56
+ /** @description Topic prefix the engine prepends to workflow-level publish topics ({networkId}/{agentId}/). */
57
+ publishPrefix?: string;
58
+ /** @description Topic prefix the engine prepends to workflow-level subscribe filters ({networkId}/+/). */
59
+ subscribePrefix?: string;
60
+ will?: components["schemas"]["MQTTWill"];
61
+ };
62
+ MQTTWill: {
63
+ topic: string;
64
+ payload: string;
65
+ /** @description MQTT QoS (0,1,2). Cast to byte at the paho call site. */
66
+ qos: number;
67
+ retain: boolean;
68
+ };
69
+ /** @description Hardware resources available on the device, keyed by driver instance ID. Drives runtime driver instantiation on the engine. */
70
+ DeviceManifest: {
71
+ gpios?: {
72
+ [key: string]: components["schemas"]["GPIOConfig"];
73
+ };
74
+ adcs?: {
75
+ [key: string]: components["schemas"]["ADCConfig"];
76
+ };
77
+ dacs?: {
78
+ [key: string]: components["schemas"]["DACConfig"];
79
+ };
80
+ serials?: {
81
+ [key: string]: components["schemas"]["SerialConfig"];
82
+ };
83
+ pwms?: {
84
+ [key: string]: components["schemas"]["PWMConfig"];
85
+ };
86
+ };
87
+ GPIOConfig: {
88
+ /** @description cdev chip name or path, e.g. "gpiochip0" or "/dev/gpiochip0" */
89
+ chip: string;
90
+ };
91
+ ADCConfig: {
92
+ /** @description sysfs path to the IIO device directory, e.g. "/sys/bus/iio/devices/iio:device0" */
93
+ device: string;
94
+ };
95
+ DACConfig: {
96
+ /** @description sysfs path to the IIO device directory, e.g. "/sys/bus/iio/devices/iio:device1" */
97
+ device: string;
98
+ };
99
+ SerialConfig: {
100
+ /** @description Serial device path, e.g. "/dev/ttyUSB0" or "COM3" */
101
+ device: string;
102
+ /** @description Baud rate; falls back to 115200 when zero */
103
+ baud?: number;
104
+ };
105
+ PWMConfig: {
106
+ /** @description sysfs path to the pwmchip directory, e.g. "/sys/class/pwm/pwmchip0" */
107
+ chip: string;
108
+ };
109
+ /** @description Body of PUT /agents/memory/{name}. */
110
+ MemoryFileWrite: {
111
+ content: string;
112
+ };
113
+ RagQueryRequest: {
114
+ /** @description Collection to query */
115
+ collectionId: string;
116
+ /** @description Search query text */
117
+ query: string;
118
+ /**
119
+ * @description Number of results to return
120
+ * @default 5
121
+ */
122
+ topK: number;
123
+ };
124
+ RagQueryResult: {
125
+ chunkId: string;
126
+ documentId: string;
127
+ content: string;
128
+ /** Format: double */
129
+ score: number;
130
+ };
131
+ NodePosition: {
132
+ x: number;
133
+ y: number;
134
+ };
135
+ /** @enum {string} */
136
+ SignalType: "digital" | "analog";
137
+ Reference: {
138
+ srcId: string;
139
+ varId: string;
140
+ };
141
+ OutputBinding: {
142
+ /** @description Discard the output if false; route it according to `mode` if true */
143
+ active: boolean;
144
+ /** @enum {string} */
145
+ mode: "emit" | "assign";
146
+ /** @description Variable name (when mode=emit) */
147
+ name?: string;
148
+ /** @description Existing variable to route to (when mode=assign) */
149
+ target?: components["schemas"]["Reference"];
150
+ };
151
+ ReadPinNode: {
152
+ id: string;
153
+ /**
154
+ * @description discriminator enum property added by openapi-typescript
155
+ * @enum {string}
156
+ */
157
+ type: "ReadPin";
158
+ label?: string;
159
+ position: components["schemas"]["NodePosition"];
160
+ arguments: {
161
+ /** @description Reference to an IO variable ID */
162
+ pinReference?: string;
163
+ signalType: components["schemas"]["SignalType"];
164
+ output: components["schemas"]["OutputBinding"];
165
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
166
+ toolDescription?: string;
167
+ };
168
+ };
169
+ /** @enum {string} */
170
+ DataType: "int" | "float" | "bool" | "string";
171
+ Expression: {
172
+ expression: string;
173
+ /** @description A list of referenced variable IDs used in the expression */
174
+ references: components["schemas"]["Reference"][];
175
+ dataType: components["schemas"]["DataType"];
176
+ };
177
+ WritePinNode: {
178
+ id: string;
179
+ /**
180
+ * @description discriminator enum property added by openapi-typescript
181
+ * @enum {string}
182
+ */
183
+ type: "WritePin";
184
+ label?: string;
185
+ position: components["schemas"]["NodePosition"];
186
+ arguments: {
187
+ /** @description Reference to an IO variable ID */
188
+ pinReference?: string;
189
+ signalType: components["schemas"]["SignalType"];
190
+ value: components["schemas"]["Expression"];
191
+ };
192
+ };
193
+ OutputDeclaration: {
194
+ /** @enum {string} */
195
+ mode: "emit" | "assign";
196
+ /** @description JSON property name of the declared output */
197
+ name: string;
198
+ dataType: components["schemas"]["DataType"];
199
+ /** @description New variable uid (when mode=emit) */
200
+ uid?: string;
201
+ /** @description Existing variable to route to (when mode=assign) */
202
+ target?: components["schemas"]["Reference"];
203
+ };
204
+ /** @description Reference from an LLM agent node to a declared MemoryFile with an access mode. */
205
+ MemoryRef: {
206
+ /** @description id of the referenced MemoryFile. */
207
+ id: string;
208
+ /**
209
+ * @description r = read-only; rw = read + write.
210
+ * @enum {string}
211
+ */
212
+ mode: "r" | "rw";
213
+ };
214
+ AgentNode: {
215
+ id: string;
216
+ /**
217
+ * @description discriminator enum property added by openapi-typescript
218
+ * @enum {string}
219
+ */
220
+ type: "Agent";
221
+ label?: string;
222
+ position: components["schemas"]["NodePosition"];
223
+ arguments: {
224
+ /** @description Name of the agent */
225
+ name?: string;
226
+ model?: string;
227
+ instructions?: string;
228
+ /** @description Maximum number of agent runner turns */
229
+ maxTurns?: number;
230
+ answer: components["schemas"]["OutputBinding"];
231
+ /** @description Ordered list of structured-output declarations. Names must be unique within this list */
232
+ outputDeclarations: components["schemas"]["OutputDeclaration"][];
233
+ /** @description Memory files this agent can access, each with an access mode. */
234
+ memoryRefs: components["schemas"]["MemoryRef"][];
235
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
236
+ toolDescription?: string;
237
+ };
238
+ };
239
+ IfNode: {
240
+ id: string;
241
+ /**
242
+ * @description discriminator enum property added by openapi-typescript
243
+ * @enum {string}
244
+ */
245
+ type: "If";
246
+ label?: string;
247
+ position: components["schemas"]["NodePosition"];
248
+ arguments: {
249
+ condition: components["schemas"]["Expression"];
250
+ };
251
+ };
252
+ SerialReadNode: {
253
+ id: string;
254
+ /**
255
+ * @description discriminator enum property added by openapi-typescript
256
+ * @enum {string}
257
+ */
258
+ type: "SerialRead";
259
+ label?: string;
260
+ position: components["schemas"]["NodePosition"];
261
+ arguments: {
262
+ /** @description Reference to an UART ID (the serial port to read from) */
263
+ portReference?: string;
264
+ prompt?: string;
265
+ output: components["schemas"]["OutputBinding"];
266
+ };
267
+ };
268
+ SerialWriteNode: {
269
+ id: string;
270
+ /**
271
+ * @description discriminator enum property added by openapi-typescript
272
+ * @enum {string}
273
+ */
274
+ type: "SerialWrite";
275
+ label?: string;
276
+ position: components["schemas"]["NodePosition"];
277
+ arguments: {
278
+ /** @description Reference to a UART channel ID (the serial port to write to) */
279
+ portReference?: string;
280
+ value: components["schemas"]["Expression"];
281
+ };
282
+ };
283
+ RetrieverNode: {
284
+ id: string;
285
+ /**
286
+ * @description discriminator enum property added by openapi-typescript
287
+ * @enum {string}
288
+ */
289
+ type: "Retriever";
290
+ label?: string;
291
+ position: components["schemas"]["NodePosition"];
292
+ arguments: {
293
+ /** @description Reference to a declared VectorDatabase memory id */
294
+ memoryReference?: string;
295
+ /** @description Number of results to return */
296
+ topK?: number;
297
+ /** @description Search query expression */
298
+ query: components["schemas"]["Expression"];
299
+ output: components["schemas"]["OutputBinding"];
300
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
301
+ toolDescription?: string;
302
+ };
303
+ };
304
+ WebFetchNode: {
305
+ id: string;
306
+ /**
307
+ * @description discriminator enum property added by openapi-typescript
308
+ * @enum {string}
309
+ */
310
+ type: "WebFetch";
311
+ label?: string;
312
+ position: components["schemas"]["NodePosition"];
313
+ arguments: {
314
+ /** @description URL expression to fetch (http or https) */
315
+ url: components["schemas"]["Expression"];
316
+ /** @description Maximum characters of extracted text to return. Defaults to 50000 when omitted or non-positive. */
317
+ maxChars?: number;
318
+ output: components["schemas"]["OutputBinding"];
319
+ };
320
+ };
321
+ FunctionCallNode: {
322
+ id: string;
323
+ /**
324
+ * @description discriminator enum property added by openapi-typescript
325
+ * @enum {string}
326
+ */
327
+ type: "FunctionCall";
328
+ label?: string;
329
+ position: components["schemas"]["NodePosition"];
330
+ /** @description Id of the function this node calls. The signature is resolved from the workflow's functions table. */
331
+ functionId: string;
332
+ arguments: {
333
+ inputBindings?: {
334
+ [key: string]: components["schemas"]["Expression"];
335
+ };
336
+ outputBindings?: {
337
+ [key: string]: components["schemas"]["OutputBinding"];
338
+ };
339
+ /** @description Description exposed to the LLM when this function is wired as a tool. Ignored in exec mode. */
340
+ toolDescription?: string;
341
+ };
342
+ };
343
+ OnFunctionCallNode: {
344
+ id: string;
345
+ /**
346
+ * @description discriminator enum property added by openapi-typescript
347
+ * @enum {string}
348
+ */
349
+ type: "OnFunctionCall";
350
+ label?: string;
351
+ position: components["schemas"]["NodePosition"];
352
+ };
353
+ DelayNode: {
354
+ id: string;
355
+ /**
356
+ * @description discriminator enum property added by openapi-typescript
357
+ * @enum {string}
358
+ */
359
+ type: "Delay";
360
+ label?: string;
361
+ position: components["schemas"]["NodePosition"];
362
+ arguments: {
363
+ /** @description Time in milliseconds to pause execution */
364
+ delayMs?: number;
365
+ };
366
+ };
367
+ TickerNode: {
368
+ id: string;
369
+ /**
370
+ * @description discriminator enum property added by openapi-typescript
371
+ * @enum {string}
372
+ */
373
+ type: "Ticker";
374
+ label?: string;
375
+ position: components["schemas"]["NodePosition"];
376
+ arguments: {
377
+ /** @description How many units between ticks */
378
+ intervalValue?: number;
379
+ /**
380
+ * @description Time unit for the interval
381
+ * @enum {string}
382
+ */
383
+ intervalUnit: "milliseconds" | "seconds" | "minutes" | "hours";
384
+ };
385
+ };
386
+ AlarmNode: {
387
+ id: string;
388
+ /**
389
+ * @description discriminator enum property added by openapi-typescript
390
+ * @enum {string}
391
+ */
392
+ type: "Alarm";
393
+ label?: string;
394
+ position: components["schemas"]["NodePosition"];
395
+ arguments: {
396
+ /** @description Time of day to fire (HH:MM, 24h format) */
397
+ time?: string;
398
+ /** @description Days of the week to fire on (empty = every day) */
399
+ days: string[];
400
+ };
401
+ };
402
+ WebSearchToolNode: {
403
+ id: string;
404
+ /**
405
+ * @description discriminator enum property added by openapi-typescript
406
+ * @enum {string}
407
+ */
408
+ type: "WebSearchTool";
409
+ label?: string;
410
+ position: components["schemas"]["NodePosition"];
411
+ arguments: {
412
+ /** @description Maximum number of search results to return per call. Defaults to 5 when omitted or non-positive. Capped at 20. */
413
+ maxResults?: number;
414
+ };
415
+ };
416
+ OnStartupNode: {
417
+ id: string;
418
+ /**
419
+ * @description discriminator enum property added by openapi-typescript
420
+ * @enum {string}
421
+ */
422
+ type: "OnStartup";
423
+ label?: string;
424
+ position: components["schemas"]["NodePosition"];
425
+ };
426
+ OnPinEdgeNode: {
427
+ id: string;
428
+ /**
429
+ * @description discriminator enum property added by openapi-typescript
430
+ * @enum {string}
431
+ */
432
+ type: "OnPinEdge";
433
+ label?: string;
434
+ position: components["schemas"]["NodePosition"];
435
+ arguments: {
436
+ /** @description IO variable ID of the digital pin to watch */
437
+ pinReference?: string;
438
+ /**
439
+ * @description Edge transition that fires the trigger
440
+ * @enum {string}
441
+ */
442
+ edge: "rising" | "falling" | "both";
443
+ };
444
+ };
445
+ OnSerialReceiveNode: {
446
+ id: string;
447
+ /**
448
+ * @description discriminator enum property added by openapi-typescript
449
+ * @enum {string}
450
+ */
451
+ type: "OnSerialReceive";
452
+ label?: string;
453
+ position: components["schemas"]["NodePosition"];
454
+ arguments: {
455
+ /** @description Reference to an IO variable ID (the serial port to listen on) */
456
+ portReference?: string;
457
+ output: components["schemas"]["OutputBinding"];
458
+ };
459
+ };
460
+ OnThresholdNode: {
461
+ id: string;
462
+ /**
463
+ * @description discriminator enum property added by openapi-typescript
464
+ * @enum {string}
465
+ */
466
+ type: "OnThreshold";
467
+ label?: string;
468
+ position: components["schemas"]["NodePosition"];
469
+ arguments: {
470
+ /** @description Numeric variable to watch for threshold crossings */
471
+ variable?: components["schemas"]["Reference"];
472
+ /** @description Value the variable crosses to fire the trigger */
473
+ threshold?: number;
474
+ /**
475
+ * @description Crossing direction to fire on (default both)
476
+ * @enum {string}
477
+ */
478
+ direction: "rising" | "falling" | "both";
479
+ /** @description Hysteresis band width around threshold; 0 disables (default 0) */
480
+ deadband?: number;
481
+ /** @description Optional binding for the triggering value */
482
+ output: components["schemas"]["OutputBinding"];
483
+ };
484
+ };
485
+ SetVariableNode: {
486
+ id: string;
487
+ /**
488
+ * @description discriminator enum property added by openapi-typescript
489
+ * @enum {string}
490
+ */
491
+ type: "SetVariable";
492
+ label?: string;
493
+ position: components["schemas"]["NodePosition"];
494
+ arguments: {
495
+ variable?: components["schemas"]["Reference"];
496
+ value: components["schemas"]["Expression"];
497
+ };
498
+ };
499
+ MqttPublishNode: {
500
+ id: string;
501
+ /**
502
+ * @description discriminator enum property added by openapi-typescript
503
+ * @enum {string}
504
+ */
505
+ type: "MqttPublish";
506
+ label?: string;
507
+ position: components["schemas"]["NodePosition"];
508
+ arguments: {
509
+ /** @description Reference to an MQTT channel ID (the channel carries the topic; resolved to a broker at deploy time) */
510
+ channelReference?: string;
511
+ dataType: components["schemas"]["DataType"];
512
+ value: components["schemas"]["Expression"];
513
+ /**
514
+ * @description MQTT Quality of Service level
515
+ * @enum {integer}
516
+ */
517
+ qos: 0 | 1 | 2;
518
+ /** @description Whether the broker should retain the message */
519
+ retain: boolean;
520
+ };
521
+ };
522
+ OnMqttMessageNode: {
523
+ id: string;
524
+ /**
525
+ * @description discriminator enum property added by openapi-typescript
526
+ * @enum {string}
527
+ */
528
+ type: "OnMqttMessage";
529
+ label?: string;
530
+ position: components["schemas"]["NodePosition"];
531
+ arguments: {
532
+ /** @description Reference to an MQTT channel ID (the channel carries the topic filter; resolved to a broker at deploy time) */
533
+ channelReference?: string;
534
+ dataType: components["schemas"]["DataType"];
535
+ output: components["schemas"]["OutputBinding"];
536
+ };
537
+ };
538
+ Node: components["schemas"]["ReadPinNode"] | components["schemas"]["WritePinNode"] | components["schemas"]["AgentNode"] | components["schemas"]["IfNode"] | components["schemas"]["SerialReadNode"] | components["schemas"]["SerialWriteNode"] | components["schemas"]["RetrieverNode"] | components["schemas"]["WebFetchNode"] | components["schemas"]["FunctionCallNode"] | components["schemas"]["OnFunctionCallNode"] | components["schemas"]["DelayNode"] | components["schemas"]["TickerNode"] | components["schemas"]["AlarmNode"] | components["schemas"]["WebSearchToolNode"] | components["schemas"]["OnStartupNode"] | components["schemas"]["OnPinEdgeNode"] | components["schemas"]["OnSerialReceiveNode"] | components["schemas"]["OnThresholdNode"] | components["schemas"]["SetVariableNode"] | components["schemas"]["MqttPublishNode"] | components["schemas"]["OnMqttMessageNode"];
539
+ /** @enum {string} */
540
+ EdgeType: "control" | "tool" | "agentTask" | "agentChoice" | "agentDelegate";
541
+ Vertex: {
542
+ nodeId: string;
543
+ port: string;
544
+ };
545
+ Edge: {
546
+ id: string;
547
+ type: components["schemas"]["EdgeType"];
548
+ from: components["schemas"]["Vertex"];
549
+ to: components["schemas"]["Vertex"];
550
+ /** @description Prompt expression sent to the agent. Present on `agentTask` (required) and `agentDelegate` (optional). */
551
+ prompt?: components["schemas"]["Expression"];
552
+ /** @description LLM-readable explanation of when the edge should fire. Present on `agentChoice` and `agentDelegate`. */
553
+ description?: string;
554
+ };
555
+ /** @description A named, typed variable with a stable uid that can be referenced throughout the workflow. */
556
+ Variable: {
557
+ /** @description Stable identifier that survives renames */
558
+ uid: string;
559
+ name: string;
560
+ dataType: components["schemas"]["DataType"];
561
+ /** @description Initial value matching the dataType (number, boolean, or string). Only used by declared variables. */
562
+ initialValue?: unknown;
563
+ };
564
+ FunctionInfo: {
565
+ id: string;
566
+ /** Format: int32 */
567
+ version: number;
568
+ name: string;
569
+ arguments: components["schemas"]["Variable"][];
570
+ returns: components["schemas"]["Variable"][];
571
+ };
572
+ Function: {
573
+ functionInfo: components["schemas"]["FunctionInfo"];
574
+ /** @description Maps return variable uid to its Expression */
575
+ outputAssignments: {
576
+ [key: string]: components["schemas"]["Expression"];
577
+ };
578
+ nodes: components["schemas"]["Node"][];
579
+ edges: components["schemas"]["Edge"][];
580
+ declaredVariables: components["schemas"]["Variable"][];
581
+ };
582
+ GPIOINChannel: {
583
+ /**
584
+ * @description discriminator enum property added by openapi-typescript
585
+ * @enum {string}
586
+ */
587
+ type: "GPIOIN";
588
+ id: string;
589
+ label: string;
590
+ /**
591
+ * @description Pin bias configuration
592
+ * @enum {string}
593
+ */
594
+ bias: "none" | "pullup" | "pulldown";
595
+ /** @description Debounce window in milliseconds */
596
+ debounceMs: number;
597
+ };
598
+ GPIOOUTChannel: {
599
+ /**
600
+ * @description discriminator enum property added by openapi-typescript
601
+ * @enum {string}
602
+ */
603
+ type: "GPIOOUT";
604
+ id: string;
605
+ label: string;
606
+ };
607
+ ADCChannel: {
608
+ /**
609
+ * @description discriminator enum property added by openapi-typescript
610
+ * @enum {string}
611
+ */
612
+ type: "ADC";
613
+ id: string;
614
+ label: string;
615
+ };
616
+ PWMChannel: {
617
+ /**
618
+ * @description discriminator enum property added by openapi-typescript
619
+ * @enum {string}
620
+ */
621
+ type: "PWM";
622
+ id: string;
623
+ label: string;
624
+ /** @description PWM frequency in Hz */
625
+ frequency: number;
626
+ };
627
+ DACChannel: {
628
+ /**
629
+ * @description discriminator enum property added by openapi-typescript
630
+ * @enum {string}
631
+ */
632
+ type: "DAC";
633
+ id: string;
634
+ label: string;
635
+ };
636
+ UARTChannel: {
637
+ /**
638
+ * @description discriminator enum property added by openapi-typescript
639
+ * @enum {string}
640
+ */
641
+ type: "UART";
642
+ id: string;
643
+ label: string;
644
+ };
645
+ MQTTChannel: {
646
+ /**
647
+ * @description discriminator enum property added by openapi-typescript
648
+ * @enum {string}
649
+ */
650
+ type: "MQTT";
651
+ id: string;
652
+ label: string;
653
+ /** @description Topic this channel publishes to / subscribes on. The engine wraps it with the bound broker's prefix at runtime. */
654
+ topic: string;
655
+ };
656
+ LOGChannel: {
657
+ /**
658
+ * @description discriminator enum property added by openapi-typescript
659
+ * @enum {string}
660
+ */
661
+ type: "LOG";
662
+ id: string;
663
+ label: string;
664
+ /**
665
+ * @description Severity the engine records messages written to this channel at.
666
+ * @enum {string}
667
+ */
668
+ level: "debug" | "info" | "warn" | "error";
669
+ /** @description Optional category stamped on each line so the backend can group workflow-emitted logs apart from engine diagnostics. */
670
+ tag?: string;
671
+ };
672
+ Channel: components["schemas"]["GPIOINChannel"] | components["schemas"]["GPIOOUTChannel"] | components["schemas"]["ADCChannel"] | components["schemas"]["PWMChannel"] | components["schemas"]["DACChannel"] | components["schemas"]["UARTChannel"] | components["schemas"]["MQTTChannel"] | components["schemas"]["LOGChannel"];
673
+ /** @description One .md file that agent nodes can read and write to. */
674
+ MemoryFile: {
675
+ /**
676
+ * @description discriminator enum property added by openapi-typescript
677
+ * @enum {string}
678
+ */
679
+ type: "MemoryFile";
680
+ /** @description Stable identifier that survives renames; referenced from MemoryRef. */
681
+ id: string;
682
+ /** @description Display name. Unique per agent (LLM tool enums use it). */
683
+ label: string;
684
+ description: string;
685
+ content: string;
686
+ /** @description Byte cap; null means unlimited. */
687
+ maxSizeBytes?: number | null;
688
+ };
689
+ /** @description A vector database for retrieval-augmented generation (RAG). */
690
+ VectorDatabase: {
691
+ /**
692
+ * @description discriminator enum property added by openapi-typescript
693
+ * @enum {string}
694
+ */
695
+ type: "VectorDatabase";
696
+ /** @description Stable identifier; referenced from Retriever nodes. */
697
+ id: string;
698
+ /** @description Display name. */
699
+ label: string;
700
+ description?: string;
701
+ };
702
+ Memory: components["schemas"]["MemoryFile"] | components["schemas"]["VectorDatabase"];
703
+ /** @enum {string} */
704
+ ModelCapability: "chat" | "embedding" | "function_call" | "vision" | "fine_tuning" | "reasoning" | "classification" | "code";
705
+ /** @description A custom or self-hosted language model that agent nodes can reference. */
706
+ LLMModel: {
707
+ /**
708
+ * @description discriminator enum property added by openapi-typescript
709
+ * @enum {string}
710
+ */
711
+ type: "LLMModel";
712
+ /** @description Stable identifier; this is the ModelID nodes reference. */
713
+ id: string;
714
+ /** @description Display name. */
715
+ label: string;
716
+ /** @description Capabilities this model supports (used to filter model pickers). */
717
+ capabilities: components["schemas"]["ModelCapability"][];
718
+ };
719
+ Model: components["schemas"]["LLMModel"];
720
+ /** @description Workflow represents the deployment format of a project, passed to agents. */
721
+ Workflow: {
722
+ /**
723
+ * Format: int32
724
+ * @description Monotonic version of the persisted workflow format, bumped when the serialized shape changes.
725
+ */
726
+ schemaVersion: number;
727
+ nodes: components["schemas"]["Node"][];
728
+ edges: components["schemas"]["Edge"][];
729
+ functions: components["schemas"]["Function"][];
730
+ declaredVariables: components["schemas"]["Variable"][];
731
+ channels: components["schemas"]["Channel"][];
732
+ memory: components["schemas"]["Memory"][];
733
+ /** @description Declared custom/self-hosted models; referenced from nodes by id. Static catalog models need no declaration. */
734
+ models: components["schemas"]["Model"][];
735
+ };
736
+ };
737
+ responses: never;
738
+ parameters: never;
739
+ requestBodies: never;
740
+ headers: never;
741
+ pathItems: never;
742
+ }
743
+ export type $defs = Record<string, never>;
744
+ export type operations = Record<string, never>;