@dxos/plugin-automation 0.8.4-main.422d1c7879 → 0.8.4-main.4f23b4e393

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 (259) hide show
  1. package/dist/lib/neutral/AutomationPanel-HI63JQ2X.mjs +11 -0
  2. package/dist/lib/neutral/AutomationPlugin.mjs +38 -0
  3. package/dist/lib/neutral/AutomationPlugin.mjs.map +7 -0
  4. package/dist/lib/{browser/cli/index.mjs → neutral/AutomationPlugin.node.mjs} +77 -75
  5. package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
  6. package/dist/lib/neutral/AutomationSettings-LM5GSR4H.mjs +31 -0
  7. package/dist/lib/neutral/AutomationSettings-LM5GSR4H.mjs.map +7 -0
  8. package/dist/lib/neutral/FunctionsContainer-SR6DHMF6.mjs +38 -0
  9. package/dist/lib/neutral/FunctionsContainer-SR6DHMF6.mjs.map +7 -0
  10. package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs +97 -0
  11. package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs.map +7 -0
  12. package/dist/lib/neutral/FunctionsRegistry-Z2B5MUD3.mjs +95 -0
  13. package/dist/lib/neutral/FunctionsRegistry-Z2B5MUD3.mjs.map +7 -0
  14. package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
  15. package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs +75 -0
  16. package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs.map +7 -0
  17. package/dist/lib/neutral/capabilities/index.mjs +15 -0
  18. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  19. package/dist/lib/neutral/capabilities/node.mjs +13 -0
  20. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-2JP77CMN.mjs +42 -0
  22. package/dist/lib/neutral/chunk-2JP77CMN.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-6CKX6RIL.mjs +270 -0
  24. package/dist/lib/neutral/chunk-6CKX6RIL.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-ATECY555.mjs +20 -0
  26. package/dist/lib/neutral/chunk-ATECY555.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-DSCOLDT5.mjs +93 -0
  28. package/dist/lib/neutral/chunk-DSCOLDT5.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-K3C5ZTZA.mjs +285 -0
  30. package/dist/lib/neutral/chunk-K3C5ZTZA.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-M3TIHFXN.mjs +8 -0
  32. package/dist/lib/neutral/chunk-M3TIHFXN.mjs.map +7 -0
  33. package/dist/lib/neutral/chunk-UUC257FA.mjs +12 -0
  34. package/dist/lib/neutral/chunk-UUC257FA.mjs.map +7 -0
  35. package/dist/lib/neutral/components/index.mjs +16 -0
  36. package/dist/lib/neutral/compute-runtime-42CP6VG5.mjs +220 -0
  37. package/dist/lib/neutral/compute-runtime-42CP6VG5.mjs.map +7 -0
  38. package/dist/lib/neutral/containers/index.mjs +13 -0
  39. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  40. package/dist/lib/{browser/create-trigger-from-template-NH5EL6LB.mjs → neutral/create-trigger-from-template-7K3OYOHQ.mjs} +10 -13
  41. package/dist/lib/neutral/create-trigger-from-template-7K3OYOHQ.mjs.map +7 -0
  42. package/dist/lib/{browser → neutral}/hooks/index.mjs +59 -17
  43. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  44. package/dist/lib/neutral/index.mjs +20 -0
  45. package/dist/lib/neutral/index.mjs.map +7 -0
  46. package/dist/lib/neutral/meta.json +1 -0
  47. package/dist/lib/neutral/meta.mjs +8 -0
  48. package/dist/lib/neutral/meta.mjs.map +7 -0
  49. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs +13 -0
  50. package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs.map +7 -0
  51. package/dist/lib/neutral/operations/index.mjs +8 -0
  52. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  53. package/dist/lib/neutral/plugin.mjs +16 -0
  54. package/dist/lib/neutral/plugin.mjs.map +7 -0
  55. package/dist/lib/neutral/react-surface-3OGMAMKV.mjs +57 -0
  56. package/dist/lib/neutral/react-surface-3OGMAMKV.mjs.map +7 -0
  57. package/dist/lib/neutral/translations.mjs +47 -0
  58. package/dist/lib/neutral/translations.mjs.map +7 -0
  59. package/dist/lib/neutral/types/index.mjs +16 -0
  60. package/dist/lib/neutral/types/index.mjs.map +7 -0
  61. package/dist/types/src/AutomationPlugin.d.ts +1 -0
  62. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  63. package/dist/types/src/{cli/plugin.d.ts → AutomationPlugin.node.d.ts} +2 -1
  64. package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
  65. package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
  66. package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/index.d.ts +2 -2
  70. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/node.d.ts +4 -1
  72. package/dist/types/src/capabilities/node.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  74. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  76. package/dist/types/src/commands/index.d.ts.map +1 -0
  77. package/dist/types/src/{cli/commands → commands}/trigger/create/index.d.ts +6 -6
  78. package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
  79. package/dist/types/src/{cli/commands → commands}/trigger/create/queue.d.ts +1 -1
  80. package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
  81. package/dist/types/src/{cli/commands → commands}/trigger/create/subscription.d.ts +1 -1
  82. package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
  83. package/dist/types/src/{cli/commands → commands}/trigger/create/timer.d.ts +1 -1
  84. package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
  85. package/dist/types/src/{cli/commands → commands}/trigger/index.d.ts +7 -7
  86. package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
  87. package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
  88. package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
  89. package/dist/types/src/{cli/commands → commands}/trigger/remove.d.ts +1 -1
  90. package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
  91. package/dist/types/src/{cli/commands → commands}/trigger/update/index.d.ts +5 -5
  92. package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
  93. package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
  94. package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
  95. package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
  96. package/dist/types/src/{cli/commands → commands}/trigger/util.d.ts +2 -2
  97. package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
  98. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
  99. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  100. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +32 -32
  101. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  102. package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
  103. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  104. package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -1
  105. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -1
  106. package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -1
  107. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +5 -5
  108. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  109. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +4 -4
  110. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  111. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
  112. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  113. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +95 -95
  114. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  115. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -1
  116. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -1
  117. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -1
  118. package/dist/types/src/hooks/useComputeRuntime.d.ts.map +1 -1
  119. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +1 -1
  120. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
  121. package/dist/types/src/hooks/useComputeRuntimeService.d.ts +14 -2
  122. package/dist/types/src/hooks/useComputeRuntimeService.d.ts.map +1 -1
  123. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
  124. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
  125. package/dist/types/src/index.d.ts +2 -2
  126. package/dist/types/src/index.d.ts.map +1 -1
  127. package/dist/types/src/meta.d.ts.map +1 -1
  128. package/dist/types/src/operations/create-trigger-from-template.d.ts +3 -3
  129. package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -1
  130. package/dist/types/src/operations/index.d.ts +1 -2
  131. package/dist/types/src/operations/index.d.ts.map +1 -1
  132. package/dist/types/src/plugin.d.ts +4 -0
  133. package/dist/types/src/plugin.d.ts.map +1 -0
  134. package/dist/types/src/testing/test-functions.d.ts +78 -78
  135. package/dist/types/src/translations.d.ts +32 -33
  136. package/dist/types/src/translations.d.ts.map +1 -1
  137. package/dist/types/src/types/AutomationCapabilities.d.ts +22 -0
  138. package/dist/types/src/types/AutomationCapabilities.d.ts.map +1 -0
  139. package/dist/types/src/types/AutomationEvents.d.ts +3 -0
  140. package/dist/types/src/types/AutomationEvents.d.ts.map +1 -0
  141. package/dist/types/src/{operations/definitions.d.ts → types/AutomationOperation.d.ts} +5 -5
  142. package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
  143. package/dist/types/src/types/index.d.ts +3 -2
  144. package/dist/types/src/types/index.d.ts.map +1 -1
  145. package/dist/types/src/types/schema.d.ts.map +1 -1
  146. package/dist/types/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +107 -74
  148. package/src/{cli/plugin.ts → AutomationPlugin.node.ts} +8 -2
  149. package/src/AutomationPlugin.test.ts +27 -0
  150. package/src/AutomationPlugin.tsx +5 -5
  151. package/src/capabilities/app-graph-builder.ts +10 -6
  152. package/src/capabilities/compute-runtime.ts +35 -16
  153. package/src/capabilities/index.ts +1 -1
  154. package/src/capabilities/node.ts +6 -0
  155. package/src/capabilities/operation-handler.ts +1 -1
  156. package/src/{cli/commands → commands}/trigger/create/queue.ts +3 -4
  157. package/src/{cli/commands → commands}/trigger/create/subscription.ts +1 -2
  158. package/src/{cli/commands → commands}/trigger/create/timer.ts +1 -2
  159. package/src/{cli/commands → commands}/trigger/list.ts +5 -3
  160. package/src/{cli/commands → commands}/trigger/remove.ts +2 -3
  161. package/src/{cli/commands → commands}/trigger/update/queue.ts +7 -8
  162. package/src/{cli/commands → commands}/trigger/update/subscription.ts +5 -6
  163. package/src/{cli/commands → commands}/trigger/update/timer.ts +5 -6
  164. package/src/{cli/commands → commands}/trigger/util.ts +8 -7
  165. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +2 -3
  166. package/src/components/AutomationPanel/AutomationPanel.tsx +10 -7
  167. package/src/components/FunctionsPanel/FunctionsPanel.tsx +4 -4
  168. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +3 -2
  169. package/src/components/TriggerEditor/FunctionInputEditor.tsx +1 -1
  170. package/src/components/TriggerEditor/SpecSelector.tsx +1 -1
  171. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +4 -5
  172. package/src/components/TriggerEditor/TriggerEditor.tsx +7 -8
  173. package/src/containers/FunctionsContainer/FunctionsContainer.tsx +1 -2
  174. package/src/hooks/useComputeRuntime.ts +9 -0
  175. package/src/hooks/useComputeRuntimeCallback.ts +2 -3
  176. package/src/hooks/useComputeRuntimeService.ts +48 -9
  177. package/src/hooks/useTriggerRuntimeControls.ts +6 -3
  178. package/src/index.ts +2 -2
  179. package/src/meta.ts +1 -0
  180. package/src/operations/create-trigger-from-template.ts +51 -52
  181. package/src/operations/index.ts +1 -3
  182. package/src/plugin.ts +11 -0
  183. package/src/testing/test-functions.ts +6 -6
  184. package/src/translations.ts +3 -3
  185. package/src/types/AutomationCapabilities.ts +48 -0
  186. package/src/types/AutomationEvents.ts +11 -0
  187. package/src/{operations/definitions.ts → types/AutomationOperation.ts} +4 -2
  188. package/src/types/index.ts +4 -2
  189. package/dist/lib/browser/chunk-LEN2XWRB.mjs +0 -44
  190. package/dist/lib/browser/chunk-LEN2XWRB.mjs.map +0 -7
  191. package/dist/lib/browser/chunk-VKSAIOAL.mjs +0 -54
  192. package/dist/lib/browser/chunk-VKSAIOAL.mjs.map +0 -7
  193. package/dist/lib/browser/cli/index.mjs.map +0 -7
  194. package/dist/lib/browser/create-trigger-from-template-NH5EL6LB.mjs.map +0 -7
  195. package/dist/lib/browser/hooks/index.mjs.map +0 -7
  196. package/dist/lib/browser/index.mjs +0 -94
  197. package/dist/lib/browser/index.mjs.map +0 -7
  198. package/dist/lib/browser/meta.json +0 -1
  199. package/dist/lib/browser/operations/index.mjs +0 -14
  200. package/dist/lib/browser/operations/index.mjs.map +0 -7
  201. package/dist/lib/browser/types/index.mjs +0 -14
  202. package/dist/lib/node-esm/chunk-45PS7CQD.mjs +0 -56
  203. package/dist/lib/node-esm/chunk-45PS7CQD.mjs.map +0 -7
  204. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  205. package/dist/lib/node-esm/chunk-V2SSR4MK.mjs +0 -45
  206. package/dist/lib/node-esm/chunk-V2SSR4MK.mjs.map +0 -7
  207. package/dist/lib/node-esm/cli/index.mjs +0 -1111
  208. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  209. package/dist/lib/node-esm/create-trigger-from-template-C7UPU2VL.mjs +0 -72
  210. package/dist/lib/node-esm/create-trigger-from-template-C7UPU2VL.mjs.map +0 -7
  211. package/dist/lib/node-esm/hooks/index.mjs +0 -88
  212. package/dist/lib/node-esm/hooks/index.mjs.map +0 -7
  213. package/dist/lib/node-esm/index.mjs +0 -95
  214. package/dist/lib/node-esm/index.mjs.map +0 -7
  215. package/dist/lib/node-esm/meta.json +0 -1
  216. package/dist/lib/node-esm/operations/index.mjs +0 -15
  217. package/dist/lib/node-esm/operations/index.mjs.map +0 -7
  218. package/dist/lib/node-esm/types/index.mjs +0 -15
  219. package/dist/types/src/cli/commands/index.d.ts.map +0 -1
  220. package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +0 -1
  221. package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +0 -1
  222. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +0 -1
  223. package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +0 -1
  224. package/dist/types/src/cli/commands/trigger/index.d.ts.map +0 -1
  225. package/dist/types/src/cli/commands/trigger/list.d.ts.map +0 -1
  226. package/dist/types/src/cli/commands/trigger/options.d.ts.map +0 -1
  227. package/dist/types/src/cli/commands/trigger/remove.d.ts.map +0 -1
  228. package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +0 -1
  229. package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +0 -1
  230. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +0 -1
  231. package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +0 -1
  232. package/dist/types/src/cli/commands/trigger/util.d.ts.map +0 -1
  233. package/dist/types/src/cli/index.d.ts +0 -2
  234. package/dist/types/src/cli/index.d.ts.map +0 -1
  235. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  236. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  237. package/dist/types/src/types/capabilities.d.ts +0 -25
  238. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  239. package/dist/types/src/types/events.d.ts +0 -5
  240. package/dist/types/src/types/events.d.ts.map +0 -1
  241. package/src/cli/index.ts +0 -5
  242. package/src/types/capabilities.ts +0 -47
  243. package/src/types/events.ts +0 -11
  244. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/AutomationPanel-HI63JQ2X.mjs.map} +0 -0
  245. /package/dist/lib/{browser/types/index.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
  246. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  247. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  248. /package/dist/lib/{node-esm/types → neutral/components}/index.mjs.map +0 -0
  249. /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
  250. /package/dist/types/src/{cli/commands → commands}/trigger/list.d.ts +0 -0
  251. /package/dist/types/src/{cli/commands → commands}/trigger/options.d.ts +0 -0
  252. /package/dist/types/src/{cli/commands → commands}/trigger/update/queue.d.ts +0 -0
  253. /package/dist/types/src/{cli/commands → commands}/trigger/update/subscription.d.ts +0 -0
  254. /package/dist/types/src/{cli/commands → commands}/trigger/update/timer.d.ts +0 -0
  255. /package/src/{cli/commands → commands}/index.ts +0 -0
  256. /package/src/{cli/commands → commands}/trigger/create/index.ts +0 -0
  257. /package/src/{cli/commands → commands}/trigger/index.ts +0 -0
  258. /package/src/{cli/commands → commands}/trigger/options.ts +0 -0
  259. /package/src/{cli/commands → commands}/trigger/update/index.ts +0 -0
@@ -0,0 +1,11 @@
1
+ import {
2
+ AutomationPanel,
3
+ AutomationPanel_default
4
+ } from "./chunk-6CKX6RIL.mjs";
5
+ import "./chunk-K3C5ZTZA.mjs";
6
+ import "./chunk-J5LGTIGS.mjs";
7
+ export {
8
+ AutomationPanel,
9
+ AutomationPanel_default as default
10
+ };
11
+ //# sourceMappingURL=AutomationPanel-HI63JQ2X.mjs.map
@@ -0,0 +1,38 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/AutomationPlugin.tsx
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { Operation, Trace, Trigger } from "@dxos/compute";
7
+ import { ClientEvents } from "@dxos/plugin-client";
8
+ import { AppGraphBuilder, ComputeRuntime, OperationHandler, ReactSurface } from "#capabilities";
9
+ import { meta } from "#meta";
10
+ import { translations } from "#translations";
11
+ import { AutomationEvents } from "#types";
12
+ var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
13
+ activate: AppGraphBuilder
14
+ }), AppPlugin.addOperationHandlerModule({
15
+ activate: OperationHandler
16
+ }), AppPlugin.addSchemaModule({
17
+ schema: [
18
+ Operation.PersistentOperation,
19
+ Trigger.Trigger,
20
+ Trace.Message
21
+ ]
22
+ }), AppPlugin.addSurfaceModule({
23
+ activate: ReactSurface
24
+ }), AppPlugin.addTranslationsModule({
25
+ translations
26
+ }), Plugin.addModule({
27
+ activatesOn: ClientEvents.ClientReady,
28
+ firesAfterActivation: [
29
+ AutomationEvents.ComputeRuntimeReady
30
+ ],
31
+ activate: ComputeRuntime
32
+ }), Plugin.make);
33
+ var AutomationPlugin_default = AutomationPlugin;
34
+ export {
35
+ AutomationPlugin,
36
+ AutomationPlugin_default as default
37
+ };
38
+ //# sourceMappingURL=AutomationPlugin.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
+ }
@@ -1,20 +1,21 @@
1
- import "../chunk-J5LGTIGS.mjs";
1
+ import "./chunk-J5LGTIGS.mjs";
2
2
 
3
- // src/cli/plugin.ts
3
+ // src/AutomationPlugin.node.ts
4
4
  import { Plugin } from "@dxos/app-framework";
5
5
  import { AppPlugin } from "@dxos/app-toolkit";
6
- import { ClientEvents } from "@dxos/plugin-client/types";
7
- import { ComputeRuntime } from "#capabilities";
6
+ import { Operation as Operation8, Trace, Trigger as Trigger10 } from "@dxos/compute";
7
+ import { ClientEvents } from "@dxos/plugin-client";
8
+ import { AppGraphBuilder, ComputeRuntime, OperationHandler } from "#capabilities";
8
9
  import { meta } from "#meta";
9
10
  import { AutomationEvents } from "#types";
10
11
 
11
- // src/cli/commands/trigger/index.ts
12
+ // src/commands/trigger/index.ts
12
13
  import * as Command11 from "@effect/cli/Command";
13
14
 
14
- // src/cli/commands/trigger/create/index.ts
15
+ // src/commands/trigger/create/index.ts
15
16
  import * as Command4 from "@effect/cli/Command";
16
17
 
17
- // src/cli/commands/trigger/create/queue.ts
18
+ // src/commands/trigger/create/queue.ts
18
19
  import * as Command from "@effect/cli/Command";
19
20
  import * as Options2 from "@effect/cli/Options";
20
21
  import * as Prompt2 from "@effect/cli/Prompt";
@@ -25,11 +26,10 @@ import * as Option2 from "effect/Option";
25
26
  import { CommandConfig } from "@dxos/cli-util";
26
27
  import { flushAndSync, print, spaceLayer, withTypes } from "@dxos/cli-util";
27
28
  import { Common } from "@dxos/cli-util";
29
+ import { Operation as Operation2, Trigger as Trigger2 } from "@dxos/compute";
28
30
  import { Database as Database2, Filter as Filter2, JsonSchema, Ref as Ref2 } from "@dxos/echo";
29
- import { Trigger as Trigger2 } from "@dxos/functions";
30
- import { Operation as Operation2 } from "@dxos/operation";
31
31
 
32
- // src/cli/commands/trigger/options.ts
32
+ // src/commands/trigger/options.ts
33
33
  import * as Options from "@effect/cli/Options";
34
34
  import * as Schema from "effect/Schema";
35
35
  import { DXN } from "@dxos/keys";
@@ -50,7 +50,7 @@ var DXNSchema = Schema.String.pipe(Schema.transform(Schema.instanceOf(DXN), {
50
50
  }));
51
51
  var Queue = Options.text("queue").pipe(Options.withDescription("The DXN of the queue for the queue trigger."), Options.withSchema(DXNSchema));
52
52
 
53
- // src/cli/commands/trigger/util.ts
53
+ // src/commands/trigger/util.ts
54
54
  import * as Prompt from "@effect/cli/Prompt";
55
55
  import * as Ansi from "@effect/printer-ansi/Ansi";
56
56
  import * as Console from "effect/Console";
@@ -59,10 +59,9 @@ import * as Match from "effect/Match";
59
59
  import * as Option from "effect/Option";
60
60
  import * as SchemaAST from "effect/SchemaAST";
61
61
  import { FormBuilder } from "@dxos/cli-util";
62
- import { Annotation, Database, Entity, Feed, Filter, Obj, Ref, Type } from "@dxos/echo";
62
+ import { Operation, Trigger } from "@dxos/compute";
63
+ import { Annotation, Database, Entity, Feed, Filter, Obj, Query, Ref, Type } from "@dxos/echo";
63
64
  import { getProperties } from "@dxos/effect";
64
- import { Trigger } from "@dxos/functions";
65
- import { Operation } from "@dxos/operation";
66
65
  import { FeedAnnotation } from "@dxos/schema";
67
66
  var getTriggerRemoteStatus = (trigger2, remoteCronIds) => {
68
67
  if (trigger2.spec?.kind !== "timer") {
@@ -241,7 +240,7 @@ var selectFunction = Effect.fn(function* () {
241
240
  return String(selected);
242
241
  });
243
242
  var selectTrigger = Effect.fn(function* (kind) {
244
- const triggers = yield* Database.runQuery(Filter.type(Trigger.Trigger));
243
+ const triggers = yield* Database.runQuery(Query.select(Filter.type(Trigger.Trigger)).debugLabel("cli.trigger.selectTrigger"));
245
244
  const filteredTriggers = kind ? triggers.filter((trigger2) => trigger2.spec?.kind === kind) : triggers;
246
245
  if (filteredTriggers.length === 0) {
247
246
  return yield* Effect.fail(new Error(kind ? `No ${kind} triggers available` : "No triggers available"));
@@ -291,15 +290,15 @@ var selectQueue = Effect.fn(function* () {
291
290
  if (!feedObj || !Obj.instanceOf(Feed.Feed, feedObj)) {
292
291
  continue;
293
292
  }
294
- const queueDxn = Feed.getQueueDxn(feedObj);
295
- if (!queueDxn) {
293
+ const queueDXN = Feed.getQueueDxn(feedObj);
294
+ if (!queueDXN) {
296
295
  continue;
297
296
  }
298
297
  const label = Obj.getLabel(obj) ?? obj.id;
299
298
  const description = Obj.getTypename(obj);
300
299
  queueChoices.push({
301
300
  title: label,
302
- value: queueDxn.toString(),
301
+ value: queueDXN.toString(),
303
302
  description
304
303
  });
305
304
  }
@@ -318,7 +317,7 @@ var printTriggerRemoved = (id) => FormBuilder.make({
318
317
  title: "Trigger removed"
319
318
  }).pipe(FormBuilder.set("id", id), FormBuilder.build);
320
319
 
321
- // src/cli/commands/trigger/create/queue.ts
320
+ // src/commands/trigger/create/queue.ts
322
321
  var queue = Command.make("queue", {
323
322
  spaceId: Common.spaceId.pipe(Options2.optional),
324
323
  enabled: Enabled,
@@ -336,7 +335,7 @@ var queue = Command.make("queue", {
336
335
  if (!fn6) {
337
336
  return yield* Effect2.fail(new Error(`Function not found: ${functionId}`));
338
337
  }
339
- const queueDxn = yield* Option2.match(options.queue, {
338
+ const queueDXN = yield* Option2.match(options.queue, {
340
339
  onNone: () => selectQueue(),
341
340
  onSome: (dxn) => Effect2.succeed(dxn.toString())
342
341
  });
@@ -354,7 +353,7 @@ var queue = Command.make("queue", {
354
353
  const trigger2 = Trigger2.make({
355
354
  function: Ref2.make(fn6),
356
355
  enabled,
357
- spec: Trigger2.specQueue(queueDxn),
356
+ spec: Trigger2.specQueue(queueDXN),
358
357
  input
359
358
  });
360
359
  yield* Database2.add(trigger2);
@@ -368,7 +367,7 @@ var queue = Command.make("queue", {
368
367
  });
369
368
  })).pipe(Command.withDescription("Create a queue trigger."), Command.provide(({ spaceId }) => spaceLayer(spaceId, true)), Command.provideEffectDiscard(() => withTypes(Operation2.PersistentOperation, Trigger2.Trigger)));
370
369
 
371
- // src/cli/commands/trigger/create/subscription.ts
370
+ // src/commands/trigger/create/subscription.ts
372
371
  import * as Command2 from "@effect/cli/Command";
373
372
  import * as Options3 from "@effect/cli/Options";
374
373
  import * as Prompt3 from "@effect/cli/Prompt";
@@ -379,9 +378,8 @@ import * as Option3 from "effect/Option";
379
378
  import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
380
379
  import { flushAndSync as flushAndSync2, print as print2, spaceLayer as spaceLayer2, withTypes as withTypes2 } from "@dxos/cli-util";
381
380
  import { Common as Common2 } from "@dxos/cli-util";
382
- import { Database as Database3, Filter as Filter3, JsonSchema as JsonSchema2, Query, Ref as Ref3 } from "@dxos/echo";
383
- import { Trigger as Trigger3 } from "@dxos/functions";
384
- import { Operation as Operation3 } from "@dxos/operation";
381
+ import { Operation as Operation3, Trigger as Trigger3 } from "@dxos/compute";
382
+ import { Database as Database3, Filter as Filter3, JsonSchema as JsonSchema2, Query as Query2, Ref as Ref3 } from "@dxos/echo";
385
383
  var subscription = Command2.make("subscription", {
386
384
  spaceId: Common2.spaceId.pipe(Options3.optional),
387
385
  enabled: Enabled,
@@ -407,7 +405,7 @@ var subscription = Command2.make("subscription", {
407
405
  }).pipe(Prompt3.run),
408
406
  onSome: (value2) => Effect3.succeed(value2)
409
407
  });
410
- const subscriptionQuery = Query.select(Filter3.type(typename));
408
+ const subscriptionQuery = Query2.select(Filter3.type(typename));
411
409
  const deepOption = yield* Option3.match(options.deep, {
412
410
  onNone: () => Prompt3.confirm({
413
411
  message: "Watch changes to nested properties (deep)?",
@@ -459,7 +457,7 @@ var subscription = Command2.make("subscription", {
459
457
  });
460
458
  })).pipe(Command2.withDescription("Create a subscription trigger."), Command2.provide(({ spaceId }) => spaceLayer2(spaceId, true)), Command2.provideEffectDiscard(() => withTypes2(Operation3.PersistentOperation, Trigger3.Trigger)));
461
459
 
462
- // src/cli/commands/trigger/create/timer.ts
460
+ // src/commands/trigger/create/timer.ts
463
461
  import * as Command3 from "@effect/cli/Command";
464
462
  import * as Options4 from "@effect/cli/Options";
465
463
  import * as Prompt4 from "@effect/cli/Prompt";
@@ -470,9 +468,8 @@ import * as Option4 from "effect/Option";
470
468
  import { CommandConfig as CommandConfig3 } from "@dxos/cli-util";
471
469
  import { flushAndSync as flushAndSync3, print as print3, spaceLayer as spaceLayer3, withTypes as withTypes3 } from "@dxos/cli-util";
472
470
  import { Common as Common3 } from "@dxos/cli-util";
471
+ import { Operation as Operation4, Trigger as Trigger4 } from "@dxos/compute";
473
472
  import { Database as Database4, Filter as Filter4, JsonSchema as JsonSchema3, Ref as Ref4 } from "@dxos/echo";
474
- import { Trigger as Trigger4 } from "@dxos/functions";
475
- import { Operation as Operation4 } from "@dxos/operation";
476
473
  var timer = Command3.make("timer", {
477
474
  spaceId: Common3.spaceId.pipe(Options4.optional),
478
475
  enabled: Enabled,
@@ -524,36 +521,33 @@ var timer = Command3.make("timer", {
524
521
  });
525
522
  })).pipe(Command3.withDescription("Create a timer trigger."), Command3.provide(({ spaceId }) => spaceLayer3(spaceId, true)), Command3.provideEffectDiscard(() => withTypes3(Operation4.PersistentOperation, Trigger4.Trigger)));
526
523
 
527
- // src/cli/commands/trigger/create/index.ts
524
+ // src/commands/trigger/create/index.ts
528
525
  var create = Command4.make("create").pipe(Command4.withDescription("Create a trigger."), Command4.withSubcommands([
529
526
  subscription,
530
527
  timer,
531
528
  queue
532
529
  ]));
533
530
 
534
- // src/cli/commands/trigger/list.ts
531
+ // src/commands/trigger/list.ts
535
532
  import * as Command5 from "@effect/cli/Command";
536
533
  import * as Options5 from "@effect/cli/Options";
537
534
  import * as Console5 from "effect/Console";
538
535
  import * as Effect5 from "effect/Effect";
539
536
  import { CommandConfig as CommandConfig4, Common as Common4, printList, spaceIdWithDefault, spaceLayer as spaceLayer4 } from "@dxos/cli-util";
540
537
  import { ClientService } from "@dxos/client";
538
+ import { Trigger as Trigger5 } from "@dxos/compute";
541
539
  import { Context } from "@dxos/context";
542
- import { Database as Database5, Filter as Filter5 } from "@dxos/echo";
543
- import { Trigger as Trigger5 } from "@dxos/functions";
544
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-automation/src/cli/commands/trigger/list.ts";
540
+ import { Database as Database5, Filter as Filter5, Query as Query3 } from "@dxos/echo";
541
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-automation/src/commands/trigger/list.ts";
545
542
  var list = Command5.make("list", {
546
543
  spaceId: Common4.spaceId.pipe(Options5.optional)
547
544
  }, Effect5.fn(function* ({ spaceId: spaceIdOption }) {
548
545
  const { json } = yield* CommandConfig4;
549
- const triggers = yield* Database5.runQuery(Filter5.type(Trigger5.Trigger));
546
+ const triggers = yield* Database5.runQuery(Query3.select(Filter5.type(Trigger5.Trigger)).debugLabel("cli.trigger.list"));
550
547
  const remoteCronIds = yield* Effect5.gen(function* () {
551
548
  const client = yield* ClientService;
552
549
  const spaceId = yield* spaceIdWithDefault(spaceIdOption);
553
- const result = yield* Effect5.promise(() => client.edge.http.getCronTriggers(Context.default(void 0, {
554
- F: __dxlog_file,
555
- L: 33
556
- }), spaceId)).pipe(Effect5.catchAll(() => Effect5.succeed({
550
+ const result = yield* Effect5.promise(() => client.edge.http.getCronTriggers(Context.default(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 24 }), spaceId)).pipe(Effect5.catchAll(() => Effect5.succeed({
557
551
  cronIds: []
558
552
  })));
559
553
  return result.cronIds;
@@ -577,16 +571,15 @@ var list = Command5.make("list", {
577
571
  }
578
572
  })).pipe(Command5.withDescription("List triggers configured on EDGE."), Command5.provide(({ spaceId }) => spaceLayer4(spaceId, true)));
579
573
 
580
- // src/cli/commands/trigger/remove.ts
574
+ // src/commands/trigger/remove.ts
581
575
  import * as Command6 from "@effect/cli/Command";
582
576
  import * as Options6 from "@effect/cli/Options";
583
577
  import * as Console6 from "effect/Console";
584
578
  import * as Effect6 from "effect/Effect";
585
579
  import * as Option5 from "effect/Option";
586
580
  import { CommandConfig as CommandConfig5, Common as Common5, print as print4, spaceLayer as spaceLayer5, withTypes as withTypes4 } from "@dxos/cli-util";
587
- import { DXN as DXN2 } from "@dxos/echo";
588
- import { Database as Database6 } from "@dxos/echo";
589
- import { Trigger as Trigger6 } from "@dxos/functions";
581
+ import { Trigger as Trigger6 } from "@dxos/compute";
582
+ import { Database as Database6, DXN as DXN2 } from "@dxos/echo";
590
583
  var remove = Command6.make("remove", {
591
584
  spaceId: Common5.spaceId.pipe(Options6.optional),
592
585
  id: TriggerId.pipe(Options6.optional)
@@ -609,10 +602,10 @@ var remove = Command6.make("remove", {
609
602
  }
610
603
  })).pipe(Command6.withDescription("Remove a trigger."), Command6.provide(({ spaceId }) => spaceLayer5(spaceId, true)), Command6.provideEffectDiscard(() => withTypes4(Trigger6.Trigger)));
611
604
 
612
- // src/cli/commands/trigger/update/index.ts
605
+ // src/commands/trigger/update/index.ts
613
606
  import * as Command10 from "@effect/cli/Command";
614
607
 
615
- // src/cli/commands/trigger/update/queue.ts
608
+ // src/commands/trigger/update/queue.ts
616
609
  import * as Command7 from "@effect/cli/Command";
617
610
  import * as Options7 from "@effect/cli/Options";
618
611
  import * as Prompt5 from "@effect/cli/Prompt";
@@ -622,9 +615,8 @@ import * as Option6 from "effect/Option";
622
615
  import { CommandConfig as CommandConfig6 } from "@dxos/cli-util";
623
616
  import { flushAndSync as flushAndSync4, print as print5, spaceLayer as spaceLayer6, withTypes as withTypes5 } from "@dxos/cli-util";
624
617
  import { Common as Common6 } from "@dxos/cli-util";
618
+ import { Operation as Operation5, Trigger as Trigger7 } from "@dxos/compute";
625
619
  import { DXN as DXN3, Database as Database7, Filter as Filter6, JsonSchema as JsonSchema4, Obj as Obj2, Ref as Ref5 } from "@dxos/echo";
626
- import { Trigger as Trigger7 } from "@dxos/functions";
627
- import { Operation as Operation5 } from "@dxos/operation";
628
620
  var queue2 = Command7.make("queue", {
629
621
  spaceId: Common6.spaceId.pipe(Options7.optional),
630
622
  id: TriggerId.pipe(Options7.optional),
@@ -679,7 +671,7 @@ var updateFunction = Effect7.fn(function* (trigger2, functionIdOption) {
679
671
  if (!foundFn || !Obj2.instanceOf(Operation5.PersistentOperation, foundFn)) {
680
672
  return yield* Effect7.fail(new Error(`Function not found: ${functionId}`));
681
673
  }
682
- Obj2.change(trigger2, (trigger3) => {
674
+ Obj2.update(trigger2, (trigger3) => {
683
675
  trigger3.function = Ref5.make(foundFn);
684
676
  });
685
677
  currentFn = foundFn;
@@ -701,13 +693,13 @@ var updateQueue = Effect7.fn(function* (trigger2, queueOption) {
701
693
  onSome: () => Effect7.succeed(true)
702
694
  });
703
695
  if (shouldChangeQueue) {
704
- const queueDxn = yield* Option6.match(queueOption, {
696
+ const queueDXN = yield* Option6.match(queueOption, {
705
697
  onNone: () => selectQueue(),
706
698
  onSome: (dxn) => Effect7.succeed(dxn.toString())
707
699
  });
708
- Obj2.change(trigger2, (trigger3) => {
700
+ Obj2.update(trigger2, (trigger3) => {
709
701
  if (trigger3.spec?.kind === "queue") {
710
- trigger3.spec.queue = queueDxn;
702
+ trigger3.spec.queue = queueDXN;
711
703
  }
712
704
  });
713
705
  }
@@ -730,7 +722,7 @@ var updateInput = Effect7.fn(function* (trigger2, fn6, inputOption) {
730
722
  onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema4.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
731
723
  onSome: (value2) => Effect7.succeed(value2)
732
724
  });
733
- Obj2.change(trigger2, (trigger3) => {
725
+ Obj2.update(trigger2, (trigger3) => {
734
726
  trigger3.input = inputObj;
735
727
  });
736
728
  }
@@ -743,12 +735,12 @@ var updateEnabled = Effect7.fn(function* (trigger2, idOption, enabled) {
743
735
  }).pipe(Prompt5.run),
744
736
  onSome: () => Effect7.succeed(enabled)
745
737
  });
746
- Obj2.change(trigger2, (trigger3) => {
738
+ Obj2.update(trigger2, (trigger3) => {
747
739
  trigger3.enabled = enabledValue;
748
740
  });
749
741
  });
750
742
 
751
- // src/cli/commands/trigger/update/subscription.ts
743
+ // src/commands/trigger/update/subscription.ts
752
744
  import * as Command8 from "@effect/cli/Command";
753
745
  import * as Options8 from "@effect/cli/Options";
754
746
  import * as Prompt6 from "@effect/cli/Prompt";
@@ -759,9 +751,8 @@ import * as Option7 from "effect/Option";
759
751
  import { CommandConfig as CommandConfig7 } from "@dxos/cli-util";
760
752
  import { flushAndSync as flushAndSync5, print as print6, spaceLayer as spaceLayer7, withTypes as withTypes6 } from "@dxos/cli-util";
761
753
  import { Common as Common7 } from "@dxos/cli-util";
762
- import { DXN as DXN4, Database as Database8, Filter as Filter7, JsonSchema as JsonSchema5, Obj as Obj3, Query as Query2, Ref as Ref6 } from "@dxos/echo";
763
- import { Trigger as Trigger8 } from "@dxos/functions";
764
- import { Operation as Operation6 } from "@dxos/operation";
754
+ import { Operation as Operation6, Trigger as Trigger8 } from "@dxos/compute";
755
+ import { DXN as DXN4, Database as Database8, Filter as Filter7, JsonSchema as JsonSchema5, Obj as Obj3, Query as Query4, Ref as Ref6 } from "@dxos/echo";
765
756
  var subscription2 = Command8.make("subscription", {
766
757
  spaceId: Common7.spaceId.pipe(Options8.optional),
767
758
  id: TriggerId.pipe(Options8.optional),
@@ -828,7 +819,7 @@ var updateFunction2 = Effect8.fn(function* (trigger2, functionIdOption) {
828
819
  if (!foundFn || !Obj3.instanceOf(Operation6.PersistentOperation, foundFn)) {
829
820
  return yield* Effect8.fail(new Error(`Function not found: ${functionId}`));
830
821
  }
831
- Obj3.change(trigger2, (trigger3) => {
822
+ Obj3.update(trigger2, (trigger3) => {
832
823
  trigger3.function = Ref6.make(foundFn);
833
824
  });
834
825
  currentFn = foundFn;
@@ -868,7 +859,7 @@ var updateSpec = Effect8.fn(function* (trigger2, typenameOption, deepOption, del
868
859
  }).pipe(Prompt6.run),
869
860
  onSome: (value2) => Effect8.succeed(value2)
870
861
  });
871
- const queryAst = Query2.select(Filter7.type(typename)).ast;
862
+ const queryAst = Query4.select(Filter7.type(typename)).ast;
872
863
  const deepOptionValue = yield* Option7.match(deepOption, {
873
864
  onNone: () => Prompt6.confirm({
874
865
  message: "Watch changes to nested properties (deep)?",
@@ -893,7 +884,7 @@ var updateSpec = Effect8.fn(function* (trigger2, typenameOption, deepOption, del
893
884
  if (Option7.isSome(delayOptionValue)) {
894
885
  subscriptionOptions.delay = delayOptionValue.value;
895
886
  }
896
- Obj3.change(trigger2, (trigger3) => {
887
+ Obj3.update(trigger2, (trigger3) => {
897
888
  const spec = trigger3.spec;
898
889
  if (spec?.kind === "subscription") {
899
890
  spec.query = {
@@ -922,7 +913,7 @@ var updateInput2 = Effect8.fn(function* (trigger2, fn6, inputOption) {
922
913
  onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema5.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
923
914
  onSome: (value2) => Effect8.succeed(value2)
924
915
  });
925
- Obj3.change(trigger2, (trigger3) => {
916
+ Obj3.update(trigger2, (trigger3) => {
926
917
  trigger3.input = inputObj;
927
918
  });
928
919
  }
@@ -935,12 +926,12 @@ var updateEnabled2 = Effect8.fn(function* (trigger2, idOption, enabled) {
935
926
  }).pipe(Prompt6.run),
936
927
  onSome: () => Effect8.succeed(enabled)
937
928
  });
938
- Obj3.change(trigger2, (trigger3) => {
929
+ Obj3.update(trigger2, (trigger3) => {
939
930
  trigger3.enabled = enabledValue;
940
931
  });
941
932
  });
942
933
 
943
- // src/cli/commands/trigger/update/timer.ts
934
+ // src/commands/trigger/update/timer.ts
944
935
  import * as Command9 from "@effect/cli/Command";
945
936
  import * as Options9 from "@effect/cli/Options";
946
937
  import * as Prompt7 from "@effect/cli/Prompt";
@@ -950,9 +941,8 @@ import * as Option8 from "effect/Option";
950
941
  import { CommandConfig as CommandConfig8 } from "@dxos/cli-util";
951
942
  import { flushAndSync as flushAndSync6, print as print7, spaceLayer as spaceLayer8, withTypes as withTypes7 } from "@dxos/cli-util";
952
943
  import { Common as Common8 } from "@dxos/cli-util";
944
+ import { Operation as Operation7, Trigger as Trigger9 } from "@dxos/compute";
953
945
  import { DXN as DXN5, Database as Database9, Filter as Filter8, JsonSchema as JsonSchema6, Obj as Obj4, Ref as Ref7 } from "@dxos/echo";
954
- import { Trigger as Trigger9 } from "@dxos/functions";
955
- import { Operation as Operation7 } from "@dxos/operation";
956
946
  var timer2 = Command9.make("timer", {
957
947
  spaceId: Common8.spaceId.pipe(Options9.optional),
958
948
  id: TriggerId.pipe(Options9.optional),
@@ -1007,7 +997,7 @@ var updateFunction3 = Effect9.fn(function* (trigger2, functionIdOption) {
1007
997
  if (!foundFn || !Obj4.instanceOf(Operation7.PersistentOperation, foundFn)) {
1008
998
  return yield* Effect9.fail(new Error(`Function not found: ${functionId}`));
1009
999
  }
1010
- Obj4.change(trigger2, (trigger3) => {
1000
+ Obj4.update(trigger2, (trigger3) => {
1011
1001
  trigger3.function = Ref7.make(foundFn);
1012
1002
  });
1013
1003
  currentFn = foundFn;
@@ -1034,7 +1024,7 @@ var updateCron = Effect9.fn(function* (trigger2, cronOption) {
1034
1024
  }).pipe(Prompt7.run),
1035
1025
  onSome: (value2) => Effect9.succeed(value2)
1036
1026
  });
1037
- Obj4.change(trigger2, (trigger3) => {
1027
+ Obj4.update(trigger2, (trigger3) => {
1038
1028
  if (trigger3.spec?.kind === "timer") {
1039
1029
  trigger3.spec.cron = cron;
1040
1030
  }
@@ -1059,7 +1049,7 @@ var updateInput3 = Effect9.fn(function* (trigger2, fn6, inputOption) {
1059
1049
  onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema6.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
1060
1050
  onSome: (value2) => Effect9.succeed(value2)
1061
1051
  });
1062
- Obj4.change(trigger2, (trigger3) => {
1052
+ Obj4.update(trigger2, (trigger3) => {
1063
1053
  trigger3.input = inputObj;
1064
1054
  });
1065
1055
  }
@@ -1072,19 +1062,19 @@ var updateEnabled3 = Effect9.fn(function* (trigger2, idOption, enabled) {
1072
1062
  }).pipe(Prompt7.run),
1073
1063
  onSome: () => Effect9.succeed(enabled)
1074
1064
  });
1075
- Obj4.change(trigger2, (trigger3) => {
1065
+ Obj4.update(trigger2, (trigger3) => {
1076
1066
  trigger3.enabled = enabledValue;
1077
1067
  });
1078
1068
  });
1079
1069
 
1080
- // src/cli/commands/trigger/update/index.ts
1070
+ // src/commands/trigger/update/index.ts
1081
1071
  var update = Command10.make("update").pipe(Command10.withDescription("Update a trigger."), Command10.withSubcommands([
1082
1072
  subscription2,
1083
1073
  timer2,
1084
1074
  queue2
1085
1075
  ]));
1086
1076
 
1087
- // src/cli/commands/trigger/index.ts
1077
+ // src/commands/trigger/index.ts
1088
1078
  var trigger = Command11.make("trigger").pipe(Command11.withDescription("Manage EDGE triggers."), Command11.withSubcommands([
1089
1079
  create,
1090
1080
  list,
@@ -1092,11 +1082,21 @@ var trigger = Command11.make("trigger").pipe(Command11.withDescription("Manage E
1092
1082
  update
1093
1083
  ]));
1094
1084
 
1095
- // src/cli/plugin.ts
1096
- var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addCommandModule({
1085
+ // src/AutomationPlugin.node.ts
1086
+ var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
1087
+ activate: AppGraphBuilder
1088
+ }), AppPlugin.addCommandModule({
1097
1089
  commands: [
1098
1090
  trigger
1099
1091
  ]
1092
+ }), AppPlugin.addOperationHandlerModule({
1093
+ activate: OperationHandler
1094
+ }), AppPlugin.addSchemaModule({
1095
+ schema: [
1096
+ Operation8.PersistentOperation,
1097
+ Trigger10.Trigger,
1098
+ Trace.Message
1099
+ ]
1100
1100
  }), Plugin.addModule({
1101
1101
  activatesOn: ClientEvents.ClientReady,
1102
1102
  firesAfterActivation: [
@@ -1104,7 +1104,9 @@ var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addCommandModule({
1104
1104
  ],
1105
1105
  activate: ComputeRuntime
1106
1106
  }), Plugin.make);
1107
+ var AutomationPlugin_node_default = AutomationPlugin;
1107
1108
  export {
1108
- AutomationPlugin
1109
+ AutomationPlugin,
1110
+ AutomationPlugin_node_default as default
1109
1111
  };
1110
- //# sourceMappingURL=index.mjs.map
1112
+ //# sourceMappingURL=AutomationPlugin.node.mjs.map