@foresthubai/workflow-core 0.3.0

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 (339) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +14 -0
  3. package/README.md +63 -0
  4. package/dist/api/index.d.ts +7 -0
  5. package/dist/api/index.d.ts.map +1 -0
  6. package/dist/api/index.js +2 -0
  7. package/dist/api/index.js.map +1 -0
  8. package/dist/api/workflow.d.ts +607 -0
  9. package/dist/api/workflow.d.ts.map +1 -0
  10. package/dist/api/workflow.js +6 -0
  11. package/dist/api/workflow.js.map +1 -0
  12. package/dist/channel/Channel.d.ts +10 -0
  13. package/dist/channel/Channel.d.ts.map +1 -0
  14. package/dist/channel/Channel.js +2 -0
  15. package/dist/channel/Channel.js.map +1 -0
  16. package/dist/channel/ChannelDefinition.d.ts +27 -0
  17. package/dist/channel/ChannelDefinition.d.ts.map +1 -0
  18. package/dist/channel/ChannelDefinition.js +50 -0
  19. package/dist/channel/ChannelDefinition.js.map +1 -0
  20. package/dist/channel/index.d.ts +7 -0
  21. package/dist/channel/index.d.ts.map +1 -0
  22. package/dist/channel/index.js +4 -0
  23. package/dist/channel/index.js.map +1 -0
  24. package/dist/channel/serialization.d.ts +17 -0
  25. package/dist/channel/serialization.d.ts.map +1 -0
  26. package/dist/channel/serialization.js +63 -0
  27. package/dist/channel/serialization.js.map +1 -0
  28. package/dist/deploy/index.d.ts +2 -0
  29. package/dist/deploy/index.d.ts.map +1 -0
  30. package/dist/deploy/index.js +2 -0
  31. package/dist/deploy/index.js.map +1 -0
  32. package/dist/deploy/requirements.d.ts +17 -0
  33. package/dist/deploy/requirements.d.ts.map +1 -0
  34. package/dist/deploy/requirements.js +41 -0
  35. package/dist/deploy/requirements.js.map +1 -0
  36. package/dist/diagnostics/__fixtures__/diagnosticFixtures.d.ts +28 -0
  37. package/dist/diagnostics/__fixtures__/diagnosticFixtures.d.ts.map +1 -0
  38. package/dist/diagnostics/__fixtures__/diagnosticFixtures.js +125 -0
  39. package/dist/diagnostics/__fixtures__/diagnosticFixtures.js.map +1 -0
  40. package/dist/diagnostics/diagnostics.d.ts +128 -0
  41. package/dist/diagnostics/diagnostics.d.ts.map +1 -0
  42. package/dist/diagnostics/diagnostics.js +783 -0
  43. package/dist/diagnostics/diagnostics.js.map +1 -0
  44. package/dist/diagnostics/index.d.ts +3 -0
  45. package/dist/diagnostics/index.d.ts.map +1 -0
  46. package/dist/diagnostics/index.js +2 -0
  47. package/dist/diagnostics/index.js.map +1 -0
  48. package/dist/edge/Edge.d.ts +22 -0
  49. package/dist/edge/Edge.d.ts.map +1 -0
  50. package/dist/edge/Edge.js +2 -0
  51. package/dist/edge/Edge.js.map +1 -0
  52. package/dist/edge/EdgeDefinition.d.ts +10 -0
  53. package/dist/edge/EdgeDefinition.d.ts.map +1 -0
  54. package/dist/edge/EdgeDefinition.js +36 -0
  55. package/dist/edge/EdgeDefinition.js.map +1 -0
  56. package/dist/edge/EdgeType.d.ts +6 -0
  57. package/dist/edge/EdgeType.d.ts.map +1 -0
  58. package/dist/edge/EdgeType.js +7 -0
  59. package/dist/edge/EdgeType.js.map +1 -0
  60. package/dist/edge/index.d.ts +6 -0
  61. package/dist/edge/index.d.ts.map +1 -0
  62. package/dist/edge/index.js +6 -0
  63. package/dist/edge/index.js.map +1 -0
  64. package/dist/edge/serialization.d.ts +18 -0
  65. package/dist/edge/serialization.d.ts.map +1 -0
  66. package/dist/edge/serialization.js +76 -0
  67. package/dist/edge/serialization.js.map +1 -0
  68. package/dist/expression/index.d.ts +5 -0
  69. package/dist/expression/index.d.ts.map +1 -0
  70. package/dist/expression/index.js +3 -0
  71. package/dist/expression/index.js.map +1 -0
  72. package/dist/expression/parser.d.ts +14 -0
  73. package/dist/expression/parser.d.ts.map +1 -0
  74. package/dist/expression/parser.js +309 -0
  75. package/dist/expression/parser.js.map +1 -0
  76. package/dist/expression/types.d.ts +11 -0
  77. package/dist/expression/types.d.ts.map +1 -0
  78. package/dist/expression/types.js +20 -0
  79. package/dist/expression/types.js.map +1 -0
  80. package/dist/function/FunctionDeclaration.d.ts +43 -0
  81. package/dist/function/FunctionDeclaration.d.ts.map +1 -0
  82. package/dist/function/FunctionDeclaration.js +17 -0
  83. package/dist/function/FunctionDeclaration.js.map +1 -0
  84. package/dist/function/index.d.ts +4 -0
  85. package/dist/function/index.d.ts.map +1 -0
  86. package/dist/function/index.js +3 -0
  87. package/dist/function/index.js.map +1 -0
  88. package/dist/function/serialization.d.ts +20 -0
  89. package/dist/function/serialization.d.ts.map +1 -0
  90. package/dist/function/serialization.js +26 -0
  91. package/dist/function/serialization.js.map +1 -0
  92. package/dist/id/index.d.ts +7 -0
  93. package/dist/id/index.d.ts.map +1 -0
  94. package/dist/id/index.js +9 -0
  95. package/dist/id/index.js.map +1 -0
  96. package/dist/index.d.ts +11 -0
  97. package/dist/index.d.ts.map +1 -0
  98. package/dist/index.js +14 -0
  99. package/dist/index.js.map +1 -0
  100. package/dist/memory/Memory.d.ts +12 -0
  101. package/dist/memory/Memory.d.ts.map +1 -0
  102. package/dist/memory/Memory.js +2 -0
  103. package/dist/memory/Memory.js.map +1 -0
  104. package/dist/memory/MemoryDefinition.d.ts +16 -0
  105. package/dist/memory/MemoryDefinition.d.ts.map +1 -0
  106. package/dist/memory/MemoryDefinition.js +2 -0
  107. package/dist/memory/MemoryDefinition.js.map +1 -0
  108. package/dist/memory/MemoryFileDefinition.d.ts +8 -0
  109. package/dist/memory/MemoryFileDefinition.d.ts.map +1 -0
  110. package/dist/memory/MemoryFileDefinition.js +36 -0
  111. package/dist/memory/MemoryFileDefinition.js.map +1 -0
  112. package/dist/memory/MemoryRegistry.d.ts +17 -0
  113. package/dist/memory/MemoryRegistry.d.ts.map +1 -0
  114. package/dist/memory/MemoryRegistry.js +29 -0
  115. package/dist/memory/MemoryRegistry.js.map +1 -0
  116. package/dist/memory/VectorDatabaseDefinition.d.ts +7 -0
  117. package/dist/memory/VectorDatabaseDefinition.d.ts.map +1 -0
  118. package/dist/memory/VectorDatabaseDefinition.js +20 -0
  119. package/dist/memory/VectorDatabaseDefinition.js.map +1 -0
  120. package/dist/memory/index.d.ts +9 -0
  121. package/dist/memory/index.d.ts.map +1 -0
  122. package/dist/memory/index.js +6 -0
  123. package/dist/memory/index.js.map +1 -0
  124. package/dist/memory/serialization.d.ts +11 -0
  125. package/dist/memory/serialization.d.ts.map +1 -0
  126. package/dist/memory/serialization.js +44 -0
  127. package/dist/memory/serialization.js.map +1 -0
  128. package/dist/migration/index.d.ts +5 -0
  129. package/dist/migration/index.d.ts.map +1 -0
  130. package/dist/migration/index.js +4 -0
  131. package/dist/migration/index.js.map +1 -0
  132. package/dist/migration/migrate.d.ts +11 -0
  133. package/dist/migration/migrate.d.ts.map +1 -0
  134. package/dist/migration/migrate.js +52 -0
  135. package/dist/migration/migrate.js.map +1 -0
  136. package/dist/migration/migrations.d.ts +22 -0
  137. package/dist/migration/migrations.d.ts.map +1 -0
  138. package/dist/migration/migrations.js +10 -0
  139. package/dist/migration/migrations.js.map +1 -0
  140. package/dist/migration/version.d.ts +9 -0
  141. package/dist/migration/version.d.ts.map +1 -0
  142. package/dist/migration/version.js +9 -0
  143. package/dist/migration/version.js.map +1 -0
  144. package/dist/model/LLMModelDefinition.d.ts +7 -0
  145. package/dist/model/LLMModelDefinition.d.ts.map +1 -0
  146. package/dist/model/LLMModelDefinition.js +11 -0
  147. package/dist/model/LLMModelDefinition.js.map +1 -0
  148. package/dist/model/Model.d.ts +21 -0
  149. package/dist/model/Model.d.ts.map +1 -0
  150. package/dist/model/Model.js +15 -0
  151. package/dist/model/Model.js.map +1 -0
  152. package/dist/model/ModelDefinition.d.ts +15 -0
  153. package/dist/model/ModelDefinition.d.ts.map +1 -0
  154. package/dist/model/ModelDefinition.js +2 -0
  155. package/dist/model/ModelDefinition.js.map +1 -0
  156. package/dist/model/ModelRegistry.d.ts +17 -0
  157. package/dist/model/ModelRegistry.d.ts.map +1 -0
  158. package/dist/model/ModelRegistry.js +27 -0
  159. package/dist/model/ModelRegistry.js.map +1 -0
  160. package/dist/model/index.d.ts +8 -0
  161. package/dist/model/index.d.ts.map +1 -0
  162. package/dist/model/index.js +5 -0
  163. package/dist/model/index.js.map +1 -0
  164. package/dist/model/serialization.d.ts +8 -0
  165. package/dist/model/serialization.d.ts.map +1 -0
  166. package/dist/model/serialization.js +25 -0
  167. package/dist/model/serialization.js.map +1 -0
  168. package/dist/node/AgentNode.d.ts +21 -0
  169. package/dist/node/AgentNode.d.ts.map +1 -0
  170. package/dist/node/AgentNode.js +60 -0
  171. package/dist/node/AgentNode.js.map +1 -0
  172. package/dist/node/DataNode.d.ts +14 -0
  173. package/dist/node/DataNode.d.ts.map +1 -0
  174. package/dist/node/DataNode.js +26 -0
  175. package/dist/node/DataNode.js.map +1 -0
  176. package/dist/node/FunctionNode.d.ts +24 -0
  177. package/dist/node/FunctionNode.d.ts.map +1 -0
  178. package/dist/node/FunctionNode.js +44 -0
  179. package/dist/node/FunctionNode.js.map +1 -0
  180. package/dist/node/InputNode.d.ts +46 -0
  181. package/dist/node/InputNode.d.ts.map +1 -0
  182. package/dist/node/InputNode.js +133 -0
  183. package/dist/node/InputNode.js.map +1 -0
  184. package/dist/node/LogicNode.d.ts +13 -0
  185. package/dist/node/LogicNode.d.ts.map +1 -0
  186. package/dist/node/LogicNode.js +19 -0
  187. package/dist/node/LogicNode.js.map +1 -0
  188. package/dist/node/MqttNode.d.ts +27 -0
  189. package/dist/node/MqttNode.d.ts.map +1 -0
  190. package/dist/node/MqttNode.js +96 -0
  191. package/dist/node/MqttNode.js.map +1 -0
  192. package/dist/node/Node.d.ts +49 -0
  193. package/dist/node/Node.d.ts.map +1 -0
  194. package/dist/node/Node.js +9 -0
  195. package/dist/node/Node.js.map +1 -0
  196. package/dist/node/NodeDefinition.d.ts +30 -0
  197. package/dist/node/NodeDefinition.d.ts.map +1 -0
  198. package/dist/node/NodeDefinition.js +2 -0
  199. package/dist/node/NodeDefinition.js.map +1 -0
  200. package/dist/node/NodeRegistry.d.ts +19 -0
  201. package/dist/node/NodeRegistry.d.ts.map +1 -0
  202. package/dist/node/NodeRegistry.js +65 -0
  203. package/dist/node/NodeRegistry.js.map +1 -0
  204. package/dist/node/OutputNode.d.ts +23 -0
  205. package/dist/node/OutputNode.d.ts.map +1 -0
  206. package/dist/node/OutputNode.js +62 -0
  207. package/dist/node/OutputNode.js.map +1 -0
  208. package/dist/node/ToolNode.d.ts +12 -0
  209. package/dist/node/ToolNode.d.ts.map +1 -0
  210. package/dist/node/ToolNode.js +18 -0
  211. package/dist/node/ToolNode.js.map +1 -0
  212. package/dist/node/TriggerNode.d.ts +67 -0
  213. package/dist/node/TriggerNode.d.ts.map +1 -0
  214. package/dist/node/TriggerNode.js +172 -0
  215. package/dist/node/TriggerNode.js.map +1 -0
  216. package/dist/node/constants.d.ts +16 -0
  217. package/dist/node/constants.d.ts.map +1 -0
  218. package/dist/node/constants.js +18 -0
  219. package/dist/node/constants.js.map +1 -0
  220. package/dist/node/index.d.ts +12 -0
  221. package/dist/node/index.d.ts.map +1 -0
  222. package/dist/node/index.js +9 -0
  223. package/dist/node/index.js.map +1 -0
  224. package/dist/node/methods.d.ts +73 -0
  225. package/dist/node/methods.d.ts.map +1 -0
  226. package/dist/node/methods.js +261 -0
  227. package/dist/node/methods.js.map +1 -0
  228. package/dist/node/serialization.d.ts +25 -0
  229. package/dist/node/serialization.d.ts.map +1 -0
  230. package/dist/node/serialization.js +525 -0
  231. package/dist/node/serialization.js.map +1 -0
  232. package/dist/parameter/OutputParameter.d.ts +69 -0
  233. package/dist/parameter/OutputParameter.d.ts.map +1 -0
  234. package/dist/parameter/OutputParameter.js +6 -0
  235. package/dist/parameter/OutputParameter.js.map +1 -0
  236. package/dist/parameter/Parameter.d.ts +152 -0
  237. package/dist/parameter/Parameter.d.ts.map +1 -0
  238. package/dist/parameter/Parameter.js +86 -0
  239. package/dist/parameter/Parameter.js.map +1 -0
  240. package/dist/parameter/index.d.ts +5 -0
  241. package/dist/parameter/index.d.ts.map +1 -0
  242. package/dist/parameter/index.js +3 -0
  243. package/dist/parameter/index.js.map +1 -0
  244. package/dist/variable/Variable.d.ts +25 -0
  245. package/dist/variable/Variable.d.ts.map +1 -0
  246. package/dist/variable/Variable.js +2 -0
  247. package/dist/variable/Variable.js.map +1 -0
  248. package/dist/variable/index.d.ts +3 -0
  249. package/dist/variable/index.d.ts.map +1 -0
  250. package/dist/variable/index.js +5 -0
  251. package/dist/variable/index.js.map +1 -0
  252. package/dist/variable/operations.d.ts +37 -0
  253. package/dist/variable/operations.d.ts.map +1 -0
  254. package/dist/variable/operations.js +88 -0
  255. package/dist/variable/operations.js.map +1 -0
  256. package/dist/workflow/Workflow.d.ts +38 -0
  257. package/dist/workflow/Workflow.d.ts.map +1 -0
  258. package/dist/workflow/Workflow.js +8 -0
  259. package/dist/workflow/Workflow.js.map +1 -0
  260. package/dist/workflow/index.d.ts +4 -0
  261. package/dist/workflow/index.d.ts.map +1 -0
  262. package/dist/workflow/index.js +3 -0
  263. package/dist/workflow/index.js.map +1 -0
  264. package/dist/workflow/serialization.d.ts +43 -0
  265. package/dist/workflow/serialization.d.ts.map +1 -0
  266. package/dist/workflow/serialization.js +215 -0
  267. package/dist/workflow/serialization.js.map +1 -0
  268. package/package.json +105 -0
  269. package/src/api/index.ts +11 -0
  270. package/src/api/workflow.ts +607 -0
  271. package/src/channel/Channel.ts +11 -0
  272. package/src/channel/ChannelDefinition.ts +76 -0
  273. package/src/channel/index.ts +6 -0
  274. package/src/channel/serialization.ts +68 -0
  275. package/src/deploy/index.ts +1 -0
  276. package/src/deploy/requirements.test.ts +61 -0
  277. package/src/deploy/requirements.ts +41 -0
  278. package/src/diagnostics/__fixtures__/diagnosticFixtures.ts +158 -0
  279. package/src/diagnostics/diagnostics.test.ts +878 -0
  280. package/src/diagnostics/diagnostics.ts +936 -0
  281. package/src/diagnostics/index.ts +11 -0
  282. package/src/edge/Edge.ts +23 -0
  283. package/src/edge/EdgeDefinition.ts +45 -0
  284. package/src/edge/EdgeType.ts +19 -0
  285. package/src/edge/index.ts +8 -0
  286. package/src/edge/serialization.ts +83 -0
  287. package/src/expression/index.ts +4 -0
  288. package/src/expression/parser.ts +362 -0
  289. package/src/expression/types.ts +30 -0
  290. package/src/function/FunctionDeclaration.ts +54 -0
  291. package/src/function/index.ts +3 -0
  292. package/src/function/serialization.ts +40 -0
  293. package/src/globals.d.ts +9 -0
  294. package/src/id/index.ts +8 -0
  295. package/src/index.ts +22 -0
  296. package/src/memory/Memory.ts +15 -0
  297. package/src/memory/MemoryDefinition.ts +16 -0
  298. package/src/memory/MemoryFileDefinition.ts +37 -0
  299. package/src/memory/MemoryRegistry.ts +35 -0
  300. package/src/memory/VectorDatabaseDefinition.ts +21 -0
  301. package/src/memory/index.ts +8 -0
  302. package/src/memory/serialization.ts +47 -0
  303. package/src/migration/index.ts +4 -0
  304. package/src/migration/migrate.test.ts +44 -0
  305. package/src/migration/migrate.ts +58 -0
  306. package/src/migration/migrations.ts +24 -0
  307. package/src/migration/version.ts +9 -0
  308. package/src/model/LLMModelDefinition.ts +12 -0
  309. package/src/model/Model.ts +39 -0
  310. package/src/model/ModelDefinition.ts +15 -0
  311. package/src/model/ModelRegistry.ts +33 -0
  312. package/src/model/index.ts +7 -0
  313. package/src/model/serialization.ts +30 -0
  314. package/src/node/AgentNode.ts +82 -0
  315. package/src/node/DataNode.ts +41 -0
  316. package/src/node/FunctionNode.ts +76 -0
  317. package/src/node/InputNode.ts +185 -0
  318. package/src/node/LogicNode.ts +33 -0
  319. package/src/node/MqttNode.ts +127 -0
  320. package/src/node/Node.ts +61 -0
  321. package/src/node/NodeDefinition.ts +37 -0
  322. package/src/node/NodeRegistry.ts +85 -0
  323. package/src/node/OutputNode.ts +87 -0
  324. package/src/node/ToolNode.ts +32 -0
  325. package/src/node/TriggerNode.ts +272 -0
  326. package/src/node/constants.ts +16 -0
  327. package/src/node/index.ts +26 -0
  328. package/src/node/methods.ts +278 -0
  329. package/src/node/serialization.ts +544 -0
  330. package/src/parameter/OutputParameter.ts +68 -0
  331. package/src/parameter/Parameter.ts +243 -0
  332. package/src/parameter/index.ts +33 -0
  333. package/src/variable/Variable.ts +10 -0
  334. package/src/variable/index.ts +16 -0
  335. package/src/variable/operations.ts +106 -0
  336. package/src/workflow/Workflow.ts +41 -0
  337. package/src/workflow/index.ts +3 -0
  338. package/src/workflow/serialization.test.ts +240 -0
  339. package/src/workflow/serialization.ts +242 -0
@@ -0,0 +1,607 @@
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
+ /** @enum {string} */
11
+ DataType: "int" | "float" | "bool" | "string";
12
+ /** @enum {string} */
13
+ SignalType: "digital" | "analog";
14
+ /** @enum {string} */
15
+ EdgeType: "control" | "tool" | "agentTask" | "agentChoice" | "agentDelegate";
16
+ NodePosition: {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ /** @description Workflow represents the deployment format of a project, passed to agents. */
21
+ Workflow: {
22
+ /**
23
+ * Format: int32
24
+ * @description Monotonic version of the persisted workflow format, bumped when the serialized shape changes.
25
+ */
26
+ schemaVersion: number;
27
+ nodes: components["schemas"]["Node"][];
28
+ edges: components["schemas"]["Edge"][];
29
+ functions: components["schemas"]["Function"][];
30
+ declaredVariables: components["schemas"]["Variable"][];
31
+ channels: components["schemas"]["Channel"][];
32
+ memory: components["schemas"]["Memory"][];
33
+ /** @description Declared custom/self-hosted models; referenced from nodes by id. Static catalog models need no declaration. */
34
+ models: components["schemas"]["Model"][];
35
+ };
36
+ Edge: {
37
+ id: string;
38
+ type: components["schemas"]["EdgeType"];
39
+ from: components["schemas"]["Vertex"];
40
+ to: components["schemas"]["Vertex"];
41
+ /** @description Prompt expression sent to the agent. Present on `agentTask` (required) and `agentDelegate` (optional). */
42
+ prompt?: components["schemas"]["Expression"];
43
+ /** @description LLM-readable explanation of when the edge should fire. Present on `agentChoice` and `agentDelegate`. */
44
+ description?: string;
45
+ };
46
+ Vertex: {
47
+ nodeId: string;
48
+ port: string;
49
+ };
50
+ Function: {
51
+ functionInfo: components["schemas"]["FunctionInfo"];
52
+ /** @description Maps return variable uid to its Expression */
53
+ outputAssignments: {
54
+ [key: string]: components["schemas"]["Expression"];
55
+ };
56
+ nodes: components["schemas"]["Node"][];
57
+ edges: components["schemas"]["Edge"][];
58
+ declaredVariables: components["schemas"]["Variable"][];
59
+ };
60
+ FunctionInfo: {
61
+ id: string;
62
+ /** Format: int32 */
63
+ version: number;
64
+ name: string;
65
+ arguments: components["schemas"]["Variable"][];
66
+ returns: components["schemas"]["Variable"][];
67
+ };
68
+ /** @description A named, typed variable with a stable uid that can be referenced throughout the workflow. */
69
+ Variable: {
70
+ /** @description Stable identifier that survives renames */
71
+ uid: string;
72
+ name: string;
73
+ dataType: components["schemas"]["DataType"];
74
+ /** @description Initial value matching the dataType (number, boolean, or string). Only used by declared variables. */
75
+ initialValue?: unknown;
76
+ };
77
+ Expression: {
78
+ expression: string;
79
+ /** @description A list of referenced variable IDs used in the expression */
80
+ references: components["schemas"]["Reference"][];
81
+ dataType: components["schemas"]["DataType"];
82
+ };
83
+ Reference: {
84
+ srcId: string;
85
+ varId: string;
86
+ };
87
+ OutputBinding: {
88
+ /** @description Discard the output if false; route it according to `mode` if true */
89
+ active: boolean;
90
+ /** @enum {string} */
91
+ mode: "emit" | "assign";
92
+ /** @description Variable name (when mode=emit) */
93
+ name?: string;
94
+ /** @description Existing variable to route to (when mode=assign) */
95
+ target?: components["schemas"]["Reference"];
96
+ };
97
+ OutputDeclaration: {
98
+ /** @enum {string} */
99
+ mode: "emit" | "assign";
100
+ /** @description JSON property name of the declared output */
101
+ name: string;
102
+ dataType: components["schemas"]["DataType"];
103
+ /** @description New variable uid (when mode=emit) */
104
+ uid?: string;
105
+ /** @description Existing variable to route to (when mode=assign) */
106
+ target?: components["schemas"]["Reference"];
107
+ };
108
+ Memory: components["schemas"]["MemoryFile"] | components["schemas"]["VectorDatabase"];
109
+ /** @description One .md file that agent nodes can read and write to. */
110
+ MemoryFile: {
111
+ /**
112
+ * @description discriminator enum property added by openapi-typescript
113
+ * @enum {string}
114
+ */
115
+ type: "MemoryFile";
116
+ /** @description Stable identifier that survives renames; referenced from MemoryRef. */
117
+ id: string;
118
+ /** @description Display name. Unique per agent (LLM tool enums use it). */
119
+ label: string;
120
+ description: string;
121
+ content: string;
122
+ /** @description Byte cap; null means unlimited. */
123
+ maxSizeBytes?: number | null;
124
+ };
125
+ /** @description A vector database for retrieval-augmented generation (RAG). */
126
+ VectorDatabase: {
127
+ /**
128
+ * @description discriminator enum property added by openapi-typescript
129
+ * @enum {string}
130
+ */
131
+ type: "VectorDatabase";
132
+ /** @description Stable identifier; referenced from Retriever nodes. */
133
+ id: string;
134
+ /** @description Display name. */
135
+ label: string;
136
+ description?: string;
137
+ };
138
+ /** @description Reference from an LLM agent node to a declared MemoryFile with an access mode. */
139
+ MemoryRef: {
140
+ /** @description id of the referenced MemoryFile. */
141
+ id: string;
142
+ /**
143
+ * @description r = read-only; rw = read + write.
144
+ * @enum {string}
145
+ */
146
+ mode: "r" | "rw";
147
+ };
148
+ /** @enum {string} */
149
+ ModelCapability: "chat" | "embedding" | "function_call" | "vision" | "fine_tuning" | "reasoning" | "classification" | "code";
150
+ Model: components["schemas"]["LLMModel"];
151
+ /** @description A custom or self-hosted language model that agent nodes can reference. */
152
+ LLMModel: {
153
+ /**
154
+ * @description discriminator enum property added by openapi-typescript
155
+ * @enum {string}
156
+ */
157
+ type: "LLMModel";
158
+ /** @description Stable identifier; this is the ModelID nodes reference. */
159
+ id: string;
160
+ /** @description Display name. */
161
+ label: string;
162
+ /** @description Capabilities this model supports (used to filter model pickers). */
163
+ capabilities: components["schemas"]["ModelCapability"][];
164
+ };
165
+ 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"];
166
+ WebSearchToolNode: {
167
+ id: string;
168
+ /**
169
+ * @description discriminator enum property added by openapi-typescript
170
+ * @enum {string}
171
+ */
172
+ type: "WebSearchTool";
173
+ label?: string;
174
+ position: components["schemas"]["NodePosition"];
175
+ arguments: {
176
+ /** @description Maximum number of search results to return per call. Defaults to 5 when omitted or non-positive. Capped at 20. */
177
+ maxResults?: number;
178
+ };
179
+ };
180
+ DelayNode: {
181
+ id: string;
182
+ /**
183
+ * @description discriminator enum property added by openapi-typescript
184
+ * @enum {string}
185
+ */
186
+ type: "Delay";
187
+ label?: string;
188
+ position: components["schemas"]["NodePosition"];
189
+ arguments: {
190
+ /** @description Time in milliseconds to pause execution */
191
+ delayMs?: number;
192
+ };
193
+ };
194
+ TickerNode: {
195
+ id: string;
196
+ /**
197
+ * @description discriminator enum property added by openapi-typescript
198
+ * @enum {string}
199
+ */
200
+ type: "Ticker";
201
+ label?: string;
202
+ position: components["schemas"]["NodePosition"];
203
+ arguments: {
204
+ /** @description How many units between ticks */
205
+ intervalValue?: number;
206
+ /**
207
+ * @description Time unit for the interval
208
+ * @enum {string}
209
+ */
210
+ intervalUnit: "milliseconds" | "seconds" | "minutes" | "hours";
211
+ };
212
+ };
213
+ AlarmNode: {
214
+ id: string;
215
+ /**
216
+ * @description discriminator enum property added by openapi-typescript
217
+ * @enum {string}
218
+ */
219
+ type: "Alarm";
220
+ label?: string;
221
+ position: components["schemas"]["NodePosition"];
222
+ arguments: {
223
+ /** @description Time of day to fire (HH:MM, 24h format) */
224
+ time?: string;
225
+ /** @description Days of the week to fire on (empty = every day) */
226
+ days: string[];
227
+ };
228
+ };
229
+ FunctionCallNode: {
230
+ id: string;
231
+ /**
232
+ * @description discriminator enum property added by openapi-typescript
233
+ * @enum {string}
234
+ */
235
+ type: "FunctionCall";
236
+ label?: string;
237
+ position: components["schemas"]["NodePosition"];
238
+ /** @description Id of the function this node calls. The signature is resolved from the workflow's functions table. */
239
+ functionId: string;
240
+ arguments: {
241
+ inputBindings?: {
242
+ [key: string]: components["schemas"]["Expression"];
243
+ };
244
+ outputBindings?: {
245
+ [key: string]: components["schemas"]["OutputBinding"];
246
+ };
247
+ /** @description Description exposed to the LLM when this function is wired as a tool. Ignored in exec mode. */
248
+ toolDescription?: string;
249
+ };
250
+ };
251
+ OnFunctionCallNode: {
252
+ id: string;
253
+ /**
254
+ * @description discriminator enum property added by openapi-typescript
255
+ * @enum {string}
256
+ */
257
+ type: "OnFunctionCall";
258
+ label?: string;
259
+ position: components["schemas"]["NodePosition"];
260
+ };
261
+ OnStartupNode: {
262
+ id: string;
263
+ /**
264
+ * @description discriminator enum property added by openapi-typescript
265
+ * @enum {string}
266
+ */
267
+ type: "OnStartup";
268
+ label?: string;
269
+ position: components["schemas"]["NodePosition"];
270
+ };
271
+ OnPinEdgeNode: {
272
+ id: string;
273
+ /**
274
+ * @description discriminator enum property added by openapi-typescript
275
+ * @enum {string}
276
+ */
277
+ type: "OnPinEdge";
278
+ label?: string;
279
+ position: components["schemas"]["NodePosition"];
280
+ arguments: {
281
+ /** @description IO variable ID of the digital pin to watch */
282
+ pinReference?: string;
283
+ /**
284
+ * @description Edge transition that fires the trigger
285
+ * @enum {string}
286
+ */
287
+ edge: "rising" | "falling" | "both";
288
+ };
289
+ };
290
+ OnSerialReceiveNode: {
291
+ id: string;
292
+ /**
293
+ * @description discriminator enum property added by openapi-typescript
294
+ * @enum {string}
295
+ */
296
+ type: "OnSerialReceive";
297
+ label?: string;
298
+ position: components["schemas"]["NodePosition"];
299
+ arguments: {
300
+ /** @description Reference to an IO variable ID (the serial port to listen on) */
301
+ portReference?: string;
302
+ output: components["schemas"]["OutputBinding"];
303
+ };
304
+ };
305
+ OnThresholdNode: {
306
+ id: string;
307
+ /**
308
+ * @description discriminator enum property added by openapi-typescript
309
+ * @enum {string}
310
+ */
311
+ type: "OnThreshold";
312
+ label?: string;
313
+ position: components["schemas"]["NodePosition"];
314
+ arguments: {
315
+ /** @description Numeric variable to watch for threshold crossings */
316
+ variable?: components["schemas"]["Reference"];
317
+ /** @description Value the variable crosses to fire the trigger */
318
+ threshold?: number;
319
+ /**
320
+ * @description Crossing direction to fire on (default both)
321
+ * @enum {string}
322
+ */
323
+ direction: "rising" | "falling" | "both";
324
+ /** @description Hysteresis band width around threshold; 0 disables (default 0) */
325
+ deadband?: number;
326
+ /** @description Optional binding for the triggering value */
327
+ output: components["schemas"]["OutputBinding"];
328
+ };
329
+ };
330
+ RetrieverNode: {
331
+ id: string;
332
+ /**
333
+ * @description discriminator enum property added by openapi-typescript
334
+ * @enum {string}
335
+ */
336
+ type: "Retriever";
337
+ label?: string;
338
+ position: components["schemas"]["NodePosition"];
339
+ arguments: {
340
+ /** @description Reference to a declared VectorDatabase memory id */
341
+ memoryReference?: string;
342
+ /** @description Number of results to return */
343
+ topK?: number;
344
+ /** @description Search query expression */
345
+ query: components["schemas"]["Expression"];
346
+ output: components["schemas"]["OutputBinding"];
347
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
348
+ toolDescription?: string;
349
+ };
350
+ };
351
+ WebFetchNode: {
352
+ id: string;
353
+ /**
354
+ * @description discriminator enum property added by openapi-typescript
355
+ * @enum {string}
356
+ */
357
+ type: "WebFetch";
358
+ label?: string;
359
+ position: components["schemas"]["NodePosition"];
360
+ arguments: {
361
+ /** @description URL expression to fetch (http or https) */
362
+ url: components["schemas"]["Expression"];
363
+ /** @description Maximum characters of extracted text to return. Defaults to 50000 when omitted or non-positive. */
364
+ maxChars?: number;
365
+ output: components["schemas"]["OutputBinding"];
366
+ };
367
+ };
368
+ ReadPinNode: {
369
+ id: string;
370
+ /**
371
+ * @description discriminator enum property added by openapi-typescript
372
+ * @enum {string}
373
+ */
374
+ type: "ReadPin";
375
+ label?: string;
376
+ position: components["schemas"]["NodePosition"];
377
+ arguments: {
378
+ /** @description Reference to an IO variable ID */
379
+ pinReference?: string;
380
+ signalType: components["schemas"]["SignalType"];
381
+ output: components["schemas"]["OutputBinding"];
382
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
383
+ toolDescription?: string;
384
+ };
385
+ };
386
+ WritePinNode: {
387
+ id: string;
388
+ /**
389
+ * @description discriminator enum property added by openapi-typescript
390
+ * @enum {string}
391
+ */
392
+ type: "WritePin";
393
+ label?: string;
394
+ position: components["schemas"]["NodePosition"];
395
+ arguments: {
396
+ /** @description Reference to an IO variable ID */
397
+ pinReference?: string;
398
+ signalType: components["schemas"]["SignalType"];
399
+ value: components["schemas"]["Expression"];
400
+ };
401
+ };
402
+ AgentNode: {
403
+ id: string;
404
+ /**
405
+ * @description discriminator enum property added by openapi-typescript
406
+ * @enum {string}
407
+ */
408
+ type: "Agent";
409
+ label?: string;
410
+ position: components["schemas"]["NodePosition"];
411
+ arguments: {
412
+ /** @description Name of the agent */
413
+ name?: string;
414
+ model?: string;
415
+ instructions?: string;
416
+ /** @description Maximum number of agent runner turns */
417
+ maxTurns?: number;
418
+ answer: components["schemas"]["OutputBinding"];
419
+ /** @description Ordered list of structured-output declarations. Names must be unique within this list */
420
+ outputDeclarations: components["schemas"]["OutputDeclaration"][];
421
+ /** @description Memory files this agent can access, each with an access mode. */
422
+ memoryRefs: components["schemas"]["MemoryRef"][];
423
+ /** @description Description exposed to the LLM when this node is wired as a tool. Ignored in exec mode. */
424
+ toolDescription?: string;
425
+ };
426
+ };
427
+ IfNode: {
428
+ id: string;
429
+ /**
430
+ * @description discriminator enum property added by openapi-typescript
431
+ * @enum {string}
432
+ */
433
+ type: "If";
434
+ label?: string;
435
+ position: components["schemas"]["NodePosition"];
436
+ arguments: {
437
+ condition: components["schemas"]["Expression"];
438
+ };
439
+ };
440
+ SerialReadNode: {
441
+ id: string;
442
+ /**
443
+ * @description discriminator enum property added by openapi-typescript
444
+ * @enum {string}
445
+ */
446
+ type: "SerialRead";
447
+ label?: string;
448
+ position: components["schemas"]["NodePosition"];
449
+ arguments: {
450
+ /** @description Reference to an UART ID (the serial port to read from) */
451
+ portReference?: string;
452
+ prompt?: string;
453
+ output: components["schemas"]["OutputBinding"];
454
+ };
455
+ };
456
+ SerialWriteNode: {
457
+ id: string;
458
+ /**
459
+ * @description discriminator enum property added by openapi-typescript
460
+ * @enum {string}
461
+ */
462
+ type: "SerialWrite";
463
+ label?: string;
464
+ position: components["schemas"]["NodePosition"];
465
+ arguments: {
466
+ /** @description Reference to a UART channel ID (the serial port to write to) */
467
+ portReference?: string;
468
+ value: components["schemas"]["Expression"];
469
+ };
470
+ };
471
+ SetVariableNode: {
472
+ id: string;
473
+ /**
474
+ * @description discriminator enum property added by openapi-typescript
475
+ * @enum {string}
476
+ */
477
+ type: "SetVariable";
478
+ label?: string;
479
+ position: components["schemas"]["NodePosition"];
480
+ arguments: {
481
+ variable?: components["schemas"]["Reference"];
482
+ value: components["schemas"]["Expression"];
483
+ };
484
+ };
485
+ MqttPublishNode: {
486
+ id: string;
487
+ /**
488
+ * @description discriminator enum property added by openapi-typescript
489
+ * @enum {string}
490
+ */
491
+ type: "MqttPublish";
492
+ label?: string;
493
+ position: components["schemas"]["NodePosition"];
494
+ arguments: {
495
+ /** @description Reference to an MQTT channel ID (the channel carries the topic; resolved to a broker at deploy time) */
496
+ channelReference?: string;
497
+ dataType: components["schemas"]["DataType"];
498
+ value: components["schemas"]["Expression"];
499
+ /**
500
+ * @description MQTT Quality of Service level
501
+ * @enum {integer}
502
+ */
503
+ qos: 0 | 1 | 2;
504
+ /** @description Whether the broker should retain the message */
505
+ retain: boolean;
506
+ };
507
+ };
508
+ OnMqttMessageNode: {
509
+ id: string;
510
+ /**
511
+ * @description discriminator enum property added by openapi-typescript
512
+ * @enum {string}
513
+ */
514
+ type: "OnMqttMessage";
515
+ label?: string;
516
+ position: components["schemas"]["NodePosition"];
517
+ arguments: {
518
+ /** @description Reference to an MQTT channel ID (the channel carries the topic filter; resolved to a broker at deploy time) */
519
+ channelReference?: string;
520
+ dataType: components["schemas"]["DataType"];
521
+ output: components["schemas"]["OutputBinding"];
522
+ };
523
+ };
524
+ Channel: components["schemas"]["GPIOINChannel"] | components["schemas"]["GPIOOUTChannel"] | components["schemas"]["ADCChannel"] | components["schemas"]["PWMChannel"] | components["schemas"]["DACChannel"] | components["schemas"]["UARTChannel"] | components["schemas"]["MQTTChannel"];
525
+ GPIOINChannel: {
526
+ /**
527
+ * @description discriminator enum property added by openapi-typescript
528
+ * @enum {string}
529
+ */
530
+ type: "GPIOIN";
531
+ id: string;
532
+ label: string;
533
+ /**
534
+ * @description Pin bias configuration
535
+ * @enum {string}
536
+ */
537
+ bias: "none" | "pullup" | "pulldown";
538
+ /** @description Debounce window in milliseconds */
539
+ debounceMs: number;
540
+ };
541
+ GPIOOUTChannel: {
542
+ /**
543
+ * @description discriminator enum property added by openapi-typescript
544
+ * @enum {string}
545
+ */
546
+ type: "GPIOOUT";
547
+ id: string;
548
+ label: string;
549
+ };
550
+ ADCChannel: {
551
+ /**
552
+ * @description discriminator enum property added by openapi-typescript
553
+ * @enum {string}
554
+ */
555
+ type: "ADC";
556
+ id: string;
557
+ label: string;
558
+ };
559
+ PWMChannel: {
560
+ /**
561
+ * @description discriminator enum property added by openapi-typescript
562
+ * @enum {string}
563
+ */
564
+ type: "PWM";
565
+ id: string;
566
+ label: string;
567
+ /** @description PWM frequency in Hz */
568
+ frequency: number;
569
+ };
570
+ DACChannel: {
571
+ /**
572
+ * @description discriminator enum property added by openapi-typescript
573
+ * @enum {string}
574
+ */
575
+ type: "DAC";
576
+ id: string;
577
+ label: string;
578
+ };
579
+ UARTChannel: {
580
+ /**
581
+ * @description discriminator enum property added by openapi-typescript
582
+ * @enum {string}
583
+ */
584
+ type: "UART";
585
+ id: string;
586
+ label: string;
587
+ };
588
+ MQTTChannel: {
589
+ /**
590
+ * @description discriminator enum property added by openapi-typescript
591
+ * @enum {string}
592
+ */
593
+ type: "MQTT";
594
+ id: string;
595
+ label: string;
596
+ /** @description Topic this channel publishes to / subscribes on. The engine wraps it with the bound broker's prefix at runtime. */
597
+ topic: string;
598
+ };
599
+ };
600
+ responses: never;
601
+ parameters: never;
602
+ requestBodies: never;
603
+ headers: never;
604
+ pathItems: never;
605
+ }
606
+ export type $defs = Record<string, never>;
607
+ export type operations = Record<string, never>;
@@ -0,0 +1,11 @@
1
+ export type ChannelType = "GPIOIN" | "GPIOOUT" | "ADC" | "PWM" | "DAC" | "UART" | "MQTT";
2
+
3
+ export const ALL_CHANNEL_TYPES: ChannelType[] = ["GPIOIN", "GPIOOUT", "ADC", "PWM", "DAC", "UART", "MQTT"];
4
+
5
+ /** Interface for a channel instance in the workflow */
6
+ export interface Channel {
7
+ id: string;
8
+ label: string;
9
+ type: ChannelType;
10
+ arguments: Record<string, unknown>;
11
+ }