@decaf-ts/ui-decorators 0.20.9 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/dist/ui-decorators.cjs +1 -1
  2. package/dist/ui-decorators.cjs.map +1 -1
  3. package/dist/ui-decorators.js +1 -1
  4. package/dist/ui-decorators.js.map +1 -1
  5. package/lib/cjs/index.cjs +3 -3
  6. package/lib/esm/index.js +3 -3
  7. package/lib/types/index.d.cts +3 -3
  8. package/lib/types/index.d.mts +3 -3
  9. package/package.json +2 -18
  10. package/lib/cjs/graph/GraphExecutionStateMapper.cjs +0 -97
  11. package/lib/cjs/graph/GraphExecutionStateMapper.cjs.map +0 -1
  12. package/lib/cjs/graph/GraphResolution.cjs +0 -17
  13. package/lib/cjs/graph/GraphResolution.cjs.map +0 -1
  14. package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs +0 -20
  15. package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs.map +0 -1
  16. package/lib/cjs/graph/catalog/GraphCredentialReference.cjs +0 -15
  17. package/lib/cjs/graph/catalog/GraphCredentialReference.cjs.map +0 -1
  18. package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs +0 -16
  19. package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs.map +0 -1
  20. package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs +0 -31
  21. package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs.map +0 -1
  22. package/lib/cjs/graph/catalog/GraphIconReference.cjs +0 -22
  23. package/lib/cjs/graph/catalog/GraphIconReference.cjs.map +0 -1
  24. package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs +0 -307
  25. package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs.map +0 -1
  26. package/lib/cjs/graph/catalog/GraphNodeCapability.cjs +0 -23
  27. package/lib/cjs/graph/catalog/GraphNodeCapability.cjs.map +0 -1
  28. package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs +0 -11
  29. package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs.map +0 -1
  30. package/lib/cjs/graph/catalog/GraphNodeManifest.cjs +0 -23
  31. package/lib/cjs/graph/catalog/GraphNodeManifest.cjs.map +0 -1
  32. package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs +0 -50
  33. package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs.map +0 -1
  34. package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs +0 -29
  35. package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs.map +0 -1
  36. package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs +0 -18
  37. package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs.map +0 -1
  38. package/lib/cjs/graph/catalog/GraphParameterBase.cjs +0 -4
  39. package/lib/cjs/graph/catalog/GraphParameterBase.cjs.map +0 -1
  40. package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs +0 -29
  41. package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs.map +0 -1
  42. package/lib/cjs/graph/catalog/GraphParameterOption.cjs +0 -18
  43. package/lib/cjs/graph/catalog/GraphParameterOption.cjs.map +0 -1
  44. package/lib/cjs/graph/catalog/GraphParameterValidation.cjs +0 -57
  45. package/lib/cjs/graph/catalog/GraphParameterValidation.cjs.map +0 -1
  46. package/lib/cjs/graph/catalog/GraphPortManifest.cjs +0 -19
  47. package/lib/cjs/graph/catalog/GraphPortManifest.cjs.map +0 -1
  48. package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs +0 -19
  49. package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs.map +0 -1
  50. package/lib/cjs/graph/catalog/GraphValueSchema.cjs +0 -25
  51. package/lib/cjs/graph/catalog/GraphValueSchema.cjs.map +0 -1
  52. package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs +0 -164
  53. package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs.map +0 -1
  54. package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs +0 -63
  55. package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs.map +0 -1
  56. package/lib/cjs/graph/catalog/index.cjs +0 -39
  57. package/lib/cjs/graph/catalog/index.cjs.map +0 -1
  58. package/lib/cjs/graph/constants.cjs +0 -320
  59. package/lib/cjs/graph/constants.cjs.map +0 -1
  60. package/lib/cjs/graph/decorators.cjs +0 -151
  61. package/lib/cjs/graph/decorators.cjs.map +0 -1
  62. package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs +0 -353
  63. package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs.map +0 -1
  64. package/lib/cjs/graph/document/GraphEdgeInstance.cjs +0 -4
  65. package/lib/cjs/graph/document/GraphEdgeInstance.cjs.map +0 -1
  66. package/lib/cjs/graph/document/GraphEndpoint.cjs +0 -27
  67. package/lib/cjs/graph/document/GraphEndpoint.cjs.map +0 -1
  68. package/lib/cjs/graph/document/GraphJsonValue.cjs +0 -82
  69. package/lib/cjs/graph/document/GraphJsonValue.cjs.map +0 -1
  70. package/lib/cjs/graph/document/GraphLoopConfiguration.cjs +0 -4
  71. package/lib/cjs/graph/document/GraphLoopConfiguration.cjs.map +0 -1
  72. package/lib/cjs/graph/document/GraphNodeBinding.cjs +0 -27
  73. package/lib/cjs/graph/document/GraphNodeBinding.cjs.map +0 -1
  74. package/lib/cjs/graph/document/GraphNodeInstance.cjs +0 -4
  75. package/lib/cjs/graph/document/GraphNodeInstance.cjs.map +0 -1
  76. package/lib/cjs/graph/document/GraphWorkflowDocument.cjs +0 -16
  77. package/lib/cjs/graph/document/GraphWorkflowDocument.cjs.map +0 -1
  78. package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs +0 -309
  79. package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs.map +0 -1
  80. package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs +0 -78
  81. package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs.map +0 -1
  82. package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs +0 -70
  83. package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs.map +0 -1
  84. package/lib/cjs/graph/document/GraphWorkflowUiState.cjs +0 -4
  85. package/lib/cjs/graph/document/GraphWorkflowUiState.cjs.map +0 -1
  86. package/lib/cjs/graph/document/index.cjs +0 -30
  87. package/lib/cjs/graph/document/index.cjs.map +0 -1
  88. package/lib/cjs/graph/index.cjs +0 -33
  89. package/lib/cjs/graph/index.cjs.map +0 -1
  90. package/lib/cjs/graph/nodes/agents/agent.cjs +0 -110
  91. package/lib/cjs/graph/nodes/agents/agent.cjs.map +0 -1
  92. package/lib/cjs/graph/nodes/base.cjs +0 -36
  93. package/lib/cjs/graph/nodes/base.cjs.map +0 -1
  94. package/lib/cjs/graph/nodes/boundary/input-value.cjs +0 -57
  95. package/lib/cjs/graph/nodes/boundary/input-value.cjs.map +0 -1
  96. package/lib/cjs/graph/nodes/category-styles.cjs +0 -38
  97. package/lib/cjs/graph/nodes/category-styles.cjs.map +0 -1
  98. package/lib/cjs/graph/nodes/flow-control/break.cjs +0 -63
  99. package/lib/cjs/graph/nodes/flow-control/break.cjs.map +0 -1
  100. package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs +0 -67
  101. package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs.map +0 -1
  102. package/lib/cjs/graph/nodes/flow-control/human-approval.cjs +0 -69
  103. package/lib/cjs/graph/nodes/flow-control/human-approval.cjs.map +0 -1
  104. package/lib/cjs/graph/nodes/flow-control/if.cjs +0 -71
  105. package/lib/cjs/graph/nodes/flow-control/if.cjs.map +0 -1
  106. package/lib/cjs/graph/nodes/flow-control/parallel.cjs +0 -61
  107. package/lib/cjs/graph/nodes/flow-control/parallel.cjs.map +0 -1
  108. package/lib/cjs/graph/nodes/flow-control/switch.cjs +0 -126
  109. package/lib/cjs/graph/nodes/flow-control/switch.cjs.map +0 -1
  110. package/lib/cjs/graph/nodes/index.cjs +0 -123
  111. package/lib/cjs/graph/nodes/index.cjs.map +0 -1
  112. package/lib/cjs/graph/nodes/loops/foreach.cjs +0 -86
  113. package/lib/cjs/graph/nodes/loops/foreach.cjs.map +0 -1
  114. package/lib/cjs/graph/nodes/loops/until.cjs +0 -74
  115. package/lib/cjs/graph/nodes/loops/until.cjs.map +0 -1
  116. package/lib/cjs/graph/nodes/loops/while.cjs +0 -74
  117. package/lib/cjs/graph/nodes/loops/while.cjs.map +0 -1
  118. package/lib/cjs/graph/nodes/manifests.cjs +0 -342
  119. package/lib/cjs/graph/nodes/manifests.cjs.map +0 -1
  120. package/lib/cjs/graph/nodes/triggers/chat.cjs +0 -70
  121. package/lib/cjs/graph/nodes/triggers/chat.cjs.map +0 -1
  122. package/lib/cjs/graph/nodes/triggers/event.cjs +0 -58
  123. package/lib/cjs/graph/nodes/triggers/event.cjs.map +0 -1
  124. package/lib/cjs/graph/nodes/triggers/form.cjs +0 -59
  125. package/lib/cjs/graph/nodes/triggers/form.cjs.map +0 -1
  126. package/lib/cjs/graph/nodes/triggers/manual.cjs +0 -60
  127. package/lib/cjs/graph/nodes/triggers/manual.cjs.map +0 -1
  128. package/lib/cjs/graph/nodes/triggers/schedule.cjs +0 -60
  129. package/lib/cjs/graph/nodes/triggers/schedule.cjs.map +0 -1
  130. package/lib/cjs/graph/nodes/triggers/webhook.cjs +0 -62
  131. package/lib/cjs/graph/nodes/triggers/webhook.cjs.map +0 -1
  132. package/lib/cjs/graph/nodes/utility/code.cjs +0 -99
  133. package/lib/cjs/graph/nodes/utility/code.cjs.map +0 -1
  134. package/lib/cjs/graph/nodes/utility/delay.cjs +0 -61
  135. package/lib/cjs/graph/nodes/utility/delay.cjs.map +0 -1
  136. package/lib/cjs/graph/nodes/utility/log.cjs +0 -62
  137. package/lib/cjs/graph/nodes/utility/log.cjs.map +0 -1
  138. package/lib/cjs/graph/nodes/utility/map.cjs +0 -61
  139. package/lib/cjs/graph/nodes/utility/map.cjs.map +0 -1
  140. package/lib/cjs/graph/nodes/utility/merge.cjs +0 -62
  141. package/lib/cjs/graph/nodes/utility/merge.cjs.map +0 -1
  142. package/lib/cjs/graph/nodes/utility/return.cjs +0 -61
  143. package/lib/cjs/graph/nodes/utility/return.cjs.map +0 -1
  144. package/lib/cjs/graph/nodes/utility/utility-log.cjs +0 -66
  145. package/lib/cjs/graph/nodes/utility/utility-log.cjs.map +0 -1
  146. package/lib/cjs/graph/overrides/Metadata.cjs +0 -23
  147. package/lib/cjs/graph/overrides/Metadata.cjs.map +0 -1
  148. package/lib/cjs/graph/overrides/Rendering.cjs +0 -4
  149. package/lib/cjs/graph/overrides/Rendering.cjs.map +0 -1
  150. package/lib/cjs/graph/overrides/index.cjs +0 -21
  151. package/lib/cjs/graph/overrides/index.cjs.map +0 -1
  152. package/lib/cjs/graph/overrides/overrides.cjs +0 -20
  153. package/lib/cjs/graph/overrides/overrides.cjs.map +0 -1
  154. package/lib/cjs/graph/reader.cjs +0 -301
  155. package/lib/cjs/graph/reader.cjs.map +0 -1
  156. package/lib/cjs/graph/registry.cjs +0 -67
  157. package/lib/cjs/graph/registry.cjs.map +0 -1
  158. package/lib/cjs/graph/snapshot.cjs +0 -695
  159. package/lib/cjs/graph/snapshot.cjs.map +0 -1
  160. package/lib/cjs/graph/types.cjs +0 -7
  161. package/lib/cjs/graph/types.cjs.map +0 -1
  162. package/lib/esm/graph/GraphExecutionStateMapper.js +0 -91
  163. package/lib/esm/graph/GraphExecutionStateMapper.js.map +0 -1
  164. package/lib/esm/graph/GraphResolution.js +0 -13
  165. package/lib/esm/graph/GraphResolution.js.map +0 -1
  166. package/lib/esm/graph/catalog/GraphConnectionPolicy.js +0 -16
  167. package/lib/esm/graph/catalog/GraphConnectionPolicy.js.map +0 -1
  168. package/lib/esm/graph/catalog/GraphCredentialReference.js +0 -9
  169. package/lib/esm/graph/catalog/GraphCredentialReference.js.map +0 -1
  170. package/lib/esm/graph/catalog/GraphCredentialRequirement.js +0 -12
  171. package/lib/esm/graph/catalog/GraphCredentialRequirement.js.map +0 -1
  172. package/lib/esm/graph/catalog/GraphDynamicPortRule.js +0 -25
  173. package/lib/esm/graph/catalog/GraphDynamicPortRule.js.map +0 -1
  174. package/lib/esm/graph/catalog/GraphIconReference.js +0 -18
  175. package/lib/esm/graph/catalog/GraphIconReference.js.map +0 -1
  176. package/lib/esm/graph/catalog/GraphManifestCompiler.js +0 -303
  177. package/lib/esm/graph/catalog/GraphManifestCompiler.js.map +0 -1
  178. package/lib/esm/graph/catalog/GraphNodeCapability.js +0 -17
  179. package/lib/esm/graph/catalog/GraphNodeCapability.js.map +0 -1
  180. package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js +0 -7
  181. package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js.map +0 -1
  182. package/lib/esm/graph/catalog/GraphNodeManifest.js +0 -17
  183. package/lib/esm/graph/catalog/GraphNodeManifest.js.map +0 -1
  184. package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js +0 -42
  185. package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js.map +0 -1
  186. package/lib/esm/graph/catalog/GraphNodeMethodManifest.js +0 -23
  187. package/lib/esm/graph/catalog/GraphNodeMethodManifest.js.map +0 -1
  188. package/lib/esm/graph/catalog/GraphNodePolicyManifest.js +0 -14
  189. package/lib/esm/graph/catalog/GraphNodePolicyManifest.js.map +0 -1
  190. package/lib/esm/graph/catalog/GraphParameterBase.js +0 -2
  191. package/lib/esm/graph/catalog/GraphParameterBase.js.map +0 -1
  192. package/lib/esm/graph/catalog/GraphParameterDefinition.js +0 -23
  193. package/lib/esm/graph/catalog/GraphParameterDefinition.js.map +0 -1
  194. package/lib/esm/graph/catalog/GraphParameterOption.js +0 -13
  195. package/lib/esm/graph/catalog/GraphParameterOption.js.map +0 -1
  196. package/lib/esm/graph/catalog/GraphParameterValidation.js +0 -50
  197. package/lib/esm/graph/catalog/GraphParameterValidation.js.map +0 -1
  198. package/lib/esm/graph/catalog/GraphPortManifest.js +0 -13
  199. package/lib/esm/graph/catalog/GraphPortManifest.js.map +0 -1
  200. package/lib/esm/graph/catalog/GraphResourceLocatorMode.js +0 -13
  201. package/lib/esm/graph/catalog/GraphResourceLocatorMode.js.map +0 -1
  202. package/lib/esm/graph/catalog/GraphValueSchema.js +0 -19
  203. package/lib/esm/graph/catalog/GraphValueSchema.js.map +0 -1
  204. package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js +0 -156
  205. package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js.map +0 -1
  206. package/lib/esm/graph/catalog/GraphVisibilityExpression.js +0 -58
  207. package/lib/esm/graph/catalog/GraphVisibilityExpression.js.map +0 -1
  208. package/lib/esm/graph/catalog/index.js +0 -22
  209. package/lib/esm/graph/catalog/index.js.map +0 -1
  210. package/lib/esm/graph/constants.js +0 -335
  211. package/lib/esm/graph/constants.js.map +0 -1
  212. package/lib/esm/graph/decorators.js +0 -141
  213. package/lib/esm/graph/decorators.js.map +0 -1
  214. package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js +0 -347
  215. package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js.map +0 -1
  216. package/lib/esm/graph/document/GraphEdgeInstance.js +0 -2
  217. package/lib/esm/graph/document/GraphEdgeInstance.js.map +0 -1
  218. package/lib/esm/graph/document/GraphEndpoint.js +0 -21
  219. package/lib/esm/graph/document/GraphEndpoint.js.map +0 -1
  220. package/lib/esm/graph/document/GraphJsonValue.js +0 -73
  221. package/lib/esm/graph/document/GraphJsonValue.js.map +0 -1
  222. package/lib/esm/graph/document/GraphLoopConfiguration.js +0 -2
  223. package/lib/esm/graph/document/GraphLoopConfiguration.js.map +0 -1
  224. package/lib/esm/graph/document/GraphNodeBinding.js +0 -22
  225. package/lib/esm/graph/document/GraphNodeBinding.js.map +0 -1
  226. package/lib/esm/graph/document/GraphNodeInstance.js +0 -2
  227. package/lib/esm/graph/document/GraphNodeInstance.js.map +0 -1
  228. package/lib/esm/graph/document/GraphWorkflowDocument.js +0 -12
  229. package/lib/esm/graph/document/GraphWorkflowDocument.js.map +0 -1
  230. package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js +0 -303
  231. package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js.map +0 -1
  232. package/lib/esm/graph/document/GraphWorkflowDocumentReader.js +0 -62
  233. package/lib/esm/graph/document/GraphWorkflowDocumentReader.js.map +0 -1
  234. package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js +0 -63
  235. package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js.map +0 -1
  236. package/lib/esm/graph/document/GraphWorkflowUiState.js +0 -2
  237. package/lib/esm/graph/document/GraphWorkflowUiState.js.map +0 -1
  238. package/lib/esm/graph/document/index.js +0 -13
  239. package/lib/esm/graph/document/index.js.map +0 -1
  240. package/lib/esm/graph/index.js +0 -16
  241. package/lib/esm/graph/index.js.map +0 -1
  242. package/lib/esm/graph/nodes/agents/agent.js +0 -101
  243. package/lib/esm/graph/nodes/agents/agent.js.map +0 -1
  244. package/lib/esm/graph/nodes/base.js +0 -31
  245. package/lib/esm/graph/nodes/base.js.map +0 -1
  246. package/lib/esm/graph/nodes/boundary/input-value.js +0 -48
  247. package/lib/esm/graph/nodes/boundary/input-value.js.map +0 -1
  248. package/lib/esm/graph/nodes/category-styles.js +0 -34
  249. package/lib/esm/graph/nodes/category-styles.js.map +0 -1
  250. package/lib/esm/graph/nodes/flow-control/break.js +0 -54
  251. package/lib/esm/graph/nodes/flow-control/break.js.map +0 -1
  252. package/lib/esm/graph/nodes/flow-control/error-boundary.js +0 -58
  253. package/lib/esm/graph/nodes/flow-control/error-boundary.js.map +0 -1
  254. package/lib/esm/graph/nodes/flow-control/human-approval.js +0 -60
  255. package/lib/esm/graph/nodes/flow-control/human-approval.js.map +0 -1
  256. package/lib/esm/graph/nodes/flow-control/if.js +0 -62
  257. package/lib/esm/graph/nodes/flow-control/if.js.map +0 -1
  258. package/lib/esm/graph/nodes/flow-control/parallel.js +0 -52
  259. package/lib/esm/graph/nodes/flow-control/parallel.js.map +0 -1
  260. package/lib/esm/graph/nodes/flow-control/switch.js +0 -117
  261. package/lib/esm/graph/nodes/flow-control/switch.js.map +0 -1
  262. package/lib/esm/graph/nodes/index.js +0 -105
  263. package/lib/esm/graph/nodes/index.js.map +0 -1
  264. package/lib/esm/graph/nodes/loops/foreach.js +0 -77
  265. package/lib/esm/graph/nodes/loops/foreach.js.map +0 -1
  266. package/lib/esm/graph/nodes/loops/until.js +0 -65
  267. package/lib/esm/graph/nodes/loops/until.js.map +0 -1
  268. package/lib/esm/graph/nodes/loops/while.js +0 -65
  269. package/lib/esm/graph/nodes/loops/while.js.map +0 -1
  270. package/lib/esm/graph/nodes/manifests.js +0 -338
  271. package/lib/esm/graph/nodes/manifests.js.map +0 -1
  272. package/lib/esm/graph/nodes/triggers/chat.js +0 -61
  273. package/lib/esm/graph/nodes/triggers/chat.js.map +0 -1
  274. package/lib/esm/graph/nodes/triggers/event.js +0 -49
  275. package/lib/esm/graph/nodes/triggers/event.js.map +0 -1
  276. package/lib/esm/graph/nodes/triggers/form.js +0 -50
  277. package/lib/esm/graph/nodes/triggers/form.js.map +0 -1
  278. package/lib/esm/graph/nodes/triggers/manual.js +0 -51
  279. package/lib/esm/graph/nodes/triggers/manual.js.map +0 -1
  280. package/lib/esm/graph/nodes/triggers/schedule.js +0 -51
  281. package/lib/esm/graph/nodes/triggers/schedule.js.map +0 -1
  282. package/lib/esm/graph/nodes/triggers/webhook.js +0 -53
  283. package/lib/esm/graph/nodes/triggers/webhook.js.map +0 -1
  284. package/lib/esm/graph/nodes/utility/code.js +0 -90
  285. package/lib/esm/graph/nodes/utility/code.js.map +0 -1
  286. package/lib/esm/graph/nodes/utility/delay.js +0 -52
  287. package/lib/esm/graph/nodes/utility/delay.js.map +0 -1
  288. package/lib/esm/graph/nodes/utility/log.js +0 -53
  289. package/lib/esm/graph/nodes/utility/log.js.map +0 -1
  290. package/lib/esm/graph/nodes/utility/map.js +0 -52
  291. package/lib/esm/graph/nodes/utility/map.js.map +0 -1
  292. package/lib/esm/graph/nodes/utility/merge.js +0 -53
  293. package/lib/esm/graph/nodes/utility/merge.js.map +0 -1
  294. package/lib/esm/graph/nodes/utility/return.js +0 -52
  295. package/lib/esm/graph/nodes/utility/return.js.map +0 -1
  296. package/lib/esm/graph/nodes/utility/utility-log.js +0 -57
  297. package/lib/esm/graph/nodes/utility/utility-log.js.map +0 -1
  298. package/lib/esm/graph/overrides/Metadata.js +0 -20
  299. package/lib/esm/graph/overrides/Metadata.js.map +0 -1
  300. package/lib/esm/graph/overrides/Rendering.js +0 -2
  301. package/lib/esm/graph/overrides/Rendering.js.map +0 -1
  302. package/lib/esm/graph/overrides/index.js +0 -4
  303. package/lib/esm/graph/overrides/index.js.map +0 -1
  304. package/lib/esm/graph/overrides/overrides.js +0 -17
  305. package/lib/esm/graph/overrides/overrides.js.map +0 -1
  306. package/lib/esm/graph/reader.js +0 -288
  307. package/lib/esm/graph/reader.js.map +0 -1
  308. package/lib/esm/graph/registry.js +0 -59
  309. package/lib/esm/graph/registry.js.map +0 -1
  310. package/lib/esm/graph/snapshot.js +0 -680
  311. package/lib/esm/graph/snapshot.js.map +0 -1
  312. package/lib/esm/graph/types.js +0 -2
  313. package/lib/esm/graph/types.js.map +0 -1
  314. package/lib/types/graph/GraphExecutionStateMapper.d.cts +0 -66
  315. package/lib/types/graph/GraphExecutionStateMapper.d.mts +0 -66
  316. package/lib/types/graph/GraphResolution.d.cts +0 -53
  317. package/lib/types/graph/GraphResolution.d.mts +0 -53
  318. package/lib/types/graph/catalog/GraphConnectionPolicy.d.cts +0 -9
  319. package/lib/types/graph/catalog/GraphConnectionPolicy.d.mts +0 -9
  320. package/lib/types/graph/catalog/GraphCredentialReference.d.cts +0 -6
  321. package/lib/types/graph/catalog/GraphCredentialReference.d.mts +0 -6
  322. package/lib/types/graph/catalog/GraphCredentialRequirement.d.cts +0 -7
  323. package/lib/types/graph/catalog/GraphCredentialRequirement.d.mts +0 -7
  324. package/lib/types/graph/catalog/GraphDynamicPortRule.d.cts +0 -22
  325. package/lib/types/graph/catalog/GraphDynamicPortRule.d.mts +0 -22
  326. package/lib/types/graph/catalog/GraphIconReference.d.cts +0 -12
  327. package/lib/types/graph/catalog/GraphIconReference.d.mts +0 -12
  328. package/lib/types/graph/catalog/GraphManifestCompiler.d.cts +0 -14
  329. package/lib/types/graph/catalog/GraphManifestCompiler.d.mts +0 -14
  330. package/lib/types/graph/catalog/GraphNodeCapability.d.cts +0 -4
  331. package/lib/types/graph/catalog/GraphNodeCapability.d.mts +0 -4
  332. package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.cts +0 -33
  333. package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.mts +0 -33
  334. package/lib/types/graph/catalog/GraphNodeManifest.d.cts +0 -26
  335. package/lib/types/graph/catalog/GraphNodeManifest.d.mts +0 -26
  336. package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.cts +0 -7
  337. package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.mts +0 -7
  338. package/lib/types/graph/catalog/GraphNodeMethodManifest.d.cts +0 -10
  339. package/lib/types/graph/catalog/GraphNodeMethodManifest.d.mts +0 -10
  340. package/lib/types/graph/catalog/GraphNodePolicyManifest.d.cts +0 -46
  341. package/lib/types/graph/catalog/GraphNodePolicyManifest.d.mts +0 -46
  342. package/lib/types/graph/catalog/GraphParameterBase.d.cts +0 -14
  343. package/lib/types/graph/catalog/GraphParameterBase.d.mts +0 -14
  344. package/lib/types/graph/catalog/GraphParameterDefinition.d.cts +0 -66
  345. package/lib/types/graph/catalog/GraphParameterDefinition.d.mts +0 -66
  346. package/lib/types/graph/catalog/GraphParameterOption.d.cts +0 -8
  347. package/lib/types/graph/catalog/GraphParameterOption.d.mts +0 -8
  348. package/lib/types/graph/catalog/GraphParameterValidation.d.cts +0 -25
  349. package/lib/types/graph/catalog/GraphParameterValidation.d.mts +0 -25
  350. package/lib/types/graph/catalog/GraphPortManifest.d.cts +0 -21
  351. package/lib/types/graph/catalog/GraphPortManifest.d.mts +0 -21
  352. package/lib/types/graph/catalog/GraphResourceLocatorMode.d.cts +0 -10
  353. package/lib/types/graph/catalog/GraphResourceLocatorMode.d.mts +0 -10
  354. package/lib/types/graph/catalog/GraphValueSchema.d.cts +0 -44
  355. package/lib/types/graph/catalog/GraphValueSchema.d.mts +0 -44
  356. package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.cts +0 -9
  357. package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.mts +0 -9
  358. package/lib/types/graph/catalog/GraphVisibilityExpression.d.cts +0 -22
  359. package/lib/types/graph/catalog/GraphVisibilityExpression.d.mts +0 -22
  360. package/lib/types/graph/catalog/index.d.cts +0 -21
  361. package/lib/types/graph/catalog/index.d.mts +0 -21
  362. package/lib/types/graph/constants.d.cts +0 -544
  363. package/lib/types/graph/constants.d.mts +0 -544
  364. package/lib/types/graph/decorators.d.cts +0 -69
  365. package/lib/types/graph/decorators.d.mts +0 -69
  366. package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.cts +0 -47
  367. package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.mts +0 -47
  368. package/lib/types/graph/document/GraphEdgeInstance.d.cts +0 -12
  369. package/lib/types/graph/document/GraphEdgeInstance.d.mts +0 -12
  370. package/lib/types/graph/document/GraphEndpoint.d.cts +0 -13
  371. package/lib/types/graph/document/GraphEndpoint.d.mts +0 -13
  372. package/lib/types/graph/document/GraphJsonValue.d.cts +0 -11
  373. package/lib/types/graph/document/GraphJsonValue.d.mts +0 -11
  374. package/lib/types/graph/document/GraphLoopConfiguration.d.cts +0 -24
  375. package/lib/types/graph/document/GraphLoopConfiguration.d.mts +0 -24
  376. package/lib/types/graph/document/GraphNodeBinding.d.cts +0 -21
  377. package/lib/types/graph/document/GraphNodeBinding.d.mts +0 -21
  378. package/lib/types/graph/document/GraphNodeInstance.d.cts +0 -36
  379. package/lib/types/graph/document/GraphNodeInstance.d.mts +0 -36
  380. package/lib/types/graph/document/GraphWorkflowDocument.d.cts +0 -33
  381. package/lib/types/graph/document/GraphWorkflowDocument.d.mts +0 -33
  382. package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.cts +0 -72
  383. package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.mts +0 -72
  384. package/lib/types/graph/document/GraphWorkflowDocumentReader.d.cts +0 -21
  385. package/lib/types/graph/document/GraphWorkflowDocumentReader.d.mts +0 -21
  386. package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.cts +0 -5
  387. package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.mts +0 -5
  388. package/lib/types/graph/document/GraphWorkflowUiState.d.cts +0 -37
  389. package/lib/types/graph/document/GraphWorkflowUiState.d.mts +0 -37
  390. package/lib/types/graph/document/index.d.cts +0 -12
  391. package/lib/types/graph/document/index.d.mts +0 -12
  392. package/lib/types/graph/index.d.cts +0 -15
  393. package/lib/types/graph/index.d.mts +0 -15
  394. package/lib/types/graph/nodes/agents/agent.d.cts +0 -44
  395. package/lib/types/graph/nodes/agents/agent.d.mts +0 -44
  396. package/lib/types/graph/nodes/base.d.cts +0 -28
  397. package/lib/types/graph/nodes/base.d.mts +0 -28
  398. package/lib/types/graph/nodes/boundary/input-value.d.cts +0 -13
  399. package/lib/types/graph/nodes/boundary/input-value.d.mts +0 -13
  400. package/lib/types/graph/nodes/category-styles.d.cts +0 -8
  401. package/lib/types/graph/nodes/category-styles.d.mts +0 -8
  402. package/lib/types/graph/nodes/flow-control/break.d.cts +0 -15
  403. package/lib/types/graph/nodes/flow-control/break.d.mts +0 -15
  404. package/lib/types/graph/nodes/flow-control/error-boundary.d.cts +0 -12
  405. package/lib/types/graph/nodes/flow-control/error-boundary.d.mts +0 -12
  406. package/lib/types/graph/nodes/flow-control/human-approval.d.cts +0 -13
  407. package/lib/types/graph/nodes/flow-control/human-approval.d.mts +0 -13
  408. package/lib/types/graph/nodes/flow-control/if.d.cts +0 -16
  409. package/lib/types/graph/nodes/flow-control/if.d.mts +0 -16
  410. package/lib/types/graph/nodes/flow-control/parallel.d.cts +0 -11
  411. package/lib/types/graph/nodes/flow-control/parallel.d.mts +0 -11
  412. package/lib/types/graph/nodes/flow-control/switch.d.cts +0 -21
  413. package/lib/types/graph/nodes/flow-control/switch.d.mts +0 -21
  414. package/lib/types/graph/nodes/index.d.cts +0 -79
  415. package/lib/types/graph/nodes/index.d.mts +0 -79
  416. package/lib/types/graph/nodes/loops/foreach.d.cts +0 -19
  417. package/lib/types/graph/nodes/loops/foreach.d.mts +0 -19
  418. package/lib/types/graph/nodes/loops/until.d.cts +0 -16
  419. package/lib/types/graph/nodes/loops/until.d.mts +0 -16
  420. package/lib/types/graph/nodes/loops/while.d.cts +0 -16
  421. package/lib/types/graph/nodes/loops/while.d.mts +0 -16
  422. package/lib/types/graph/nodes/manifests.d.cts +0 -62
  423. package/lib/types/graph/nodes/manifests.d.mts +0 -62
  424. package/lib/types/graph/nodes/triggers/chat.d.cts +0 -13
  425. package/lib/types/graph/nodes/triggers/chat.d.mts +0 -13
  426. package/lib/types/graph/nodes/triggers/event.d.cts +0 -10
  427. package/lib/types/graph/nodes/triggers/event.d.mts +0 -10
  428. package/lib/types/graph/nodes/triggers/form.d.cts +0 -11
  429. package/lib/types/graph/nodes/triggers/form.d.mts +0 -11
  430. package/lib/types/graph/nodes/triggers/manual.d.cts +0 -12
  431. package/lib/types/graph/nodes/triggers/manual.d.mts +0 -12
  432. package/lib/types/graph/nodes/triggers/schedule.d.cts +0 -11
  433. package/lib/types/graph/nodes/triggers/schedule.d.mts +0 -11
  434. package/lib/types/graph/nodes/triggers/webhook.d.cts +0 -11
  435. package/lib/types/graph/nodes/triggers/webhook.d.mts +0 -11
  436. package/lib/types/graph/nodes/utility/code.d.cts +0 -31
  437. package/lib/types/graph/nodes/utility/code.d.mts +0 -31
  438. package/lib/types/graph/nodes/utility/delay.d.cts +0 -11
  439. package/lib/types/graph/nodes/utility/delay.d.mts +0 -11
  440. package/lib/types/graph/nodes/utility/log.d.cts +0 -13
  441. package/lib/types/graph/nodes/utility/log.d.mts +0 -13
  442. package/lib/types/graph/nodes/utility/map.d.cts +0 -11
  443. package/lib/types/graph/nodes/utility/map.d.mts +0 -11
  444. package/lib/types/graph/nodes/utility/merge.d.cts +0 -12
  445. package/lib/types/graph/nodes/utility/merge.d.mts +0 -12
  446. package/lib/types/graph/nodes/utility/return.d.cts +0 -11
  447. package/lib/types/graph/nodes/utility/return.d.mts +0 -11
  448. package/lib/types/graph/nodes/utility/utility-log.d.cts +0 -15
  449. package/lib/types/graph/nodes/utility/utility-log.d.mts +0 -15
  450. package/lib/types/graph/overrides/Metadata.d.cts +0 -43
  451. package/lib/types/graph/overrides/Metadata.d.mts +0 -43
  452. package/lib/types/graph/overrides/Rendering.d.cts +0 -5
  453. package/lib/types/graph/overrides/Rendering.d.mts +0 -5
  454. package/lib/types/graph/overrides/index.d.cts +0 -3
  455. package/lib/types/graph/overrides/index.d.mts +0 -3
  456. package/lib/types/graph/overrides/overrides.d.cts +0 -1
  457. package/lib/types/graph/overrides/overrides.d.mts +0 -1
  458. package/lib/types/graph/reader.d.cts +0 -16
  459. package/lib/types/graph/reader.d.mts +0 -16
  460. package/lib/types/graph/registry.d.cts +0 -40
  461. package/lib/types/graph/registry.d.mts +0 -40
  462. package/lib/types/graph/snapshot.d.cts +0 -176
  463. package/lib/types/graph/snapshot.d.mts +0 -176
  464. package/lib/types/graph/types.d.cts +0 -289
  465. package/lib/types/graph/types.d.mts +0 -289
@@ -1,303 +0,0 @@
1
- import { ValidationError } from "@decaf-ts/db-decorators";
2
- import { isGraphJsonSafeValue, isGraphUnsafeObjectKey, } from "./GraphJsonValue.js";
3
- import { isGraphEndpoint, isGraphNodeEndpoint, isGraphWorkflowEndpoint } from "./GraphEndpoint.js";
4
- import { isGraphInputBinding } from "./GraphNodeBinding.js";
5
- import { isGraphValueSchema } from "./../catalog/GraphValueSchema.js";
6
- /**
7
- * Fluent builder for the canonical {@link GraphWorkflowDocument}
8
- * (DECAF-50 §4.4.4). Collects boundary ports, node instances, edges, and
9
- * optional settings/metadata/UI state, then validates and freezes a
10
- * defensively-copied document on {@link GraphWorkflowDocumentBuilder.build}.
11
- */
12
- export class GraphWorkflowDocumentBuilder {
13
- /**
14
- * @param id Document id.
15
- * @param name Optional document name; defaults to an empty string.
16
- */
17
- constructor(id, name) {
18
- this.document = {
19
- id,
20
- name: name ?? "",
21
- inputs: [],
22
- outputs: [],
23
- nodes: [],
24
- edges: [],
25
- };
26
- }
27
- /** Appends a workflow input port. */
28
- addInput(port) {
29
- this.document.inputs.push(port);
30
- return this;
31
- }
32
- /** Appends a workflow output port. */
33
- addOutput(port) {
34
- this.document.outputs.push(port);
35
- return this;
36
- }
37
- /** Appends a node instance, defaulting `parameters` to an empty object. */
38
- addNode(node) {
39
- this.document.nodes.push({
40
- ...node,
41
- parameters: node.parameters ?? {},
42
- });
43
- return this;
44
- }
45
- /** Appends an edge instance. */
46
- addEdge(edge) {
47
- this.document.edges.push(edge);
48
- return this;
49
- }
50
- /** Sets (or clears) the document's free-form settings bag. */
51
- setSettings(settings) {
52
- this.document.settings = settings;
53
- return this;
54
- }
55
- /** Sets (or clears) the document's metadata bag. */
56
- setMetadata(metadata) {
57
- this.document.metadata = metadata;
58
- return this;
59
- }
60
- /** Sets (or clears) the document's editor UI state. */
61
- setUi(ui) {
62
- this.document.ui = ui;
63
- return this;
64
- }
65
- /**
66
- * Validates the accumulated document with
67
- * {@link assertGraphWorkflowDocumentValid} and returns a deep-ish copy:
68
- * ports, nodes, and edges are cloned per entry, and the optional
69
- * `settings`/`metadata`/`ui` bags are only present when explicitly set, so
70
- * callers never observe builder-internal `undefined` fields.
71
- *
72
- * @throws ValidationError when the document fails validation.
73
- */
74
- build() {
75
- assertGraphWorkflowDocumentValid(this.document);
76
- const document = {
77
- id: this.document.id,
78
- name: this.document.name,
79
- inputs: this.document.inputs.map((port) => ({ ...port })),
80
- outputs: this.document.outputs.map((port) => ({ ...port })),
81
- nodes: this.document.nodes.map((node) => ({ ...node })),
82
- edges: this.document.edges.map((edge) => ({ ...edge })),
83
- };
84
- if (this.document.settings !== undefined) {
85
- document.settings = this.document.settings;
86
- }
87
- if (this.document.metadata !== undefined) {
88
- document.metadata = this.document.metadata;
89
- }
90
- if (this.document.ui !== undefined) {
91
- document.ui = this.document.ui;
92
- }
93
- return document;
94
- }
95
- }
96
- /**
97
- * Structural validation gate for a canonical {@link GraphWorkflowDocument}
98
- * (shared by the frontend builder and the backend nine-stage validator,
99
- * DECAF-50 §4.8 stage 1 shape rules). Checks unique port/node/edge ids,
100
- * valid schemas, binding shapes, edge endpoints, and recursively validates
101
- * nested loop-body documents.
102
- *
103
- * @throws ValidationError describing the first invalid aspect found.
104
- */
105
- export function assertGraphWorkflowDocumentValid(document, context = { seen: [] }) {
106
- if (context.seen.includes(document)) {
107
- throw new ValidationError(`Document '${describeDocument(document)}' contains a loop body that references itself (cyclic document)`);
108
- }
109
- if (typeof document.id !== "string" || !document.id) {
110
- throw new ValidationError("Document 'id' is required and must be a non-empty string");
111
- }
112
- if (typeof document.name !== "string" || !document.name) {
113
- throw new ValidationError("Document 'name' is required and must be a non-empty string");
114
- }
115
- const workflowPorts = new Set();
116
- for (const port of [...document.inputs, ...document.outputs]) {
117
- if (typeof port.id !== "string" || !port.id) {
118
- throw new ValidationError("Workflow port 'id' is required and must be a non-empty string");
119
- }
120
- if (workflowPorts.has(port.id)) {
121
- throw new ValidationError(`Workflow port '${port.id}' is declared more than once; workflow port ids must be unique`);
122
- }
123
- if (port.schema !== undefined && !isGraphValueSchema(port.schema)) {
124
- throw new ValidationError(`Workflow port '${port.id}' schema must be a valid GraphValueSchema`);
125
- }
126
- workflowPorts.add(port.id);
127
- }
128
- const nestedContext = {
129
- seen: [...context.seen, document],
130
- };
131
- const nodeIds = new Set();
132
- for (const node of document.nodes) {
133
- assertGraphNodeValid(node, nodeIds);
134
- }
135
- for (const node of document.nodes) {
136
- if (node.loop) {
137
- assertGraphLoopConfigurationValid(node, node.loop, nestedContext);
138
- }
139
- }
140
- const edgeIds = new Set();
141
- for (const edge of document.edges) {
142
- assertGraphEdgeValid(edge, edgeIds);
143
- }
144
- for (const edge of document.edges) {
145
- assertEdgeEndpoint(edge.source, document, workflowPorts, nodeIds, `Edge '${edge.id}' source`);
146
- assertEdgeEndpoint(edge.target, document, workflowPorts, nodeIds, `Edge '${edge.id}' target`);
147
- }
148
- if (document.settings !== undefined && !isGraphJsonSafeValue(document.settings)) {
149
- throw new ValidationError("Document settings must be JSON-safe (a map of JSON-safe values)");
150
- }
151
- if (document.metadata !== undefined && !isGraphJsonSafeValue(document.metadata)) {
152
- throw new ValidationError("Document metadata must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed");
153
- }
154
- if (document.ui !== undefined && !isGraphJsonSafeValue(document.ui)) {
155
- throw new ValidationError("Document ui must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed");
156
- }
157
- }
158
- function describeDocument(document) {
159
- const id = document?.["id"];
160
- return typeof id === "string" ? id : "<unnamed document>";
161
- }
162
- function assertGraphNodeValid(node, nodeIds) {
163
- if (typeof node.id !== "string" || !node.id) {
164
- throw new ValidationError("Node 'id' is required and must be a non-empty string");
165
- }
166
- if (nodeIds.has(node.id)) {
167
- throw new ValidationError(`Node id '${node.id}' is declared more than once; node ids must be unique`);
168
- }
169
- if (typeof node.kind !== "string" || !node.kind) {
170
- throw new ValidationError(`Node '${node.id}' must declare a non-empty string 'kind'`);
171
- }
172
- if (node.parameters === undefined || node.parameters === null) {
173
- throw new ValidationError(`Node '${node.id}' parameters must be present (an empty object when there are none)`);
174
- }
175
- nodeIds.add(node.id);
176
- if (node.inputBindings) {
177
- for (const [key, binding] of Object.entries(node.inputBindings)) {
178
- if (isGraphUnsafeObjectKey(key)) {
179
- throw new ValidationError(`Node '${node.id}' input binding key '${key}' is not allowed (unsafe prototype-pollutant key)`);
180
- }
181
- if (!isGraphInputBinding(binding)) {
182
- throw new ValidationError(`Node '${node.id}' input binding for '${key}' must be a valid GraphInputBinding (edge, literal, or expression)`);
183
- }
184
- if (binding.mode === "literal" && !isGraphJsonSafeValue(binding.value)) {
185
- throw new ValidationError(`Node '${node.id}' literal binding for '${key}' must contain JSON-safe values`);
186
- }
187
- if (binding.mode === "expression" && !binding.expression) {
188
- throw new ValidationError(`Node '${node.id}' expression binding for '${key}' must contain a non-empty expression`);
189
- }
190
- }
191
- }
192
- if (node.outputBindings) {
193
- for (const [key, binding] of Object.entries(node.outputBindings)) {
194
- if (isGraphUnsafeObjectKey(key)) {
195
- throw new ValidationError(`Node '${node.id}' output binding key '${key}' is not allowed (unsafe prototype-pollutant key)`);
196
- }
197
- if (!binding || typeof binding !== "object" || Array.isArray(binding)) {
198
- throw new ValidationError(`Node '${node.id}' output binding for '${key}' must be an object with enabled and alias settings`);
199
- }
200
- }
201
- }
202
- if (!isGraphJsonSafeValue(node.parameters)) {
203
- throw new ValidationError(`Node '${node.id}' parameters must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed`);
204
- }
205
- }
206
- function assertGraphLoopConfigurationValid(node, config, context) {
207
- if (!config.body || typeof config.body !== "object") {
208
- throw new ValidationError(`Node '${node.id}' loop configuration requires a body document`);
209
- }
210
- assertGraphWorkflowDocumentValid(config.body, context);
211
- if (config.maxIterations !== undefined &&
212
- (!Number.isFinite(config.maxIterations) || config.maxIterations <= 0)) {
213
- throw new ValidationError(`Node '${node.id}' loop maxIterations must be a positive number`);
214
- }
215
- if (config.timeoutMs !== undefined &&
216
- (typeof config.timeoutMs !== "number" || config.timeoutMs <= 0)) {
217
- throw new ValidationError(`Node '${node.id}' loop timeoutMs must be a positive number in milliseconds`);
218
- }
219
- if (config.concurrency !== undefined &&
220
- (typeof config.concurrency !== "number" || config.concurrency <= 0)) {
221
- throw new ValidationError(`Node '${node.id}' loop concurrency must be a positive number`);
222
- }
223
- for (const mappings of [config.inputMappings, config.outputMappings]) {
224
- if (!mappings)
225
- continue;
226
- for (const [key, reference] of Object.entries(mappings)) {
227
- if (isGraphUnsafeObjectKey(key)) {
228
- throw new ValidationError(`Node '${node.id}' loop mapping key '${key}' is not allowed (unsafe prototype-pollutant key)`);
229
- }
230
- assertGraphValueReferenceShape(reference, node.id, key);
231
- }
232
- }
233
- }
234
- function assertGraphValueReferenceShape(reference, nodeId, mappingKey) {
235
- if (!reference || typeof reference !== "object") {
236
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' must reference a workflow port, node port, literal, or expression`);
237
- }
238
- switch (reference.source) {
239
- case "workflow":
240
- if (typeof reference.port !== "string" || !reference.port) {
241
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' referencing a workflow must reference a port identifier`);
242
- }
243
- break;
244
- case "node":
245
- if (typeof reference.nodeId !== "string" ||
246
- !reference.nodeId ||
247
- typeof reference.port !== "string" ||
248
- !reference.port) {
249
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' referencing a node must reference a node id and a port`);
250
- }
251
- break;
252
- case "literal":
253
- if (!isGraphJsonSafeValue(reference.value)) {
254
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' literal references must be JSON-safe values`);
255
- }
256
- break;
257
- case "expression":
258
- if (typeof reference.expression !== "string" || !reference.expression) {
259
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' expression references must be non-empty expressions`);
260
- }
261
- break;
262
- default:
263
- throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' must use a workflow, node, literal, or expression reference source`);
264
- }
265
- }
266
- function assertGraphEdgeValid(edge, edgeIds) {
267
- if (typeof edge.id !== "string" || !edge.id) {
268
- throw new ValidationError("Edge 'id' is required and must be a non-empty string");
269
- }
270
- if (edgeIds.has(edge.id)) {
271
- throw new ValidationError(`Edge id '${edge.id}' is declared more than once; edge ids must be unique`);
272
- }
273
- if (!isGraphEndpoint(edge.source)) {
274
- throw new ValidationError(`Edge '${edge.id}' source endpoint is not a valid GraphEndpoint`);
275
- }
276
- if (!isGraphEndpoint(edge.target)) {
277
- throw new ValidationError(`Edge '${edge.id}' target endpoint is not a valid GraphEndpoint`);
278
- }
279
- if (edge.type !== "data" && edge.type !== "connection") {
280
- throw new ValidationError(`Edge '${edge.id}' type '${String(edge.type)}' is not a valid edge type (data or connection are allowed)`);
281
- }
282
- edgeIds.add(edge.id);
283
- if (!isGraphJsonSafeValue(edge)) {
284
- throw new ValidationError(`Edge '${edge.id}' contains values that are not JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed`);
285
- }
286
- }
287
- function assertEdgeEndpoint(endpoint, document, workflowPorts, nodeIds, context) {
288
- if (isGraphWorkflowEndpoint(endpoint)) {
289
- if (!workflowPorts.has(endpoint.port)) {
290
- throw new ValidationError(`${context} references workflow port '${endpoint.port}' which is not declared on the document`);
291
- }
292
- return;
293
- }
294
- if (isGraphNodeEndpoint(endpoint)) {
295
- if (!nodeIds.has(endpoint.nodeId)) {
296
- throw new ValidationError(`${context} references node '${endpoint.nodeId}' which is not part of the document`);
297
- }
298
- if (typeof endpoint.port !== "string" || !endpoint.port) {
299
- throw new ValidationError(`${context} node endpoints must reference a non-empty port identifier`);
300
- }
301
- }
302
- }
303
- //# sourceMappingURL=GraphWorkflowDocumentBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphWorkflowDocumentBuilder.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowDocumentBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,4BAAyB;AAE1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,2BAAwB;AAChG,OAAO,EAAE,mBAAmB,EAAE,8BAA2B;AAWzD,OAAO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AE,CAAC;YAClC,MAAM,IAAI,eAAe,CACvB,GAAG,OAAO,qBAAqB,QAAQ,CAAC,MAAM,qCAAqC,CACpF,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxD,MAAM,IAAI,eAAe,CACvB,GAAG,OAAO,4DAA4D,CACvE,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,62 +0,0 @@
1
- import { isGraphUnsafeObjectKey } from "./GraphJsonValue.js";
2
- import { isGraphWorkflowDocumentShape } from "./GraphWorkflowDocument.js";
3
- export function graphWorkflowDocumentOf(value) {
4
- if (!isGraphWorkflowDocumentShape(value))
5
- return undefined;
6
- return value;
7
- }
8
- export function graphWorkflowNodeOf(document, nodeId) {
9
- return document?.nodes.find((node) => node.id === nodeId);
10
- }
11
- export function graphWorkflowEdgeOf(document, edgeId) {
12
- return document?.edges.find((edge) => edge.id === edgeId);
13
- }
14
- export function graphWorkflowPortsOf(document) {
15
- const inputs = document?.inputs ?? [];
16
- const outputs = document?.outputs ?? [];
17
- return { inputs, outputs };
18
- }
19
- export function graphWorkflowSettingsOf(document) {
20
- return { ...(document?.settings ?? {}) };
21
- }
22
- export function graphWorkflowEdgesOf(document) {
23
- return document?.edges ?? [];
24
- }
25
- export function graphWorkflowNodeEdgesOf(document, nodeId) {
26
- return (document?.edges ?? []).filter((edge) => graphNodeEndpointId(edge.source) === nodeId || graphNodeEndpointId(edge.target) === nodeId);
27
- }
28
- export function graphNodeEndpointId(endpoint) {
29
- if (endpoint && endpoint.scope === "node") {
30
- return endpoint.nodeId;
31
- }
32
- return undefined;
33
- }
34
- export function graphWorkflowNodeUiOf(document, nodeId) {
35
- return graphWorkflowNodeOf(document, nodeId)?.ui;
36
- }
37
- export function graphWorkflowUiOf(document) {
38
- return document.ui ?? undefined;
39
- }
40
- export function graphWorkflowUiValueOf(document, key) {
41
- const ui = graphWorkflowUiOf(document);
42
- if (!ui || isGraphUnsafeObjectKey(key))
43
- return undefined;
44
- return ui[key];
45
- }
46
- export function graphWorkflowDocumentSettingOf(document, key) {
47
- return hasSetting(document?.settings, key)
48
- ? document.settings[key]
49
- : undefined;
50
- }
51
- export function graphWorkflowDocumentMetadataValueOf(document, key) {
52
- if (!document?.metadata ||
53
- isGraphUnsafeObjectKey(key) ||
54
- !(key in document.metadata)) {
55
- return undefined;
56
- }
57
- return document.metadata[key];
58
- }
59
- function hasSetting(settings, key) {
60
- return Boolean(settings) && !isGraphUnsafeObjectKey(key) && key in settings;
61
- }
62
- //# sourceMappingURL=GraphWorkflowDocumentReader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphWorkflowDocumentReader.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowDocumentReader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,4BAAyB;AAK1D,OAAO,EAAE,4BAA4B,EAAE,mCAAgC;AAQvE,MAAM,UAAU,uBAAuB,CACrC,KAAc;IAEd,IAAI,CAAC,4BAA4B,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3D,OAAO,KAAyC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAA2C,EAC3C,MAAc;IAEd,OAAO,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAA2C,EAC3C,MAAc;IAEd,OAAO,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,QAA2C;IAE3C,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,IAAI,EAA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AC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACzD,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,QAA2C,EAC3C,GAAW;IAEX,OAAO,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC;QACxC,CAAC,CAAE,QAAS,CAAC,QAA2C,CAAC,GAAG,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,QAA2C,EAC3C,GAAW;IAEX,IACE,CAAC,QAAQ,EAAE,QAAQ;QACnB,sBAAsB,CAAC,GAAG,CAAC;QAC3B,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,UAAU,CACjB,QAAuD,EACvD,GAAW;IAEX,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,GAAG,IAAK,QAAmB,CAAC;AAC1F,CAAC"}
@@ -1,63 +0,0 @@
1
- import { ValidationError } from "@decaf-ts/db-decorators";
2
- import { isGraphJsonSafeValue } from "./GraphJsonValue.js";
3
- import { isGraphWorkflowDocumentShape } from "./GraphWorkflowDocument.js";
4
- import { assertGraphWorkflowDocumentValid } from "./GraphWorkflowDocumentBuilder.js";
5
- export function graphWorkflowDocumentSerializer(document) {
6
- if (!isGraphWorkflowDocumentShape(document)) {
7
- throw new ValidationError("Cannot serialize a graph workflow document: the value is not a canonical GraphWorkflowDocument shape");
8
- }
9
- try {
10
- return JSON.stringify(document, null, 2);
11
- }
12
- catch (e) {
13
- throw new ValidationError(`Cannot serialize graph workflow document '${document.id}': ${String(e)}`);
14
- }
15
- }
16
- export function graphWorkflowDocumentDeserializer(serialised) {
17
- let parsed;
18
- try {
19
- parsed = JSON.parse(serialised);
20
- }
21
- catch (e) {
22
- throw new ValidationError(`Serialized graph workflow document is not valid JSON: ${String(e)}`);
23
- }
24
- if (!isGraphJsonSafeValue(parsed)) {
25
- throw new ValidationError("Serialized graph workflow document contains JSON-unsafe values: functions, non-JSON objects, NaN/Infinity, symbol keys, unsafe prototype keys are rejected");
26
- }
27
- if (!isGraphWorkflowDocumentShape(parsed)) {
28
- throw new ValidationError("Serialized graph workflow document is not shaped as a canonical GraphWorkflowDocument (id, name, inputs, outputs, nodes and edges are required)");
29
- }
30
- const document = parsed;
31
- assertGraphWorkflowDocumentValid(document);
32
- return document;
33
- }
34
- export function graphJsonSerializer(value, indentation) {
35
- if (!isGraphJsonSafeValue(value)) {
36
- throw new ValidationError("Cannot serialize a value: functions, class instances, undefined, NaN/Infinity, symbol keys, unsafe prototype keys, or cycles are not allowed");
37
- }
38
- try {
39
- return JSON.stringify(value, null, indentation);
40
- }
41
- catch (e) {
42
- throw new ValidationError(`Cannot serialize JSON-safe value: ${String(e)} (cycles and circular structures are not allowed inside graph JSON)`);
43
- }
44
- }
45
- export function graphJsonParser(serialised) {
46
- if (typeof serialised !== "string") {
47
- if (typeof serialised === "object" && serialised !== null)
48
- return serialised;
49
- throw new ValidationError("Graph JSON parser accepts serialized strings (pass an object only when restoring a known-safe value)");
50
- }
51
- let parsed;
52
- try {
53
- parsed = JSON.parse(serialised);
54
- }
55
- catch (e) {
56
- throw new ValidationError(`Serialized graph JSON is not valid JSON: ${String(e)}`);
57
- }
58
- if (!isGraphJsonSafeValue(parsed)) {
59
- throw new ValidationError("Serialized graph JSON contains JSON-unsafe values: functions, non-JSON objects, NaN/Infinity, symbol keys, unsafe prototype keys are rejected");
60
- }
61
- return parsed;
62
- }
63
- //# sourceMappingURL=GraphWorkflowDocumentSerializer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphWorkflowDocumentSerializer.js","sourceRoot":"","sources":["../../../../src/graph/document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CAAC;IAC3C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAc,EAAE,WAAoB;IACtE,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,eAAe,CACvB,8IAA8I,CAC/I,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,qCAAqC,MAAM,CAAC,CAAC,CAAC,qEAAqE,CACpH,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,UAA4B;IAC1D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,IAAI;YAAE,OAAO,UAAU,CAAC;QAC7E,MAAM,IAAI,eAAe,CACvB,sGAAsG,CACvG,CAAC;IACJ,CAAC;IACD,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,4CAA4C,MAAM,CAAC,CAAC,CAAC,EAAE,CACxD,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,eAAe,CACvB,+IAA+I,CAChJ,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=GraphWorkflowUiState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphWorkflowUiState.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowUiState.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- export * from "./GraphDecoratedWorkflowCompiler.js";
2
- export * from "./GraphEdgeInstance.js";
3
- export * from "./GraphEndpoint.js";
4
- export * from "./GraphJsonValue.js";
5
- export * from "./GraphLoopConfiguration.js";
6
- export * from "./GraphNodeBinding.js";
7
- export * from "./GraphNodeInstance.js";
8
- export * from "./GraphWorkflowDocument.js";
9
- export * from "./GraphWorkflowDocumentBuilder.js";
10
- export * from "./GraphWorkflowDocumentReader.js";
11
- export * from "./GraphWorkflowDocumentSerializer.js";
12
- export * from "./GraphWorkflowUiState.js";
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/document/index.ts"],"names":[],"mappings":"AAAA,oDAAiD;AACjD,uCAAoC;AACpC,mCAAgC;AAChC,oCAAiC;AACjC,4CAAyC;AACzC,sCAAmC;AACnC,uCAAoC;AACpC,2CAAwC;AACxC,kDAA+C;AAC/C,iDAA8C;AAC9C,qDAAkD;AAClD,0CAAuC"}
@@ -1,16 +0,0 @@
1
- import "./../overrides/index.js";
2
- import "./overrides/index.js";
3
- export * from "./constants.js";
4
- export * from "./decorators.js";
5
- export * from "./registry.js";
6
- export * from "./overrides/index.js";
7
- export * from "./snapshot.js";
8
- export * from "./reader.js";
9
- export * from "./document/index.js";
10
- export * from "./catalog/index.js";
11
- export * from "./types.js";
12
- export * from "./GraphExecutionStateMapper.js";
13
- export * from "./GraphResolution.js";
14
- export * from "./nodes/index.js";
15
- export * from "./overrides/index.js";
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA,iCAAsB;AACtB,8BAAqB;AAErB,+BAA4B;AAC5B,gCAA6B;AAC7B,8BAA2B;AAC3B,qCAA4B;AAC5B,8BAA2B;AAC3B,4BAAyB;AACzB,oCAA2B;AAC3B,mCAA0B;AAC1B,2BAAwB;AACxB,+CAA4C;AAC5C,qCAAkC;AAClC,iCAAwB;AACxB,qCAA4B"}
@@ -1,101 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- /**
11
- * @module ui-decorators/graph/nodes/agents/agent
12
- * @summary Production Agent node declaration.
13
- * @description The Agent node is the primary AI agent entrypoint. It is a
14
- * rectangular node with `@connection()` ports for its structural
15
- * dependencies: `model` (the LLM), `memory` (the memory store), and
16
- * `workspace` (the workspace/context). Connections are rendered on the
17
- * bottom side of the node (DECAF-32 §21.3). Each connection category has a
18
- * distinct color defined in the category style registry.
19
- *
20
- * The single `prompt` input accepts placeholder expressions (§22.4) such as
21
- * `{{ $input.brief }}` or `{{ $node["Research"].output.summary }}` that are
22
- * resolved at execution time by the placeholder compiler.
23
- */
24
- import { Model, model, required } from "@decaf-ts/decorator-validation";
25
- import { uielement } from "./../../../ui/decorators.js";
26
- import { connection, input, node, output } from "./../../decorators.js";
27
- // Ensure category styles are registered (idempotent).
28
- import "./../category-styles.js";
29
- /**
30
- * Agent node — an AI agent that orchestrates a model, memory, and workspace.
31
- *
32
- * The agent has:
33
- * - `@input` port on the **left**: `prompt` (the task prompt; supports
34
- * placeholder expressions like `{{ $input.something }}` per §22.4).
35
- * - `@output` ports on the **right**: `response` (the agent's output), `actions`
36
- * (any actions the agent decided to take).
37
- * - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
38
- * store), `workspace` (workspace/context). Each connection has a distinct
39
- * category color.
40
- *
41
- * The node is rectangular (not rounded) to visually distinguish it from
42
- * regular processing nodes. The `color` and `icon` are omitted from `@node()`
43
- * so they are resolved from the `"Agent"` category style.
44
- */
45
- let AgentNode = class AgentNode extends Model {
46
- };
47
- __decorate([
48
- required(),
49
- uielement("textarea", {
50
- label: "Prompt",
51
- placeholder: "Enter task prompt. Supports placeholders like {{ $input.brief }} or {{ $node[\"Research\"].output.summary }}",
52
- }),
53
- input({ handle: "prompt" }),
54
- __metadata("design:type", String)
55
- ], AgentNode.prototype, "prompt", void 0);
56
- __decorate([
57
- required(),
58
- uielement("textarea", { label: "Response", placeholder: "Agent response" }),
59
- output({ handle: "response" }),
60
- __metadata("design:type", String)
61
- ], AgentNode.prototype, "response", void 0);
62
- __decorate([
63
- required(),
64
- uielement("textarea", { label: "Actions", placeholder: "Actions taken by the agent" }),
65
- output({ handle: "actions" }),
66
- __metadata("design:type", Array)
67
- ], AgentNode.prototype, "actions", void 0);
68
- __decorate([
69
- connection({ category: "model", handle: "model" }),
70
- __metadata("design:type", Object)
71
- ], AgentNode.prototype, "model", void 0);
72
- __decorate([
73
- connection({ category: "memory", handle: "memory" }),
74
- __metadata("design:type", Object)
75
- ], AgentNode.prototype, "memory", void 0);
76
- __decorate([
77
- connection({ category: "workspace", handle: "workspace" }),
78
- __metadata("design:type", Object)
79
- ], AgentNode.prototype, "workspace", void 0);
80
- AgentNode = __decorate([
81
- node("core.agent", {
82
- kind: "core.agent",
83
- category: "Agent",
84
- // color and icon omitted — resolved from the "Agent" category style
85
- width: 120,
86
- height: 140,
87
- labels: ["agent", "ai", "orchestrator"],
88
- metadata: {
89
- title: "Agent",
90
- description: "AI agent that orchestrates a model, memory, and workspace to complete a task.",
91
- shape: "rectangle",
92
- },
93
- }),
94
- model()
95
- ], AgentNode);
96
- export { AgentNode };
97
- /**
98
- * All built-in agent node constructors.
99
- */
100
- export const GRAPH_AGENT_NODES = [AgentNode];
101
- //# sourceMappingURL=agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/agents/agent.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAEnE,sDAAsD;AACtD,iCAA4B;AAE5B;;;;;;;;;;;;;;;GAeG;AAgBI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,KAAK;CAiCnC,CAAA;AAxBC;IANC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE;QACrB,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,8GAA8G;KAC5H,CAAC;IACD,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;;yCACZ;AAOhB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAC3E,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;;2CACb;AAKlB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACtF,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;;0CACV;AAKpB;IADC,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;wCACnC;AAGhB;IADC,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;;yCACpC;AAGjB;IADC,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;4CACvC;AAhCT,SAAS;IAfrB,IAAI,CAAC,YAAY,EAAE;QAClB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,OAAO;QACjB,oEAAoE;QACpE,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC;QACvC,QAAQ,EAAE;YACR,KAAK,EAAE,OAAO;YACd,WAAW,EACT,+EAA+E;YACjF,KAAK,EAAE,WAAW;SACnB;KACF,CAAC;IACD,KAAK,EAAE;GACK,SAAS,CAiCrB;;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,CAAU,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * @module ui-decorators/graph/nodes/base
3
- * @summary Base class for shared graph node declarations.
4
- * @description `GraphNode` extends `Model` with an overridable
5
- * `applyMetadata` static method. Concrete node kinds that support dynamic
6
- * metadata changes (e.g. `SwitchFlowNode` adding case output ports) override
7
- * this method to compute their own ports, size, and data patches — the node
8
- * is exclusively responsible for itself in every way.
9
- */
10
- import { Model } from "@decaf-ts/decorator-validation";
11
- export class GraphNode extends Model {
12
- /**
13
- * Applies a metadata patch to this node class, returning the resulting
14
- * ports, size, and data patches.
15
- *
16
- * The default implementation returns `null` (no changes). Concrete node
17
- * kinds that support dynamic metadata override this to compute their own
18
- * ports and size from the metadata — the caller (renderer) simply relays
19
- * the result to the diagram model.
20
- *
21
- * @param _meta - The metadata patch (node-kind-specific, e.g.
22
- * `SwitchNodeMetadata`).
23
- * @returns The computed change, or `null` when the node kind does not
24
- * support dynamic metadata.
25
- */
26
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
- static applyMetadata(_meta) {
28
- return null;
29
- }
30
- }
31
- //# sourceMappingURL=base.js.map