@dxos/plugin-automation 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

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 (386) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +428 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/AutomationPanel-OKF2MDLO.mjs +12 -0
  5. package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
  6. package/dist/lib/{browser/cli/index.mjs → neutral/AutomationPlugin.node.mjs} +191 -186
  7. package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
  8. package/dist/lib/neutral/AutomationPlugin.workerd.mjs +23 -0
  9. package/dist/lib/neutral/AutomationPlugin.workerd.mjs.map +7 -0
  10. package/dist/lib/neutral/AutomationSettings-GQF5UFM6.mjs +32 -0
  11. package/dist/lib/neutral/AutomationSettings-GQF5UFM6.mjs.map +7 -0
  12. package/dist/lib/neutral/FunctionsContainer-YBTQGCL3.mjs +38 -0
  13. package/dist/lib/neutral/FunctionsContainer-YBTQGCL3.mjs.map +7 -0
  14. package/dist/lib/{browser/chunk-U55ZXRYM.mjs → neutral/FunctionsPanel-L32Z67B7.mjs} +24 -25
  15. package/dist/lib/neutral/FunctionsPanel-L32Z67B7.mjs.map +7 -0
  16. package/dist/lib/{browser/chunk-XFXYU645.mjs → neutral/FunctionsRegistry-RTCY3LXE.mjs} +24 -25
  17. package/dist/lib/neutral/FunctionsRegistry-RTCY3LXE.mjs.map +7 -0
  18. package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
  19. package/dist/lib/neutral/app-graph-builder-Q3LJLICE.mjs +75 -0
  20. package/dist/lib/neutral/app-graph-builder-Q3LJLICE.mjs.map +7 -0
  21. package/dist/lib/neutral/capabilities/index.mjs +19 -0
  22. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  23. package/dist/lib/neutral/capabilities/node.mjs +17 -0
  24. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-2JP77CMN.mjs +42 -0
  26. package/dist/lib/neutral/chunk-2JP77CMN.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-7YWISQOZ.mjs +54 -0
  28. package/dist/lib/neutral/chunk-7YWISQOZ.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-C7H62AU3.mjs +435 -0
  30. package/dist/lib/neutral/chunk-C7H62AU3.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-CMM3AFHR.mjs +111 -0
  32. package/dist/lib/neutral/chunk-CMM3AFHR.mjs.map +7 -0
  33. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  34. package/dist/lib/neutral/chunk-LRVJEKMN.mjs +40 -0
  35. package/dist/lib/neutral/chunk-LRVJEKMN.mjs.map +7 -0
  36. package/dist/lib/neutral/chunk-MBIODLCB.mjs +12 -0
  37. package/dist/lib/neutral/chunk-MBIODLCB.mjs.map +7 -0
  38. package/dist/lib/neutral/chunk-NCCFEPBZ.mjs +76 -0
  39. package/dist/lib/neutral/chunk-NCCFEPBZ.mjs.map +7 -0
  40. package/dist/lib/{browser/chunk-ZNI2CGQP.mjs → neutral/chunk-RCBE37YU.mjs} +158 -60
  41. package/dist/lib/neutral/chunk-RCBE37YU.mjs.map +7 -0
  42. package/dist/lib/neutral/chunk-TJOQNSS5.mjs +8 -0
  43. package/dist/lib/neutral/chunk-TJOQNSS5.mjs.map +7 -0
  44. package/dist/lib/neutral/components/index.mjs +16 -0
  45. package/dist/lib/neutral/containers/index.mjs +13 -0
  46. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  47. package/dist/lib/neutral/create-trigger-from-template-5YUHZOFA.mjs +68 -0
  48. package/dist/lib/neutral/create-trigger-from-template-5YUHZOFA.mjs.map +7 -0
  49. package/dist/lib/neutral/hooks/index.mjs +10 -0
  50. package/dist/lib/neutral/index.mjs +16 -0
  51. package/dist/lib/neutral/layer-specs-OXK75RDW.mjs +141 -0
  52. package/dist/lib/neutral/layer-specs-OXK75RDW.mjs.map +7 -0
  53. package/dist/lib/neutral/meta.json +1 -0
  54. package/dist/lib/neutral/meta.mjs +8 -0
  55. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs +13 -0
  56. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs.map +7 -0
  57. package/dist/lib/neutral/operations/index.mjs +8 -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-FOOBGYNG.mjs +57 -0
  61. package/dist/lib/neutral/react-surface-FOOBGYNG.mjs.map +7 -0
  62. package/dist/lib/neutral/registry-sync-JYDDTBAE.mjs +82 -0
  63. package/dist/lib/neutral/registry-sync-JYDDTBAE.mjs.map +7 -0
  64. package/dist/lib/neutral/testing.mjs +8 -0
  65. package/dist/lib/neutral/translations.mjs +60 -0
  66. package/dist/lib/neutral/translations.mjs.map +7 -0
  67. package/dist/lib/neutral/trigger-runtime-controller-BOEJYGWC.mjs +77 -0
  68. package/dist/lib/neutral/trigger-runtime-controller-BOEJYGWC.mjs.map +7 -0
  69. package/dist/lib/neutral/types/index.mjs +12 -0
  70. package/dist/lib/neutral/types/index.mjs.map +7 -0
  71. package/dist/types/src/AutomationPlugin.d.ts +1 -0
  72. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  73. package/dist/types/src/{cli/plugin.d.ts → AutomationPlugin.node.d.ts} +2 -1
  74. package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
  75. package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
  76. package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
  77. package/dist/types/src/AutomationPlugin.workerd.d.ts +4 -0
  78. package/dist/types/src/AutomationPlugin.workerd.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/index.d.ts +8 -4
  81. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/layer-specs.d.ts +6 -0
  83. package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
  84. package/dist/types/src/capabilities/node.d.ts +8 -0
  85. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  86. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  87. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  88. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/registry-sync.d.ts +21 -0
  90. package/dist/types/src/capabilities/registry-sync.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/trigger-runtime-controller.d.ts +5 -0
  92. package/dist/types/src/capabilities/trigger-runtime-controller.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/trigger-runtime-controller.test.d.ts +2 -0
  94. package/dist/types/src/capabilities/trigger-runtime-controller.test.d.ts.map +1 -0
  95. package/dist/types/src/commands/index.d.ts.map +1 -0
  96. package/dist/types/src/{cli/commands → commands}/trigger/create/index.d.ts +6 -6
  97. package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
  98. package/dist/types/src/{cli/commands → commands}/trigger/create/queue.d.ts +2 -2
  99. package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
  100. package/dist/types/src/{cli/commands → commands}/trigger/create/subscription.d.ts +1 -1
  101. package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
  102. package/dist/types/src/{cli/commands → commands}/trigger/create/timer.d.ts +1 -1
  103. package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
  104. package/dist/types/src/{cli/commands → commands}/trigger/index.d.ts +8 -8
  105. package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
  106. package/dist/types/src/{cli/commands → commands}/trigger/list.d.ts +1 -1
  107. package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
  108. package/dist/types/src/{cli/commands → commands}/trigger/options.d.ts +1 -2
  109. package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
  110. package/dist/types/src/{cli/commands → commands}/trigger/remove.d.ts +1 -1
  111. package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
  112. package/dist/types/src/{cli/commands → commands}/trigger/update/index.d.ts +5 -5
  113. package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
  114. package/dist/types/src/{cli/commands → commands}/trigger/update/queue.d.ts +2 -3
  115. package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
  116. package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
  117. package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
  118. package/dist/types/src/commands/trigger/util.d.ts +85 -0
  119. package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
  120. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
  121. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  122. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +45 -32
  123. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/AutomationPanel/TriggerEdgeMetadata.d.ts +18 -0
  125. package/dist/types/src/components/AutomationPanel/TriggerEdgeMetadata.d.ts.map +1 -0
  126. package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
  127. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  128. package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -1
  129. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -1
  130. package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -1
  131. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +6 -6
  132. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  133. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +4 -4
  134. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  135. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
  136. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  137. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +109 -93
  138. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  139. package/dist/types/src/components/TriggerEditor/util.d.ts +14 -0
  140. package/dist/types/src/components/TriggerEditor/util.d.ts.map +1 -0
  141. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +3 -1
  142. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -1
  143. package/dist/types/src/containers/AutomationSettings/index.d.ts +1 -2
  144. package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -1
  145. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts +2 -4
  146. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -1
  147. package/dist/types/src/containers/FunctionsContainer/index.d.ts +1 -2
  148. package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -1
  149. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +3 -3
  150. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -1
  151. package/dist/types/src/containers/TriggerSettings/index.d.ts +2 -2
  152. package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -1
  153. package/dist/types/src/hooks/index.d.ts +1 -1
  154. package/dist/types/src/hooks/index.d.ts.map +1 -1
  155. package/dist/types/src/hooks/useEdgeTriggersDispatcherStatus.d.ts +13 -0
  156. package/dist/types/src/hooks/useEdgeTriggersDispatcherStatus.d.ts.map +1 -0
  157. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
  158. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
  159. package/dist/types/src/index.d.ts +0 -3
  160. package/dist/types/src/index.d.ts.map +1 -1
  161. package/dist/types/src/meta.d.ts +1 -1
  162. package/dist/types/src/meta.d.ts.map +1 -1
  163. package/dist/types/src/operations/create-trigger-from-template.d.ts +5 -0
  164. package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -0
  165. package/dist/types/src/operations/index.d.ts +3 -0
  166. package/dist/types/src/operations/index.d.ts.map +1 -0
  167. package/dist/types/src/plugin.d.ts +4 -0
  168. package/dist/types/src/plugin.d.ts.map +1 -0
  169. package/dist/types/src/testing/test-functions.d.ts +162 -46
  170. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  171. package/dist/types/src/testing.d.ts +2 -0
  172. package/dist/types/src/testing.d.ts.map +1 -0
  173. package/dist/types/src/translations.d.ts +45 -33
  174. package/dist/types/src/translations.d.ts.map +1 -1
  175. package/dist/types/src/types/AutomationOperation.d.ts +21 -0
  176. package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
  177. package/dist/types/src/types/index.d.ts +1 -2
  178. package/dist/types/src/types/index.d.ts.map +1 -1
  179. package/dist/types/src/types/schema.d.ts +11 -32
  180. package/dist/types/src/types/schema.d.ts.map +1 -1
  181. package/dist/types/tsconfig.tsbuildinfo +1 -1
  182. package/package.json +124 -75
  183. package/src/AutomationPlugin.node.ts +35 -0
  184. package/src/AutomationPlugin.test.ts +27 -0
  185. package/src/AutomationPlugin.tsx +33 -11
  186. package/src/AutomationPlugin.workerd.ts +18 -0
  187. package/src/capabilities/app-graph-builder.ts +66 -0
  188. package/src/capabilities/index.ts +15 -4
  189. package/src/capabilities/layer-specs.ts +197 -0
  190. package/src/capabilities/node.ts +18 -0
  191. package/src/capabilities/operation-handler.ts +16 -0
  192. package/src/capabilities/react-surface.tsx +59 -0
  193. package/src/capabilities/registry-sync.ts +110 -0
  194. package/src/capabilities/trigger-runtime-controller.test.ts +103 -0
  195. package/src/capabilities/trigger-runtime-controller.ts +126 -0
  196. package/src/{cli/commands → commands}/trigger/create/queue.ts +14 -16
  197. package/src/{cli/commands → commands}/trigger/create/subscription.ts +8 -11
  198. package/src/{cli/commands → commands}/trigger/create/timer.ts +4 -7
  199. package/src/{cli/commands → commands}/trigger/list.ts +7 -4
  200. package/src/{cli/commands → commands}/trigger/options.ts +3 -15
  201. package/src/{cli/commands → commands}/trigger/remove.ts +5 -5
  202. package/src/{cli/commands → commands}/trigger/update/queue.ts +39 -43
  203. package/src/{cli/commands → commands}/trigger/update/subscription.ts +22 -21
  204. package/src/{cli/commands → commands}/trigger/update/timer.ts +22 -20
  205. package/src/{cli/commands → commands}/trigger/util.ts +53 -38
  206. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +12 -5
  207. package/src/components/AutomationPanel/AutomationPanel.tsx +120 -58
  208. package/src/components/AutomationPanel/TriggerEdgeMetadata.tsx +148 -0
  209. package/src/components/FunctionsPanel/FunctionsPanel.tsx +35 -27
  210. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +32 -23
  211. package/src/components/TriggerEditor/FunctionInputEditor.tsx +9 -13
  212. package/src/components/TriggerEditor/SpecSelector.tsx +18 -14
  213. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +36 -18
  214. package/src/components/TriggerEditor/TriggerEditor.tsx +120 -25
  215. package/src/components/TriggerEditor/util.ts +51 -0
  216. package/src/containers/AutomationSettings/AutomationSettings.tsx +12 -8
  217. package/src/containers/AutomationSettings/index.ts +1 -3
  218. package/src/containers/FunctionsContainer/FunctionsContainer.tsx +11 -11
  219. package/src/containers/FunctionsContainer/index.ts +1 -3
  220. package/src/containers/TriggerSettings/TriggerSettings.tsx +32 -10
  221. package/src/containers/TriggerSettings/index.ts +2 -3
  222. package/src/hooks/index.ts +2 -1
  223. package/src/hooks/useEdgeTriggersDispatcherStatus.ts +78 -0
  224. package/src/hooks/useTriggerRuntimeControls.ts +13 -8
  225. package/src/index.ts +0 -4
  226. package/src/meta.ts +27 -7
  227. package/src/operations/create-trigger-from-template.ts +70 -0
  228. package/src/operations/index.ts +7 -0
  229. package/src/plugin.ts +11 -0
  230. package/src/testing/test-functions.ts +38 -4
  231. package/src/testing.ts +7 -0
  232. package/src/translations.ts +52 -39
  233. package/src/types/AutomationOperation.ts +39 -0
  234. package/src/types/index.ts +2 -2
  235. package/src/types/schema.ts +4 -25
  236. package/src/vite-env.d.ts +10 -0
  237. package/dist/lib/browser/AutomationPanel-EHRSV2DL.mjs +0 -11
  238. package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs +0 -37
  239. package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs.map +0 -7
  240. package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs +0 -43
  241. package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs.map +0 -7
  242. package/dist/lib/browser/FunctionsPanel-5WPUZGRB.mjs +0 -10
  243. package/dist/lib/browser/FunctionsRegistry-XRXIZRLL.mjs +0 -10
  244. package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs +0 -13
  245. package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs.map +0 -7
  246. package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs +0 -85
  247. package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs.map +0 -7
  248. package/dist/lib/browser/chunk-3P4R5WNC.mjs +0 -8
  249. package/dist/lib/browser/chunk-3P4R5WNC.mjs.map +0 -7
  250. package/dist/lib/browser/chunk-4EY2KMCM.mjs +0 -272
  251. package/dist/lib/browser/chunk-4EY2KMCM.mjs.map +0 -7
  252. package/dist/lib/browser/chunk-PZNBEKO5.mjs +0 -17
  253. package/dist/lib/browser/chunk-PZNBEKO5.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-QPG3AKFX.mjs +0 -93
  255. package/dist/lib/browser/chunk-QPG3AKFX.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-SEG5OCGB.mjs +0 -31
  257. package/dist/lib/browser/chunk-SEG5OCGB.mjs.map +0 -7
  258. package/dist/lib/browser/chunk-U55ZXRYM.mjs.map +0 -7
  259. package/dist/lib/browser/chunk-WOBCY2FQ.mjs +0 -83
  260. package/dist/lib/browser/chunk-WOBCY2FQ.mjs.map +0 -7
  261. package/dist/lib/browser/chunk-XFXYU645.mjs.map +0 -7
  262. package/dist/lib/browser/chunk-ZNI2CGQP.mjs.map +0 -7
  263. package/dist/lib/browser/cli/index.mjs.map +0 -7
  264. package/dist/lib/browser/compute-runtime-L2RVWXY2.mjs +0 -124
  265. package/dist/lib/browser/compute-runtime-L2RVWXY2.mjs.map +0 -7
  266. package/dist/lib/browser/hooks/index.mjs +0 -13
  267. package/dist/lib/browser/index.mjs +0 -123
  268. package/dist/lib/browser/index.mjs.map +0 -7
  269. package/dist/lib/browser/meta.json +0 -1
  270. package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs +0 -83
  271. package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs.map +0 -7
  272. package/dist/lib/browser/react-surface-U6FAYV42.mjs +0 -69
  273. package/dist/lib/browser/react-surface-U6FAYV42.mjs.map +0 -7
  274. package/dist/lib/browser/types/index.mjs +0 -14
  275. package/dist/lib/node-esm/AutomationPanel-F7MPUR7U.mjs +0 -12
  276. package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs +0 -38
  277. package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs.map +0 -7
  278. package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs +0 -44
  279. package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs.map +0 -7
  280. package/dist/lib/node-esm/FunctionsPanel-UFL5LT2R.mjs +0 -11
  281. package/dist/lib/node-esm/FunctionsRegistry-574OBZ5T.mjs +0 -11
  282. package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs +0 -14
  283. package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs.map +0 -7
  284. package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs +0 -86
  285. package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-2X564LII.mjs +0 -10
  287. package/dist/lib/node-esm/chunk-2X564LII.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-34HGM46Z.mjs +0 -32
  289. package/dist/lib/node-esm/chunk-34HGM46Z.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-4DK33JDH.mjs +0 -84
  291. package/dist/lib/node-esm/chunk-4DK33JDH.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-5FXNN3MV.mjs +0 -19
  293. package/dist/lib/node-esm/chunk-5FXNN3MV.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-7AIKTEAX.mjs +0 -273
  295. package/dist/lib/node-esm/chunk-7AIKTEAX.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs +0 -271
  297. package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs.map +0 -7
  298. package/dist/lib/node-esm/chunk-GXFQR3KI.mjs +0 -99
  299. package/dist/lib/node-esm/chunk-GXFQR3KI.mjs.map +0 -7
  300. package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs +0 -94
  301. package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs.map +0 -7
  302. package/dist/lib/node-esm/chunk-RTEXGGBX.mjs +0 -97
  303. package/dist/lib/node-esm/chunk-RTEXGGBX.mjs.map +0 -7
  304. package/dist/lib/node-esm/cli/index.mjs +0 -1109
  305. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  306. package/dist/lib/node-esm/compute-runtime-XD6A5Q7Q.mjs +0 -125
  307. package/dist/lib/node-esm/compute-runtime-XD6A5Q7Q.mjs.map +0 -7
  308. package/dist/lib/node-esm/hooks/index.mjs +0 -14
  309. package/dist/lib/node-esm/index.mjs +0 -124
  310. package/dist/lib/node-esm/index.mjs.map +0 -7
  311. package/dist/lib/node-esm/meta.json +0 -1
  312. package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs +0 -84
  313. package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs.map +0 -7
  314. package/dist/lib/node-esm/react-surface-BVNHCWQ7.mjs +0 -70
  315. package/dist/lib/node-esm/react-surface-BVNHCWQ7.mjs.map +0 -7
  316. package/dist/lib/node-esm/types/index.mjs +0 -15
  317. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  318. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  319. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  320. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +0 -6
  321. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +0 -1
  322. package/dist/types/src/capabilities/compute-runtime/index.d.ts +0 -3
  323. package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +0 -1
  324. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  325. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  326. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  327. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  328. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  329. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  330. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  331. package/dist/types/src/cli/commands/index.d.ts.map +0 -1
  332. package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +0 -1
  333. package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +0 -1
  334. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +0 -1
  335. package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +0 -1
  336. package/dist/types/src/cli/commands/trigger/index.d.ts.map +0 -1
  337. package/dist/types/src/cli/commands/trigger/list.d.ts.map +0 -1
  338. package/dist/types/src/cli/commands/trigger/options.d.ts.map +0 -1
  339. package/dist/types/src/cli/commands/trigger/remove.d.ts.map +0 -1
  340. package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +0 -1
  341. package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +0 -1
  342. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +0 -1
  343. package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +0 -1
  344. package/dist/types/src/cli/commands/trigger/util.d.ts +0 -46
  345. package/dist/types/src/cli/commands/trigger/util.d.ts.map +0 -1
  346. package/dist/types/src/cli/index.d.ts +0 -2
  347. package/dist/types/src/cli/index.d.ts.map +0 -1
  348. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  349. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +0 -12
  350. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +0 -1
  351. package/dist/types/src/types/capabilities.d.ts +0 -22
  352. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  353. package/dist/types/src/types/events.d.ts +0 -5
  354. package/dist/types/src/types/events.d.ts.map +0 -1
  355. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -72
  356. package/src/capabilities/app-graph-builder/index.ts +0 -7
  357. package/src/capabilities/compute-runtime/compute-runtime.ts +0 -146
  358. package/src/capabilities/compute-runtime/index.ts +0 -7
  359. package/src/capabilities/operation-resolver/index.ts +0 -7
  360. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -80
  361. package/src/capabilities/react-surface/index.ts +0 -7
  362. package/src/capabilities/react-surface/react-surface.tsx +0 -61
  363. package/src/cli/index.ts +0 -5
  364. package/src/cli/plugin.ts +0 -24
  365. package/src/hooks/useComputeRuntimeCallback.ts +0 -67
  366. package/src/types/capabilities.ts +0 -43
  367. package/src/types/events.ts +0 -11
  368. /package/dist/lib/{browser/AutomationPanel-EHRSV2DL.mjs.map → neutral/AutomationPanel-OKF2MDLO.mjs.map} +0 -0
  369. /package/dist/lib/{browser/FunctionsPanel-5WPUZGRB.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
  370. /package/dist/lib/{browser/FunctionsRegistry-XRXIZRLL.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
  371. /package/dist/lib/{browser/hooks/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  372. /package/dist/lib/{browser/types → neutral/components}/index.mjs.map +0 -0
  373. /package/dist/lib/{node-esm → neutral}/hooks/index.mjs.map +0 -0
  374. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
  375. /package/dist/lib/{node-esm/AutomationPanel-F7MPUR7U.mjs.map → neutral/meta.mjs.map} +0 -0
  376. /package/dist/lib/{node-esm/FunctionsPanel-UFL5LT2R.mjs.map → neutral/operations/index.mjs.map} +0 -0
  377. /package/dist/lib/{node-esm/FunctionsRegistry-574OBZ5T.mjs.map → neutral/testing.mjs.map} +0 -0
  378. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  379. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  380. /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
  381. /package/dist/types/src/{cli/commands → commands}/trigger/update/subscription.d.ts +0 -0
  382. /package/dist/types/src/{cli/commands → commands}/trigger/update/timer.d.ts +0 -0
  383. /package/src/{cli/commands → commands}/index.ts +0 -0
  384. /package/src/{cli/commands → commands}/trigger/create/index.ts +0 -0
  385. /package/src/{cli/commands → commands}/trigger/index.ts +0 -0
  386. /package/src/{cli/commands → commands}/trigger/update/index.ts +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/PLUGIN.mdl ADDED
@@ -0,0 +1,428 @@
1
+ ---
2
+ id: org.dxos.plugin.automation
3
+ name: AutomationPlugin
4
+ version: 0.1.0
5
+ ---
6
+
7
+ A workflow automation engine plugin for DXOS Composer that enables event-driven
8
+ pipelines connecting ECHO objects to persistent compute functions.
9
+
10
+ Triggers listen for ECHO mutations, timer schedules, incoming feeds (email, webhook),
11
+ or data subscriptions and invoke `PersistentOperation` handlers when their conditions
12
+ fire. Each trigger carries optional structured input and is dispatched by a
13
+ per-space `TriggerDispatcher` that runs locally in the browser or is delegated to
14
+ the DXOS edge when the space `computeEnvironment` is `edge`.
15
+
16
+ The plugin integrates with the `@dxos/compute` operation registry and the
17
+ `@dxos/functions-runtime` execution layer. Blueprint, operation-handler, and
18
+ toolkit contributions from other plugins are gathered at application scope and
19
+ merged before being offered to space-level operation registries, so any plugin
20
+ that contributes a `Capabilities.OperationHandler` automatically becomes
21
+ invocable from an automation trigger.
22
+
23
+ Users interact with automations through the `AutomationPanel` settings surface,
24
+ which lists active triggers for a space (or for a specific ECHO object) and
25
+ opens the `TriggerEditor` form to create, configure, and enable/disable
26
+ individual triggers.
27
+
28
+ ## Extensions
29
+
30
+ The following extension dialects are used in this document.
31
+ Each extension is defined in the Appendix or resolved via its URI.
32
+
33
+ | Term | URI |
34
+ |-------------|-------------------------------|
35
+ | `type` | `org.dxos.mdl.type@1.0` |
36
+ | `feat` | `org.dxos.mdl.feat@1.0` |
37
+ | `test` | `org.dxos.mdl.test@1.0` |
38
+ | `component` | `org.dxos.mdl.component@1.0` |
39
+ | `op` | `org.dxos.mdl.op@1.0` |
40
+
41
+ ## Types
42
+
43
+ Existing types used by this plugin (defined in `@dxos/compute` and `@dxos/functions-runtime`):
44
+
45
+ | Type | Source | Role in AutomationPlugin |
46
+ |----------------------|---------------------------|--------------------------------------------------------------------|
47
+ | `Trigger` | `@dxos/compute` | Persistent trigger configuration (spec, function ref, input, enabled) |
48
+ | `PersistentOperation`| `@dxos/compute` | Registered compute function callable from a trigger |
49
+ | `Trace.Message` | `@dxos/compute` | Execution trace record appended after each trigger run |
50
+ | `Script` | `@dxos/compute` | Source script that produces one or more `PersistentOperation`s |
51
+ | `Feed` | `@dxos/echo` | Feed object that a `feed`-spec trigger listens to |
52
+ | `ComputeGraph` | `@dxos/conductor` | Visual workflow graph selectable as a trigger function |
53
+
54
+ New types defined by this plugin:
55
+
56
+ ```mdl
57
+ type TriggerTemplate
58
+ desc: |
59
+ Lightweight description of a trigger's spec used when creating a trigger
60
+ from a pre-defined template (e.g. from a Blueprint action).
61
+ literals: timer | feed
62
+ fields:
63
+ type: timer | feed
64
+ cron?: string # required when type === timer; cron expression
65
+ feed?: Feed # required when type === feed; the feed to subscribe to
66
+ ```
67
+
68
+ ## Components
69
+
70
+ ```mdl
71
+ component AutomationPanel
72
+ desc: |
73
+ Settings surface that lists all triggers for a space (or filtered to a
74
+ specific ECHO object) and provides inline create / edit / delete via the
75
+ TriggerEditor form. Displayed inside Settings.Panel at the path
76
+ `<spacePath>/settings/org.dxos.plugin.automation.automations`.
77
+ props:
78
+ space: Space
79
+ object?: Obj.Unknown # when set, only triggers matching this object are shown
80
+ initialTrigger?: Trigger # pre-populate TriggerEditor for a new trigger
81
+ onDone?: () => void
82
+ state:
83
+ trigger?: Trigger # trigger currently open in TriggerEditor (undefined = list view)
84
+ selected?: Trigger # the existing trigger being edited (undefined = new)
85
+ slots:
86
+ (none)
87
+ actions:
88
+ handleAdd() # open TriggerEditor with a blank Trigger
89
+ handleSelect(t: Trigger) # open TriggerEditor for an existing trigger
90
+ handleDelete(t: Trigger) # remove trigger from space.db
91
+ handleSave(t: Trigger) # persist new or update selected trigger
92
+ handleCancel()
93
+ handleForceRunTrigger(t: Trigger) # invoke timer trigger immediately
94
+ handleResetCursor(t: Trigger) # clear feed cursor on a feed trigger
95
+ layout: |
96
+ ┌──────────────────────────────────┐
97
+ │ [list view — triggers exist] │
98
+ │ ┌────────────────────────────┐ │
99
+ │ │ ○ fn-name [▶] [✕] │ │
100
+ │ │ ● fn-name [↺] [✕] │ │
101
+ │ └────────────────────────────┘ │
102
+ │ ───────────────────────────── │
103
+ │ [+ New Trigger] │
104
+ ├──────────────────────────────────┤
105
+ │ [editor view — trigger selected] │
106
+ │ Settings.Item │
107
+ │ └── TriggerEditor │
108
+ └──────────────────────────────────┘
109
+ ```
110
+
111
+ ```mdl
112
+ component TriggerEditor
113
+ desc: |
114
+ Form-driven editor for a single Trigger. Renders a Form.Root backed by the
115
+ Trigger schema with custom field overrides for function/workflow selection,
116
+ spec kind selector, feed selector, subscription query builder, and
117
+ structured input editor.
118
+ props:
119
+ db: Database
120
+ trigger: Trigger
121
+ types: TypeOption[] # available ECHO types for query builder
122
+ tags: Tag[] # available tags for query builder
123
+ readonlySpec?: boolean # lock spec.kind and spec.query (e.g. editing from an object context)
124
+ onSave: (t: Partial<Trigger>) => void
125
+ onCancel: () => void
126
+ state:
127
+ (managed by Form.Root)
128
+ slots:
129
+ (none)
130
+ ```
131
+
132
+ ```mdl
133
+ component FunctionsPanel
134
+ desc: |
135
+ Settings surface listing all PersistentOperation objects in a space.
136
+ Each row shows the function name, optional source script name, a
137
+ "go to script" icon button, and a delete button.
138
+ props:
139
+ space: Space
140
+ state:
141
+ functions: PersistentOperation[]
142
+ scripts: Script[]
143
+ slots:
144
+ (none)
145
+ actions:
146
+ handleGoToScript(fn: PersistentOperation) # navigate to source Script
147
+ handleDelete(fn: PersistentOperation) # remove function via SpaceOperation
148
+ ```
149
+
150
+ ## Operations
151
+
152
+ ```mdl
153
+ op CreateTriggerFromTemplate
154
+ desc: |
155
+ Creates a new Trigger from a lightweight template, optionally wiring it to
156
+ a named Script's PersistentOperation, and navigates to the automations
157
+ settings panel for the target space.
158
+ input:
159
+ db: Database
160
+ template: TriggerTemplate
161
+ enabled?: boolean # default false
162
+ scriptName?: string # if provided, looks up Script by name and wires function ref
163
+ input?: Record<string, any> # optional structured input forwarded to the trigger
164
+ output: void
165
+ effects: [echo:write, layout:navigate]
166
+ requires: [SpaceOperation.AddObject, LayoutOperation.Open]
167
+ note: |
168
+ Resolves the named Script, finds its linked PersistentOperation, and sets
169
+ trigger.function = Ref.make(fn). Template type determines spec:
170
+ timer → Trigger.specTimer(cron)
171
+ feed → Trigger.specFeed(feed)
172
+ Trigger is added as a hidden object so it does not appear in the main graph.
173
+ ```
174
+
175
+ ## Features
176
+
177
+ ```mdl
178
+ feat F-1: Trigger Management
179
+
180
+ req F-1.1: User can create a Trigger in any space via AutomationPanel.
181
+ req F-1.2: User can edit an existing Trigger's function, spec, and input.
182
+ req F-1.3: User can delete a Trigger; it is removed from space.db.
183
+ req F-1.4: User can enable or disable a Trigger via an inline toggle.
184
+ req F-1.5:
185
+ when: object context provided to AutomationPanel
186
+ then: only triggers matching that object's type or query are shown
187
+ ```
188
+
189
+ ```mdl
190
+ feat F-2: Trigger Dispatch
191
+
192
+ req F-2.1:
193
+ when: space.properties.computeEnvironment === "local"
194
+ then: TriggerDispatcher starts for that space
195
+
196
+ req F-2.2:
197
+ when: space.properties.computeEnvironment === "edge" or "disabled"
198
+ then: TriggerDispatcher stops for that space
199
+
200
+ req F-2.3:
201
+ when: computeEnvironment changes
202
+ then: any in-flight dispatcher transition is cancelled before the new one starts
203
+
204
+ req F-2.4:
205
+ when: trigger spec.kind === "timer" and enabled === true
206
+ then: TriggerDispatcher fires trigger according to cron expression
207
+
208
+ req F-2.5:
209
+ when: trigger spec.kind === "feed"
210
+ then: TriggerDispatcher processes new messages from the linked Feed
211
+
212
+ req F-2.6:
213
+ when: trigger spec.kind === "subscription"
214
+ then: TriggerDispatcher invokes trigger on matching ECHO object mutations
215
+ ```
216
+
217
+ ```mdl
218
+ feat F-3: Force Run and Cursor Reset
219
+
220
+ req F-3.1:
221
+ when: timer trigger is enabled and computeEnvironment !== "disabled"
222
+ then: user can force-run the trigger immediately from AutomationPanel
223
+
224
+ req F-3.2:
225
+ when: computeEnvironment === "local"
226
+ then: force-run invokes TriggerDispatcher.invokeTrigger directly in-process
227
+
228
+ req F-3.3:
229
+ when: computeEnvironment === "edge"
230
+ then: force-run calls FunctionsServiceClient.forceRunCronTrigger via HTTP
231
+
232
+ req F-3.4:
233
+ when: trigger spec.kind === "feed" and a cursor is stored
234
+ then: user can reset the cursor to reprocess the feed from the beginning
235
+ ```
236
+
237
+ ```mdl
238
+ feat F-4: Operation Registry
239
+
240
+ req F-4.1:
241
+ when: plugin activates
242
+ then: all Capabilities.OperationHandler contributions are merged into a single OperationHandlerProvider
243
+
244
+ req F-4.2: OperationRegistry per space resolves operations from the merged OperationHandlerProvider.
245
+ req F-4.3: Blueprint registry is populated from AppCapabilities.BlueprintDefinition contributions.
246
+ req F-4.4: OpaqueToolkit aggregates AppCapabilities.Toolkit contributions for agent invocation.
247
+ ```
248
+
249
+ ```mdl
250
+ feat F-5: Trace Sink
251
+
252
+ req F-5.1:
253
+ when: a trigger executes
254
+ then: execution trace messages are written to the space Feed via FeedTraceSink
255
+
256
+ req F-5.2: FeedTraceSink is contributed to Capabilities.TraceSink and routed via makeRoutingSink.
257
+ ```
258
+
259
+ ```mdl
260
+ feat F-6: Create Trigger From Template
261
+
262
+ req F-6.1:
263
+ when: op:CreateTriggerFromTemplate is invoked
264
+ then: a Trigger is created and added as a hidden ECHO object in the target space
265
+
266
+ req F-6.2:
267
+ when: scriptName is provided
268
+ then: the Trigger.function is wired to the PersistentOperation linked to that Script
269
+
270
+ req F-6.3:
271
+ when: template.type === "timer"
272
+ then: Trigger.spec is set via Trigger.specTimer(template.cron)
273
+
274
+ req F-6.4:
275
+ when: template.type === "feed"
276
+ then: Trigger.spec is set via Trigger.specFeed(template.feed)
277
+
278
+ req F-6.5:
279
+ when: trigger is created
280
+ then: layout navigates to the automations settings panel for the space
281
+ ```
282
+
283
+ ## Acceptance
284
+
285
+ ```mdl
286
+ test T-1: Create trigger via AutomationPanel
287
+ given: AutomationPanel rendered for a space with no triggers
288
+ when: user clicks "New Trigger"
289
+ then:
290
+ - TriggerEditor shown with a blank Trigger
291
+ - selected state is undefined (new trigger mode)
292
+ ```
293
+
294
+ ```mdl
295
+ test T-2: Save new trigger
296
+ given: TriggerEditor open with blank Trigger
297
+ when: user fills in a function and spec, then saves
298
+ then:
299
+ - space.db.add called with a new Trigger
300
+ - list view restored
301
+ - onDone called
302
+ ```
303
+
304
+ ```mdl
305
+ test T-3: Edit existing trigger
306
+ given: AutomationPanel listing one trigger
307
+ when: user clicks the trigger row
308
+ then:
309
+ - TriggerEditor opens pre-populated with that trigger's values
310
+ - selected state holds the original trigger
311
+ - saving calls Obj.update on the original trigger
312
+ ```
313
+
314
+ ```mdl
315
+ test T-4: Enable/disable toggle
316
+ given: AutomationPanel showing trigger with enabled = false
317
+ when: user flips the toggle
318
+ then:
319
+ - Obj.update sets trigger.enabled = true
320
+ - toggle reflects new state immediately
321
+ ```
322
+
323
+ ```mdl
324
+ test T-5: Force run timer trigger (local)
325
+ given: timer trigger enabled, computeEnvironment = "local"
326
+ when: user clicks the force-run button
327
+ then:
328
+ - TriggerDispatcher.invokeTrigger called with a TimerEvent
329
+ - no error surfaced to user
330
+ ```
331
+
332
+ ```mdl
333
+ test T-6: Dispatcher lifecycle on environment change
334
+ given: space computeEnvironment = "local", dispatcher running
335
+ when: space.properties.computeEnvironment changes to "edge"
336
+ then:
337
+ - in-flight transition fiber interrupted
338
+ - TriggerDispatcher.stop() called for that space
339
+ ```
340
+
341
+ ```mdl
342
+ test T-7: CreateTriggerFromTemplate with timer
343
+ given: db contains Script "daily-summary", computeEnvironment = "local"
344
+ when: op:CreateTriggerFromTemplate invoked with template={type:"timer",cron:"0 8 * * *"}, scriptName="daily-summary"
345
+ then:
346
+ - Trigger created with spec.kind === "timer", spec.cron === "0 8 * * *"
347
+ - Trigger.function wired to PersistentOperation linked to "daily-summary" script
348
+ - Trigger added as hidden ECHO object
349
+ - layout navigates to automations settings panel
350
+ ```
351
+
352
+ ```mdl
353
+ test T-8: CreateTriggerFromTemplate with feed
354
+ given: db contains a Feed object "email-feed"
355
+ when: op:CreateTriggerFromTemplate invoked with template={type:"feed",feed:<email-feed>}
356
+ then:
357
+ - Trigger created with spec.kind === "feed", spec.feed === Ref to email-feed
358
+ - Trigger added as hidden ECHO object
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Appendix: Extension Definitions
364
+
365
+ Extension block types used in this document are defined below using
366
+ the core `ext` primitive — the only construct the base language provides.
367
+
368
+ ```mdl
369
+ ext type
370
+ uri: org.dxos.mdl.type@1.0
371
+ desc: A named data structure with typed fields and optional literals.
372
+ fields:
373
+ desc?: Prose
374
+ fields?: FieldMap # name[?]: TypeExpr (# inline comment)
375
+ literals?: UnionList # a | b | c
376
+ extends?: TypeRef[]
377
+ ```
378
+
379
+ ```mdl
380
+ ext feat
381
+ uri: org.dxos.mdl.feat@1.0
382
+ desc: A named feature grouping one or more requirements.
383
+ fields:
384
+ desc?: Prose
385
+ req: RequirementList
386
+ nesting: self # feat blocks may contain feat blocks
387
+ ```
388
+
389
+ ```mdl
390
+ ext test
391
+ uri: org.dxos.mdl.test@1.0
392
+ desc: An acceptance scenario expressed as given / when / then steps.
393
+ fields:
394
+ given?: Step | Step[]
395
+ when?: Step | Step[]
396
+ then: Step | Step[]
397
+ tags?: TagList
398
+ ```
399
+
400
+ ```mdl
401
+ ext component
402
+ uri: org.dxos.mdl.component@1.0
403
+ desc: A UI component with props, internal state, slots, actions, and events.
404
+ fields:
405
+ desc?: Prose
406
+ props?: FieldMap # external inputs (immutable inside component)
407
+ state?: FieldMap # internal reactive state
408
+ slots?: FieldMap # named ReactNode injection points
409
+ actions?: ActionMap # methods the component exposes or handles
410
+ emits?: EventMap # events the component raises to its parent
411
+ layout?: CodeBlock # ASCII sketch of visual structure (non-normative)
412
+ ```
413
+
414
+ ```mdl
415
+ ext op
416
+ uri: org.dxos.mdl.op@1.0
417
+ desc: |
418
+ A named operation with typed inputs, outputs, and declared errors.
419
+ Pure ops have no effects or requires. Effectful ops declare both.
420
+ fields:
421
+ desc?: Prose
422
+ input?: FieldMap # named input parameters
423
+ output?: TypeExpr # return type
424
+ errors?: ErrorMap # name: Prose (when this error occurs)
425
+ effects?: EffectList # echo:read | echo:write | http | fs | ...
426
+ requires?: ServiceList # injected service dependencies
427
+ note?: Prose # implementation guidance (non-normative)
428
+ ```
package/README.md CHANGED
@@ -12,4 +12,4 @@ Automation plugin.
12
12
 
13
13
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
14
14
 
15
- License: [MIT](./LICENSE) Copyright 2023 © DXOS
15
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
@@ -0,0 +1,12 @@
1
+ import {
2
+ AutomationPanel,
3
+ AutomationPanel_default
4
+ } from "./chunk-C7H62AU3.mjs";
5
+ import "./chunk-CMM3AFHR.mjs";
6
+ import "./chunk-RCBE37YU.mjs";
7
+ import "./chunk-J5LGTIGS.mjs";
8
+ export {
9
+ AutomationPanel,
10
+ AutomationPanel_default as default
11
+ };
12
+ //# sourceMappingURL=AutomationPanel-OKF2MDLO.mjs.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ AutomationPlugin,
3
+ AutomationPlugin_default
4
+ } from "./chunk-7YWISQOZ.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
6
+ export {
7
+ AutomationPlugin,
8
+ AutomationPlugin_default as default
9
+ };
10
+ //# sourceMappingURL=AutomationPlugin.mjs.map