@dxos/plugin-automation 0.8.4-main.7ace549 → 0.8.4-main.9735255

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 (275) hide show
  1. package/dist/lib/browser/AutomationPanel-FAS6ADCW.mjs +11 -0
  2. package/dist/lib/browser/AutomationSettings-XN2OIYWL.mjs +56 -0
  3. package/dist/lib/browser/AutomationSettings-XN2OIYWL.mjs.map +7 -0
  4. package/dist/lib/browser/FunctionsContainer-6QLC7JP4.mjs +129 -0
  5. package/dist/lib/browser/FunctionsContainer-6QLC7JP4.mjs.map +7 -0
  6. package/dist/lib/browser/{FunctionsPanel-CRW6SJUN.mjs → FunctionsPanel-ZX4J75UM.mjs} +3 -3
  7. package/dist/lib/browser/app-graph-builder-LAQMEBMH.mjs +84 -0
  8. package/dist/lib/browser/app-graph-builder-LAQMEBMH.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-CZVA5NMD.mjs → chunk-54PANILA.mjs} +5 -5
  10. package/dist/lib/browser/chunk-BFUIVUQH.mjs +102 -0
  11. package/dist/lib/browser/chunk-BFUIVUQH.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-BKFQBKYO.mjs +8 -0
  13. package/dist/lib/browser/chunk-BKFQBKYO.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-JOXPQ27I.mjs +83 -0
  15. package/dist/lib/browser/chunk-JOXPQ27I.mjs.map +7 -0
  16. package/dist/lib/browser/{chunk-LZQFZO3B.mjs → chunk-PZNBEKO5.mjs} +1 -1
  17. package/dist/lib/browser/chunk-PZNBEKO5.mjs.map +7 -0
  18. package/dist/lib/browser/chunk-QW3EM35H.mjs +248 -0
  19. package/dist/lib/browser/chunk-QW3EM35H.mjs.map +7 -0
  20. package/dist/lib/browser/{chunk-4MBM6C6A.mjs → chunk-RAF2FJST.mjs} +14 -28
  21. package/dist/lib/browser/chunk-RAF2FJST.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-YWLEY2FD.mjs +200 -0
  23. package/dist/lib/browser/chunk-YWLEY2FD.mjs.map +7 -0
  24. package/dist/lib/browser/cli/index.mjs +1107 -0
  25. package/dist/lib/browser/cli/index.mjs.map +7 -0
  26. package/dist/lib/browser/compute-runtime-WTWLQ67J.mjs +114 -0
  27. package/dist/lib/browser/compute-runtime-WTWLQ67J.mjs.map +7 -0
  28. package/dist/lib/browser/hooks/index.mjs +3 -3
  29. package/dist/lib/browser/index.mjs +49 -57
  30. package/dist/lib/browser/index.mjs.map +4 -4
  31. package/dist/lib/browser/meta.json +1 -1
  32. package/dist/lib/browser/operation-resolver-Q3MWOR7K.mjs +82 -0
  33. package/dist/lib/browser/operation-resolver-Q3MWOR7K.mjs.map +7 -0
  34. package/dist/lib/browser/{react-surface-TKU2EQ5A.mjs → react-surface-EV3AC62F.mjs} +12 -11
  35. package/dist/lib/browser/react-surface-EV3AC62F.mjs.map +7 -0
  36. package/dist/lib/browser/types/index.mjs +10 -4
  37. package/dist/lib/node-esm/{AutomationPanel-F5CTC6AT.mjs → AutomationPanel-B7NAGDFA.mjs} +4 -4
  38. package/dist/lib/node-esm/AutomationSettings-M5PMZJ6P.mjs +57 -0
  39. package/dist/lib/node-esm/AutomationSettings-M5PMZJ6P.mjs.map +7 -0
  40. package/dist/lib/node-esm/FunctionsContainer-J4O2ULWR.mjs +130 -0
  41. package/dist/lib/node-esm/FunctionsContainer-J4O2ULWR.mjs.map +7 -0
  42. package/dist/lib/node-esm/{FunctionsPanel-RVVCS6VH.mjs → FunctionsPanel-SS6GIVNU.mjs} +3 -3
  43. package/dist/lib/node-esm/app-graph-builder-4UCMXHYY.mjs +85 -0
  44. package/dist/lib/node-esm/app-graph-builder-4UCMXHYY.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-2CKVH7JC.mjs +201 -0
  46. package/dist/lib/node-esm/chunk-2CKVH7JC.mjs.map +7 -0
  47. package/dist/lib/node-esm/{chunk-CEVIVRTY.mjs → chunk-5FXNN3MV.mjs} +1 -1
  48. package/dist/lib/node-esm/chunk-5FXNN3MV.mjs.map +7 -0
  49. package/dist/lib/node-esm/{chunk-3IYSC75Z.mjs → chunk-7QRUPEHH.mjs} +5 -5
  50. package/dist/lib/node-esm/{chunk-7B6NAAI6.mjs → chunk-HQLVREIX.mjs} +14 -28
  51. package/dist/lib/node-esm/chunk-HQLVREIX.mjs.map +7 -0
  52. package/dist/lib/node-esm/chunk-K7GCM342.mjs +10 -0
  53. package/dist/lib/node-esm/chunk-K7GCM342.mjs.map +7 -0
  54. package/dist/lib/node-esm/chunk-KWKWOGS5.mjs +103 -0
  55. package/dist/lib/node-esm/chunk-KWKWOGS5.mjs.map +7 -0
  56. package/dist/lib/node-esm/chunk-LJAXQ6CX.mjs +249 -0
  57. package/dist/lib/node-esm/chunk-LJAXQ6CX.mjs.map +7 -0
  58. package/dist/lib/node-esm/chunk-RX52VKI2.mjs +84 -0
  59. package/dist/lib/node-esm/chunk-RX52VKI2.mjs.map +7 -0
  60. package/dist/lib/node-esm/cli/index.mjs +1108 -0
  61. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  62. package/dist/lib/node-esm/compute-runtime-ZHROOBLY.mjs +115 -0
  63. package/dist/lib/node-esm/compute-runtime-ZHROOBLY.mjs.map +7 -0
  64. package/dist/lib/node-esm/hooks/index.mjs +3 -3
  65. package/dist/lib/node-esm/index.mjs +49 -57
  66. package/dist/lib/node-esm/index.mjs.map +4 -4
  67. package/dist/lib/node-esm/meta.json +1 -1
  68. package/dist/lib/node-esm/operation-resolver-R5GA4YNO.mjs +83 -0
  69. package/dist/lib/node-esm/operation-resolver-R5GA4YNO.mjs.map +7 -0
  70. package/dist/lib/node-esm/{react-surface-7QROSEGH.mjs → react-surface-S6VZJCEZ.mjs} +12 -11
  71. package/dist/lib/node-esm/react-surface-S6VZJCEZ.mjs.map +7 -0
  72. package/dist/lib/node-esm/types/index.mjs +10 -4
  73. package/dist/types/src/AutomationPlugin.d.ts +2 -1
  74. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  76. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  78. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +6 -0
  80. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/compute-runtime/index.d.ts +3 -0
  82. package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/index.d.ts +4 -5
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  86. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  88. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  90. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  92. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  93. package/dist/types/src/cli/commands/index.d.ts +2 -0
  94. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  95. package/dist/types/src/cli/commands/trigger/create/index.d.ts +25 -0
  96. package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +1 -0
  97. package/dist/types/src/cli/commands/trigger/create/queue.d.ts +13 -0
  98. package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +1 -0
  99. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts +15 -0
  100. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +1 -0
  101. package/dist/types/src/cli/commands/trigger/create/timer.d.ts +13 -0
  102. package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +1 -0
  103. package/dist/types/src/cli/commands/trigger/index.d.ts +57 -0
  104. package/dist/types/src/cli/commands/trigger/index.d.ts.map +1 -0
  105. package/dist/types/src/cli/commands/trigger/list.d.ts +7 -0
  106. package/dist/types/src/cli/commands/trigger/list.d.ts.map +1 -0
  107. package/dist/types/src/cli/commands/trigger/options.d.ts +11 -0
  108. package/dist/types/src/cli/commands/trigger/options.d.ts.map +1 -0
  109. package/dist/types/src/cli/commands/trigger/remove.d.ts +8 -0
  110. package/dist/types/src/cli/commands/trigger/remove.d.ts.map +1 -0
  111. package/dist/types/src/cli/commands/trigger/update/index.d.ts +28 -0
  112. package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +1 -0
  113. package/dist/types/src/cli/commands/trigger/update/queue.d.ts +12 -0
  114. package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +1 -0
  115. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts +13 -0
  116. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +1 -0
  117. package/dist/types/src/cli/commands/trigger/update/timer.d.ts +11 -0
  118. package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +1 -0
  119. package/dist/types/src/cli/commands/trigger/util.d.ts +46 -0
  120. package/dist/types/src/cli/commands/trigger/util.d.ts.map +1 -0
  121. package/dist/types/src/cli/index.d.ts +2 -0
  122. package/dist/types/src/cli/index.d.ts.map +1 -0
  123. package/dist/types/src/cli/plugin.d.ts +3 -0
  124. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  125. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
  126. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  127. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +1 -0
  128. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  129. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  130. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -1
  131. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +10 -7
  132. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  133. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
  134. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  135. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +7 -6
  136. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  137. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +70 -2
  138. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  139. package/dist/types/src/components/TriggerSettings.d.ts +3 -3
  140. package/dist/types/src/components/TriggerSettings.d.ts.map +1 -1
  141. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +6 -6
  142. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
  143. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +2 -2
  144. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
  145. package/dist/types/src/index.d.ts +1 -2
  146. package/dist/types/src/index.d.ts.map +1 -1
  147. package/dist/types/src/meta.d.ts +2 -2
  148. package/dist/types/src/meta.d.ts.map +1 -1
  149. package/dist/types/src/testing/test-functions.d.ts +202 -2
  150. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  151. package/dist/types/src/translations.d.ts +1 -0
  152. package/dist/types/src/translations.d.ts.map +1 -1
  153. package/dist/types/src/types/capabilities.d.ts +22 -0
  154. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  155. package/dist/types/src/types/events.d.ts +5 -0
  156. package/dist/types/src/types/events.d.ts.map +1 -0
  157. package/dist/types/src/types/index.d.ts +2 -0
  158. package/dist/types/src/types/index.d.ts.map +1 -1
  159. package/dist/types/src/types/schema.d.ts +30 -1
  160. package/dist/types/src/types/schema.d.ts.map +1 -1
  161. package/dist/types/tsconfig.tsbuildinfo +1 -1
  162. package/package.json +61 -49
  163. package/src/AutomationPlugin.tsx +13 -33
  164. package/src/capabilities/app-graph-builder/app-graph-builder.ts +71 -0
  165. package/src/capabilities/app-graph-builder/index.ts +7 -0
  166. package/src/capabilities/{compute-runtime.ts → compute-runtime/compute-runtime.ts} +48 -44
  167. package/src/capabilities/compute-runtime/index.ts +7 -0
  168. package/src/capabilities/index.ts +4 -8
  169. package/src/capabilities/operation-resolver/index.ts +7 -0
  170. package/src/capabilities/operation-resolver/operation-resolver.ts +79 -0
  171. package/src/capabilities/react-surface/index.ts +7 -0
  172. package/src/capabilities/react-surface/react-surface.tsx +60 -0
  173. package/src/cli/commands/index.ts +5 -0
  174. package/src/cli/commands/trigger/create/index.ts +14 -0
  175. package/src/cli/commands/trigger/create/queue.ts +89 -0
  176. package/src/cli/commands/trigger/create/subscription.ts +128 -0
  177. package/src/cli/commands/trigger/create/timer.ts +93 -0
  178. package/src/cli/commands/trigger/index.ts +16 -0
  179. package/src/cli/commands/trigger/list.ts +67 -0
  180. package/src/cli/commands/trigger/options.ts +59 -0
  181. package/src/cli/commands/trigger/remove.ts +45 -0
  182. package/src/cli/commands/trigger/update/index.ts +14 -0
  183. package/src/cli/commands/trigger/update/queue.ts +195 -0
  184. package/src/cli/commands/trigger/update/subscription.ts +278 -0
  185. package/src/cli/commands/trigger/update/timer.ts +193 -0
  186. package/src/cli/commands/trigger/util.ts +395 -0
  187. package/src/cli/index.ts +5 -0
  188. package/src/cli/plugin.ts +23 -0
  189. package/src/components/AutomationPanel/AutomationPanel.tsx +33 -12
  190. package/src/components/AutomationSettings.tsx +1 -1
  191. package/src/components/FunctionsPanel/FunctionsPanel.tsx +11 -16
  192. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +8 -24
  193. package/src/components/TriggerEditor/FunctionInputEditor.tsx +23 -31
  194. package/src/components/TriggerEditor/SpecSelector.tsx +8 -6
  195. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +27 -24
  196. package/src/components/TriggerEditor/TriggerEditor.tsx +55 -42
  197. package/src/components/TriggerSettings.tsx +3 -3
  198. package/src/hooks/useComputeRuntimeCallback.ts +9 -10
  199. package/src/hooks/useTriggerRuntimeControls.ts +7 -7
  200. package/src/index.ts +1 -2
  201. package/src/meta.ts +2 -2
  202. package/src/translations.ts +2 -0
  203. package/src/{capabilities → types}/capabilities.ts +8 -7
  204. package/src/types/events.ts +11 -0
  205. package/src/types/index.ts +2 -0
  206. package/src/types/schema.ts +23 -2
  207. package/dist/lib/browser/AutomationPanel-M4M77L4V.mjs +0 -11
  208. package/dist/lib/browser/AutomationSettings-4HCI6KJR.mjs +0 -68
  209. package/dist/lib/browser/AutomationSettings-4HCI6KJR.mjs.map +0 -7
  210. package/dist/lib/browser/FunctionsContainer-CDVBRQCT.mjs +0 -144
  211. package/dist/lib/browser/FunctionsContainer-CDVBRQCT.mjs.map +0 -7
  212. package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs +0 -81
  213. package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs.map +0 -7
  214. package/dist/lib/browser/chunk-4MBM6C6A.mjs.map +0 -7
  215. package/dist/lib/browser/chunk-7W6QMY3L.mjs +0 -267
  216. package/dist/lib/browser/chunk-7W6QMY3L.mjs.map +0 -7
  217. package/dist/lib/browser/chunk-LZQFZO3B.mjs.map +0 -7
  218. package/dist/lib/browser/chunk-T6ZESHDY.mjs +0 -191
  219. package/dist/lib/browser/chunk-T6ZESHDY.mjs.map +0 -7
  220. package/dist/lib/browser/chunk-TWWFNOIR.mjs +0 -109
  221. package/dist/lib/browser/chunk-TWWFNOIR.mjs.map +0 -7
  222. package/dist/lib/browser/chunk-XAKZ4ANY.mjs +0 -15
  223. package/dist/lib/browser/chunk-XAKZ4ANY.mjs.map +0 -7
  224. package/dist/lib/browser/chunk-YBPJCY3F.mjs +0 -38
  225. package/dist/lib/browser/chunk-YBPJCY3F.mjs.map +0 -7
  226. package/dist/lib/browser/compute-runtime-B4XJVY4Y.mjs +0 -113
  227. package/dist/lib/browser/compute-runtime-B4XJVY4Y.mjs.map +0 -7
  228. package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs +0 -77
  229. package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs.map +0 -7
  230. package/dist/lib/browser/react-surface-TKU2EQ5A.mjs.map +0 -7
  231. package/dist/lib/node-esm/AutomationSettings-BQLJIFRT.mjs +0 -69
  232. package/dist/lib/node-esm/AutomationSettings-BQLJIFRT.mjs.map +0 -7
  233. package/dist/lib/node-esm/FunctionsContainer-ZHHJPQAZ.mjs +0 -145
  234. package/dist/lib/node-esm/FunctionsContainer-ZHHJPQAZ.mjs.map +0 -7
  235. package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs +0 -82
  236. package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs.map +0 -7
  237. package/dist/lib/node-esm/chunk-7B6NAAI6.mjs.map +0 -7
  238. package/dist/lib/node-esm/chunk-CEVIVRTY.mjs.map +0 -7
  239. package/dist/lib/node-esm/chunk-CF2SWXPW.mjs +0 -268
  240. package/dist/lib/node-esm/chunk-CF2SWXPW.mjs.map +0 -7
  241. package/dist/lib/node-esm/chunk-ECJKIUBO.mjs +0 -39
  242. package/dist/lib/node-esm/chunk-ECJKIUBO.mjs.map +0 -7
  243. package/dist/lib/node-esm/chunk-F76XVENA.mjs +0 -192
  244. package/dist/lib/node-esm/chunk-F76XVENA.mjs.map +0 -7
  245. package/dist/lib/node-esm/chunk-KB7NFEYY.mjs +0 -16
  246. package/dist/lib/node-esm/chunk-KB7NFEYY.mjs.map +0 -7
  247. package/dist/lib/node-esm/chunk-RVK52XGK.mjs +0 -110
  248. package/dist/lib/node-esm/chunk-RVK52XGK.mjs.map +0 -7
  249. package/dist/lib/node-esm/compute-runtime-JUWTQXOV.mjs +0 -114
  250. package/dist/lib/node-esm/compute-runtime-JUWTQXOV.mjs.map +0 -7
  251. package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs +0 -78
  252. package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs.map +0 -7
  253. package/dist/lib/node-esm/react-surface-7QROSEGH.mjs.map +0 -7
  254. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  255. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  256. package/dist/types/src/capabilities/capabilities.d.ts +0 -20
  257. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  258. package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
  259. package/dist/types/src/capabilities/compute-runtime.d.ts.map +0 -1
  260. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  261. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  262. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  263. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  264. package/dist/types/src/events.d.ts +0 -4
  265. package/dist/types/src/events.d.ts.map +0 -1
  266. package/src/capabilities/app-graph-builder.ts +0 -87
  267. package/src/capabilities/intent-resolver.ts +0 -72
  268. package/src/capabilities/react-surface.tsx +0 -56
  269. package/src/events.ts +0 -11
  270. /package/dist/lib/browser/{AutomationPanel-M4M77L4V.mjs.map → AutomationPanel-FAS6ADCW.mjs.map} +0 -0
  271. /package/dist/lib/browser/{FunctionsPanel-CRW6SJUN.mjs.map → FunctionsPanel-ZX4J75UM.mjs.map} +0 -0
  272. /package/dist/lib/browser/{chunk-CZVA5NMD.mjs.map → chunk-54PANILA.mjs.map} +0 -0
  273. /package/dist/lib/node-esm/{AutomationPanel-F5CTC6AT.mjs.map → AutomationPanel-B7NAGDFA.mjs.map} +0 -0
  274. /package/dist/lib/node-esm/{FunctionsPanel-RVVCS6VH.mjs.map → FunctionsPanel-SS6GIVNU.mjs.map} +0 -0
  275. /package/dist/lib/node-esm/{chunk-3IYSC75Z.mjs.map → chunk-7QRUPEHH.mjs.map} +0 -0
@@ -0,0 +1,11 @@
1
+ import {
2
+ AutomationPanel,
3
+ AutomationPanel_default
4
+ } from "./chunk-YWLEY2FD.mjs";
5
+ import "./chunk-QW3EM35H.mjs";
6
+ import "./chunk-PZNBEKO5.mjs";
7
+ export {
8
+ AutomationPanel,
9
+ AutomationPanel_default as default
10
+ };
11
+ //# sourceMappingURL=AutomationPanel-FAS6ADCW.mjs.map
@@ -0,0 +1,56 @@
1
+ import {
2
+ useTriggerRuntimeControls
3
+ } from "./chunk-RAF2FJST.mjs";
4
+ import "./chunk-JOXPQ27I.mjs";
5
+ import {
6
+ AutomationPanel
7
+ } from "./chunk-YWLEY2FD.mjs";
8
+ import "./chunk-QW3EM35H.mjs";
9
+ import {
10
+ meta
11
+ } from "./chunk-PZNBEKO5.mjs";
12
+
13
+ // src/components/AutomationSettings.tsx
14
+ import React2 from "react";
15
+ import { useTranslation as useTranslation2 } from "@dxos/react-ui";
16
+ import { ControlPage, ControlSection } from "@dxos/react-ui-form";
17
+
18
+ // src/components/TriggerSettings.tsx
19
+ import React from "react";
20
+ import { Input, useTranslation } from "@dxos/react-ui";
21
+ import { ControlItemInput } from "@dxos/react-ui-form";
22
+ var TriggersSettings = ({ db }) => {
23
+ const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(db);
24
+ const { t } = useTranslation(meta.id);
25
+ return /* @__PURE__ */ React.createElement("div", {
26
+ className: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
27
+ }, /* @__PURE__ */ React.createElement(ControlItemInput, {
28
+ title: t("runtime label"),
29
+ description: t("runtime description")
30
+ }, /* @__PURE__ */ React.createElement(Input.Switch, {
31
+ classNames: "justify-self-end",
32
+ checked: isRunning,
33
+ onCheckedChange: isRunning ? stop : start
34
+ })));
35
+ };
36
+
37
+ // src/components/AutomationSettings.tsx
38
+ var AutomationSettings = (props) => {
39
+ const { t } = useTranslation2(meta.id);
40
+ return /* @__PURE__ */ React2.createElement(ControlPage, null, /* @__PURE__ */ React2.createElement(ControlSection, {
41
+ title: t("automation verbose label", {
42
+ ns: meta.id
43
+ }),
44
+ description: t("automation description", {
45
+ ns: meta.id
46
+ })
47
+ }, /* @__PURE__ */ React2.createElement(AutomationPanel, props), /* @__PURE__ */ React2.createElement(TriggersSettings, {
48
+ db: props.space.db
49
+ })));
50
+ };
51
+ var AutomationSettings_default = AutomationSettings;
52
+ export {
53
+ AutomationSettings,
54
+ AutomationSettings_default as default
55
+ };
56
+ //# sourceMappingURL=AutomationSettings-XN2OIYWL.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/AutomationSettings.tsx", "../../../src/components/TriggerSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { TriggersSettings } from './TriggerSettings';\n\nexport const AutomationSettings = (props: AutomationPanelProps) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: meta.id })}\n description={t('automation description', { ns: meta.id })}\n >\n <AutomationPanel {...props} />\n <TriggersSettings db={props.space.db} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default AutomationSettings;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Database } from '@dxos/echo';\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { ControlItemInput } from '@dxos/react-ui-form';\n\nimport { useTriggerRuntimeControls } from '../hooks';\nimport { meta } from '../meta';\n\nexport const TriggersSettings = ({ db }: { db: Database.Database }) => {\n const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(db);\n const { t } = useTranslation(meta.id);\n\n return (\n <div className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>\n <ControlItemInput title={t('runtime label')} description={t('runtime description')}>\n <Input.Switch classNames='justify-self-end' checked={isRunning} onCheckedChange={isRunning ? stop : start} />\n </ControlItemInput>\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;;;ACH5C,OAAOC,WAAW;AAGlB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,wBAAwB;AAK1B,IAAMC,mBAAmB,CAAC,EAAEC,GAAE,MAA6B;AAChE,QAAM,EAAEC,UAAUC,WAAWC,OAAOC,KAAI,IAAKC,0BAA0BL,EAAAA;AACvE,QAAM,EAAEM,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,SACE,sBAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,kBAAAA;IAAiBC,OAAOP,EAAE,eAAA;IAAkBQ,aAAaR,EAAE,qBAAA;KAC1D,sBAAA,cAACS,MAAMC,QAAM;IAACC,YAAW;IAAmBC,SAAShB;IAAWiB,iBAAiBjB,YAAYE,OAAOD;;AAI5G;;;ADVO,IAAMiB,qBAAqB,CAACC,UAAAA;AACjC,QAAM,EAAEC,EAAC,IAAKC,gBAAeC,KAAKC,EAAE;AACpC,SACE,gBAAAC,OAAA,cAACC,aAAAA,MACC,gBAAAD,OAAA,cAACE,gBAAAA;IACCC,OAAOP,EAAE,4BAA4B;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;IACnDM,aAAaT,EAAE,0BAA0B;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;KAEvD,gBAAAC,OAAA,cAACM,iBAAoBX,KAAAA,GACrB,gBAAAK,OAAA,cAACO,kBAAAA;IAAiBC,IAAIb,MAAMc,MAAMD;;AAI1C;AAEA,IAAA,6BAAed;",
6
+ "names": ["React", "useTranslation", "ControlPage", "ControlSection", "React", "Input", "useTranslation", "ControlItemInput", "TriggersSettings", "db", "triggers", "isRunning", "start", "stop", "useTriggerRuntimeControls", "t", "useTranslation", "meta", "id", "div", "className", "ControlItemInput", "title", "description", "Input", "Switch", "classNames", "checked", "onCheckedChange", "AutomationSettings", "props", "t", "useTranslation", "meta", "id", "React", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel", "TriggersSettings", "db", "space"]
7
+ }
@@ -0,0 +1,129 @@
1
+ import {
2
+ FunctionsPanel
3
+ } from "./chunk-BFUIVUQH.mjs";
4
+ import {
5
+ meta
6
+ } from "./chunk-PZNBEKO5.mjs";
7
+
8
+ // src/components/FunctionsContainer.tsx
9
+ import React2 from "react";
10
+ import { useTranslation as useTranslation2 } from "@dxos/react-ui";
11
+ import { ControlPage, ControlSection } from "@dxos/react-ui-form";
12
+
13
+ // src/components/FunctionsRegistry/FunctionsRegistry.tsx
14
+ import * as Schema from "effect/Schema";
15
+ import { useState } from "react";
16
+ import React, { useCallback } from "react";
17
+ import { Function } from "@dxos/functions";
18
+ import { getDeployedFunctions } from "@dxos/functions-runtime/edge";
19
+ import { useClient } from "@dxos/react-client";
20
+ import { Filter, Query, useQuery } from "@dxos/react-client/echo";
21
+ import { useAsyncEffect } from "@dxos/react-ui";
22
+ import { IconButton, useTranslation } from "@dxos/react-ui";
23
+ import { controlItemClasses } from "@dxos/react-ui-form";
24
+ import { List } from "@dxos/react-ui-list";
25
+ import { ghostHover, mx } from "@dxos/ui-theme";
26
+ var grid = "grid grid-cols-[1fr_1fr_auto] min-bs-[2.5rem]";
27
+ var FunctionsRegistry = ({ space }) => {
28
+ const client = useClient();
29
+ const [loading, setLoading] = useState(true);
30
+ const [functions, setFunctions] = useState([]);
31
+ const { t } = useTranslation(meta.id);
32
+ const dbFunctions = useQuery(space.db, Filter.type(Function.Function));
33
+ const state = (func) => {
34
+ const dbFunction = dbFunctions.find((f) => f.key === func.key);
35
+ if (!dbFunction) {
36
+ return "import";
37
+ }
38
+ if (dbFunction.version === func.version && dbFunction.updated === func.updated) {
39
+ return "none";
40
+ }
41
+ return "update";
42
+ };
43
+ useAsyncEffect(async () => {
44
+ setLoading(true);
45
+ const functions2 = await getDeployedFunctions(client, true);
46
+ setFunctions(functions2);
47
+ setLoading(false);
48
+ }, []);
49
+ const hanleImportOrUpdate = useCallback(async (func) => {
50
+ const functions2 = await space.db.query(Query.type(Function.Function, {
51
+ key: func.key
52
+ })).run();
53
+ const [existingFunc] = functions2;
54
+ if (!existingFunc) {
55
+ space.db.add(func);
56
+ return;
57
+ }
58
+ Function.setFrom(existingFunc, func);
59
+ }, [
60
+ space
61
+ ]);
62
+ return /* @__PURE__ */ React.createElement("div", {
63
+ role: "none",
64
+ className: mx(controlItemClasses)
65
+ }, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
66
+ items: functions,
67
+ isItem: Schema.is(Function.Function),
68
+ getId: (func) => func.id
69
+ }, ({ items }) => /* @__PURE__ */ React.createElement("div", {
70
+ role: "list",
71
+ className: "flex flex-col is-full"
72
+ }, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
73
+ key: func.id,
74
+ item: func,
75
+ classNames: mx(grid, ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
76
+ }, /* @__PURE__ */ React.createElement("div", {
77
+ className: "flex flex-col truncate"
78
+ }, /* @__PURE__ */ React.createElement(List.ItemTitle, {
79
+ classNames: "truncate"
80
+ }, func.name), /* @__PURE__ */ React.createElement("div", {
81
+ className: "text-xs text-description truncate"
82
+ }, func.key)), /* @__PURE__ */ React.createElement("div", {
83
+ className: "flex flex-col truncate"
84
+ }, /* @__PURE__ */ React.createElement("div", {
85
+ className: "text-xs text-description truncate"
86
+ }, func.version), /* @__PURE__ */ React.createElement("div", {
87
+ className: "text-xs text-description truncate"
88
+ }, func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : "")), /* @__PURE__ */ React.createElement(IconButton, {
89
+ iconOnly: true,
90
+ icon: state(func) === "update" ? "ph--arrows-clockwise--regular" : "ph--download--regular",
91
+ label: state(func) === "update" ? t("update function button label") : t("import function button label"),
92
+ disabled: state(func) === "none",
93
+ onClick: () => hanleImportOrUpdate(func)
94
+ }))))), functions.length === 0 && !loading && /* @__PURE__ */ React.createElement("div", {
95
+ className: "text-center plb-4 text-gray-500"
96
+ }, t("no functions found")), loading && /* @__PURE__ */ React.createElement("div", {
97
+ className: "text-center plb-4 text-gray-500"
98
+ }, t("loading functions")));
99
+ };
100
+
101
+ // src/components/FunctionsContainer.tsx
102
+ var FunctionsContainer = ({ space }) => {
103
+ const { t } = useTranslation2(meta.id);
104
+ return /* @__PURE__ */ React2.createElement(ControlPage, null, /* @__PURE__ */ React2.createElement(ControlSection, {
105
+ title: t("functions verbose label", {
106
+ ns: meta.id
107
+ }),
108
+ description: t("functions description", {
109
+ ns: meta.id
110
+ })
111
+ }, /* @__PURE__ */ React2.createElement(FunctionsPanel, {
112
+ space
113
+ })), /* @__PURE__ */ React2.createElement(ControlSection, {
114
+ title: t("functions registry verbose label", {
115
+ ns: meta.id
116
+ }),
117
+ description: t("functions registry description", {
118
+ ns: meta.id
119
+ })
120
+ }, /* @__PURE__ */ React2.createElement(FunctionsRegistry, {
121
+ space
122
+ })));
123
+ };
124
+ var FunctionsContainer_default = FunctionsContainer;
125
+ export {
126
+ FunctionsContainer,
127
+ FunctionsContainer_default as default
128
+ };
129
+ //# sourceMappingURL=FunctionsContainer-6QLC7JP4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FunctionsContainer.tsx", "../../../src/components/FunctionsRegistry/FunctionsRegistry.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\n\nimport { FunctionsPanel } from './FunctionsPanel';\nimport { FunctionsRegistry } from './FunctionsRegistry';\n\nexport const FunctionsContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('functions verbose label', { ns: meta.id })}\n description={t('functions description', { ns: meta.id })}\n >\n <FunctionsPanel space={space} />\n </ControlSection>\n <ControlSection\n title={t('functions registry verbose label', { ns: meta.id })}\n description={t('functions registry description', { ns: meta.id })}\n >\n <FunctionsRegistry space={space} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default FunctionsContainer;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport { useState } from 'react';\nimport React, { useCallback } from 'react';\n\nimport { Function } from '@dxos/functions';\nimport { getDeployedFunctions } from '@dxos/functions-runtime/edge';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, Query, type Space, useQuery } from '@dxos/react-client/echo';\nimport { useAsyncEffect } from '@dxos/react-ui';\nimport { IconButton, useTranslation } from '@dxos/react-ui';\nimport { controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_1fr_auto] min-bs-[2.5rem]';\n\ntype FunctionsRegistryProps = {\n space: Space;\n};\n\nexport const FunctionsRegistry = ({ space }: FunctionsRegistryProps) => {\n const client = useClient();\n const [loading, setLoading] = useState(true);\n const [functions, setFunctions] = useState<Function.Function[]>([]);\n const { t } = useTranslation(meta.id);\n\n const dbFunctions = useQuery(space.db, Filter.type(Function.Function));\n\n const state = (func: Function.Function) => {\n const dbFunction = dbFunctions.find((f) => f.key === func.key);\n if (!dbFunction) {\n return 'import';\n }\n if (dbFunction.version === func.version && dbFunction.updated === func.updated) {\n return 'none';\n }\n return 'update';\n };\n\n useAsyncEffect(async () => {\n setLoading(true);\n const functions = await getDeployedFunctions(client, true);\n setFunctions(functions);\n setLoading(false);\n }, []);\n\n const hanleImportOrUpdate = useCallback(\n async (func: Function.Function) => {\n const functions = await space.db.query(Query.type(Function.Function, { key: func.key })).run();\n const [existingFunc] = functions;\n if (!existingFunc) {\n space.db.add(func);\n return;\n }\n Function.setFrom(existingFunc, func);\n },\n [space],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n {functions.length > 0 && (\n <List.Root<Function.Function> items={functions} isItem={Schema.is(Function.Function)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col is-full'>\n {items?.map((func) => (\n <List.Item<Function.Function>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n <div className='text-xs text-description truncate'>{func.key}</div>\n </div>\n <div className='flex flex-col truncate'>\n <div className='text-xs text-description truncate'>{func.version}</div>\n <div className='text-xs text-description truncate'>\n {func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : ''}\n </div>\n </div>\n\n <IconButton\n iconOnly\n icon={state(func) === 'update' ? 'ph--arrows-clockwise--regular' : 'ph--download--regular'}\n label={\n state(func) === 'update' ? t('update function button label') : t('import function button label')\n }\n disabled={state(func) === 'none'}\n onClick={() => hanleImportOrUpdate(func)}\n />\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {functions.length === 0 && !loading && (\n <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>\n )}\n {loading && <div className='text-center plb-4 text-gray-500'>{t('loading functions')}</div>}\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;;;ACJ5C,YAAYC,YAAY;AACxB,SAASC,gBAAgB;AACzB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,gBAAgB;AACzB,SAASC,4BAA4B;AACrC,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,OAAmBC,gBAAgB;AACpD,SAASC,sBAAsB;AAC/B,SAASC,YAAYC,sBAAsB;AAC3C,SAASC,0BA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MuD,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;AAC5D,QAAM,EAAEC,EAAC,IAAKC,gBAAeC,KAAKC,EAAE;AACpC,SACE,gBAAAC,OAAA,cAACC,aAAAA,MACC,gBAAAD,OAAA,cAACE,gBAAAA;IACCC,OAAOP,EAAE,2BAA2B;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;IAClDM,aAAaT,EAAE,yBAAyB;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;KAEtD,gBAAAC,OAAA,cAACM,gBAAAA;IAAeX;OAElB,gBAAAK,OAAA,cAACE,gBAAAA;IACCC,OAAOP,EAAE,oCAAoC;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;IAC3DM,aAAaT,EAAE,kCAAkC;MAAEQ,IAAIN,KAAKC;IAAG,CAAA;KAE/D,gBAAAC,OAAA,cAACO,mBAAAA;IAAkBZ;;AAI3B;AAEA,IAAA,6BAAeD;",
6
+ "names": ["React", "useTranslation", "ControlPage", "ControlSection", "Schema", "useState", "React", "useCallback", "Function", "getDeployedFunctions", "useClient", "Filter", "Query", "useQuery", "useAsyncEffect", "IconButton", "useTranslation", "controlItemClasses", "List", "ghostHover", "mx", "grid", "FunctionsRegistry", "space", "client", "useClient", "loading", "setLoading", "useState", "functions", "setFunctions", "t", "useTranslation", "meta", "id", "dbFunctions", "useQuery", "db", "Filter", "type", "Function", "state", "func", "dbFunction", "find", "f", "key", "version", "updated", "useAsyncEffect", "getDeployedFunctions", "hanleImportOrUpdate", "useCallback", "query", "Query", "run", "existingFunc", "add", "setFrom", "div", "role", "className", "mx", "controlItemClasses", "length", "List", "Root", "items", "isItem", "is", "getId", "map", "Item", "item", "classNames", "ghostHover", "ItemTitle", "name", "Date", "toLocaleString", "IconButton", "iconOnly", "icon", "label", "disabled", "onClick", "FunctionsContainer", "space", "t", "useTranslation", "meta", "id", "React", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel", "FunctionsRegistry"]
7
+ }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  FunctionsPanel,
3
3
  FunctionsPanel_default
4
- } from "./chunk-TWWFNOIR.mjs";
5
- import "./chunk-LZQFZO3B.mjs";
4
+ } from "./chunk-BFUIVUQH.mjs";
5
+ import "./chunk-PZNBEKO5.mjs";
6
6
  export {
7
7
  FunctionsPanel,
8
8
  FunctionsPanel_default as default
9
9
  };
10
- //# sourceMappingURL=FunctionsPanel-CRW6SJUN.mjs.map
10
+ //# sourceMappingURL=FunctionsPanel-ZX4J75UM.mjs.map
@@ -0,0 +1,84 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-PZNBEKO5.mjs";
4
+
5
+ // src/capabilities/app-graph-builder/app-graph-builder.ts
6
+ import * as Effect from "effect/Effect";
7
+ import { Capability, Common } from "@dxos/app-framework";
8
+ import { Script } from "@dxos/functions";
9
+ import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
10
+ import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
11
+ import { meta as spaceMeta } from "@dxos/plugin-space";
12
+ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
13
+ const extensions = yield* Effect.all([
14
+ GraphBuilder.createExtension({
15
+ id: `${meta.id}/space-settings-automation`,
16
+ match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),
17
+ connector: (node) => Effect.succeed([
18
+ {
19
+ id: `automation-${node.id}`,
20
+ type: `${meta.id}/space-settings-automation`,
21
+ data: `${meta.id}/space-settings-automation`,
22
+ properties: {
23
+ label: [
24
+ "automation panel label",
25
+ {
26
+ ns: meta.id
27
+ }
28
+ ],
29
+ icon: "ph--lightning--regular"
30
+ }
31
+ }
32
+ ])
33
+ }),
34
+ GraphBuilder.createExtension({
35
+ id: `${meta.id}/space-settings-functions`,
36
+ match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),
37
+ connector: (node) => Effect.succeed([
38
+ {
39
+ id: `functions-${node.id}`,
40
+ type: `${meta.id}/space-settings-functions`,
41
+ data: `${meta.id}/space-settings-functions`,
42
+ properties: {
43
+ label: [
44
+ "functions panel label",
45
+ {
46
+ ns: meta.id
47
+ }
48
+ ],
49
+ icon: "ph--function--regular"
50
+ }
51
+ }
52
+ ])
53
+ }),
54
+ GraphBuilder.createTypeExtension({
55
+ id: `${meta.id}/script-companion`,
56
+ type: Script.Script,
57
+ connector: (script) => Effect.succeed([
58
+ {
59
+ id: [
60
+ script.id,
61
+ "automation"
62
+ ].join(ATTENDABLE_PATH_SEPARATOR),
63
+ type: PLANK_COMPANION_TYPE,
64
+ data: "automation",
65
+ properties: {
66
+ label: [
67
+ "script automation label",
68
+ {
69
+ ns: meta.id
70
+ }
71
+ ],
72
+ icon: "ph--lightning--regular",
73
+ disposition: "hidden"
74
+ }
75
+ }
76
+ ])
77
+ })
78
+ ]);
79
+ return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
80
+ }));
81
+ export {
82
+ app_graph_builder_default as default
83
+ };
84
+ //# sourceMappingURL=app-graph-builder-LAQMEBMH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Script } from '@dxos/functions';\nimport { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { meta as spaceMeta } from '@dxos/plugin-space';\n\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: `${meta.id}/space-settings-automation`,\n match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),\n connector: (node) =>\n Effect.succeed([\n {\n id: `automation-${node.id}`,\n type: `${meta.id}/space-settings-automation`,\n data: `${meta.id}/space-settings-automation`,\n properties: {\n label: ['automation panel label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/space-settings-functions`,\n match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),\n connector: (node) =>\n Effect.succeed([\n {\n id: `functions-${node.id}`,\n type: `${meta.id}/space-settings-functions`,\n data: `${meta.id}/space-settings-functions`,\n properties: {\n label: ['functions panel label', { ns: meta.id }],\n icon: 'ph--function--regular',\n },\n },\n ]),\n }),\n GraphBuilder.createTypeExtension({\n id: `${meta.id}/script-companion`,\n type: Script.Script,\n connector: (script) =>\n Effect.succeed([\n {\n id: [script.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'automation',\n properties: {\n label: ['script automation label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n disposition: 'hidden',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);\n }),\n);\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,cAAc;AACvB,SAASC,2BAA2BC,4BAA4B;AAChE,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,QAAQC,iBAAiB;AAIlC,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC,aAAa,GAAGC,UAAUL,EAAE,WAAW;MAC1DM,WAAW,CAACC,SACHC,eAAQ;QACb;UACER,IAAI,cAAcO,KAAKP,EAAE;UACzBS,MAAM,GAAGR,KAAKD,EAAE;UAChBU,MAAM,GAAGT,KAAKD,EAAE;UAChBW,YAAY;YACVC,OAAO;cAAC;cAA0B;gBAAEC,IAAIZ,KAAKD;cAAG;;YAChDc,MAAM;UACR;QACF;OACD;IACL,CAAA;IACAhB,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC,aAAa,GAAGC,UAAUL,EAAE,WAAW;MAC1DM,WAAW,CAACC,SACHC,eAAQ;QACb;UACER,IAAI,aAAaO,KAAKP,EAAE;UACxBS,MAAM,GAAGR,KAAKD,EAAE;UAChBU,MAAM,GAAGT,KAAKD,EAAE;UAChBW,YAAY;YACVC,OAAO;cAAC;cAAyB;gBAAEC,IAAIZ,KAAKD;cAAG;;YAC/Cc,MAAM;UACR;QACF;OACD;IACL,CAAA;IACAhB,aAAaiB,oBAAoB;MAC/Bf,IAAI,GAAGC,KAAKD,EAAE;MACdS,MAAMO,OAAOA;MACbV,WAAW,CAACW,WACHT,eAAQ;QACb;UACER,IAAI;YAACiB,OAAOjB;YAAI;YAAckB,KAAKC,yBAAAA;UACnCV,MAAMW;UACNV,MAAM;UACNC,YAAY;YACVC,OAAO;cAAC;cAA2B;gBAAEC,IAAIZ,KAAKD;cAAG;;YACjDc,MAAM;YACNO,aAAa;UACf;QACF;OACD;IACL,CAAA;GACD;AAED,SAAO5B,WAAW6B,YAAYC,OAAO9B,WAAW+B,iBAAiB5B,UAAAA;AACnE,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "Common", "Script", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "GraphBuilder", "NodeMatcher", "meta", "spaceMeta", "Capability", "makeModule", "fnUntraced", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenNodeType", "spaceMeta", "connector", "node", "succeed", "type", "data", "properties", "label", "ns", "icon", "createTypeExtension", "Script", "script", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "disposition", "contributes", "Common", "AppGraphBuilder"]
7
+ }
@@ -1,9 +1,9 @@
1
1
  // src/components/index.ts
2
2
  import { lazy } from "react";
3
- var AutomationPanel = lazy(() => import("./AutomationPanel-M4M77L4V.mjs"));
4
- var AutomationSettings = lazy(() => import("./AutomationSettings-4HCI6KJR.mjs"));
5
- var FunctionsContainer = lazy(() => import("./FunctionsContainer-CDVBRQCT.mjs"));
6
- var FunctionsPanel = lazy(() => import("./FunctionsPanel-CRW6SJUN.mjs"));
3
+ var AutomationPanel = lazy(() => import("./AutomationPanel-FAS6ADCW.mjs"));
4
+ var AutomationSettings = lazy(() => import("./AutomationSettings-XN2OIYWL.mjs"));
5
+ var FunctionsContainer = lazy(() => import("./FunctionsContainer-6QLC7JP4.mjs"));
6
+ var FunctionsPanel = lazy(() => import("./FunctionsPanel-ZX4J75UM.mjs"));
7
7
 
8
8
  export {
9
9
  AutomationPanel,
@@ -11,4 +11,4 @@ export {
11
11
  FunctionsContainer,
12
12
  FunctionsPanel
13
13
  };
14
- //# sourceMappingURL=chunk-CZVA5NMD.mjs.map
14
+ //# sourceMappingURL=chunk-54PANILA.mjs.map
@@ -0,0 +1,102 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-PZNBEKO5.mjs";
4
+
5
+ // src/components/FunctionsPanel/FunctionsPanel.tsx
6
+ import * as Schema from "effect/Schema";
7
+ import React, { useCallback, useMemo } from "react";
8
+ import { Common } from "@dxos/app-framework";
9
+ import { useOperationInvoker } from "@dxos/app-framework/react";
10
+ import { Obj } from "@dxos/echo";
11
+ import { Function, Script } from "@dxos/functions";
12
+ import { SpaceOperation } from "@dxos/plugin-space/types";
13
+ import { Filter, useQuery } from "@dxos/react-client/echo";
14
+ import { Button, IconButton, useTranslation } from "@dxos/react-ui";
15
+ import { controlItemClasses } from "@dxos/react-ui-form";
16
+ import { List } from "@dxos/react-ui-list";
17
+ import { ghostHover, mx } from "@dxos/ui-theme";
18
+ var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
19
+ var FunctionsPanel = ({ space }) => {
20
+ const { t } = useTranslation(meta.id);
21
+ const functions = useQuery(space.db, Filter.type(Function.Function));
22
+ const scripts = useQuery(space.db, Filter.type(Script.Script));
23
+ const { invokePromise } = useOperationInvoker();
24
+ const functionToScriptMap = useMemo(() => functions.reduce((map, func) => {
25
+ const scriptId = func.source?.target?.id;
26
+ if (scriptId) {
27
+ const script = scripts.find((s) => s.id === scriptId);
28
+ if (script) {
29
+ map[func.id] = script;
30
+ }
31
+ }
32
+ return map;
33
+ }, {}), [
34
+ functions,
35
+ scripts
36
+ ]);
37
+ const getScriptName = useCallback((func) => {
38
+ const script = functionToScriptMap[func.id];
39
+ return script?.name;
40
+ }, [
41
+ functionToScriptMap
42
+ ]);
43
+ const handleGoToScript = useCallback((func) => {
44
+ const script = functionToScriptMap[func.id];
45
+ if (script) {
46
+ void invokePromise(Common.LayoutOperation.Open, {
47
+ subject: [
48
+ Obj.getDXN(script).toString()
49
+ ]
50
+ });
51
+ }
52
+ }, [
53
+ functionToScriptMap,
54
+ invokePromise
55
+ ]);
56
+ const handleDelete = useCallback((func) => invokePromise(SpaceOperation.RemoveObjects, {
57
+ objects: [
58
+ func
59
+ ]
60
+ }), [
61
+ invokePromise
62
+ ]);
63
+ return /* @__PURE__ */ React.createElement("div", {
64
+ role: "none",
65
+ className: mx(controlItemClasses)
66
+ }, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
67
+ items: functions,
68
+ isItem: Schema.is(Function.Function),
69
+ getId: (func) => func.id
70
+ }, ({ items }) => /* @__PURE__ */ React.createElement("div", {
71
+ role: "list",
72
+ className: "flex flex-col is-full"
73
+ }, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
74
+ key: func.id,
75
+ item: func,
76
+ classNames: mx(grid, ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
77
+ }, /* @__PURE__ */ React.createElement("div", {
78
+ className: "flex flex-col truncate"
79
+ }, /* @__PURE__ */ React.createElement(List.ItemTitle, {
80
+ classNames: "truncate"
81
+ }, func.name), getScriptName(func) && /* @__PURE__ */ React.createElement("div", {
82
+ className: "text-xs text-description truncate"
83
+ }, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ React.createElement(Button, {
84
+ onClick: () => handleGoToScript(func)
85
+ }, t("go to function source button label")), /* @__PURE__ */ React.createElement(IconButton, {
86
+ iconOnly: true,
87
+ icon: "ph--trash--regular",
88
+ label: t("delete function button label"),
89
+ onClick: () => handleDelete(func)
90
+ }))))), functions.length === 0 && /* @__PURE__ */ React.createElement("div", {
91
+ className: "text-center plb-4 text-gray-500"
92
+ }, t("no functions found")));
93
+ };
94
+
95
+ // src/components/FunctionsPanel/index.ts
96
+ var FunctionsPanel_default = FunctionsPanel;
97
+
98
+ export {
99
+ FunctionsPanel,
100
+ FunctionsPanel_default
101
+ };
102
+ //# sourceMappingURL=chunk-BFUIVUQH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FunctionsPanel/FunctionsPanel.tsx", "../../../src/components/FunctionsPanel/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Common } from '@dxos/app-framework';\nimport { useOperationInvoker } from '@dxos/app-framework/react';\nimport { Obj } from '@dxos/echo';\nimport { Function, Script } from '@dxos/functions';\nimport { SpaceOperation } from '@dxos/plugin-space/types';\nimport { Filter, type Space, useQuery } from '@dxos/react-client/echo';\nimport { Button, IconButton, useTranslation } from '@dxos/react-ui';\nimport { controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';\n\nexport type FunctionsPanelProps = {\n space: Space;\n};\n\nexport const FunctionsPanel = ({ space }: FunctionsPanelProps) => {\n const { t } = useTranslation(meta.id);\n const functions = useQuery(space.db, Filter.type(Function.Function));\n const scripts = useQuery(space.db, Filter.type(Script.Script));\n const { invokePromise } = useOperationInvoker();\n\n const functionToScriptMap = useMemo(\n () =>\n functions.reduce(\n (map, func) => {\n const scriptId = func.source?.target?.id;\n if (scriptId) {\n const script = scripts.find((s) => s.id === scriptId);\n if (script) {\n map[func.id] = script;\n }\n }\n return map;\n },\n {} as Record<string, Script.Script>,\n ),\n [functions, scripts],\n );\n\n const getScriptName = useCallback(\n (func: Function.Function) => {\n const script = functionToScriptMap[func.id];\n return script?.name;\n },\n [functionToScriptMap],\n );\n\n const handleGoToScript = useCallback(\n (func: Function.Function) => {\n const script = functionToScriptMap[func.id];\n if (script) {\n void invokePromise(Common.LayoutOperation.Open, { subject: [Obj.getDXN(script).toString()] });\n }\n },\n [functionToScriptMap, invokePromise],\n );\n\n const handleDelete = useCallback(\n (func: Function.Function) => invokePromise(SpaceOperation.RemoveObjects, { objects: [func] }),\n [invokePromise],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n {functions.length > 0 && (\n <List.Root<Function.Function> items={functions} isItem={Schema.is(Function.Function)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col is-full'>\n {items?.map((func) => (\n <List.Item<Function.Function>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n {getScriptName(func) && (\n <div className='text-xs text-description truncate'>{getScriptName(func)}</div>\n )}\n </div>\n {functionToScriptMap[func.id] && (\n <Button onClick={() => handleGoToScript(func)}>{t('go to function source button label')}</Button>\n )}\n <IconButton\n iconOnly\n icon='ph--trash--regular'\n label={t('delete function button label')}\n onClick={() => handleDelete(func)}\n />\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {functions.length === 0 && <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from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AAmC1C,EAAE,oBAAA,CAAA,CAAA;AAGrF;;;ACvGA,IAAA,yBAAegE;",
6
+ "names": ["Schema", "React", "useCallback", "useMemo", "Common", "useOperationInvoker", "Obj", "Function", "Script", "SpaceOperation", "Filter", "useQuery", "Button", "IconButton", "useTranslation", "controlItemClasses", "List", "ghostHover", "mx", "grid", "FunctionsPanel", "space", "t", "useTranslation", "meta", "id", "functions", "useQuery", "db", "Filter", "type", "Function", "scripts", "Script", "invokePromise", "useOperationInvoker", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "Common", "LayoutOperation", "Open", "subject", "Obj", "getDXN", "toString", "handleDelete", "SpaceOperation", "RemoveObjects", "objects", "div", "role", "className", "mx", "controlItemClasses", "length", "List", "Root", "items", "isItem", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "IconButton", "iconOnly", "icon", "label", "FunctionsPanel"]
7
+ }
@@ -0,0 +1,8 @@
1
+ // src/capabilities/compute-runtime/index.ts
2
+ import { Capability } from "@dxos/app-framework";
3
+ var ComputeRuntime = Capability.lazy("ComputeRuntime", () => import("./compute-runtime-WTWLQ67J.mjs"));
4
+
5
+ export {
6
+ ComputeRuntime
7
+ };
8
+ //# sourceMappingURL=chunk-BKFQBKYO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/compute-runtime/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ComputeRuntime = Capability.lazy('ComputeRuntime', () => import('./compute-runtime'));\n"],
5
+ "mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,iBAAiBC,WAAWC,KAAK,kBAAkB,MAAM,OAAO,gCAAA,CAAA;",
6
+ "names": ["Capability", "ComputeRuntime", "Capability", "lazy"]
7
+ }
@@ -0,0 +1,83 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-PZNBEKO5.mjs";
4
+
5
+ // src/types/capabilities.ts
6
+ import { Capability } from "@dxos/app-framework";
7
+ (function(AutomationCapabilities2) {
8
+ AutomationCapabilities2.ComputeRuntime = Capability.make(`${meta.id}/capability/compute-runtime`);
9
+ })(AutomationCapabilities || (AutomationCapabilities = {}));
10
+ var AutomationCapabilities;
11
+
12
+ // src/types/events.ts
13
+ import { ActivationEvent } from "@dxos/app-framework";
14
+ (function(AutomationEvents2) {
15
+ AutomationEvents2.ComputeRuntimeReady = ActivationEvent.make(`${meta.id}/event/compute-runtime-ready`);
16
+ })(AutomationEvents || (AutomationEvents = {}));
17
+ var AutomationEvents;
18
+
19
+ // src/types/schema.ts
20
+ import * as Schema from "effect/Schema";
21
+ import { Capability as Capability2 } from "@dxos/app-framework";
22
+ import { Database } from "@dxos/echo";
23
+ import { Operation } from "@dxos/operation";
24
+ var TriggerTemplate = Schema.Union(Schema.Struct({
25
+ type: Schema.Literal("timer"),
26
+ cron: Schema.String
27
+ }), Schema.Struct({
28
+ type: Schema.Literal("queue"),
29
+ queueDXN: Schema.Any
30
+ }));
31
+ (function(AutomationAction2) {
32
+ class CreateTriggerFromTemplate extends Schema.TaggedClass()(`${meta.id}/action/create-trigger-from-template`, {
33
+ input: Schema.Struct({
34
+ db: Database.Database,
35
+ template: TriggerTemplate,
36
+ enabled: Schema.optional(Schema.Boolean),
37
+ // TODO(wittjosiah): Improve how this lookup is done.
38
+ scriptName: Schema.optional(Schema.String),
39
+ input: Schema.optional(Schema.Record({
40
+ key: Schema.String,
41
+ value: Schema.Any
42
+ }))
43
+ }),
44
+ output: Schema.Void
45
+ }) {
46
+ }
47
+ AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
48
+ })(AutomationAction || (AutomationAction = {}));
49
+ var AUTOMATION_OPERATION = `${meta.id}/operation`;
50
+ (function(AutomationOperation2) {
51
+ AutomationOperation2.CreateTriggerFromTemplate = Operation.make({
52
+ meta: {
53
+ key: `${AUTOMATION_OPERATION}/create-trigger-from-template`,
54
+ name: "Create Trigger From Template"
55
+ },
56
+ services: [
57
+ Capability2.Service
58
+ ],
59
+ schema: {
60
+ input: Schema.Struct({
61
+ db: Database.Database,
62
+ template: TriggerTemplate,
63
+ enabled: Schema.optional(Schema.Boolean),
64
+ scriptName: Schema.optional(Schema.String),
65
+ input: Schema.optional(Schema.Record({
66
+ key: Schema.String,
67
+ value: Schema.Any
68
+ }))
69
+ }),
70
+ output: Schema.Void
71
+ }
72
+ });
73
+ })(AutomationOperation || (AutomationOperation = {}));
74
+ var AutomationAction;
75
+ var AutomationOperation;
76
+
77
+ export {
78
+ AutomationCapabilities,
79
+ AutomationEvents,
80
+ AutomationAction,
81
+ AutomationOperation
82
+ };
83
+ //# sourceMappingURL=chunk-JOXPQ27I.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';\nimport { Capability } from '@dxos/app-framework';\nimport { type Database } from '@dxos/echo';\nimport type { CredentialsService, FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';\nimport type { TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';\nimport type { SpaceId } from '@dxos/keys';\n\nimport { meta } from '../meta';\n\nexport namespace AutomationCapabilities {\n /**\n * Service stack for executing agents, functions, and triggers.\n */\n export type ComputeServices =\n | TriggerDispatcher\n | TriggerStateStore\n | AiService.AiService\n | Database.Service\n | QueueService\n | CredentialsService\n | FunctionInvocationService\n | TracingService\n // TODO(dmaretskyi): Those should be provided at AI-chat call site.\n | ToolResolverService\n | ToolExecutionService;\n\n export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;\n export interface ComputeRuntimeProvider {\n getRuntime(spaceId: SpaceId): ComputeRuntime;\n }\n\n /**\n * Runtime for executing agents, functions, and triggers.\n */\n export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace AutomationEvents {\n export const ComputeRuntimeReady = ActivationEvent.make(`${meta.id}/event/compute-runtime-ready`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Database } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '../meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${meta.id}/action/create-trigger-from-template`,\n {\n input: Schema.Struct({\n db: Database.Database,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n\nconst AUTOMATION_OPERATION = `${meta.id}/operation`;\n\nexport namespace AutomationOperation {\n export const CreateTriggerFromTemplate = Operation.make({\n meta: { key: `${AUTOMATION_OPERATION}/create-trigger-from-template`, name: 'Create Trigger From Template' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n db: Database.Database,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n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bC,UAAUjB;QACVkB,SAAgBC,gBAAgBC,cAAO;QACvCC,YAAmBF,gBAAgBb,aAAM;QACzCQ,OAAcK,gBAAgBG,cAAO;UAAEC,KAAYjB;UAAQkB,OAAchB;QAAI,CAAA,CAAA;MAC/E,CAAA;MACAiB,QAAeC;IACjB;EACF,CAAA;AACF,GAfiBE,wBAAAA,sBAAAA,CAAAA,EAAAA;;;",
6
+ "names": ["Capability", "AutomationCapabilities", "ComputeRuntime", "Capability", "make", "meta", "id", "ActivationEvent", "AutomationEvents", "ComputeRuntimeReady", "ActivationEvent", "make", "meta", "id", "Schema", "Capability", "Database", "Operation", "TriggerTemplate", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "CreateTriggerFromTemplate", "TaggedClass", "meta", "id", "input", "db", "Database", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void", "AUTOMATION_OPERATION", "AutomationOperation", "Operation", "make", "name", "services", "Capability", "Service", "schema"]
7
+ }
@@ -14,4 +14,4 @@ var meta = {
14
14
  export {
15
15
  meta
16
16
  };
17
- //# sourceMappingURL=chunk-LZQFZO3B.mjs.map
17
+ //# sourceMappingURL=chunk-PZNBEKO5.mjs.map