@dxos/plugin-automation 0.8.4-main.b97322e → 0.8.4-main.bc2380dfbc

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 (318) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/AutomationPanel-T5O4DNQF.mjs +11 -0
  4. package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
  5. package/dist/lib/neutral/AutomationPlugin.node.mjs +1112 -0
  6. package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
  7. package/dist/lib/neutral/AutomationPlugin.workerd.mjs +23 -0
  8. package/dist/lib/neutral/AutomationPlugin.workerd.mjs.map +7 -0
  9. package/dist/lib/neutral/AutomationSettings-UVS5STCS.mjs +31 -0
  10. package/dist/lib/neutral/AutomationSettings-UVS5STCS.mjs.map +7 -0
  11. package/dist/lib/neutral/FunctionsContainer-CDCM65U4.mjs +38 -0
  12. package/dist/lib/neutral/FunctionsContainer-CDCM65U4.mjs.map +7 -0
  13. package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs +97 -0
  14. package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs.map +7 -0
  15. package/dist/lib/neutral/FunctionsRegistry-7ITCFJCW.mjs +95 -0
  16. package/dist/lib/neutral/FunctionsRegistry-7ITCFJCW.mjs.map +7 -0
  17. package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
  18. package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs +75 -0
  19. package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs.map +7 -0
  20. package/dist/lib/neutral/capabilities/index.mjs +15 -0
  21. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  22. package/dist/lib/neutral/capabilities/node.mjs +13 -0
  23. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-2JP77CMN.mjs +42 -0
  25. package/dist/lib/neutral/chunk-2JP77CMN.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-2UYFDJO6.mjs +12 -0
  27. package/dist/lib/neutral/chunk-2UYFDJO6.mjs.map +7 -0
  28. package/dist/lib/neutral/chunk-ATECY555.mjs +20 -0
  29. package/dist/lib/neutral/chunk-ATECY555.mjs.map +7 -0
  30. package/dist/lib/neutral/chunk-CNFKEN7S.mjs +37 -0
  31. package/dist/lib/neutral/chunk-CNFKEN7S.mjs.map +7 -0
  32. package/dist/lib/neutral/chunk-DSCOLDT5.mjs +93 -0
  33. package/dist/lib/neutral/chunk-DSCOLDT5.mjs.map +7 -0
  34. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  35. package/dist/lib/neutral/chunk-JKVVCWSL.mjs +307 -0
  36. package/dist/lib/neutral/chunk-JKVVCWSL.mjs.map +7 -0
  37. package/dist/lib/neutral/chunk-K3C5ZTZA.mjs +285 -0
  38. package/dist/lib/neutral/chunk-K3C5ZTZA.mjs.map +7 -0
  39. package/dist/lib/neutral/chunk-M3TIHFXN.mjs +8 -0
  40. package/dist/lib/neutral/chunk-M3TIHFXN.mjs.map +7 -0
  41. package/dist/lib/neutral/components/index.mjs +16 -0
  42. package/dist/lib/neutral/compute-runtime-D7MPZJ4R.mjs +222 -0
  43. package/dist/lib/neutral/compute-runtime-D7MPZJ4R.mjs.map +7 -0
  44. package/dist/lib/neutral/containers/index.mjs +13 -0
  45. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  46. package/dist/lib/neutral/create-trigger-from-template-7K3OYOHQ.mjs +68 -0
  47. package/dist/lib/neutral/create-trigger-from-template-7K3OYOHQ.mjs.map +7 -0
  48. package/dist/lib/neutral/hooks/index.mjs +129 -0
  49. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  50. package/dist/lib/neutral/index.mjs +20 -0
  51. package/dist/lib/neutral/meta.json +1 -0
  52. package/dist/lib/neutral/meta.mjs +8 -0
  53. package/dist/lib/neutral/meta.mjs.map +7 -0
  54. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs +13 -0
  55. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs.map +7 -0
  56. package/dist/lib/neutral/operations/index.mjs +8 -0
  57. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  58. package/dist/lib/neutral/plugin.mjs +16 -0
  59. package/dist/lib/neutral/plugin.mjs.map +7 -0
  60. package/dist/lib/neutral/react-surface-3OGMAMKV.mjs +57 -0
  61. package/dist/lib/neutral/react-surface-3OGMAMKV.mjs.map +7 -0
  62. package/dist/lib/neutral/testing.mjs +8 -0
  63. package/dist/lib/neutral/testing.mjs.map +7 -0
  64. package/dist/lib/neutral/translations.mjs +47 -0
  65. package/dist/lib/neutral/translations.mjs.map +7 -0
  66. package/dist/lib/neutral/types/index.mjs +16 -0
  67. package/dist/lib/neutral/types/index.mjs.map +7 -0
  68. package/dist/types/src/AutomationPlugin.d.ts +3 -1
  69. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  70. package/dist/types/src/AutomationPlugin.node.d.ts +4 -0
  71. package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
  72. package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
  73. package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
  74. package/dist/types/src/AutomationPlugin.workerd.d.ts +4 -0
  75. package/dist/types/src/AutomationPlugin.workerd.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  77. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/compute-runtime.d.ts +14 -0
  79. package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/index.d.ts +6 -3
  81. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/node.d.ts +6 -0
  83. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  84. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  85. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  86. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  87. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  88. package/dist/types/src/commands/index.d.ts +2 -0
  89. package/dist/types/src/commands/index.d.ts.map +1 -0
  90. package/dist/types/src/commands/trigger/create/index.d.ts +25 -0
  91. package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
  92. package/dist/types/src/commands/trigger/create/queue.d.ts +13 -0
  93. package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
  94. package/dist/types/src/commands/trigger/create/subscription.d.ts +15 -0
  95. package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
  96. package/dist/types/src/commands/trigger/create/timer.d.ts +13 -0
  97. package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
  98. package/dist/types/src/commands/trigger/index.d.ts +57 -0
  99. package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
  100. package/dist/types/src/commands/trigger/list.d.ts +7 -0
  101. package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
  102. package/dist/types/src/commands/trigger/options.d.ts +11 -0
  103. package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
  104. package/dist/types/src/commands/trigger/remove.d.ts +8 -0
  105. package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
  106. package/dist/types/src/commands/trigger/update/index.d.ts +28 -0
  107. package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
  108. package/dist/types/src/commands/trigger/update/queue.d.ts +12 -0
  109. package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
  110. package/dist/types/src/commands/trigger/update/subscription.d.ts +13 -0
  111. package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
  112. package/dist/types/src/commands/trigger/update/timer.d.ts +11 -0
  113. package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
  114. package/dist/types/src/commands/trigger/util.d.ts +46 -0
  115. package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
  116. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -3
  117. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  118. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +50 -4
  119. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
  121. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  122. package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -1
  123. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +8 -0
  124. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
  125. package/dist/types/src/components/FunctionsRegistry/index.d.ts +4 -0
  126. package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
  127. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -9
  128. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  129. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
  130. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  131. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +11 -8
  132. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  133. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +121 -4
  134. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  135. package/dist/types/src/components/index.d.ts +2 -3
  136. package/dist/types/src/components/index.d.ts.map +1 -1
  137. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +6 -0
  138. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
  139. package/dist/types/src/containers/AutomationSettings/index.d.ts +2 -0
  140. package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
  141. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts +4 -0
  142. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -0
  143. package/dist/types/src/containers/FunctionsContainer/index.d.ts +2 -0
  144. package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -0
  145. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +6 -0
  146. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -0
  147. package/dist/types/src/containers/TriggerSettings/index.d.ts +3 -0
  148. package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -0
  149. package/dist/types/src/containers/index.d.ts +5 -0
  150. package/dist/types/src/containers/index.d.ts.map +1 -0
  151. package/dist/types/src/hooks/index.d.ts +5 -0
  152. package/dist/types/src/hooks/index.d.ts.map +1 -0
  153. package/dist/types/src/hooks/useComputeRuntime.d.ts +8 -0
  154. package/dist/types/src/hooks/useComputeRuntime.d.ts.map +1 -0
  155. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +9 -0
  156. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
  157. package/dist/types/src/hooks/useComputeRuntimeService.d.ts +17 -0
  158. package/dist/types/src/hooks/useComputeRuntimeService.d.ts.map +1 -0
  159. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +12 -0
  160. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -0
  161. package/dist/types/src/index.d.ts +1 -2
  162. package/dist/types/src/index.d.ts.map +1 -1
  163. package/dist/types/src/meta.d.ts +2 -3
  164. package/dist/types/src/meta.d.ts.map +1 -1
  165. package/dist/types/src/operations/create-trigger-from-template.d.ts +5 -0
  166. package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -0
  167. package/dist/types/src/operations/index.d.ts +3 -0
  168. package/dist/types/src/operations/index.d.ts.map +1 -0
  169. package/dist/types/src/plugin.d.ts +4 -0
  170. package/dist/types/src/plugin.d.ts.map +1 -0
  171. package/dist/types/src/testing/test-functions.d.ts +204 -3
  172. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  173. package/dist/types/src/testing.d.ts +2 -0
  174. package/dist/types/src/testing.d.ts.map +1 -0
  175. package/dist/types/src/translations.d.ts +32 -26
  176. package/dist/types/src/translations.d.ts.map +1 -1
  177. package/dist/types/src/types/AutomationCapabilities.d.ts +22 -0
  178. package/dist/types/src/types/AutomationCapabilities.d.ts.map +1 -0
  179. package/dist/types/src/types/AutomationEvents.d.ts +3 -0
  180. package/dist/types/src/types/AutomationEvents.d.ts.map +1 -0
  181. package/dist/types/src/types/AutomationOperation.d.ts +19 -0
  182. package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
  183. package/dist/types/src/types/index.d.ts +3 -0
  184. package/dist/types/src/types/index.d.ts.map +1 -1
  185. package/dist/types/src/types/schema.d.ts +12 -4
  186. package/dist/types/src/types/schema.d.ts.map +1 -1
  187. package/dist/types/tsconfig.tsbuildinfo +1 -1
  188. package/package.json +147 -50
  189. package/src/AutomationPlugin.node.ts +29 -0
  190. package/src/AutomationPlugin.test.ts +27 -0
  191. package/src/AutomationPlugin.tsx +23 -34
  192. package/src/AutomationPlugin.workerd.ts +18 -0
  193. package/src/capabilities/app-graph-builder.ts +59 -79
  194. package/src/capabilities/compute-runtime.ts +326 -0
  195. package/src/capabilities/index.ts +9 -4
  196. package/src/capabilities/node.ts +13 -0
  197. package/src/capabilities/operation-handler.ts +16 -0
  198. package/src/capabilities/react-surface.tsx +49 -46
  199. package/src/commands/index.ts +5 -0
  200. package/src/commands/trigger/create/index.ts +14 -0
  201. package/src/commands/trigger/create/queue.ts +86 -0
  202. package/src/commands/trigger/create/subscription.ts +125 -0
  203. package/src/commands/trigger/create/timer.ts +90 -0
  204. package/src/commands/trigger/index.ts +16 -0
  205. package/src/commands/trigger/list.ts +70 -0
  206. package/src/commands/trigger/options.ts +59 -0
  207. package/src/commands/trigger/remove.ts +44 -0
  208. package/src/commands/trigger/update/index.ts +14 -0
  209. package/src/commands/trigger/update/queue.ts +194 -0
  210. package/src/commands/trigger/update/subscription.ts +278 -0
  211. package/src/commands/trigger/update/timer.ts +193 -0
  212. package/src/commands/trigger/util.ts +412 -0
  213. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +23 -17
  214. package/src/components/AutomationPanel/AutomationPanel.tsx +289 -94
  215. package/src/components/FunctionsPanel/FunctionsPanel.tsx +52 -32
  216. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +119 -0
  217. package/src/components/FunctionsRegistry/index.ts +8 -0
  218. package/src/components/TriggerEditor/FunctionInputEditor.tsx +42 -35
  219. package/src/components/TriggerEditor/SpecSelector.tsx +34 -22
  220. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +134 -40
  221. package/src/components/TriggerEditor/TriggerEditor.tsx +109 -48
  222. package/src/components/index.ts +1 -2
  223. package/src/containers/AutomationSettings/AutomationSettings.tsx +31 -0
  224. package/src/containers/AutomationSettings/index.ts +5 -0
  225. package/src/containers/FunctionsContainer/FunctionsContainer.tsx +33 -0
  226. package/src/containers/FunctionsContainer/index.ts +5 -0
  227. package/src/containers/TriggerSettings/TriggerSettings.tsx +48 -0
  228. package/src/containers/TriggerSettings/index.ts +6 -0
  229. package/src/containers/index.ts +9 -0
  230. package/src/hooks/index.ts +9 -0
  231. package/src/hooks/useComputeRuntime.ts +30 -0
  232. package/src/hooks/useComputeRuntimeCallback.ts +31 -0
  233. package/src/hooks/useComputeRuntimeService.ts +64 -0
  234. package/src/hooks/useTriggerRuntimeControls.ts +70 -0
  235. package/src/index.ts +1 -3
  236. package/src/meta.ts +10 -8
  237. package/src/operations/create-trigger-from-template.ts +71 -0
  238. package/src/operations/index.ts +7 -0
  239. package/src/plugin.ts +11 -0
  240. package/src/testing/test-functions.ts +13 -10
  241. package/src/testing.ts +7 -0
  242. package/src/translations.ts +39 -29
  243. package/src/types/AutomationCapabilities.ts +48 -0
  244. package/src/types/AutomationEvents.ts +11 -0
  245. package/src/types/AutomationOperation.ts +30 -0
  246. package/src/types/index.ts +4 -0
  247. package/src/types/schema.ts +6 -6
  248. package/dist/lib/browser/AutomationContainer-VZNV2ZQF.mjs +0 -38
  249. package/dist/lib/browser/AutomationContainer-VZNV2ZQF.mjs.map +0 -7
  250. package/dist/lib/browser/AutomationPanel-ZWA6GOFY.mjs +0 -11
  251. package/dist/lib/browser/FunctionsContainer-IOB333TX.mjs +0 -39
  252. package/dist/lib/browser/FunctionsContainer-IOB333TX.mjs.map +0 -7
  253. package/dist/lib/browser/FunctionsPanel-56ZKRVM5.mjs +0 -10
  254. package/dist/lib/browser/app-graph-builder-ZTAUTFI4.mjs +0 -80
  255. package/dist/lib/browser/app-graph-builder-ZTAUTFI4.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-ECSTS2UI.mjs +0 -14
  257. package/dist/lib/browser/chunk-ECSTS2UI.mjs.map +0 -7
  258. package/dist/lib/browser/chunk-ERTIGJYE.mjs +0 -147
  259. package/dist/lib/browser/chunk-ERTIGJYE.mjs.map +0 -7
  260. package/dist/lib/browser/chunk-FSJZXTS2.mjs +0 -230
  261. package/dist/lib/browser/chunk-FSJZXTS2.mjs.map +0 -7
  262. package/dist/lib/browser/chunk-GW5U2DGT.mjs +0 -15
  263. package/dist/lib/browser/chunk-GW5U2DGT.mjs.map +0 -7
  264. package/dist/lib/browser/chunk-HN7OHFCB.mjs +0 -38
  265. package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-LYJVTIVD.mjs +0 -94
  267. package/dist/lib/browser/chunk-LYJVTIVD.mjs.map +0 -7
  268. package/dist/lib/browser/index.mjs +0 -101
  269. package/dist/lib/browser/index.mjs.map +0 -7
  270. package/dist/lib/browser/intent-resolver-U3ZAQEFW.mjs +0 -76
  271. package/dist/lib/browser/intent-resolver-U3ZAQEFW.mjs.map +0 -7
  272. package/dist/lib/browser/meta.json +0 -1
  273. package/dist/lib/browser/react-surface-4DFSM7OX.mjs +0 -64
  274. package/dist/lib/browser/react-surface-4DFSM7OX.mjs.map +0 -7
  275. package/dist/lib/browser/types/index.mjs +0 -8
  276. package/dist/lib/node-esm/AutomationContainer-WMIH3F4V.mjs +0 -39
  277. package/dist/lib/node-esm/AutomationContainer-WMIH3F4V.mjs.map +0 -7
  278. package/dist/lib/node-esm/AutomationPanel-YYUMSK2W.mjs +0 -12
  279. package/dist/lib/node-esm/FunctionsContainer-DJWB6WFH.mjs +0 -40
  280. package/dist/lib/node-esm/FunctionsContainer-DJWB6WFH.mjs.map +0 -7
  281. package/dist/lib/node-esm/FunctionsPanel-KGIOZSPZ.mjs +0 -11
  282. package/dist/lib/node-esm/app-graph-builder-3FP63ZSG.mjs +0 -81
  283. package/dist/lib/node-esm/app-graph-builder-3FP63ZSG.mjs.map +0 -7
  284. package/dist/lib/node-esm/chunk-AZH66CED.mjs +0 -231
  285. package/dist/lib/node-esm/chunk-AZH66CED.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-HIMYPGHF.mjs +0 -148
  287. package/dist/lib/node-esm/chunk-HIMYPGHF.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-NK5N3QKD.mjs +0 -17
  289. package/dist/lib/node-esm/chunk-NK5N3QKD.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-OEZNHUL2.mjs +0 -39
  291. package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-SGZPTJ47.mjs +0 -16
  293. package/dist/lib/node-esm/chunk-SGZPTJ47.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-ZGPUV5VS.mjs +0 -95
  295. package/dist/lib/node-esm/chunk-ZGPUV5VS.mjs.map +0 -7
  296. package/dist/lib/node-esm/index.mjs +0 -102
  297. package/dist/lib/node-esm/index.mjs.map +0 -7
  298. package/dist/lib/node-esm/intent-resolver-3QWXEBPX.mjs +0 -77
  299. package/dist/lib/node-esm/intent-resolver-3QWXEBPX.mjs.map +0 -7
  300. package/dist/lib/node-esm/meta.json +0 -1
  301. package/dist/lib/node-esm/react-surface-3PNW7NDW.mjs +0 -65
  302. package/dist/lib/node-esm/react-surface-3PNW7NDW.mjs.map +0 -7
  303. package/dist/lib/node-esm/types/index.mjs +0 -9
  304. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  305. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  306. package/dist/types/src/components/AutomationContainer.d.ts +0 -5
  307. package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
  308. package/dist/types/src/components/FunctionsContainer.d.ts +0 -7
  309. package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
  310. package/src/capabilities/intent-resolver.ts +0 -72
  311. package/src/components/AutomationContainer.tsx +0 -30
  312. package/src/components/FunctionsContainer.tsx +0 -31
  313. /package/dist/lib/{browser/AutomationPanel-ZWA6GOFY.mjs.map → neutral/AutomationPanel-T5O4DNQF.mjs.map} +0 -0
  314. /package/dist/lib/{browser/FunctionsPanel-56ZKRVM5.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
  315. /package/dist/lib/{browser/types/index.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
  316. /package/dist/lib/{node-esm/AutomationPanel-YYUMSK2W.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  317. /package/dist/lib/{node-esm/types → neutral/components}/index.mjs.map +0 -0
  318. /package/dist/lib/{node-esm/FunctionsPanel-KGIOZSPZ.mjs.map → neutral/index.mjs.map} +0 -0
@@ -0,0 +1,95 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/components/FunctionsRegistry/FunctionsRegistry.tsx
4
+ import * as Schema from "effect/Schema";
5
+ import { useState } from "react";
6
+ import React, { useCallback } from "react";
7
+ import * as OperationModule from "@dxos/compute";
8
+ import { Context } from "@dxos/context";
9
+ import { Filter, Obj } from "@dxos/echo";
10
+ import { getDeployedFunctions } from "@dxos/functions-runtime/edge";
11
+ import { useClient } from "@dxos/react-client";
12
+ import { useQuery } from "@dxos/react-client/echo";
13
+ import { IconButton, useAsyncEffect, useTranslation } from "@dxos/react-ui";
14
+ import { Settings } from "@dxos/react-ui-form";
15
+ import { List } from "@dxos/react-ui-list";
16
+ import { ghostHover, mx } from "@dxos/ui-theme";
17
+ import { meta } from "#meta";
18
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-automation/src/components/FunctionsRegistry/FunctionsRegistry.tsx";
19
+ var grid = "grid grid-cols-[1fr_1fr_auto] min-h-[2.5rem]";
20
+ var FunctionsRegistry = ({ space }) => {
21
+ const client = useClient();
22
+ const [loading, setLoading] = useState(true);
23
+ const [functions, setFunctions] = useState([]);
24
+ const { t } = useTranslation(meta.id);
25
+ const dbFunctions = useQuery(space.db, Filter.type(OperationModule.Operation.PersistentOperation));
26
+ const state = (func) => {
27
+ const funcKey = Obj.getMeta(func).key;
28
+ const dbFunction = dbFunctions.find((f) => Obj.getMeta(f).key === funcKey);
29
+ if (!dbFunction) {
30
+ return "import";
31
+ }
32
+ if (Obj.getMeta(dbFunction).version === Obj.getMeta(func).version && dbFunction.updated === func.updated) {
33
+ return "none";
34
+ }
35
+ return "update";
36
+ };
37
+ useAsyncEffect(async () => {
38
+ setLoading(true);
39
+ const functions2 = await getDeployedFunctions(Context.default(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 38 }), client, true);
40
+ setFunctions(functions2);
41
+ setLoading(false);
42
+ }, []);
43
+ const hanleImportOrUpdate = useCallback(async (func) => {
44
+ const funcKey = Obj.getMeta(func).key;
45
+ const functions2 = funcKey ? await space.db.query(Filter.and(Filter.type(OperationModule.Operation.PersistentOperation), Filter.key(funcKey))).run() : [];
46
+ const [existingFunc] = functions2;
47
+ if (!existingFunc) {
48
+ space.db.add(func);
49
+ return;
50
+ }
51
+ OperationModule.Operation.setFrom(existingFunc, func);
52
+ }, [
53
+ space
54
+ ]);
55
+ return /* @__PURE__ */ React.createElement(Settings.Panel, null, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
56
+ items: functions,
57
+ isItem: Schema.is(OperationModule.Operation.PersistentOperation),
58
+ getId: (func) => func.id
59
+ }, ({ items }) => /* @__PURE__ */ React.createElement("div", {
60
+ role: "list",
61
+ className: "flex flex-col w-full"
62
+ }, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
63
+ key: func.id,
64
+ item: func,
65
+ classNames: mx(grid, ghostHover, "items-center", "px-2", "min-h-[3rem]")
66
+ }, /* @__PURE__ */ React.createElement("div", {
67
+ className: "flex flex-col truncate"
68
+ }, /* @__PURE__ */ React.createElement(List.ItemTitle, {
69
+ classNames: "truncate"
70
+ }, func.name), /* @__PURE__ */ React.createElement("div", {
71
+ className: "text-xs text-description truncate"
72
+ }, Obj.getMeta(func).key)), /* @__PURE__ */ React.createElement("div", {
73
+ className: "flex flex-col truncate"
74
+ }, /* @__PURE__ */ React.createElement("div", {
75
+ className: "text-xs text-description truncate"
76
+ }, Obj.getMeta(func).version), /* @__PURE__ */ React.createElement("div", {
77
+ className: "text-xs text-description truncate"
78
+ }, func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : "")), /* @__PURE__ */ React.createElement(IconButton, {
79
+ iconOnly: true,
80
+ icon: state(func) === "update" ? "ph--arrows-clockwise--regular" : "ph--download--regular",
81
+ label: state(func) === "update" ? t("update-function-button.label") : t("import-function-button.label"),
82
+ disabled: state(func) === "none",
83
+ onClick: () => hanleImportOrUpdate(func)
84
+ }))))), loading && /* @__PURE__ */ React.createElement("div", {
85
+ className: "text-center py-4 text-gray-500"
86
+ }, t("loading-functions.message")));
87
+ };
88
+
89
+ // src/components/FunctionsRegistry/index.ts
90
+ var FunctionsRegistry_default = FunctionsRegistry;
91
+ export {
92
+ FunctionsRegistry,
93
+ FunctionsRegistry_default as default
94
+ };
95
+ //# sourceMappingURL=FunctionsRegistry-7ITCFJCW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FunctionsRegistry/FunctionsRegistry.tsx", "../../../src/components/FunctionsRegistry/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport { useState } from 'react';\nimport React, { useCallback } from 'react';\n\nimport * as OperationModule from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Filter, Obj } from '@dxos/echo';\nimport { getDeployedFunctions } from '@dxos/functions-runtime/edge';\nimport { useClient } from '@dxos/react-client';\nimport { type Space, useQuery } from '@dxos/react-client/echo';\nimport { IconButton, useAsyncEffect, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\n\nconst grid = 'grid grid-cols-[1fr_1fr_auto] min-h-[2.5rem]';\n\ntype FunctionsRegistryProps = {\n space: Space;\n};\n\nexport const FunctionsRegistry = ({ space }: FunctionsRegistryProps) => {\n const client = useClient();\n const [loading, setLoading] = useState(true);\n const [functions, setFunctions] = useState<OperationModule.Operation.PersistentOperation[]>([]);\n const { t } = useTranslation(meta.id);\n\n const dbFunctions = useQuery(space.db, Filter.type(OperationModule.Operation.PersistentOperation));\n\n const state = (func: OperationModule.Operation.PersistentOperation) => {\n const funcKey = Obj.getMeta(func).key;\n const dbFunction = dbFunctions.find((f) => Obj.getMeta(f).key === funcKey);\n if (!dbFunction) {\n return 'import';\n }\n if (Obj.getMeta(dbFunction).version === Obj.getMeta(func).version && dbFunction.updated === func.updated) {\n return 'none';\n }\n return 'update';\n };\n\n useAsyncEffect(async () => {\n setLoading(true);\n const functions = await getDeployedFunctions(Context.default(), client, true);\n setFunctions(functions);\n setLoading(false);\n }, []);\n\n const hanleImportOrUpdate = useCallback(\n async (func: OperationModule.Operation.PersistentOperation) => {\n const funcKey = Obj.getMeta(func).key;\n const functions = funcKey\n ? await space.db\n .query(Filter.and(Filter.type(OperationModule.Operation.PersistentOperation), Filter.key(funcKey)))\n .run()\n : [];\n const [existingFunc] = functions;\n if (!existingFunc) {\n space.db.add(func);\n return;\n }\n OperationModule.Operation.setFrom(existingFunc, func);\n },\n [space],\n );\n\n return (\n <Settings.Panel>\n {functions.length > 0 && (\n <List.Root<OperationModule.Operation.PersistentOperation>\n items={functions}\n isItem={Schema.is(OperationModule.Operation.PersistentOperation)}\n getId={(func) => func.id}\n >\n {({ items }) => (\n <div role='list' className='flex flex-col w-full'>\n {items?.map((func) => (\n <List.Item<OperationModule.Operation.PersistentOperation>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2', 'min-h-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n <div className='text-xs text-description truncate'>{Obj.getMeta(func).key}</div>\n </div>\n <div className='flex flex-col truncate'>\n <div className='text-xs text-description truncate'>{Obj.getMeta(func).version}</div>\n <div className='text-xs text-description truncate'>\n {func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : ''}\n </div>\n </div>\n\n <IconButton\n iconOnly\n icon={state(func) === 'update' ? 'ph--arrows-clockwise--regular' : 'ph--download--regular'}\n label={\n state(func) === 'update' ? t('update-function-button.label') : t('import-function-button.label')\n }\n disabled={state(func) === 'none'}\n onClick={() => hanleImportOrUpdate(func)}\n />\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {loading && <div className='text-center py-4 text-gray-500'>{t('loading-functions.message')}</div>}\n </Settings.Panel>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsRegistry } from './FunctionsRegistry';\n\nexport { FunctionsRegistry };\nexport default FunctionsRegistry;\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,SAASC,gBAAgB;AACzB,OAAOC,SAASC,mBAAmB;AAEnC,YAAYC,qBAAqB;AACjC,SAASC,eAAe;AACxB,SAASC,QAAQC,WAAW;AAC5B,SAASC,4BAA4B;AACrC,SAASC,iBAAiB;AAC1B,SAAqBC,gBAAgB;AACrC,SAASC,YAAYC,gBAAgBC,sBAAsB;AAC3D,SAASC,gBAAgB;AACzB,SAASC,YAAY;AACrB,SAASC,YAAYC,UAAU;AAE/B,SAASC,YAAY;AAErB,IAAA,eAAa;IAOX,OAAMC;AACN,IAAOC,oBAAoB,CAAGnB,EAAAA,MAAAA,MAAS;AACvC,QAAM,SAACoB,UAAWC;AAClB,QAAM,CAAA,SAAQT,UAAAA,IAAeK,SAAO,IAAA;AAEpC,QAAMK,CAAAA,WAAAA,YAAuBC,IAAAA,SAAUlB,CAAAA,CAAAA;AAEvC,QAAMmB,EAAAA,EAAAA,IAAQ,eAACC,KAAAA,EAAAA;QACb,cAAgBnB,SAAIoB,MAAQD,IAAME,OAAG,KAAA,0BAAA,mBAAA,CAAA;QACrC,QAAMC,CAAAA,SAAAA;AACN,UAAKA,UAAAA,IAAY,QAAA,IAAA,EAAA;UACf,aAAO,YAAA,KAAA,CAAA,MAAA,IAAA,QAAA,CAAA,EAAA,QAAA,OAAA;AACT,QAAA,CAAA,YAAA;AACItB,aAAIoB;;AAER,QAAA,IAAA,QAAA,UAAA,EAAA,YAAA,IAAA,QAAA,IAAA,EAAA,WAAA,WAAA,YAAA,KAAA,SAAA;AACA,aAAO;IACT;AAEAf,WAAAA;;iBAEQS,YAAY;AAClBC,eAAAA,IAAaD;AACbS,UAAAA,aAAW,MAAA,qBAAA,QAAA,QAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,GAAA,CAAA,GAAA,QAAA,IAAA;AACV,iBAAET,UAAA;AAEL,eAAMU,KAAAA;MAEF,CAAA;QACA,sBAAkBC,YACRR,OACHS,SAAM3B;AAGb,UAAM,UAAC4B,IAAa,QAAGb,IAAAA,EAAAA;AACvB,UAAKa,aAAAA,UAAc,MAAA,MAAA,GAAA,MAAA,OAAA,IAAA,OAAA,KAAA,0BAAA,mBAAA,GAAA,OAAA,IAAA,OAAA,CAAA,CAAA,EAAA,IAAA,IAAA,CAAA;UACjBV,CAAAA,YAAaE,IAAAA;QACb,CAAA,cAAA;AACF,YAAA,GAAA,IAAA,IAAA;AACAtB;IAEF;AAACoB,IAAAA,0BAAAA,QAAAA,cAAAA,IAAAA;KAAM;IAGT;;SAKyB,sBAACpB,cAAgB+B,SAAUC,OAAAA,MAAAA,UAAmB,SAAA,KAAA,sBAAA,cAAA,KAAA,MAAA;IAC/DC,OAAO;IAEL,QAAS,UACT,0BAAA,mBAACC;WAAIC,CAAAA,SAAK,KAAA;cAAOC,MAAU,sBAAA,cAAA,OAAA;IACxBC,MAAOC;eAEChB;YACLiB,IAAMjB,CAAAA,SAAAA,sBAAAA,cAAAA,KAAAA,MAAAA;IACNkB,KAAAA,KAAAA;;IAEKJ,YAAU,GAAA,MAAA,YAAA,gBAAA,QAAA,cAAA;KACb,sBAAA,cAACzB,OAAK8B;IAAUD,WAAAA;KAAgC,sBAAA,cAChD,KAAA,WAACN;IAAIE,YAAU;KAAqCjC,KAAIoB,IAAAA,GAAiB,sBAAA,cAE3E,OAAA;IAAKa,WAAU;qBACb,EAAA,GAAA,CAAA,GAACF,sBAAAA,cAAAA,OAAAA;IAAIE,WAAU;KAAiDd,sBAAMoB,cAAO,OAAA;IACxEN,WAAU;KACZd,IAAAA,QAAY,IAAI,EAAA,OAAS,GAAgBqB,sBAAO,cAAEC,OAAkB;IAKvEC,WAAAA;UACAC,UAAYxB,YAAU,IAAA,KAAW,KAAA,OAAA,EAAA,eAAA,CAAA,KAAkC,EAAA,CAAA,GAAA,sBAAA,cAAA,YAAA;IACnEyB,UACE1B;IAEF2B,MAAAA,MAAU3B,IAAMC,MAAAA,WAAU,kCAAA;IAC1B2B,OAAAA,MAAetB,IAAAA,MAAAA,WAAoBL,EAAAA,8BAAAA,IAAAA,EAAAA,8BAAAA;cAShDN,MAAAA,IAAAA,MAAAA;IAAgBoB,SAAU,MAAA,oBAAA,IAAA;EAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,WAAA,sBAAA,cAAA,OAAA;IAGnE,WAAA;;;;;AC/GF,IAAA,4BAAec;",
6
+ "names": ["Schema", "useState", "React", "useCallback", "OperationModule", "Context", "Filter", "Obj", "getDeployedFunctions", "useClient", "useQuery", "IconButton", "useAsyncEffect", "useTranslation", "Settings", "List", "ghostHover", "mx", "meta", "client", "loading", "functions", "setFunctions", "dbFunctions", "space", "state", "func", "getMeta", "key", "dbFunction", "setLoading", "hanleImportOrUpdate", "funcKey", "query", "existingFunc", "Operation", "PersistentOperation", "getId", "div", "role", "className", "items", "map", "item", "classNames", "ItemTitle", "version", "updated", "toLocaleString", "iconOnly", "icon", "label", "disabled", "onClick", "FunctionsRegistry"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import {
2
+ TriggersSettings
3
+ } from "./chunk-2JP77CMN.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+ export {
6
+ TriggersSettings,
7
+ TriggersSettings as default
8
+ };
9
+ //# sourceMappingURL=TriggerSettings-XCHIZPOR.mjs.map
@@ -0,0 +1,75 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/app-graph-builder.ts
4
+ import * as Effect from "effect/Effect";
5
+ import { Capability } from "@dxos/app-framework";
6
+ import { AppCapabilities, AppNode } from "@dxos/app-toolkit";
7
+ import { Script } from "@dxos/compute";
8
+ import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
9
+ import { SETTINGS_SECTION_TYPE } from "@dxos/plugin-space";
10
+ import { linkedSegment } from "@dxos/react-ui-attention";
11
+ import { meta } from "#meta";
12
+ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
13
+ const extensions = yield* Effect.all([
14
+ GraphBuilder.createExtension({
15
+ id: "space-settings-automation",
16
+ match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),
17
+ connector: () => Effect.succeed([
18
+ AppNode.makeSettingsPanel({
19
+ id: "automations",
20
+ type: `${meta.id}.space-settings-automation`,
21
+ label: [
22
+ "automation-panel.label",
23
+ {
24
+ ns: meta.id
25
+ }
26
+ ],
27
+ icon: "ph--lightning--regular",
28
+ iconHue: "indigo",
29
+ position: "fallback"
30
+ })
31
+ ])
32
+ }),
33
+ GraphBuilder.createExtension({
34
+ id: "space-settings-functions",
35
+ match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),
36
+ connector: () => Effect.succeed([
37
+ AppNode.makeSettingsPanel({
38
+ id: "functions",
39
+ type: `${meta.id}.space-settings-functions`,
40
+ label: [
41
+ "functions-panel.label",
42
+ {
43
+ ns: meta.id
44
+ }
45
+ ],
46
+ icon: "ph--function--regular",
47
+ iconHue: "indigo",
48
+ position: "fallback"
49
+ })
50
+ ])
51
+ }),
52
+ GraphBuilder.createTypeExtension({
53
+ id: "script-companion",
54
+ type: Script.Script,
55
+ connector: (script) => Effect.succeed([
56
+ AppNode.makeCompanion({
57
+ id: linkedSegment("automation"),
58
+ label: [
59
+ "script-automation.label",
60
+ {
61
+ ns: meta.id
62
+ }
63
+ ],
64
+ icon: "ph--lightning--regular",
65
+ data: "automation"
66
+ })
67
+ ])
68
+ })
69
+ ]);
70
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
71
+ }));
72
+ export {
73
+ app_graph_builder_default as default
74
+ };
75
+ //# sourceMappingURL=app-graph-builder-GDCGRYEP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode } from '@dxos/app-toolkit';\nimport { Script } from '@dxos/compute';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { SETTINGS_SECTION_TYPE } from '@dxos/plugin-space';\nimport { linkedSegment } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: 'space-settings-automation',\n match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),\n connector: () =>\n Effect.succeed([\n AppNode.makeSettingsPanel({\n id: 'automations',\n type: `${meta.id}.space-settings-automation`,\n label: ['automation-panel.label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n iconHue: 'indigo',\n position: 'fallback',\n }),\n ]),\n }),\n GraphBuilder.createExtension({\n id: 'space-settings-functions',\n match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),\n connector: () =>\n Effect.succeed([\n AppNode.makeSettingsPanel({\n id: 'functions',\n type: `${meta.id}.space-settings-functions`,\n label: ['functions-panel.label', { ns: meta.id }],\n icon: 'ph--function--regular',\n iconHue: 'indigo',\n position: 'fallback',\n }),\n ]),\n }),\n GraphBuilder.createTypeExtension({\n id: 'script-companion',\n type: Script.Script,\n connector: (script) =>\n Effect.succeed([\n AppNode.makeCompanion({\n id: linkedSegment('automation'),\n label: ['script-automation.label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n data: 'automation',\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,eAAe;AACzC,SAASC,cAAc;AACvB,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,6BAA6B;AACtC,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AAErB,IAAA,4BAAeR,WAAWS,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCR,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW,aAAaV,qBAAAA;MAChCW,WAAW,MACFC,eAAQ;QACbhB,QAAQiB,kBAAkB;UACxBL,IAAI;UACJM,MAAM,GAAGZ,KAAKM,EAAE;UAChBO,OAAO;YAAC;YAA0B;cAAEC,IAAId,KAAKM;YAAG;;UAChDS,MAAM;UACNC,SAAS;UACTC,UAAU;QACZ,CAAA;OACD;IACL,CAAA;IACArB,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW,aAAaV,qBAAAA;MAChCW,WAAW,MACFC,eAAQ;QACbhB,QAAQiB,kBAAkB;UACxBL,IAAI;UACJM,MAAM,GAAGZ,KAAKM,EAAE;UAChBO,OAAO;YAAC;YAAyB;cAAEC,IAAId,KAAKM;YAAG;;UAC/CS,MAAM;UACNC,SAAS;UACTC,UAAU;QACZ,CAAA;OACD;IACL,CAAA;IACArB,aAAasB,oBAAoB;MAC/BZ,IAAI;MACJM,MAAMjB,OAAOA;MACbc,WAAW,CAACU,WACHT,eAAQ;QACbhB,QAAQ0B,cAAc;UACpBd,IAAIP,cAAc,YAAA;UAClBc,OAAO;YAAC;YAA2B;cAAEC,IAAId,KAAKM;YAAG;;UACjDS,MAAM;UACNM,MAAM;QACR,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAO7B,WAAW8B,YAAY7B,gBAAgB8B,iBAAiBpB,UAAAA;AACjE,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "AppCapabilities", "AppNode", "Script", "GraphBuilder", "NodeMatcher", "SETTINGS_SECTION_TYPE", "linkedSegment", "meta", "makeModule", "fnUntraced", "extensions", "all", "createExtension", "id", "match", "whenNodeType", "connector", "succeed", "makeSettingsPanel", "type", "label", "ns", "icon", "iconHue", "position", "createTypeExtension", "script", "makeCompanion", "data", "contributes", "AppGraphBuilder"]
7
+ }
@@ -0,0 +1,15 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-GDCGRYEP.mjs"));
6
+ var ComputeRuntime = Capability.lazy("ComputeRuntime", () => import("../compute-runtime-D7MPZJ4R.mjs"));
7
+ var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-YXGYH5W5.mjs"));
8
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-3OGMAMKV.mjs"));
9
+ export {
10
+ AppGraphBuilder,
11
+ ComputeRuntime,
12
+ OperationHandler,
13
+ ReactSurface
14
+ };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ComputeRuntime = Capability.lazy('ComputeRuntime', () => import('./compute-runtime'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,iBAAiBH,WAAWE,KAAK,kBAAkB,MAAM,OAAO,iCAAA,CAAA;AACtE,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "AppGraphBuilder", "lazy", "ComputeRuntime", "OperationHandler", "ReactSurface"]
7
+ }
@@ -0,0 +1,13 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/node.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-GDCGRYEP.mjs"));
6
+ var ComputeRuntime = Capability.lazy("ComputeRuntime", () => import("../compute-runtime-D7MPZJ4R.mjs"));
7
+ var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-YXGYH5W5.mjs"));
8
+ export {
9
+ AppGraphBuilder,
10
+ ComputeRuntime,
11
+ OperationHandler
12
+ };
13
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/node.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ComputeRuntime = Capability.lazy('ComputeRuntime', () => import('./compute-runtime'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,iBAAiBH,WAAWE,KAAK,kBAAkB,MAAM,OAAO,iCAAA,CAAA;AACtE,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;",
6
+ "names": ["Capability", "AppGraphBuilder", "lazy", "ComputeRuntime", "OperationHandler"]
7
+ }
@@ -0,0 +1,42 @@
1
+ // src/containers/TriggerSettings/TriggerSettings.tsx
2
+ import React from "react";
3
+ import { useObject } from "@dxos/echo-react";
4
+ import { DropdownMenu, IconButton, useTranslation } from "@dxos/react-ui";
5
+ import { Settings } from "@dxos/react-ui-form";
6
+ import { meta } from "#meta";
7
+ var TriggersSettings = ({ space }) => {
8
+ const { t } = useTranslation(meta.id);
9
+ const [properties, changeProperties] = useObject(space.properties);
10
+ const selected = properties.computeEnvironment ?? "local";
11
+ const handleUpdate = (option) => {
12
+ changeProperties((draft) => {
13
+ draft.computeEnvironment = option;
14
+ });
15
+ };
16
+ return /* @__PURE__ */ React.createElement("div", {
17
+ className: "grid grid-cols-1 md:grid-cols-[1fr_min-content]"
18
+ }, /* @__PURE__ */ React.createElement(Settings.Item, {
19
+ title: t("runtime.label"),
20
+ description: t("runtime.description")
21
+ }, /* @__PURE__ */ React.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React.createElement(DropdownMenu.Trigger, {
22
+ asChild: true
23
+ }, /* @__PURE__ */ React.createElement(IconButton, {
24
+ iconEnd: true,
25
+ icon: "ph--caret-down--regular",
26
+ size: 4,
27
+ label: t(`runtime.${selected}.label`)
28
+ })), /* @__PURE__ */ React.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenu.Content, {
29
+ side: "bottom"
30
+ }, /* @__PURE__ */ React.createElement(DropdownMenu.Viewport, null, /* @__PURE__ */ React.createElement(DropdownMenu.Item, {
31
+ onClick: () => handleUpdate("disabled")
32
+ }, t(`runtime.disabled.label`)), /* @__PURE__ */ React.createElement(DropdownMenu.Item, {
33
+ onClick: () => handleUpdate("local")
34
+ }, t(`runtime.local.label`)), /* @__PURE__ */ React.createElement(DropdownMenu.Item, {
35
+ onClick: () => handleUpdate("edge")
36
+ }, t(`runtime.edge.label`))))))));
37
+ };
38
+
39
+ export {
40
+ TriggersSettings
41
+ };
42
+ //# sourceMappingURL=chunk-2JP77CMN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/TriggerSettings/TriggerSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type ComputeEnvironment } from '@dxos/client-protocol';\nimport { useObject } from '@dxos/echo-react';\nimport { type Space } from '@dxos/react-client/echo';\nimport { DropdownMenu, IconButton, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\n\nexport const TriggersSettings = ({ space }: { space: Space }) => {\n const { t } = useTranslation(meta.id);\n const [properties, changeProperties] = useObject(space.properties);\n const selected = properties.computeEnvironment ?? 'local';\n\n const handleUpdate = (option: ComputeEnvironment) => {\n changeProperties((draft) => {\n draft.computeEnvironment = option;\n });\n };\n\n return (\n <div className='grid grid-cols-1 md:grid-cols-[1fr_min-content]'>\n <Settings.Item title={t('runtime.label')} description={t('runtime.description')}>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton iconEnd icon='ph--caret-down--regular' size={4} label={t(`runtime.${selected}.label`)} />\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content side='bottom'>\n <DropdownMenu.Viewport>\n <DropdownMenu.Item onClick={() => handleUpdate('disabled')}>\n {t(`runtime.disabled.label`)}\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => handleUpdate('local')}>{t(`runtime.local.label`)}</DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => handleUpdate('edge')}>{t(`runtime.edge.label`)}</DropdownMenu.Item>\n </DropdownMenu.Viewport>\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </Settings.Item>\n </div>\n );\n};\n"],
5
+ "mappings": ";AAIA,OAAOA,WAAW;AAGlB,SAASC,iBAAiB;AAE1B,SAASC,cAAcC,YAAYC,sBAAsB;AACzD,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AAEd,IAAMC,mBAAmB,CAAC,EAAEC,MAAK,MAAoB;AAC1D,QAAM,EAAEC,EAAC,IAAKL,eAAeE,KAAKI,EAAE;AACpC,QAAM,CAACC,YAAYC,gBAAAA,IAAoBX,UAAUO,MAAMG,UAAU;AACjE,QAAME,WAAWF,WAAWG,sBAAsB;AAElD,QAAMC,eAAe,CAACC,WAAAA;AACpBJ,qBAAiB,CAACK,UAAAA;AAChBA,YAAMH,qBAAqBE;IAC7B,CAAA;EACF;AAEA,SACE,sBAAA,cAACE,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACd,SAASe,MAAI;IAACC,OAAOZ,EAAE,eAAA;IAAkBa,aAAab,EAAE,qBAAA;KACvD,sBAAA,cAACP,aAAaqB,MAAI,MAChB,sBAAA,cAACrB,aAAasB,SAAO;IAACC,SAAAA;KACpB,sBAAA,cAACtB,YAAAA;IAAWuB,SAAAA;IAAQC,MAAK;IAA0BC,MAAM;IAAGC,OAAOpB,EAAE,WAAWI,QAAAA,QAAgB;OAElG,sBAAA,cAACX,aAAa4B,QAAM,MAClB,sBAAA,cAAC5B,aAAa6B,SAAO;IAACC,MAAK;KACzB,sBAAA,cAAC9B,aAAa+B,UAAQ,MACpB,sBAAA,cAAC/B,aAAakB,MAAI;IAACc,SAAS,MAAMnB,aAAa,UAAA;KAC5CN,EAAE,wBAAwB,CAAA,GAE7B,sBAAA,cAACP,aAAakB,MAAI;IAACc,SAAS,MAAMnB,aAAa,OAAA;KAAWN,EAAE,qBAAqB,CAAA,GACjF,sBAAA,cAACP,aAAakB,MAAI;IAACc,SAAS,MAAMnB,aAAa,MAAA;KAAUN,EAAE,oBAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAQ/F;",
6
+ "names": ["React", "useObject", "DropdownMenu", "IconButton", "useTranslation", "Settings", "meta", "TriggersSettings", "space", "t", "id", "properties", "changeProperties", "selected", "computeEnvironment", "handleUpdate", "option", "draft", "div", "className", "Item", "title", "description", "Root", "Trigger", "asChild", "iconEnd", "icon", "size", "label", "Portal", "Content", "side", "Viewport", "onClick"]
7
+ }
@@ -0,0 +1,12 @@
1
+ // src/components/index.ts
2
+ import { lazy } from "react";
3
+ var AutomationPanel = lazy(() => import("./AutomationPanel-T5O4DNQF.mjs"));
4
+ var FunctionsPanel = lazy(() => import("./FunctionsPanel-SVRKRUXZ.mjs"));
5
+ var FunctionsRegistry = lazy(() => import("./FunctionsRegistry-7ITCFJCW.mjs"));
6
+
7
+ export {
8
+ AutomationPanel,
9
+ FunctionsPanel,
10
+ FunctionsRegistry
11
+ };
12
+ //# sourceMappingURL=chunk-2UYFDJO6.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './TriggerEditor';\n\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const FunctionsPanel = lazy(() => import('./FunctionsPanel'));\nexport const FunctionsRegistry = lazy(() => import('./FunctionsRegistry'));\n"],
5
+ "mappings": ";AAIA,SAASA,YAAY;AAId,IAAMC,kBAAkBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC1C,IAAME,iBAAiBF,KAAK,MAAM,OAAO,+BAAA,CAAA;AACzC,IAAMG,oBAAoBH,KAAK,MAAM,OAAO,kCAAA,CAAA;",
6
+ "names": ["lazy", "AutomationPanel", "FunctionsPanel", "FunctionsRegistry"]
7
+ }
@@ -0,0 +1,20 @@
1
+ // src/meta.ts
2
+ import { trim } from "@dxos/util";
3
+ var meta = {
4
+ id: "org.dxos.plugin.automation",
5
+ name: "Automation",
6
+ description: trim`
7
+ Workflow automation engine that triggers custom actions based on object events and conditions.
8
+ Create automated pipelines that respond to changes and streamline repetitive tasks.
9
+ `,
10
+ icon: "ph--atom--regular",
11
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation",
12
+ tags: [
13
+ "system"
14
+ ]
15
+ };
16
+
17
+ export {
18
+ meta
19
+ };
20
+ //# sourceMappingURL=chunk-ATECY555.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.automation',\n name: 'Automation',\n description: trim`\n Workflow automation engine that triggers custom actions based on object events and conditions.\n Create automated pipelines that respond to changes and streamline repetitive tasks.\n `,\n icon: 'ph--atom--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',\n tags: ['system'],\n};\n"],
5
+ "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
6
+ "names": ["trim", "meta", "id", "name", "description", "icon", "source", "tags"]
7
+ }
@@ -0,0 +1,37 @@
1
+ // src/AutomationPlugin.tsx
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { Operation, Trace, Trigger } from "@dxos/compute";
5
+ import { ClientEvents } from "@dxos/plugin-client";
6
+ import { AppGraphBuilder, ComputeRuntime, OperationHandler, ReactSurface } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ import { translations } from "#translations";
9
+ import { AutomationEvents } from "#types";
10
+ var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
11
+ activate: AppGraphBuilder
12
+ }), AppPlugin.addOperationHandlerModule({
13
+ activate: OperationHandler
14
+ }), AppPlugin.addSchemaModule({
15
+ schema: [
16
+ Operation.PersistentOperation,
17
+ Trigger.Trigger,
18
+ Trace.Message
19
+ ]
20
+ }), AppPlugin.addSurfaceModule({
21
+ activate: ReactSurface
22
+ }), AppPlugin.addTranslationsModule({
23
+ translations
24
+ }), Plugin.addModule({
25
+ activatesOn: ClientEvents.ClientReady,
26
+ firesAfterActivation: [
27
+ AutomationEvents.ComputeRuntimeReady
28
+ ],
29
+ activate: ComputeRuntime
30
+ }), Plugin.make);
31
+ var AutomationPlugin_default = AutomationPlugin;
32
+
33
+ export {
34
+ AutomationPlugin,
35
+ AutomationPlugin_default
36
+ };
37
+ //# sourceMappingURL=chunk-CNFKEN7S.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/AutomationPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Operation, Trace, Trigger } from '@dxos/compute';\nimport { ClientEvents } from '@dxos/plugin-client';\n\nimport { AppGraphBuilder, ComputeRuntime, OperationHandler, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { AutomationEvents } from '#types';\n\nexport const AutomationPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Operation.PersistentOperation, Trigger.Trigger, Trace.Message] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesAfterActivation: [AutomationEvents.ComputeRuntimeReady],\n activate: ComputeRuntime,\n }),\n Plugin.make,\n);\n\nexport default AutomationPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,OAAOC,eAAe;AAC1C,SAASC,oBAAoB;AAE7B,SAASC,iBAAiBC,gBAAgBC,kBAAkBC,oBAAoB;AAChF,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,wBAAwB;AAE1B,IAAMC,mBAAmBb,OAAOc,OAAOJ,IAAAA,EAAMK,KAClDd,UAAUe,kBAAkB;EAAEC,UAAUX;AAAgB,CAAA,GACxDL,UAAUiB,0BAA0B;EAAED,UAAUT;AAAiB,CAAA,GACjEP,UAAUkB,gBAAgB;EAAEC,QAAQ;IAAClB,UAAUmB;IAAqBjB,QAAQA;IAASD,MAAMmB;;AAAS,CAAA,GACpGrB,UAAUsB,iBAAiB;EAAEN,UAAUR;AAAa,CAAA,GACpDR,UAAUuB,sBAAsB;EAAEb;AAAa,CAAA,GAC/CX,OAAOyB,UAAU;EACfC,aAAarB,aAAasB;EAC1BC,sBAAsB;IAAChB,iBAAiBiB;;EACxCZ,UAAUV;AACZ,CAAA,GACAP,OAAO8B,IAAI;AAGb,IAAA,2BAAejB;",
6
+ "names": ["Plugin", "AppPlugin", "Operation", "Trace", "Trigger", "ClientEvents", "AppGraphBuilder", "ComputeRuntime", "OperationHandler", "ReactSurface", "meta", "translations", "AutomationEvents", "AutomationPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addSchemaModule", "schema", "PersistentOperation", "Message", "addSurfaceModule", "addTranslationsModule", "addModule", "activatesOn", "ClientReady", "firesAfterActivation", "ComputeRuntimeReady", "make"]
7
+ }
@@ -0,0 +1,93 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/types/schema.ts
6
+ import * as Schema from "effect/Schema";
7
+ import { Database } from "@dxos/echo";
8
+ import { meta } from "#meta";
9
+ var TriggerTemplate = Schema.Union(Schema.Struct({
10
+ type: Schema.Literal("timer"),
11
+ cron: Schema.String
12
+ }), Schema.Struct({
13
+ type: Schema.Literal("queue"),
14
+ queueDXN: Schema.Any
15
+ }));
16
+ (function(AutomationAction2) {
17
+ class CreateTriggerFromTemplate2 extends Schema.TaggedClass()(`${meta.id}.action.create-trigger-from-template`, {
18
+ input: Schema.Struct({
19
+ db: Database.Database,
20
+ template: TriggerTemplate,
21
+ enabled: Schema.optional(Schema.Boolean),
22
+ // TODO(wittjosiah): Improve how this lookup is done.
23
+ scriptName: Schema.optional(Schema.String),
24
+ input: Schema.optional(Schema.Record({
25
+ key: Schema.String,
26
+ value: Schema.Any
27
+ }))
28
+ }),
29
+ output: Schema.Void
30
+ }) {
31
+ }
32
+ AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate2;
33
+ })(AutomationAction || (AutomationAction = {}));
34
+ var AutomationAction;
35
+
36
+ // src/types/AutomationCapabilities.ts
37
+ var AutomationCapabilities_exports = {};
38
+ __export(AutomationCapabilities_exports, {
39
+ ComputeRuntime: () => ComputeRuntime
40
+ });
41
+ import { Capability } from "@dxos/app-framework";
42
+ import { meta as meta2 } from "#meta";
43
+ var ComputeRuntime = Capability.make(`${meta2.id}.capability.compute-runtime`);
44
+
45
+ // src/types/AutomationEvents.ts
46
+ var AutomationEvents_exports = {};
47
+ __export(AutomationEvents_exports, {
48
+ ComputeRuntimeReady: () => ComputeRuntimeReady
49
+ });
50
+ import { ActivationEvent } from "@dxos/app-framework";
51
+ import { meta as meta3 } from "#meta";
52
+ var ComputeRuntimeReady = ActivationEvent.make(`${meta3.id}.event.compute-runtime-ready`);
53
+
54
+ // src/types/AutomationOperation.ts
55
+ var AutomationOperation_exports = {};
56
+ __export(AutomationOperation_exports, {
57
+ CreateTriggerFromTemplate: () => CreateTriggerFromTemplate
58
+ });
59
+ import * as Schema2 from "effect/Schema";
60
+ import { Capability as Capability2 } from "@dxos/app-framework";
61
+ import { Operation } from "@dxos/compute";
62
+ import { Database as Database2 } from "@dxos/echo";
63
+ import { meta as meta4 } from "#meta";
64
+ var AUTOMATION_OPERATION = `${meta4.id}.operation`;
65
+ var CreateTriggerFromTemplate = Operation.make({
66
+ meta: {
67
+ key: `${AUTOMATION_OPERATION}.create-trigger-from-template`,
68
+ name: "Create Trigger From Template"
69
+ },
70
+ services: [
71
+ Capability2.Service
72
+ ],
73
+ input: Schema2.Struct({
74
+ db: Database2.Database,
75
+ template: TriggerTemplate,
76
+ enabled: Schema2.optional(Schema2.Boolean),
77
+ scriptName: Schema2.optional(Schema2.String),
78
+ input: Schema2.optional(Schema2.Record({
79
+ key: Schema2.String,
80
+ value: Schema2.Any
81
+ }))
82
+ }),
83
+ output: Schema2.Void
84
+ });
85
+
86
+ export {
87
+ TriggerTemplate,
88
+ AutomationAction,
89
+ AutomationCapabilities_exports,
90
+ AutomationEvents_exports,
91
+ AutomationOperation_exports
92
+ };
93
+ //# sourceMappingURL=chunk-DSCOLDT5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/schema.ts", "../../../src/types/AutomationCapabilities.ts", "../../../src/types/AutomationEvents.ts", "../../../src/types/AutomationOperation.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Database } from '@dxos/echo';\n\nimport { meta } from '#meta';\n\nexport const TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${meta.id}.action.create-trigger-from-template`,\n {\n input: Schema.Struct({\n db: Database.Database,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { type AiService, type OpaqueToolkit } from '@dxos/ai';\nimport { Capability } from '@dxos/app-framework';\nimport type { Blueprint, Credential, Operation, OperationRegistry, Process } from '@dxos/compute';\nimport { type Database, type Feed } from '@dxos/echo';\nimport type { QueueService } from '@dxos/functions';\nimport { AgentService } from '@dxos/functions-runtime';\nimport type { ProcessManager, TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';\nimport type { SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\n/**\n * Service stack for executing agents, functions, and triggers.\n */\nexport type ComputeServices =\n | TriggerDispatcher\n | TriggerStateStore\n | AiService.AiService\n | Database.Service\n | Feed.FeedService\n | QueueService\n | Credential.CredentialsService\n | Blueprint.RegistryService\n | AgentService.AgentService\n | Process.ProcessMonitorService\n | ProcessManager.Service\n | Operation.Service\n | OperationRegistry.Service\n | OpaqueToolkit.OpaqueToolkitProvider;\n\nexport type ComputeRuntime = ManagedRuntime.ManagedRuntime<ComputeServices, never>;\n\nexport interface ComputeRuntimeProvider {\n getRuntime(spaceId: SpaceId): ComputeRuntime;\n}\n\n/**\n * Runtime for executing agents, functions, and triggers.\n */\nexport const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}.capability.compute-runtime`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport const ComputeRuntimeReady = ActivationEvent.make(`${meta.id}.event.compute-runtime-ready`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nimport { meta } from '#meta';\n\nimport { TriggerTemplate } from './schema';\n\nconst AUTOMATION_OPERATION = `${meta.id}.operation`;\n\nexport const CreateTriggerFromTemplate = Operation.make({\n meta: { key: `${AUTOMATION_OPERATION}.create-trigger-from-template`, name: 'Create Trigger From Template' },\n services: [Capability.Service],\n input: Schema.Struct({\n db: Database.Database,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n});\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AAEd,IAAMC,kBAAyBC,aAC7BC,cAAO;EAAEC,MAAaC,eAAQ,OAAA;EAAUC,MAAaC;AAAO,CAAA,GAC5DJ,cAAO;EAAEC,MAAaC,eAAQ,OAAA;EAAUG,UAAiBC;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;EACR,MAAMC,mCAAyCC,mBAAW,EAC/D,GAAGZ,KAAKa,EAAE,wCACV;IACEC,OAAcX,cAAO;MACnBY,IAAIhB,SAASA;MACbiB,UAAUf;MACVgB,SAAgBC,gBAAgBC,cAAO;;MAEvCC,YAAmBF,gBAAgBX,aAAM;MACzCO,OAAcI,gBAAgBG,cAAO;QAAEC,KAAYf;QAAQgB,OAAcd;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAe,QAAeC;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAfiBD,qBAAAA,mBAAAA,CAAAA,EAAAA;;;;ACfjB;;;;AASA,SAASgB,kBAAkB;AAQ3B,SAASC,QAAAA,aAAY;AA8Bd,IAAMC,iBAAiBF,WAAWG,KAA6B,GAAGF,MAAKG,EAAE,6BAA6B;;;AC/C7G;;;;AAMA,SAASC,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;AAEd,IAAMC,sBAAsBF,gBAAgBG,KAAK,GAAGF,MAAKG,EAAE,8BAA8B;;;ACVhG;;;;AAMA,YAAYC,aAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAAA,iBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAIrB,IAAMC,uBAAuB,GAAGC,MAAKC,EAAE;AAEhC,IAAMC,4BAA4BC,UAAUC,KAAK;EACtDJ,MAAM;IAAEK,KAAK,GAAGN,oBAAAA;IAAqDO,MAAM;EAA+B;EAC1GC,UAAU;IAACC,YAAWC;;EACtBC,OAAcC,eAAO;IACnBC,IAAIC,UAASA;IACbC,UAAUC;IACVC,SAAgBC,iBAAgBC,eAAO;IACvCC,YAAmBF,iBAAgBG,cAAM;IACzCV,OAAcO,iBAAgBI,eAAO;MAAEhB,KAAYe;MAAQE,OAAcC;IAAI,CAAA,CAAA;EAC/E,CAAA;EACAC,QAAeC;AACjB,CAAA;",
6
+ "names": ["Schema", "Database", "meta", "TriggerTemplate", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "CreateTriggerFromTemplate", "TaggedClass", "id", "input", "db", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void", "Capability", "meta", "ComputeRuntime", "make", "id", "ActivationEvent", "meta", "ComputeRuntimeReady", "make", "id", "Schema", "Capability", "Operation", "Database", "meta", "AUTOMATION_OPERATION", "meta", "id", "CreateTriggerFromTemplate", "Operation", "make", "key", "name", "services", "Capability", "Service", "input", "Struct", "db", "Database", "template", "TriggerTemplate", "enabled", "optional", "Boolean", "scriptName", "String", "Record", "value", "Any", "output", "Void"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map