@decaf-ts/integrations 0.3.8 → 0.3.9

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 (413) hide show
  1. package/dist/integrations.cjs +3 -3
  2. package/dist/integrations.js +3 -3
  3. package/lib/cjs/graph/engine/constants.cjs +58 -0
  4. package/lib/cjs/graph/engine/decorators.cjs +4 -0
  5. package/lib/cjs/graph/engine/errors/GraphCycleError.cjs +20 -0
  6. package/lib/cjs/graph/engine/errors/GraphExecutionError.cjs +27 -0
  7. package/lib/cjs/graph/engine/errors/GraphInputError.cjs +20 -0
  8. package/lib/cjs/graph/engine/errors/GraphLoopLimitError.cjs +20 -0
  9. package/lib/cjs/graph/engine/errors/GraphPinningError.cjs +20 -0
  10. package/lib/cjs/graph/engine/errors/GraphPortError.cjs +20 -0
  11. package/lib/cjs/graph/engine/errors/GraphStoreError.cjs +20 -0
  12. package/lib/cjs/graph/engine/errors/GraphTopologyError.cjs +20 -0
  13. package/lib/cjs/graph/{errors → engine/errors}/index.cjs +2 -2
  14. package/lib/cjs/graph/engine/events/GraphExecutionEvent.cjs +4 -0
  15. package/lib/cjs/graph/engine/events/GraphExecutionEventEmitter.cjs +40 -0
  16. package/lib/cjs/graph/engine/events/GraphExecutionEventFactory.cjs +37 -0
  17. package/lib/cjs/graph/engine/events/GraphExecutionObserver.cjs +4 -0
  18. package/lib/cjs/graph/{events → engine/events}/index.cjs +2 -2
  19. package/lib/cjs/graph/engine/execution/CodeSandboxEvaluator.cjs +4 -0
  20. package/lib/cjs/graph/engine/execution/GraphExecutionContext.cjs +79 -0
  21. package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs +408 -0
  22. package/lib/cjs/graph/engine/execution/GraphExecutionFrame.cjs +32 -0
  23. package/lib/cjs/graph/engine/execution/GraphExecutionResult.cjs +30 -0
  24. package/lib/cjs/graph/engine/execution/GraphNodeExecutor.cjs +4 -0
  25. package/lib/cjs/graph/engine/execution/SwitchGraphNodeExecutor.cjs +103 -0
  26. package/lib/cjs/graph/{execution → engine/execution}/index.cjs +2 -2
  27. package/lib/cjs/graph/engine/index.cjs +84 -0
  28. package/lib/cjs/graph/engine/loops/ConditionExpressionEvaluator.cjs +87 -0
  29. package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs +85 -0
  30. package/lib/cjs/graph/engine/loops/GraphConditionEvaluator.cjs +85 -0
  31. package/lib/cjs/graph/engine/loops/GraphLoopExecutionContext.cjs +16 -0
  32. package/lib/cjs/graph/engine/loops/UntilGraphNodeExecutor.cjs +77 -0
  33. package/lib/cjs/graph/engine/loops/WhileGraphNodeExecutor.cjs +78 -0
  34. package/lib/cjs/graph/{loops → engine/loops}/index.cjs +2 -2
  35. package/lib/cjs/graph/engine/pinning/GraphPinningDependencyResolver.cjs +28 -0
  36. package/lib/cjs/graph/engine/pinning/GraphPinningMetadata.cjs +20 -0
  37. package/lib/cjs/graph/engine/pinning/GraphPinningPolicy.cjs +34 -0
  38. package/lib/cjs/graph/engine/pinning/GraphPinningService.cjs +191 -0
  39. package/lib/cjs/graph/{pinning → engine/pinning}/index.cjs +2 -2
  40. package/lib/cjs/graph/engine/planning/GraphExecutionPlan.cjs +4 -0
  41. package/lib/cjs/graph/engine/planning/GraphExecutionPlanEdge.cjs +4 -0
  42. package/lib/cjs/graph/engine/planning/GraphExecutionPlanLayer.cjs +4 -0
  43. package/lib/cjs/graph/engine/planning/GraphExecutionPlanNode.cjs +4 -0
  44. package/lib/cjs/graph/engine/planning/GraphExecutionPlanner.cjs +197 -0
  45. package/lib/cjs/graph/engine/planning/GraphRelationResolver.cjs +172 -0
  46. package/lib/cjs/graph/engine/planning/GraphTopology.cjs +57 -0
  47. package/lib/cjs/graph/{planning → engine/planning}/index.cjs +2 -2
  48. package/lib/cjs/graph/engine/registry/GraphNodeExecutorRegistry.cjs +44 -0
  49. package/lib/cjs/graph/engine/registry/GraphNodeExecutorResolver.cjs +27 -0
  50. package/lib/cjs/graph/{registry → engine/registry}/index.cjs +2 -2
  51. package/lib/cjs/graph/engine/snapshots/GraphExecutionSnapshotMapper.cjs +53 -0
  52. package/lib/cjs/graph/{snapshots → engine/snapshots}/index.cjs +2 -2
  53. package/lib/cjs/graph/engine/store/GraphCachedValue.cjs +4 -0
  54. package/lib/cjs/graph/engine/store/GraphValueKey.cjs +4 -0
  55. package/lib/cjs/graph/engine/store/GraphValueStore.cjs +76 -0
  56. package/lib/cjs/graph/engine/store/GraphValueStoreAdapter.cjs +4 -0
  57. package/lib/cjs/graph/engine/store/InMemoryGraphValueStoreAdapter.cjs +69 -0
  58. package/lib/cjs/graph/{store → engine/store}/index.cjs +2 -2
  59. package/lib/cjs/graph/engine/types.cjs +4 -0
  60. package/lib/cjs/graph/engine/validation/GraphDefinitionValidator.cjs +33 -0
  61. package/lib/cjs/graph/engine/validation/GraphPortSchemaResolver.cjs +58 -0
  62. package/lib/cjs/graph/engine/validation/GraphValueValidator.cjs +52 -0
  63. package/lib/cjs/graph/{validation → engine/validation}/index.cjs +2 -2
  64. package/lib/cjs/graph/index.cjs +10 -60
  65. package/lib/cjs/graph/shared/constants.cjs +44 -0
  66. package/lib/cjs/graph/shared/index.cjs +38 -0
  67. package/lib/cjs/graph/{nodes → shared/nodes}/agent.cjs +2 -2
  68. package/lib/cjs/graph/shared/nodes/base.cjs +35 -0
  69. package/lib/cjs/graph/shared/nodes/category-styles.cjs +38 -0
  70. package/lib/cjs/graph/shared/nodes/flow-control.cjs +464 -0
  71. package/lib/cjs/graph/{nodes → shared/nodes}/index.cjs +2 -2
  72. package/lib/cjs/graph/shared/nodes/triggers.cjs +250 -0
  73. package/lib/cjs/graph/shared/types.cjs +4 -0
  74. package/lib/cjs/index.cjs +3 -3
  75. package/lib/esm/graph/engine/constants.js +62 -0
  76. package/lib/esm/graph/engine/decorators.js +2 -0
  77. package/lib/esm/graph/engine/errors/GraphCycleError.js +15 -0
  78. package/lib/esm/graph/engine/errors/GraphExecutionError.js +22 -0
  79. package/lib/esm/graph/engine/errors/GraphInputError.js +15 -0
  80. package/lib/esm/graph/engine/errors/GraphLoopLimitError.js +15 -0
  81. package/lib/esm/graph/engine/errors/GraphPinningError.js +15 -0
  82. package/lib/esm/graph/engine/errors/GraphPortError.js +15 -0
  83. package/lib/esm/graph/engine/errors/GraphStoreError.js +15 -0
  84. package/lib/esm/graph/engine/errors/GraphTopologyError.js +15 -0
  85. package/lib/esm/graph/engine/errors/index.js +14 -0
  86. package/lib/esm/graph/engine/events/GraphExecutionEvent.js +2 -0
  87. package/lib/esm/graph/engine/events/GraphExecutionEventEmitter.js +35 -0
  88. package/lib/esm/graph/engine/events/GraphExecutionEventFactory.js +32 -0
  89. package/lib/esm/graph/engine/events/GraphExecutionObserver.js +2 -0
  90. package/lib/esm/graph/engine/events/index.js +10 -0
  91. package/lib/esm/graph/engine/execution/CodeSandboxEvaluator.js +18 -0
  92. package/lib/esm/graph/engine/execution/GraphExecutionContext.js +74 -0
  93. package/lib/esm/graph/engine/execution/GraphExecutionEngine.js +403 -0
  94. package/lib/esm/graph/engine/execution/GraphExecutionFrame.js +27 -0
  95. package/lib/esm/graph/engine/execution/GraphExecutionResult.js +26 -0
  96. package/lib/esm/graph/engine/execution/GraphNodeExecutor.js +2 -0
  97. package/lib/esm/graph/engine/execution/SwitchGraphNodeExecutor.js +98 -0
  98. package/lib/esm/graph/engine/execution/index.js +13 -0
  99. package/lib/esm/graph/engine/index.js +67 -0
  100. package/lib/esm/graph/engine/loops/ConditionExpressionEvaluator.js +82 -0
  101. package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js +80 -0
  102. package/lib/esm/graph/engine/loops/GraphConditionEvaluator.js +80 -0
  103. package/lib/esm/graph/engine/loops/GraphLoopExecutionContext.js +11 -0
  104. package/lib/esm/graph/engine/loops/UntilGraphNodeExecutor.js +72 -0
  105. package/lib/esm/graph/engine/loops/WhileGraphNodeExecutor.js +73 -0
  106. package/lib/esm/graph/engine/loops/index.js +12 -0
  107. package/lib/esm/graph/engine/pinning/GraphPinningDependencyResolver.js +23 -0
  108. package/lib/esm/graph/engine/pinning/GraphPinningMetadata.js +15 -0
  109. package/lib/esm/graph/engine/pinning/GraphPinningPolicy.js +29 -0
  110. package/lib/esm/graph/engine/pinning/GraphPinningService.js +186 -0
  111. package/lib/esm/graph/engine/pinning/index.js +10 -0
  112. package/lib/esm/graph/engine/planning/GraphExecutionPlan.js +2 -0
  113. package/lib/esm/graph/engine/planning/GraphExecutionPlanEdge.js +7 -0
  114. package/lib/esm/graph/engine/planning/GraphExecutionPlanLayer.js +2 -0
  115. package/lib/esm/graph/engine/planning/GraphExecutionPlanNode.js +2 -0
  116. package/lib/esm/graph/engine/planning/GraphExecutionPlanner.js +192 -0
  117. package/lib/esm/graph/engine/planning/GraphRelationResolver.js +167 -0
  118. package/lib/esm/graph/engine/planning/GraphTopology.js +52 -0
  119. package/lib/esm/graph/engine/planning/index.js +13 -0
  120. package/lib/esm/graph/engine/registry/GraphNodeExecutorRegistry.js +39 -0
  121. package/lib/esm/graph/engine/registry/GraphNodeExecutorResolver.js +22 -0
  122. package/lib/esm/graph/engine/registry/index.js +8 -0
  123. package/lib/esm/graph/engine/snapshots/GraphExecutionSnapshotMapper.js +48 -0
  124. package/lib/esm/graph/engine/snapshots/index.js +7 -0
  125. package/lib/esm/graph/engine/store/GraphCachedValue.js +2 -0
  126. package/lib/esm/graph/engine/store/GraphValueKey.js +7 -0
  127. package/lib/esm/graph/engine/store/GraphValueStore.js +71 -0
  128. package/lib/esm/graph/engine/store/GraphValueStoreAdapter.js +2 -0
  129. package/lib/esm/graph/engine/store/InMemoryGraphValueStoreAdapter.js +64 -0
  130. package/lib/esm/graph/engine/store/index.js +11 -0
  131. package/lib/esm/graph/engine/types.js +2 -0
  132. package/lib/esm/graph/engine/validation/GraphDefinitionValidator.js +28 -0
  133. package/lib/esm/graph/engine/validation/GraphPortSchemaResolver.js +53 -0
  134. package/lib/esm/graph/engine/validation/GraphValueValidator.js +47 -0
  135. package/lib/esm/graph/engine/validation/index.js +9 -0
  136. package/lib/esm/graph/index.js +9 -59
  137. package/lib/esm/graph/shared/constants.js +56 -0
  138. package/lib/esm/graph/shared/index.js +19 -0
  139. package/lib/esm/graph/shared/nodes/agent.js +101 -0
  140. package/lib/esm/graph/shared/nodes/base.js +30 -0
  141. package/lib/esm/graph/shared/nodes/category-styles.js +34 -0
  142. package/lib/esm/graph/shared/nodes/flow-control.js +455 -0
  143. package/lib/esm/graph/shared/nodes/index.js +18 -0
  144. package/lib/esm/graph/shared/nodes/triggers.js +241 -0
  145. package/lib/esm/graph/shared/types.js +2 -0
  146. package/lib/esm/index.js +3 -3
  147. package/lib/types/graph/engine/constants.d.cts +59 -0
  148. package/lib/types/graph/engine/constants.d.mts +59 -0
  149. package/lib/types/graph/{execution → engine/execution}/GraphExecutionResult.d.cts +1 -1
  150. package/lib/types/graph/{execution → engine/execution}/GraphExecutionResult.d.mts +1 -1
  151. package/lib/types/graph/engine/index.d.cts +61 -0
  152. package/lib/types/graph/engine/index.d.mts +61 -0
  153. package/lib/types/graph/{loops → engine/loops}/ConditionExpressionEvaluator.d.cts +1 -1
  154. package/lib/types/graph/{loops → engine/loops}/ConditionExpressionEvaluator.d.mts +1 -1
  155. package/lib/types/graph/{loops → engine/loops}/GraphConditionEvaluator.d.cts +2 -1
  156. package/lib/types/graph/{loops → engine/loops}/GraphConditionEvaluator.d.mts +2 -1
  157. package/lib/types/graph/{types.d.cts → engine/types.d.cts} +8 -116
  158. package/lib/types/graph/{types.d.mts → engine/types.d.mts} +8 -116
  159. package/lib/types/graph/index.d.cts +8 -53
  160. package/lib/types/graph/index.d.mts +8 -53
  161. package/lib/types/graph/shared/constants.d.cts +53 -0
  162. package/lib/types/graph/shared/constants.d.mts +53 -0
  163. package/lib/types/graph/shared/index.d.cts +18 -0
  164. package/lib/types/graph/shared/index.d.mts +18 -0
  165. package/lib/types/graph/shared/types.d.cts +121 -0
  166. package/lib/types/graph/shared/types.d.mts +121 -0
  167. package/lib/types/index.d.cts +2 -2
  168. package/lib/types/index.d.mts +2 -2
  169. package/package.json +14 -3
  170. package/lib/cjs/graph/constants.cjs +0 -94
  171. package/lib/cjs/graph/decorators.cjs +0 -4
  172. package/lib/cjs/graph/errors/GraphCycleError.cjs +0 -20
  173. package/lib/cjs/graph/errors/GraphExecutionError.cjs +0 -27
  174. package/lib/cjs/graph/errors/GraphInputError.cjs +0 -20
  175. package/lib/cjs/graph/errors/GraphLoopLimitError.cjs +0 -20
  176. package/lib/cjs/graph/errors/GraphPinningError.cjs +0 -20
  177. package/lib/cjs/graph/errors/GraphPortError.cjs +0 -20
  178. package/lib/cjs/graph/errors/GraphStoreError.cjs +0 -20
  179. package/lib/cjs/graph/errors/GraphTopologyError.cjs +0 -20
  180. package/lib/cjs/graph/events/GraphExecutionEvent.cjs +0 -4
  181. package/lib/cjs/graph/events/GraphExecutionEventEmitter.cjs +0 -40
  182. package/lib/cjs/graph/events/GraphExecutionEventFactory.cjs +0 -37
  183. package/lib/cjs/graph/events/GraphExecutionObserver.cjs +0 -4
  184. package/lib/cjs/graph/execution/CodeSandboxEvaluator.cjs +0 -4
  185. package/lib/cjs/graph/execution/GraphExecutionContext.cjs +0 -79
  186. package/lib/cjs/graph/execution/GraphExecutionEngine.cjs +0 -407
  187. package/lib/cjs/graph/execution/GraphExecutionFrame.cjs +0 -32
  188. package/lib/cjs/graph/execution/GraphExecutionResult.cjs +0 -30
  189. package/lib/cjs/graph/execution/GraphNodeExecutor.cjs +0 -4
  190. package/lib/cjs/graph/execution/SwitchGraphNodeExecutor.cjs +0 -103
  191. package/lib/cjs/graph/loops/ConditionExpressionEvaluator.cjs +0 -87
  192. package/lib/cjs/graph/loops/ForeachGraphNodeExecutor.cjs +0 -84
  193. package/lib/cjs/graph/loops/GraphConditionEvaluator.cjs +0 -85
  194. package/lib/cjs/graph/loops/GraphLoopExecutionContext.cjs +0 -16
  195. package/lib/cjs/graph/loops/UntilGraphNodeExecutor.cjs +0 -76
  196. package/lib/cjs/graph/loops/WhileGraphNodeExecutor.cjs +0 -77
  197. package/lib/cjs/graph/nodes/base.cjs +0 -35
  198. package/lib/cjs/graph/nodes/category-styles.cjs +0 -38
  199. package/lib/cjs/graph/nodes/flow-control.cjs +0 -464
  200. package/lib/cjs/graph/nodes/triggers.cjs +0 -250
  201. package/lib/cjs/graph/pinning/GraphPinningDependencyResolver.cjs +0 -28
  202. package/lib/cjs/graph/pinning/GraphPinningMetadata.cjs +0 -20
  203. package/lib/cjs/graph/pinning/GraphPinningPolicy.cjs +0 -34
  204. package/lib/cjs/graph/pinning/GraphPinningService.cjs +0 -191
  205. package/lib/cjs/graph/planning/GraphExecutionPlan.cjs +0 -4
  206. package/lib/cjs/graph/planning/GraphExecutionPlanEdge.cjs +0 -4
  207. package/lib/cjs/graph/planning/GraphExecutionPlanLayer.cjs +0 -4
  208. package/lib/cjs/graph/planning/GraphExecutionPlanNode.cjs +0 -4
  209. package/lib/cjs/graph/planning/GraphExecutionPlanner.cjs +0 -197
  210. package/lib/cjs/graph/planning/GraphRelationResolver.cjs +0 -172
  211. package/lib/cjs/graph/planning/GraphTopology.cjs +0 -57
  212. package/lib/cjs/graph/registry/GraphNodeExecutorRegistry.cjs +0 -44
  213. package/lib/cjs/graph/registry/GraphNodeExecutorResolver.cjs +0 -27
  214. package/lib/cjs/graph/snapshots/GraphExecutionSnapshotMapper.cjs +0 -53
  215. package/lib/cjs/graph/store/GraphCachedValue.cjs +0 -4
  216. package/lib/cjs/graph/store/GraphValueKey.cjs +0 -4
  217. package/lib/cjs/graph/store/GraphValueStore.cjs +0 -76
  218. package/lib/cjs/graph/store/GraphValueStoreAdapter.cjs +0 -4
  219. package/lib/cjs/graph/store/InMemoryGraphValueStoreAdapter.cjs +0 -69
  220. package/lib/cjs/graph/types.cjs +0 -4
  221. package/lib/cjs/graph/validation/GraphDefinitionValidator.cjs +0 -33
  222. package/lib/cjs/graph/validation/GraphPortSchemaResolver.cjs +0 -58
  223. package/lib/cjs/graph/validation/GraphValueValidator.cjs +0 -52
  224. package/lib/esm/graph/constants.js +0 -106
  225. package/lib/esm/graph/decorators.js +0 -2
  226. package/lib/esm/graph/errors/GraphCycleError.js +0 -15
  227. package/lib/esm/graph/errors/GraphExecutionError.js +0 -22
  228. package/lib/esm/graph/errors/GraphInputError.js +0 -15
  229. package/lib/esm/graph/errors/GraphLoopLimitError.js +0 -15
  230. package/lib/esm/graph/errors/GraphPinningError.js +0 -15
  231. package/lib/esm/graph/errors/GraphPortError.js +0 -15
  232. package/lib/esm/graph/errors/GraphStoreError.js +0 -15
  233. package/lib/esm/graph/errors/GraphTopologyError.js +0 -15
  234. package/lib/esm/graph/errors/index.js +0 -14
  235. package/lib/esm/graph/events/GraphExecutionEvent.js +0 -2
  236. package/lib/esm/graph/events/GraphExecutionEventEmitter.js +0 -35
  237. package/lib/esm/graph/events/GraphExecutionEventFactory.js +0 -32
  238. package/lib/esm/graph/events/GraphExecutionObserver.js +0 -2
  239. package/lib/esm/graph/events/index.js +0 -10
  240. package/lib/esm/graph/execution/CodeSandboxEvaluator.js +0 -18
  241. package/lib/esm/graph/execution/GraphExecutionContext.js +0 -74
  242. package/lib/esm/graph/execution/GraphExecutionEngine.js +0 -402
  243. package/lib/esm/graph/execution/GraphExecutionFrame.js +0 -27
  244. package/lib/esm/graph/execution/GraphExecutionResult.js +0 -26
  245. package/lib/esm/graph/execution/GraphNodeExecutor.js +0 -2
  246. package/lib/esm/graph/execution/SwitchGraphNodeExecutor.js +0 -98
  247. package/lib/esm/graph/execution/index.js +0 -13
  248. package/lib/esm/graph/loops/ConditionExpressionEvaluator.js +0 -82
  249. package/lib/esm/graph/loops/ForeachGraphNodeExecutor.js +0 -79
  250. package/lib/esm/graph/loops/GraphConditionEvaluator.js +0 -80
  251. package/lib/esm/graph/loops/GraphLoopExecutionContext.js +0 -11
  252. package/lib/esm/graph/loops/UntilGraphNodeExecutor.js +0 -71
  253. package/lib/esm/graph/loops/WhileGraphNodeExecutor.js +0 -72
  254. package/lib/esm/graph/loops/index.js +0 -12
  255. package/lib/esm/graph/nodes/agent.js +0 -101
  256. package/lib/esm/graph/nodes/base.js +0 -30
  257. package/lib/esm/graph/nodes/category-styles.js +0 -34
  258. package/lib/esm/graph/nodes/flow-control.js +0 -455
  259. package/lib/esm/graph/nodes/index.js +0 -18
  260. package/lib/esm/graph/nodes/triggers.js +0 -241
  261. package/lib/esm/graph/pinning/GraphPinningDependencyResolver.js +0 -23
  262. package/lib/esm/graph/pinning/GraphPinningMetadata.js +0 -15
  263. package/lib/esm/graph/pinning/GraphPinningPolicy.js +0 -29
  264. package/lib/esm/graph/pinning/GraphPinningService.js +0 -186
  265. package/lib/esm/graph/pinning/index.js +0 -10
  266. package/lib/esm/graph/planning/GraphExecutionPlan.js +0 -2
  267. package/lib/esm/graph/planning/GraphExecutionPlanEdge.js +0 -7
  268. package/lib/esm/graph/planning/GraphExecutionPlanLayer.js +0 -2
  269. package/lib/esm/graph/planning/GraphExecutionPlanNode.js +0 -2
  270. package/lib/esm/graph/planning/GraphExecutionPlanner.js +0 -192
  271. package/lib/esm/graph/planning/GraphRelationResolver.js +0 -167
  272. package/lib/esm/graph/planning/GraphTopology.js +0 -52
  273. package/lib/esm/graph/planning/index.js +0 -13
  274. package/lib/esm/graph/registry/GraphNodeExecutorRegistry.js +0 -39
  275. package/lib/esm/graph/registry/GraphNodeExecutorResolver.js +0 -22
  276. package/lib/esm/graph/registry/index.js +0 -8
  277. package/lib/esm/graph/snapshots/GraphExecutionSnapshotMapper.js +0 -48
  278. package/lib/esm/graph/snapshots/index.js +0 -7
  279. package/lib/esm/graph/store/GraphCachedValue.js +0 -2
  280. package/lib/esm/graph/store/GraphValueKey.js +0 -7
  281. package/lib/esm/graph/store/GraphValueStore.js +0 -71
  282. package/lib/esm/graph/store/GraphValueStoreAdapter.js +0 -2
  283. package/lib/esm/graph/store/InMemoryGraphValueStoreAdapter.js +0 -64
  284. package/lib/esm/graph/store/index.js +0 -11
  285. package/lib/esm/graph/types.js +0 -2
  286. package/lib/esm/graph/validation/GraphDefinitionValidator.js +0 -28
  287. package/lib/esm/graph/validation/GraphPortSchemaResolver.js +0 -53
  288. package/lib/esm/graph/validation/GraphValueValidator.js +0 -47
  289. package/lib/esm/graph/validation/index.js +0 -9
  290. package/lib/types/graph/constants.d.cts +0 -101
  291. package/lib/types/graph/constants.d.mts +0 -101
  292. /package/lib/types/graph/{decorators.d.cts → engine/decorators.d.cts} +0 -0
  293. /package/lib/types/graph/{decorators.d.mts → engine/decorators.d.mts} +0 -0
  294. /package/lib/types/graph/{errors → engine/errors}/GraphCycleError.d.cts +0 -0
  295. /package/lib/types/graph/{errors → engine/errors}/GraphCycleError.d.mts +0 -0
  296. /package/lib/types/graph/{errors → engine/errors}/GraphExecutionError.d.cts +0 -0
  297. /package/lib/types/graph/{errors → engine/errors}/GraphExecutionError.d.mts +0 -0
  298. /package/lib/types/graph/{errors → engine/errors}/GraphInputError.d.cts +0 -0
  299. /package/lib/types/graph/{errors → engine/errors}/GraphInputError.d.mts +0 -0
  300. /package/lib/types/graph/{errors → engine/errors}/GraphLoopLimitError.d.cts +0 -0
  301. /package/lib/types/graph/{errors → engine/errors}/GraphLoopLimitError.d.mts +0 -0
  302. /package/lib/types/graph/{errors → engine/errors}/GraphPinningError.d.cts +0 -0
  303. /package/lib/types/graph/{errors → engine/errors}/GraphPinningError.d.mts +0 -0
  304. /package/lib/types/graph/{errors → engine/errors}/GraphPortError.d.cts +0 -0
  305. /package/lib/types/graph/{errors → engine/errors}/GraphPortError.d.mts +0 -0
  306. /package/lib/types/graph/{errors → engine/errors}/GraphStoreError.d.cts +0 -0
  307. /package/lib/types/graph/{errors → engine/errors}/GraphStoreError.d.mts +0 -0
  308. /package/lib/types/graph/{errors → engine/errors}/GraphTopologyError.d.cts +0 -0
  309. /package/lib/types/graph/{errors → engine/errors}/GraphTopologyError.d.mts +0 -0
  310. /package/lib/types/graph/{errors → engine/errors}/index.d.cts +0 -0
  311. /package/lib/types/graph/{errors → engine/errors}/index.d.mts +0 -0
  312. /package/lib/types/graph/{events → engine/events}/GraphExecutionEvent.d.cts +0 -0
  313. /package/lib/types/graph/{events → engine/events}/GraphExecutionEvent.d.mts +0 -0
  314. /package/lib/types/graph/{events → engine/events}/GraphExecutionEventEmitter.d.cts +0 -0
  315. /package/lib/types/graph/{events → engine/events}/GraphExecutionEventEmitter.d.mts +0 -0
  316. /package/lib/types/graph/{events → engine/events}/GraphExecutionEventFactory.d.cts +0 -0
  317. /package/lib/types/graph/{events → engine/events}/GraphExecutionEventFactory.d.mts +0 -0
  318. /package/lib/types/graph/{events → engine/events}/GraphExecutionObserver.d.cts +0 -0
  319. /package/lib/types/graph/{events → engine/events}/GraphExecutionObserver.d.mts +0 -0
  320. /package/lib/types/graph/{events → engine/events}/index.d.cts +0 -0
  321. /package/lib/types/graph/{events → engine/events}/index.d.mts +0 -0
  322. /package/lib/types/graph/{execution → engine/execution}/CodeSandboxEvaluator.d.cts +0 -0
  323. /package/lib/types/graph/{execution → engine/execution}/CodeSandboxEvaluator.d.mts +0 -0
  324. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionContext.d.cts +0 -0
  325. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionContext.d.mts +0 -0
  326. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionEngine.d.cts +0 -0
  327. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionEngine.d.mts +0 -0
  328. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionFrame.d.cts +0 -0
  329. /package/lib/types/graph/{execution → engine/execution}/GraphExecutionFrame.d.mts +0 -0
  330. /package/lib/types/graph/{execution → engine/execution}/GraphNodeExecutor.d.cts +0 -0
  331. /package/lib/types/graph/{execution → engine/execution}/GraphNodeExecutor.d.mts +0 -0
  332. /package/lib/types/graph/{execution → engine/execution}/SwitchGraphNodeExecutor.d.cts +0 -0
  333. /package/lib/types/graph/{execution → engine/execution}/SwitchGraphNodeExecutor.d.mts +0 -0
  334. /package/lib/types/graph/{execution → engine/execution}/index.d.cts +0 -0
  335. /package/lib/types/graph/{execution → engine/execution}/index.d.mts +0 -0
  336. /package/lib/types/graph/{loops → engine/loops}/ForeachGraphNodeExecutor.d.cts +0 -0
  337. /package/lib/types/graph/{loops → engine/loops}/ForeachGraphNodeExecutor.d.mts +0 -0
  338. /package/lib/types/graph/{loops → engine/loops}/GraphLoopExecutionContext.d.cts +0 -0
  339. /package/lib/types/graph/{loops → engine/loops}/GraphLoopExecutionContext.d.mts +0 -0
  340. /package/lib/types/graph/{loops → engine/loops}/UntilGraphNodeExecutor.d.cts +0 -0
  341. /package/lib/types/graph/{loops → engine/loops}/UntilGraphNodeExecutor.d.mts +0 -0
  342. /package/lib/types/graph/{loops → engine/loops}/WhileGraphNodeExecutor.d.cts +0 -0
  343. /package/lib/types/graph/{loops → engine/loops}/WhileGraphNodeExecutor.d.mts +0 -0
  344. /package/lib/types/graph/{loops → engine/loops}/index.d.cts +0 -0
  345. /package/lib/types/graph/{loops → engine/loops}/index.d.mts +0 -0
  346. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningDependencyResolver.d.cts +0 -0
  347. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningDependencyResolver.d.mts +0 -0
  348. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningMetadata.d.cts +0 -0
  349. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningMetadata.d.mts +0 -0
  350. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningPolicy.d.cts +0 -0
  351. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningPolicy.d.mts +0 -0
  352. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningService.d.cts +0 -0
  353. /package/lib/types/graph/{pinning → engine/pinning}/GraphPinningService.d.mts +0 -0
  354. /package/lib/types/graph/{pinning → engine/pinning}/index.d.cts +0 -0
  355. /package/lib/types/graph/{pinning → engine/pinning}/index.d.mts +0 -0
  356. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlan.d.cts +0 -0
  357. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlan.d.mts +0 -0
  358. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanEdge.d.cts +0 -0
  359. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanEdge.d.mts +0 -0
  360. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanLayer.d.cts +0 -0
  361. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanLayer.d.mts +0 -0
  362. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanNode.d.cts +0 -0
  363. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanNode.d.mts +0 -0
  364. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanner.d.cts +0 -0
  365. /package/lib/types/graph/{planning → engine/planning}/GraphExecutionPlanner.d.mts +0 -0
  366. /package/lib/types/graph/{planning → engine/planning}/GraphRelationResolver.d.cts +0 -0
  367. /package/lib/types/graph/{planning → engine/planning}/GraphRelationResolver.d.mts +0 -0
  368. /package/lib/types/graph/{planning → engine/planning}/GraphTopology.d.cts +0 -0
  369. /package/lib/types/graph/{planning → engine/planning}/GraphTopology.d.mts +0 -0
  370. /package/lib/types/graph/{planning → engine/planning}/index.d.cts +0 -0
  371. /package/lib/types/graph/{planning → engine/planning}/index.d.mts +0 -0
  372. /package/lib/types/graph/{registry → engine/registry}/GraphNodeExecutorRegistry.d.cts +0 -0
  373. /package/lib/types/graph/{registry → engine/registry}/GraphNodeExecutorRegistry.d.mts +0 -0
  374. /package/lib/types/graph/{registry → engine/registry}/GraphNodeExecutorResolver.d.cts +0 -0
  375. /package/lib/types/graph/{registry → engine/registry}/GraphNodeExecutorResolver.d.mts +0 -0
  376. /package/lib/types/graph/{registry → engine/registry}/index.d.cts +0 -0
  377. /package/lib/types/graph/{registry → engine/registry}/index.d.mts +0 -0
  378. /package/lib/types/graph/{snapshots → engine/snapshots}/GraphExecutionSnapshotMapper.d.cts +0 -0
  379. /package/lib/types/graph/{snapshots → engine/snapshots}/GraphExecutionSnapshotMapper.d.mts +0 -0
  380. /package/lib/types/graph/{snapshots → engine/snapshots}/index.d.cts +0 -0
  381. /package/lib/types/graph/{snapshots → engine/snapshots}/index.d.mts +0 -0
  382. /package/lib/types/graph/{store → engine/store}/GraphCachedValue.d.cts +0 -0
  383. /package/lib/types/graph/{store → engine/store}/GraphCachedValue.d.mts +0 -0
  384. /package/lib/types/graph/{store → engine/store}/GraphValueKey.d.cts +0 -0
  385. /package/lib/types/graph/{store → engine/store}/GraphValueKey.d.mts +0 -0
  386. /package/lib/types/graph/{store → engine/store}/GraphValueStore.d.cts +0 -0
  387. /package/lib/types/graph/{store → engine/store}/GraphValueStore.d.mts +0 -0
  388. /package/lib/types/graph/{store → engine/store}/GraphValueStoreAdapter.d.cts +0 -0
  389. /package/lib/types/graph/{store → engine/store}/GraphValueStoreAdapter.d.mts +0 -0
  390. /package/lib/types/graph/{store → engine/store}/InMemoryGraphValueStoreAdapter.d.cts +0 -0
  391. /package/lib/types/graph/{store → engine/store}/InMemoryGraphValueStoreAdapter.d.mts +0 -0
  392. /package/lib/types/graph/{store → engine/store}/index.d.cts +0 -0
  393. /package/lib/types/graph/{store → engine/store}/index.d.mts +0 -0
  394. /package/lib/types/graph/{validation → engine/validation}/GraphDefinitionValidator.d.cts +0 -0
  395. /package/lib/types/graph/{validation → engine/validation}/GraphDefinitionValidator.d.mts +0 -0
  396. /package/lib/types/graph/{validation → engine/validation}/GraphPortSchemaResolver.d.cts +0 -0
  397. /package/lib/types/graph/{validation → engine/validation}/GraphPortSchemaResolver.d.mts +0 -0
  398. /package/lib/types/graph/{validation → engine/validation}/GraphValueValidator.d.cts +0 -0
  399. /package/lib/types/graph/{validation → engine/validation}/GraphValueValidator.d.mts +0 -0
  400. /package/lib/types/graph/{validation → engine/validation}/index.d.cts +0 -0
  401. /package/lib/types/graph/{validation → engine/validation}/index.d.mts +0 -0
  402. /package/lib/types/graph/{nodes → shared/nodes}/agent.d.cts +0 -0
  403. /package/lib/types/graph/{nodes → shared/nodes}/agent.d.mts +0 -0
  404. /package/lib/types/graph/{nodes → shared/nodes}/base.d.cts +0 -0
  405. /package/lib/types/graph/{nodes → shared/nodes}/base.d.mts +0 -0
  406. /package/lib/types/graph/{nodes → shared/nodes}/category-styles.d.cts +0 -0
  407. /package/lib/types/graph/{nodes → shared/nodes}/category-styles.d.mts +0 -0
  408. /package/lib/types/graph/{nodes → shared/nodes}/flow-control.d.cts +0 -0
  409. /package/lib/types/graph/{nodes → shared/nodes}/flow-control.d.mts +0 -0
  410. /package/lib/types/graph/{nodes → shared/nodes}/index.d.cts +0 -0
  411. /package/lib/types/graph/{nodes → shared/nodes}/index.d.mts +0 -0
  412. /package/lib/types/graph/{nodes → shared/nodes}/triggers.d.cts +0 -0
  413. /package/lib/types/graph/{nodes → shared/nodes}/triggers.d.mts +0 -0
@@ -1,10 +1,14 @@
1
1
  /**
2
- * @module integrations/graph/types
2
+ * @module integrations/graph/engine/types
3
3
  * @summary Graph execution engine core types.
4
- * @description Type aliases and interfaces shared across the graph execution engine.
4
+ * @description Engine-private type aliases and interfaces. Frontend-safe
5
+ * types (`ExprValue`, `ConditionExpression`, `CodeCondition`,
6
+ * `SwitchCaseCondition`, `SwitchCase`, `SwitchNodeMetadata`,
7
+ * `NodeMetadataChange`) live in `../shared/types`; engine modules import
8
+ * shared symbols from there and engine-private symbols from here.
5
9
  */
6
- import type { GraphNodeDefinition, GraphPortDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
7
- import type { GraphExecutionEventType, GraphExecutionStatus } from "./constants.d.cts";
10
+ import type { GraphNodeDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
11
+ import type { GraphExecutionEventType, GraphExecutionStatus } from "../shared/constants.d.cts";
8
12
  /**
9
13
  * Unique identifier for a single graph execution run.
10
14
  */
@@ -146,118 +150,6 @@ export interface GraphConditionDefinition {
146
150
  evaluator?: string;
147
151
  metadata?: Record<string, unknown>;
148
152
  }
149
- /**
150
- * A value reference inside a {@link ConditionExpression}.
151
- *
152
- * - `{ const: x }` — a literal constant.
153
- * - `{ path: "a.b" }` — a dotted path resolved against the current loop state.
154
- * - `{ step: "nodeId", path: "out" }` — a cross-node reference (resolved from
155
- * the execution state in v1; reserved for future multi-step evaluation).
156
- */
157
- export type ExprValue = {
158
- const: unknown;
159
- } | {
160
- path: string;
161
- } | {
162
- step: string;
163
- path: string;
164
- };
165
- /**
166
- * Declarative, serializable condition expression DSL (ALFRED-5 §8 / DECAF-32 §22.3).
167
- *
168
- * The engine's {@link GraphConditionEvaluator} recognises this DSL when the
169
- * condition object carries an `op` field and dispatches to the
170
- * {@link ConditionExpressionEvaluator}.
171
- */
172
- export type ConditionExpression = {
173
- op: "eq";
174
- left: ExprValue;
175
- right: ExprValue;
176
- } | {
177
- op: "neq";
178
- left: ExprValue;
179
- right: ExprValue;
180
- } | {
181
- op: "gt";
182
- left: ExprValue;
183
- right: ExprValue;
184
- } | {
185
- op: "gte";
186
- left: ExprValue;
187
- right: ExprValue;
188
- } | {
189
- op: "lt";
190
- left: ExprValue;
191
- right: ExprValue;
192
- } | {
193
- op: "lte";
194
- left: ExprValue;
195
- right: ExprValue;
196
- } | {
197
- op: "and";
198
- conditions: ConditionExpression[];
199
- } | {
200
- op: "or";
201
- conditions: ConditionExpression[];
202
- } | {
203
- op: "not";
204
- condition: ConditionExpression;
205
- } | {
206
- op: "exists";
207
- value: ExprValue;
208
- };
209
- /**
210
- * A code-based condition evaluated in a restricted VM sandbox (§22.4).
211
- *
212
- * The engine does NOT implement the sandbox directly — a pluggable
213
- * {@link CodeSandboxEvaluator} must be registered for code conditions to work.
214
- * The code must follow the same restrictions as the Code Node (§22.4):
215
- * no system API access, placeholder syntax for workflow data references.
216
- */
217
- export interface CodeCondition {
218
- type: "code";
219
- code: string;
220
- language?: "javascript" | "typescript";
221
- }
222
- /**
223
- * A condition on a Switch case — either a declarative
224
- * {@link ConditionExpression} (graphical mode) or a {@link CodeCondition}
225
- * (code mode).
226
- */
227
- export type SwitchCaseCondition = ConditionExpression | CodeCondition;
228
- /**
229
- * A single case in a Switch node.
230
- *
231
- * Each case pairs a condition with a dedicated output port. When the
232
- * condition evaluates to `true`, the input is routed to `outputPort`.
233
- */
234
- export interface SwitchCase {
235
- id: string;
236
- label: string;
237
- condition: SwitchCaseCondition;
238
- outputPort: string;
239
- }
240
- /**
241
- * Metadata for a Switch node, stored in `metadata.switch`.
242
- */
243
- export interface SwitchNodeMetadata {
244
- cases: SwitchCase[];
245
- defaultPort?: string;
246
- }
247
- /**
248
- * The result of applying a metadata change to a node. Each concrete node
249
- * class that overrides `GraphNode.applyMetadata()` returns this so the
250
- * renderer can update the diagram model — the node owns its ports, its
251
- * size, and any data patches.
252
- */
253
- export interface NodeMetadataChange {
254
- ports: GraphPortDefinition[];
255
- size: {
256
- width: number;
257
- height: number;
258
- };
259
- dataPatch: Record<string, unknown>;
260
- }
261
153
  /**
262
154
  * Pinning metadata attached to a node via `@pinnable()`.
263
155
  */
@@ -1,10 +1,14 @@
1
1
  /**
2
- * @module integrations/graph/types
2
+ * @module integrations/graph/engine/types
3
3
  * @summary Graph execution engine core types.
4
- * @description Type aliases and interfaces shared across the graph execution engine.
4
+ * @description Engine-private type aliases and interfaces. Frontend-safe
5
+ * types (`ExprValue`, `ConditionExpression`, `CodeCondition`,
6
+ * `SwitchCaseCondition`, `SwitchCase`, `SwitchNodeMetadata`,
7
+ * `NodeMetadataChange`) live in `../shared/types`; engine modules import
8
+ * shared symbols from there and engine-private symbols from here.
5
9
  */
6
- import type { GraphNodeDefinition, GraphPortDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
7
- import type { GraphExecutionEventType, GraphExecutionStatus } from "./constants.d.mts";
10
+ import type { GraphNodeDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
11
+ import type { GraphExecutionEventType, GraphExecutionStatus } from "../shared/constants.d.mts";
8
12
  /**
9
13
  * Unique identifier for a single graph execution run.
10
14
  */
@@ -146,118 +150,6 @@ export interface GraphConditionDefinition {
146
150
  evaluator?: string;
147
151
  metadata?: Record<string, unknown>;
148
152
  }
149
- /**
150
- * A value reference inside a {@link ConditionExpression}.
151
- *
152
- * - `{ const: x }` — a literal constant.
153
- * - `{ path: "a.b" }` — a dotted path resolved against the current loop state.
154
- * - `{ step: "nodeId", path: "out" }` — a cross-node reference (resolved from
155
- * the execution state in v1; reserved for future multi-step evaluation).
156
- */
157
- export type ExprValue = {
158
- const: unknown;
159
- } | {
160
- path: string;
161
- } | {
162
- step: string;
163
- path: string;
164
- };
165
- /**
166
- * Declarative, serializable condition expression DSL (ALFRED-5 §8 / DECAF-32 §22.3).
167
- *
168
- * The engine's {@link GraphConditionEvaluator} recognises this DSL when the
169
- * condition object carries an `op` field and dispatches to the
170
- * {@link ConditionExpressionEvaluator}.
171
- */
172
- export type ConditionExpression = {
173
- op: "eq";
174
- left: ExprValue;
175
- right: ExprValue;
176
- } | {
177
- op: "neq";
178
- left: ExprValue;
179
- right: ExprValue;
180
- } | {
181
- op: "gt";
182
- left: ExprValue;
183
- right: ExprValue;
184
- } | {
185
- op: "gte";
186
- left: ExprValue;
187
- right: ExprValue;
188
- } | {
189
- op: "lt";
190
- left: ExprValue;
191
- right: ExprValue;
192
- } | {
193
- op: "lte";
194
- left: ExprValue;
195
- right: ExprValue;
196
- } | {
197
- op: "and";
198
- conditions: ConditionExpression[];
199
- } | {
200
- op: "or";
201
- conditions: ConditionExpression[];
202
- } | {
203
- op: "not";
204
- condition: ConditionExpression;
205
- } | {
206
- op: "exists";
207
- value: ExprValue;
208
- };
209
- /**
210
- * A code-based condition evaluated in a restricted VM sandbox (§22.4).
211
- *
212
- * The engine does NOT implement the sandbox directly — a pluggable
213
- * {@link CodeSandboxEvaluator} must be registered for code conditions to work.
214
- * The code must follow the same restrictions as the Code Node (§22.4):
215
- * no system API access, placeholder syntax for workflow data references.
216
- */
217
- export interface CodeCondition {
218
- type: "code";
219
- code: string;
220
- language?: "javascript" | "typescript";
221
- }
222
- /**
223
- * A condition on a Switch case — either a declarative
224
- * {@link ConditionExpression} (graphical mode) or a {@link CodeCondition}
225
- * (code mode).
226
- */
227
- export type SwitchCaseCondition = ConditionExpression | CodeCondition;
228
- /**
229
- * A single case in a Switch node.
230
- *
231
- * Each case pairs a condition with a dedicated output port. When the
232
- * condition evaluates to `true`, the input is routed to `outputPort`.
233
- */
234
- export interface SwitchCase {
235
- id: string;
236
- label: string;
237
- condition: SwitchCaseCondition;
238
- outputPort: string;
239
- }
240
- /**
241
- * Metadata for a Switch node, stored in `metadata.switch`.
242
- */
243
- export interface SwitchNodeMetadata {
244
- cases: SwitchCase[];
245
- defaultPort?: string;
246
- }
247
- /**
248
- * The result of applying a metadata change to a node. Each concrete node
249
- * class that overrides `GraphNode.applyMetadata()` returns this so the
250
- * renderer can update the diagram model — the node owns its ports, its
251
- * size, and any data patches.
252
- */
253
- export interface NodeMetadataChange {
254
- ports: GraphPortDefinition[];
255
- size: {
256
- width: number;
257
- height: number;
258
- };
259
- dataPatch: Record<string, unknown>;
260
- }
261
153
  /**
262
154
  * Pinning metadata attached to a node via `@pinnable()`.
263
155
  */
@@ -1,56 +1,11 @@
1
1
  /**
2
2
  * @module integrations/graph
3
- * @summary Decaf Graph Execution Engine.
4
- * @description Reference interpreter for Decaf graph workflows. Executes workflows declared with `@decaf-ts/ui-decorators/graph`, emits events through Decaf's Observable pipeline, supports structured loops, configurable value stores, and pinnable/cacheable nodes.
3
+ * @summary Decaf Graph Execution Engine (backend convenience export).
4
+ * @description Re-exports `./engine`, which in turn re-exports `./shared`
5
+ * (frontend-safe declarations) plus all engine modules. Backend consumers
6
+ * import from `@decaf-ts/integrations/graph` and get a single unified surface.
7
+ *
8
+ * Frontend bundles MUST import from `@decaf-ts/integrations/graph/shared`
9
+ * instead to avoid pulling in the execution engine.
5
10
  */
6
- export * from "./constants.d.cts";
7
- export * from "./types.d.cts";
8
- export * from "./decorators.d.cts";
9
- export * from "./errors/GraphExecutionError.d.cts";
10
- export * from "./errors/GraphCycleError.d.cts";
11
- export * from "./errors/GraphInputError.d.cts";
12
- export * from "./errors/GraphLoopLimitError.d.cts";
13
- export * from "./errors/GraphPinningError.d.cts";
14
- export * from "./errors/GraphPortError.d.cts";
15
- export * from "./errors/GraphStoreError.d.cts";
16
- export * from "./errors/GraphTopologyError.d.cts";
17
- export * from "./events/GraphExecutionEvent.d.cts";
18
- export * from "./events/GraphExecutionObserver.d.cts";
19
- export * from "./events/GraphExecutionEventEmitter.d.cts";
20
- export * from "./events/GraphExecutionEventFactory.d.cts";
21
- export * from "./execution/GraphExecutionContext.d.cts";
22
- export * from "./execution/GraphNodeExecutor.d.cts";
23
- export * from "./execution/GraphExecutionFrame.d.cts";
24
- export * from "./execution/GraphExecutionResult.d.cts";
25
- export * from "./execution/GraphExecutionEngine.d.cts";
26
- export * from "./execution/CodeSandboxEvaluator.d.cts";
27
- export * from "./execution/SwitchGraphNodeExecutor.d.cts";
28
- export * from "./registry/GraphNodeExecutorRegistry.d.cts";
29
- export * from "./registry/GraphNodeExecutorResolver.d.cts";
30
- export * from "./store/GraphValueKey.d.cts";
31
- export * from "./store/GraphCachedValue.d.cts";
32
- export * from "./store/GraphValueStoreAdapter.d.cts";
33
- export * from "./store/InMemoryGraphValueStoreAdapter.d.cts";
34
- export * from "./store/GraphValueStore.d.cts";
35
- export * from "./planning/GraphExecutionPlanNode.d.cts";
36
- export * from "./planning/GraphExecutionPlanEdge.d.cts";
37
- export * from "./planning/GraphExecutionPlanLayer.d.cts";
38
- export * from "./planning/GraphExecutionPlan.d.cts";
39
- export * from "./planning/GraphRelationResolver.d.cts";
40
- export * from "./planning/GraphExecutionPlanner.d.cts";
41
- export * from "./planning/GraphTopology.d.cts";
42
- export * from "./validation/GraphDefinitionValidator.d.cts";
43
- export * from "./validation/GraphPortSchemaResolver.d.cts";
44
- export * from "./validation/GraphValueValidator.d.cts";
45
- export * from "./loops/GraphConditionEvaluator.d.cts";
46
- export * from "./loops/ConditionExpressionEvaluator.d.cts";
47
- export * from "./loops/GraphLoopExecutionContext.d.cts";
48
- export * from "./loops/ForeachGraphNodeExecutor.d.cts";
49
- export * from "./loops/WhileGraphNodeExecutor.d.cts";
50
- export * from "./loops/UntilGraphNodeExecutor.d.cts";
51
- export * from "./pinning/GraphPinningMetadata.d.cts";
52
- export * from "./pinning/GraphPinningPolicy.d.cts";
53
- export * from "./pinning/GraphPinningDependencyResolver.d.cts";
54
- export * from "./pinning/GraphPinningService.d.cts";
55
- export * from "./snapshots/GraphExecutionSnapshotMapper.d.cts";
56
- export * from "./nodes/index.d.cts";
11
+ export * from "./engine/index.d.cts";
@@ -1,56 +1,11 @@
1
1
  /**
2
2
  * @module integrations/graph
3
- * @summary Decaf Graph Execution Engine.
4
- * @description Reference interpreter for Decaf graph workflows. Executes workflows declared with `@decaf-ts/ui-decorators/graph`, emits events through Decaf's Observable pipeline, supports structured loops, configurable value stores, and pinnable/cacheable nodes.
3
+ * @summary Decaf Graph Execution Engine (backend convenience export).
4
+ * @description Re-exports `./engine`, which in turn re-exports `./shared`
5
+ * (frontend-safe declarations) plus all engine modules. Backend consumers
6
+ * import from `@decaf-ts/integrations/graph` and get a single unified surface.
7
+ *
8
+ * Frontend bundles MUST import from `@decaf-ts/integrations/graph/shared`
9
+ * instead to avoid pulling in the execution engine.
5
10
  */
6
- export * from "./constants.d.mts";
7
- export * from "./types.d.mts";
8
- export * from "./decorators.d.mts";
9
- export * from "./errors/GraphExecutionError.d.mts";
10
- export * from "./errors/GraphCycleError.d.mts";
11
- export * from "./errors/GraphInputError.d.mts";
12
- export * from "./errors/GraphLoopLimitError.d.mts";
13
- export * from "./errors/GraphPinningError.d.mts";
14
- export * from "./errors/GraphPortError.d.mts";
15
- export * from "./errors/GraphStoreError.d.mts";
16
- export * from "./errors/GraphTopologyError.d.mts";
17
- export * from "./events/GraphExecutionEvent.d.mts";
18
- export * from "./events/GraphExecutionObserver.d.mts";
19
- export * from "./events/GraphExecutionEventEmitter.d.mts";
20
- export * from "./events/GraphExecutionEventFactory.d.mts";
21
- export * from "./execution/GraphExecutionContext.d.mts";
22
- export * from "./execution/GraphNodeExecutor.d.mts";
23
- export * from "./execution/GraphExecutionFrame.d.mts";
24
- export * from "./execution/GraphExecutionResult.d.mts";
25
- export * from "./execution/GraphExecutionEngine.d.mts";
26
- export * from "./execution/CodeSandboxEvaluator.d.mts";
27
- export * from "./execution/SwitchGraphNodeExecutor.d.mts";
28
- export * from "./registry/GraphNodeExecutorRegistry.d.mts";
29
- export * from "./registry/GraphNodeExecutorResolver.d.mts";
30
- export * from "./store/GraphValueKey.d.mts";
31
- export * from "./store/GraphCachedValue.d.mts";
32
- export * from "./store/GraphValueStoreAdapter.d.mts";
33
- export * from "./store/InMemoryGraphValueStoreAdapter.d.mts";
34
- export * from "./store/GraphValueStore.d.mts";
35
- export * from "./planning/GraphExecutionPlanNode.d.mts";
36
- export * from "./planning/GraphExecutionPlanEdge.d.mts";
37
- export * from "./planning/GraphExecutionPlanLayer.d.mts";
38
- export * from "./planning/GraphExecutionPlan.d.mts";
39
- export * from "./planning/GraphRelationResolver.d.mts";
40
- export * from "./planning/GraphExecutionPlanner.d.mts";
41
- export * from "./planning/GraphTopology.d.mts";
42
- export * from "./validation/GraphDefinitionValidator.d.mts";
43
- export * from "./validation/GraphPortSchemaResolver.d.mts";
44
- export * from "./validation/GraphValueValidator.d.mts";
45
- export * from "./loops/GraphConditionEvaluator.d.mts";
46
- export * from "./loops/ConditionExpressionEvaluator.d.mts";
47
- export * from "./loops/GraphLoopExecutionContext.d.mts";
48
- export * from "./loops/ForeachGraphNodeExecutor.d.mts";
49
- export * from "./loops/WhileGraphNodeExecutor.d.mts";
50
- export * from "./loops/UntilGraphNodeExecutor.d.mts";
51
- export * from "./pinning/GraphPinningMetadata.d.mts";
52
- export * from "./pinning/GraphPinningPolicy.d.mts";
53
- export * from "./pinning/GraphPinningDependencyResolver.d.mts";
54
- export * from "./pinning/GraphPinningService.d.mts";
55
- export * from "./snapshots/GraphExecutionSnapshotMapper.d.mts";
56
- export * from "./nodes/index.d.mts";
11
+ export * from "./engine/index.d.mts";
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @module integrations/graph/shared/constants
3
+ * @summary Frontend-safe graph constants and enums.
4
+ * @description Constants and enumerations that are safe to import from a
5
+ * frontend bundle (no engine runtime dependency). The execution-status and
6
+ * event-type enums live here because the frontend renders status badges and
7
+ * event timelines and must not pull in the execution engine.
8
+ */
9
+ /**
10
+ * Execution status for a workflow or individual node.
11
+ */
12
+ export declare enum GraphExecutionStatus {
13
+ PENDING = "pending",
14
+ PLANNING = "planning",
15
+ RUNNING = "running",
16
+ SUCCEEDED = "succeeded",
17
+ FAILED = "failed",
18
+ SKIPPED = "skipped",
19
+ CANCELLED = "cancelled",
20
+ CACHED = "cached"
21
+ }
22
+ /**
23
+ * Event types emitted through the graph execution observer pipeline.
24
+ */
25
+ export declare enum GraphExecutionEventType {
26
+ WORKFLOW_STARTED = "workflow.started",
27
+ WORKFLOW_PLANNED = "workflow.planned",
28
+ WORKFLOW_COMPLETED = "workflow.completed",
29
+ WORKFLOW_FAILED = "workflow.failed",
30
+ WORKFLOW_CANCELLED = "workflow.cancelled",
31
+ NODE_QUEUED = "node.queued",
32
+ NODE_STARTED = "node.started",
33
+ NODE_OUTPUT = "node.output",
34
+ NODE_COMPLETED = "node.completed",
35
+ NODE_FAILED = "node.failed",
36
+ NODE_SKIPPED = "node.skipped",
37
+ NODE_CACHE_HIT = "node.cacheHit",
38
+ NODE_PINNED = "node.pinned",
39
+ NODE_UNPINNED = "node.unpinned",
40
+ EDGE_VALUE_ROUTED = "edge.valueRouted",
41
+ LOOP_STARTED = "loop.started",
42
+ LOOP_ITERATION_STARTED = "loop.iteration.started",
43
+ LOOP_ITERATION_COMPLETED = "loop.iteration.completed",
44
+ LOOP_CONDITION_EVALUATED = "loop.condition.evaluated",
45
+ LOOP_COMPLETED = "loop.completed",
46
+ LOOP_LIMIT_REACHED = "loop.limitReached",
47
+ VALIDATION_STARTED = "validation.started",
48
+ VALIDATION_FAILED = "validation.failed",
49
+ VALIDATION_COMPLETED = "validation.completed",
50
+ STORE_READ = "store.read",
51
+ STORE_WRITE = "store.write",
52
+ STORE_DELETE = "store.delete"
53
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @module integrations/graph/shared/constants
3
+ * @summary Frontend-safe graph constants and enums.
4
+ * @description Constants and enumerations that are safe to import from a
5
+ * frontend bundle (no engine runtime dependency). The execution-status and
6
+ * event-type enums live here because the frontend renders status badges and
7
+ * event timelines and must not pull in the execution engine.
8
+ */
9
+ /**
10
+ * Execution status for a workflow or individual node.
11
+ */
12
+ export declare enum GraphExecutionStatus {
13
+ PENDING = "pending",
14
+ PLANNING = "planning",
15
+ RUNNING = "running",
16
+ SUCCEEDED = "succeeded",
17
+ FAILED = "failed",
18
+ SKIPPED = "skipped",
19
+ CANCELLED = "cancelled",
20
+ CACHED = "cached"
21
+ }
22
+ /**
23
+ * Event types emitted through the graph execution observer pipeline.
24
+ */
25
+ export declare enum GraphExecutionEventType {
26
+ WORKFLOW_STARTED = "workflow.started",
27
+ WORKFLOW_PLANNED = "workflow.planned",
28
+ WORKFLOW_COMPLETED = "workflow.completed",
29
+ WORKFLOW_FAILED = "workflow.failed",
30
+ WORKFLOW_CANCELLED = "workflow.cancelled",
31
+ NODE_QUEUED = "node.queued",
32
+ NODE_STARTED = "node.started",
33
+ NODE_OUTPUT = "node.output",
34
+ NODE_COMPLETED = "node.completed",
35
+ NODE_FAILED = "node.failed",
36
+ NODE_SKIPPED = "node.skipped",
37
+ NODE_CACHE_HIT = "node.cacheHit",
38
+ NODE_PINNED = "node.pinned",
39
+ NODE_UNPINNED = "node.unpinned",
40
+ EDGE_VALUE_ROUTED = "edge.valueRouted",
41
+ LOOP_STARTED = "loop.started",
42
+ LOOP_ITERATION_STARTED = "loop.iteration.started",
43
+ LOOP_ITERATION_COMPLETED = "loop.iteration.completed",
44
+ LOOP_CONDITION_EVALUATED = "loop.condition.evaluated",
45
+ LOOP_COMPLETED = "loop.completed",
46
+ LOOP_LIMIT_REACHED = "loop.limitReached",
47
+ VALIDATION_STARTED = "validation.started",
48
+ VALIDATION_FAILED = "validation.failed",
49
+ VALIDATION_COMPLETED = "validation.completed",
50
+ STORE_READ = "store.read",
51
+ STORE_WRITE = "store.write",
52
+ STORE_DELETE = "store.delete"
53
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @module integrations/graph/shared
3
+ * @summary Frontend-safe graph declarations.
4
+ * @description Subpath export for frontend bundles. Re-exports the node kind
5
+ * declarations, shared types, and shared constants — no engine runtime
6
+ * dependency. Also re-exports `Metadata` from `@decaf-ts/ui-decorators` so
7
+ * consumers get the `Metadata.nodes()` / `Metadata.workflows()` accessors
8
+ * (attached via the graph overrides side-effect import).
9
+ *
10
+ * Importing anything from this module triggers the `ui-decorators/graph`
11
+ * overrides side-effect, which attaches `nodes()` / `workflows()` to the
12
+ * `Metadata` class.
13
+ */
14
+ import "@decaf-ts/ui-decorators/graph";
15
+ export { Metadata } from "@decaf-ts/decoration";
16
+ export * from "./constants.d.cts";
17
+ export * from "./types.d.cts";
18
+ export * from "./nodes/index.d.cts";
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @module integrations/graph/shared
3
+ * @summary Frontend-safe graph declarations.
4
+ * @description Subpath export for frontend bundles. Re-exports the node kind
5
+ * declarations, shared types, and shared constants — no engine runtime
6
+ * dependency. Also re-exports `Metadata` from `@decaf-ts/ui-decorators` so
7
+ * consumers get the `Metadata.nodes()` / `Metadata.workflows()` accessors
8
+ * (attached via the graph overrides side-effect import).
9
+ *
10
+ * Importing anything from this module triggers the `ui-decorators/graph`
11
+ * overrides side-effect, which attaches `nodes()` / `workflows()` to the
12
+ * `Metadata` class.
13
+ */
14
+ import "@decaf-ts/ui-decorators/graph";
15
+ export { Metadata } from "@decaf-ts/decoration";
16
+ export * from "./constants.d.mts";
17
+ export * from "./types.d.mts";
18
+ export * from "./nodes/index.d.mts";
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @module integrations/graph/shared/types
3
+ * @summary Frontend-safe graph type declarations.
4
+ * @description Type aliases and interfaces that are safe to import from a
5
+ * frontend bundle. These types describe declarative graph metadata (loop
6
+ * condition DSL, switch cases, node metadata patches) consumed by the
7
+ * renderer and the node CRUD screens — no engine runtime dependency.
8
+ */
9
+ import type { GraphPortDefinition } from "@decaf-ts/ui-decorators/graph";
10
+ /**
11
+ * A value reference inside a {@link ConditionExpression}.
12
+ *
13
+ * - `{ const: x }` — a literal constant.
14
+ * - `{ path: "a.b" }` — a dotted path resolved against the current loop state.
15
+ * - `{ step: "nodeId", path: "out" }` — a cross-node reference (resolved from
16
+ * the execution state in v1; reserved for future multi-step evaluation).
17
+ */
18
+ export type ExprValue = {
19
+ const: unknown;
20
+ } | {
21
+ path: string;
22
+ } | {
23
+ step: string;
24
+ path: string;
25
+ };
26
+ /**
27
+ * Declarative, serializable condition expression DSL (ALFRED-5 §8 / DECAF-32 §22.3).
28
+ *
29
+ * The engine's `GraphConditionEvaluator` recognises this DSL when the
30
+ * condition object carries an `op` field and dispatches to the
31
+ * `ConditionExpressionEvaluator`.
32
+ */
33
+ export type ConditionExpression = {
34
+ op: "eq";
35
+ left: ExprValue;
36
+ right: ExprValue;
37
+ } | {
38
+ op: "neq";
39
+ left: ExprValue;
40
+ right: ExprValue;
41
+ } | {
42
+ op: "gt";
43
+ left: ExprValue;
44
+ right: ExprValue;
45
+ } | {
46
+ op: "gte";
47
+ left: ExprValue;
48
+ right: ExprValue;
49
+ } | {
50
+ op: "lt";
51
+ left: ExprValue;
52
+ right: ExprValue;
53
+ } | {
54
+ op: "lte";
55
+ left: ExprValue;
56
+ right: ExprValue;
57
+ } | {
58
+ op: "and";
59
+ conditions: ConditionExpression[];
60
+ } | {
61
+ op: "or";
62
+ conditions: ConditionExpression[];
63
+ } | {
64
+ op: "not";
65
+ condition: ConditionExpression;
66
+ } | {
67
+ op: "exists";
68
+ value: ExprValue;
69
+ };
70
+ /**
71
+ * A code-based condition evaluated in a restricted VM sandbox (§22.4).
72
+ *
73
+ * The engine does NOT implement the sandbox directly — a pluggable
74
+ * `CodeSandboxEvaluator` must be registered for code conditions to work.
75
+ * The code must follow the same restrictions as the Code Node (§22.4):
76
+ * no system API access, placeholder syntax for workflow data references.
77
+ */
78
+ export interface CodeCondition {
79
+ type: "code";
80
+ code: string;
81
+ language?: "javascript" | "typescript";
82
+ }
83
+ /**
84
+ * A condition on a Switch case — either a declarative
85
+ * {@link ConditionExpression} (graphical mode) or a {@link CodeCondition}
86
+ * (code mode).
87
+ */
88
+ export type SwitchCaseCondition = ConditionExpression | CodeCondition;
89
+ /**
90
+ * A single case in a Switch node.
91
+ *
92
+ * Each case pairs a condition with a dedicated output port. When the
93
+ * condition evaluates to `true`, the input is routed to `outputPort`.
94
+ */
95
+ export interface SwitchCase {
96
+ id: string;
97
+ label: string;
98
+ condition: SwitchCaseCondition;
99
+ outputPort: string;
100
+ }
101
+ /**
102
+ * Metadata for a Switch node, stored in `metadata.switch`.
103
+ */
104
+ export interface SwitchNodeMetadata {
105
+ cases: SwitchCase[];
106
+ defaultPort?: string;
107
+ }
108
+ /**
109
+ * The result of applying a metadata change to a node. Each concrete node
110
+ * class that overrides `GraphNode.applyMetadata()` returns this so the
111
+ * renderer can update the diagram model — the node owns its ports, its
112
+ * size, and any data patches.
113
+ */
114
+ export interface NodeMetadataChange {
115
+ ports: GraphPortDefinition[];
116
+ size: {
117
+ width: number;
118
+ height: number;
119
+ };
120
+ dataPatch: Record<string, unknown>;
121
+ }