@dxos/plugin-automation 0.8.4-main.dedc0f3 → 0.8.4-main.e8ec1fe

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 (189) hide show
  1. package/dist/lib/browser/AutomationPanel-7OECLR5N.mjs +11 -0
  2. package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs +68 -0
  3. package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs.map +7 -0
  4. package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs +151 -0
  5. package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs.map +7 -0
  6. package/dist/lib/browser/{FunctionsPanel-I443Y6KB.mjs → FunctionsPanel-CRW6SJUN.mjs} +3 -3
  7. package/dist/lib/browser/{app-graph-builder-4OFKIRAI.mjs → app-graph-builder-W7LLC6XW.mjs} +12 -11
  8. package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-EPEXQP45.mjs +14 -0
  10. package/dist/lib/browser/chunk-EPEXQP45.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-S4SM663I.mjs → chunk-JW7XSPYW.mjs} +59 -22
  12. package/dist/lib/browser/chunk-JW7XSPYW.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-LZQFZO3B.mjs +17 -0
  14. package/dist/lib/browser/chunk-LZQFZO3B.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-NAPXRXTY.mjs +100 -0
  16. package/dist/lib/browser/chunk-NAPXRXTY.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-4TWQV33E.mjs → chunk-QKFBHAGN.mjs} +66 -25
  18. package/dist/lib/browser/chunk-QKFBHAGN.mjs.map +7 -0
  19. package/dist/lib/browser/{chunk-Z5DT4MHW.mjs → chunk-TWWFNOIR.mjs} +30 -15
  20. package/dist/lib/browser/chunk-TWWFNOIR.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-XAKZ4ANY.mjs +15 -0
  22. package/dist/lib/browser/chunk-XAKZ4ANY.mjs.map +7 -0
  23. package/dist/lib/browser/{chunk-HN7OHFCB.mjs → chunk-YBPJCY3F.mjs} +3 -3
  24. package/dist/lib/browser/chunk-YBPJCY3F.mjs.map +7 -0
  25. package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs +113 -0
  26. package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs.map +7 -0
  27. package/dist/lib/browser/hooks/index.mjs +13 -0
  28. package/dist/lib/browser/index.mjs +47 -18
  29. package/dist/lib/browser/index.mjs.map +4 -4
  30. package/dist/lib/browser/{intent-resolver-4PSYSQQG.mjs → intent-resolver-5HR7M7T6.mjs} +10 -10
  31. package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs.map +7 -0
  32. package/dist/lib/browser/meta.json +1 -1
  33. package/dist/lib/browser/{react-surface-M52XGLXY.mjs → react-surface-YQW7WCFW.mjs} +20 -20
  34. package/dist/lib/browser/react-surface-YQW7WCFW.mjs.map +7 -0
  35. package/dist/lib/browser/types/index.mjs +2 -2
  36. package/dist/lib/node-esm/{AutomationPanel-MKOLA2FE.mjs → AutomationPanel-HCVFNHGQ.mjs} +4 -4
  37. package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs +69 -0
  38. package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs.map +7 -0
  39. package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs +152 -0
  40. package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs.map +7 -0
  41. package/dist/lib/node-esm/{FunctionsPanel-ELINCXPW.mjs → FunctionsPanel-RVVCS6VH.mjs} +3 -3
  42. package/dist/lib/node-esm/FunctionsPanel-RVVCS6VH.mjs.map +7 -0
  43. package/dist/lib/node-esm/{app-graph-builder-555IHYOB.mjs → app-graph-builder-SLQOO7GH.mjs} +12 -11
  44. package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs.map +7 -0
  45. package/dist/lib/node-esm/{chunk-AONUBWBE.mjs → chunk-6YRKST6M.mjs} +66 -25
  46. package/dist/lib/node-esm/chunk-6YRKST6M.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-CEVIVRTY.mjs +19 -0
  48. package/dist/lib/node-esm/chunk-CEVIVRTY.mjs.map +7 -0
  49. package/dist/lib/node-esm/chunk-CPP35BE6.mjs +16 -0
  50. package/dist/lib/node-esm/chunk-CPP35BE6.mjs.map +7 -0
  51. package/dist/lib/node-esm/{chunk-OEZNHUL2.mjs → chunk-ECJKIUBO.mjs} +3 -3
  52. package/dist/lib/node-esm/chunk-ECJKIUBO.mjs.map +7 -0
  53. package/dist/lib/node-esm/chunk-KB7NFEYY.mjs +16 -0
  54. package/dist/lib/node-esm/chunk-KB7NFEYY.mjs.map +7 -0
  55. package/dist/lib/node-esm/chunk-PICJ2REN.mjs +101 -0
  56. package/dist/lib/node-esm/chunk-PICJ2REN.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-CX2AILIS.mjs → chunk-RVK52XGK.mjs} +30 -15
  58. package/dist/lib/node-esm/chunk-RVK52XGK.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-ZOJVKPCA.mjs → chunk-W76WUTZY.mjs} +59 -22
  60. package/dist/lib/node-esm/chunk-W76WUTZY.mjs.map +7 -0
  61. package/dist/lib/node-esm/compute-runtime-URROOC34.mjs +114 -0
  62. package/dist/lib/node-esm/compute-runtime-URROOC34.mjs.map +7 -0
  63. package/dist/lib/node-esm/hooks/index.mjs +14 -0
  64. package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
  65. package/dist/lib/node-esm/index.mjs +47 -18
  66. package/dist/lib/node-esm/index.mjs.map +4 -4
  67. package/dist/lib/node-esm/{intent-resolver-6ZGBUILG.mjs → intent-resolver-KDRYB5BC.mjs} +10 -10
  68. package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs.map +7 -0
  69. package/dist/lib/node-esm/meta.json +1 -1
  70. package/dist/lib/node-esm/{react-surface-Y6AOXM75.mjs → react-surface-NNHYNBO6.mjs} +20 -20
  71. package/dist/lib/node-esm/react-surface-NNHYNBO6.mjs.map +7 -0
  72. package/dist/lib/node-esm/types/index.mjs +2 -2
  73. package/dist/types/src/AutomationPlugin.d.ts +1 -1
  74. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  76. package/dist/types/src/capabilities/capabilities.d.ts +20 -0
  77. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  78. package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
  79. package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/index.d.ts +2 -0
  81. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  83. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +2 -2
  84. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  85. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +5 -1
  86. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  87. package/dist/types/src/components/AutomationSettings.d.ts +5 -0
  88. package/dist/types/src/components/AutomationSettings.d.ts.map +1 -0
  89. package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -1
  90. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  91. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +8 -0
  92. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
  93. package/dist/types/src/components/FunctionsRegistry/index.d.ts +2 -0
  94. package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
  95. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +2 -2
  96. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  97. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  98. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +7 -5
  99. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  100. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +9 -4
  101. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  102. package/dist/types/src/components/TriggerSettings.d.ts +6 -0
  103. package/dist/types/src/components/TriggerSettings.d.ts.map +1 -0
  104. package/dist/types/src/components/index.d.ts +1 -1
  105. package/dist/types/src/components/index.d.ts.map +1 -1
  106. package/dist/types/src/events.d.ts +4 -0
  107. package/dist/types/src/events.d.ts.map +1 -0
  108. package/dist/types/src/hooks/index.d.ts +3 -0
  109. package/dist/types/src/hooks/index.d.ts.map +1 -0
  110. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +12 -0
  111. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
  112. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +11 -0
  113. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -0
  114. package/dist/types/src/index.d.ts +3 -0
  115. package/dist/types/src/index.d.ts.map +1 -1
  116. package/dist/types/src/meta.d.ts +0 -1
  117. package/dist/types/src/meta.d.ts.map +1 -1
  118. package/dist/types/src/translations.d.ts +5 -0
  119. package/dist/types/src/translations.d.ts.map +1 -1
  120. package/dist/types/src/types/schema.d.ts +1 -1
  121. package/dist/types/src/types/schema.d.ts.map +1 -1
  122. package/dist/types/tsconfig.tsbuildinfo +1 -1
  123. package/package.json +61 -38
  124. package/src/AutomationPlugin.tsx +36 -30
  125. package/src/capabilities/app-graph-builder.ts +14 -13
  126. package/src/capabilities/capabilities.ts +41 -0
  127. package/src/capabilities/compute-runtime.ts +127 -0
  128. package/src/capabilities/index.ts +3 -0
  129. package/src/capabilities/intent-resolver.ts +5 -5
  130. package/src/capabilities/react-surface.tsx +15 -15
  131. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +7 -11
  132. package/src/components/AutomationPanel/AutomationPanel.tsx +97 -33
  133. package/src/components/{AutomationContainer.tsx → AutomationSettings.tsx} +8 -6
  134. package/src/components/FunctionsContainer.tsx +11 -4
  135. package/src/components/FunctionsPanel/FunctionsPanel.tsx +35 -16
  136. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +135 -0
  137. package/src/components/FunctionsRegistry/index.ts +5 -0
  138. package/src/components/TriggerEditor/FunctionInputEditor.tsx +10 -4
  139. package/src/components/TriggerEditor/SpecSelector.tsx +14 -8
  140. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +62 -22
  141. package/src/components/TriggerEditor/TriggerEditor.tsx +44 -18
  142. package/src/components/TriggerSettings.tsx +25 -0
  143. package/src/components/index.ts +1 -1
  144. package/src/events.ts +11 -0
  145. package/src/hooks/index.ts +6 -0
  146. package/src/hooks/useComputeRuntimeCallback.ts +68 -0
  147. package/src/hooks/useTriggerRuntimeControls.ts +53 -0
  148. package/src/index.ts +3 -0
  149. package/src/meta.ts +6 -5
  150. package/src/testing/test-functions.ts +1 -1
  151. package/src/translations.ts +7 -0
  152. package/src/types/schema.ts +1 -1
  153. package/dist/lib/browser/AutomationContainer-BRV5AJZ3.mjs +0 -35
  154. package/dist/lib/browser/AutomationContainer-BRV5AJZ3.mjs.map +0 -7
  155. package/dist/lib/browser/AutomationPanel-N5HFJJXW.mjs +0 -11
  156. package/dist/lib/browser/FunctionsContainer-U4HASI4P.mjs +0 -36
  157. package/dist/lib/browser/FunctionsContainer-U4HASI4P.mjs.map +0 -7
  158. package/dist/lib/browser/app-graph-builder-4OFKIRAI.mjs.map +0 -7
  159. package/dist/lib/browser/chunk-4TWQV33E.mjs.map +0 -7
  160. package/dist/lib/browser/chunk-EIY2EUWC.mjs +0 -14
  161. package/dist/lib/browser/chunk-EIY2EUWC.mjs.map +0 -7
  162. package/dist/lib/browser/chunk-GW5U2DGT.mjs +0 -15
  163. package/dist/lib/browser/chunk-GW5U2DGT.mjs.map +0 -7
  164. package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +0 -7
  165. package/dist/lib/browser/chunk-S4SM663I.mjs.map +0 -7
  166. package/dist/lib/browser/chunk-Z5DT4MHW.mjs.map +0 -7
  167. package/dist/lib/browser/intent-resolver-4PSYSQQG.mjs.map +0 -7
  168. package/dist/lib/browser/react-surface-M52XGLXY.mjs.map +0 -7
  169. package/dist/lib/node-esm/AutomationContainer-FYRDTERM.mjs +0 -36
  170. package/dist/lib/node-esm/AutomationContainer-FYRDTERM.mjs.map +0 -7
  171. package/dist/lib/node-esm/FunctionsContainer-VZIVURH6.mjs +0 -37
  172. package/dist/lib/node-esm/FunctionsContainer-VZIVURH6.mjs.map +0 -7
  173. package/dist/lib/node-esm/app-graph-builder-555IHYOB.mjs.map +0 -7
  174. package/dist/lib/node-esm/chunk-AONUBWBE.mjs.map +0 -7
  175. package/dist/lib/node-esm/chunk-CICQ73ZT.mjs +0 -16
  176. package/dist/lib/node-esm/chunk-CICQ73ZT.mjs.map +0 -7
  177. package/dist/lib/node-esm/chunk-CX2AILIS.mjs.map +0 -7
  178. package/dist/lib/node-esm/chunk-NK5N3QKD.mjs +0 -17
  179. package/dist/lib/node-esm/chunk-NK5N3QKD.mjs.map +0 -7
  180. package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +0 -7
  181. package/dist/lib/node-esm/chunk-ZOJVKPCA.mjs.map +0 -7
  182. package/dist/lib/node-esm/intent-resolver-6ZGBUILG.mjs.map +0 -7
  183. package/dist/lib/node-esm/react-surface-Y6AOXM75.mjs.map +0 -7
  184. package/dist/types/src/components/AutomationContainer.d.ts +0 -5
  185. package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
  186. /package/dist/lib/browser/{AutomationPanel-N5HFJJXW.mjs.map → AutomationPanel-7OECLR5N.mjs.map} +0 -0
  187. /package/dist/lib/browser/{FunctionsPanel-I443Y6KB.mjs.map → FunctionsPanel-CRW6SJUN.mjs.map} +0 -0
  188. /package/dist/lib/{node-esm/AutomationPanel-MKOLA2FE.mjs.map → browser/hooks/index.mjs.map} +0 -0
  189. /package/dist/lib/node-esm/{FunctionsPanel-ELINCXPW.mjs.map → AutomationPanel-HCVFNHGQ.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-automation",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.e8ec1fe",
4
4
  "description": "Prompt chain plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -15,6 +15,12 @@
15
15
  "browser": "./dist/lib/browser/index.mjs",
16
16
  "node": "./dist/lib/node-esm/index.mjs"
17
17
  },
18
+ "./hooks": {
19
+ "source": "./src/hooks/index.ts",
20
+ "types": "./dist/types/src/hooks/index.d.ts",
21
+ "browser": "./dist/lib/browser/hooks/index.mjs",
22
+ "node": "./dist/lib/node-esm/hooks/index.mjs"
23
+ },
18
24
  "./types": {
19
25
  "source": "./src/types/index.ts",
20
26
  "types": "./dist/types/src/types/index.d.ts",
@@ -24,7 +30,14 @@
24
30
  },
25
31
  "types": "dist/types/src/index.d.ts",
26
32
  "typesVersions": {
27
- "*": {}
33
+ "*": {
34
+ "hooks": [
35
+ "dist/types/src/hooks/index.d.ts"
36
+ ],
37
+ "types": [
38
+ "dist/types/src/types/index.d.ts"
39
+ ]
40
+ }
28
41
  },
29
42
  "files": [
30
43
  "assets",
@@ -32,49 +45,59 @@
32
45
  "src"
33
46
  ],
34
47
  "dependencies": {
48
+ "@effect/ai": "0.29.1",
49
+ "@effect/platform-browser": "0.72.0",
35
50
  "@preact-signals/safe-react": "^0.9.0",
36
- "@preact/signals-core": "^1.9.0",
37
- "@dxos/app-framework": "0.8.4-main.dedc0f3",
38
- "@dxos/conductor": "0.8.4-main.dedc0f3",
39
- "@dxos/async": "0.8.4-main.dedc0f3",
40
- "@dxos/echo": "0.8.4-main.dedc0f3",
41
- "@dxos/functions": "0.8.4-main.dedc0f3",
42
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
43
- "@dxos/live-object": "0.8.4-main.dedc0f3",
44
- "@dxos/log": "0.8.4-main.dedc0f3",
45
- "@dxos/plugin-graph": "0.8.4-main.dedc0f3",
46
- "@dxos/plugin-client": "0.8.4-main.dedc0f3",
47
- "@dxos/plugin-deck": "0.8.4-main.dedc0f3",
48
- "@dxos/plugin-space": "0.8.4-main.dedc0f3",
49
- "@dxos/random": "0.8.4-main.dedc0f3",
50
- "@dxos/react-client": "0.8.4-main.dedc0f3",
51
- "@dxos/react-ui-form": "0.8.4-main.dedc0f3",
52
- "@dxos/invariant": "0.8.4-main.dedc0f3",
53
- "@dxos/react-ui-list": "0.8.4-main.dedc0f3",
54
- "@dxos/react-ui-stack": "0.8.4-main.dedc0f3",
55
- "@dxos/util": "0.8.4-main.dedc0f3"
51
+ "@preact/signals-core": "^1.12.1",
52
+ "@dxos/ai": "0.8.4-main.e8ec1fe",
53
+ "@dxos/assistant": "0.8.4-main.e8ec1fe",
54
+ "@dxos/async": "0.8.4-main.e8ec1fe",
55
+ "@dxos/conductor": "0.8.4-main.e8ec1fe",
56
+ "@dxos/context": "0.8.4-main.e8ec1fe",
57
+ "@dxos/app-framework": "0.8.4-main.e8ec1fe",
58
+ "@dxos/echo": "0.8.4-main.e8ec1fe",
59
+ "@dxos/functions-runtime": "0.8.4-main.e8ec1fe",
60
+ "@dxos/functions": "0.8.4-main.e8ec1fe",
61
+ "@dxos/invariant": "0.8.4-main.e8ec1fe",
62
+ "@dxos/keys": "0.8.4-main.e8ec1fe",
63
+ "@dxos/log": "0.8.4-main.e8ec1fe",
64
+ "@dxos/live-object": "0.8.4-main.e8ec1fe",
65
+ "@dxos/plugin-client": "0.8.4-main.e8ec1fe",
66
+ "@dxos/plugin-deck": "0.8.4-main.e8ec1fe",
67
+ "@dxos/plugin-graph": "0.8.4-main.e8ec1fe",
68
+ "@dxos/random": "0.8.4-main.e8ec1fe",
69
+ "@dxos/plugin-space": "0.8.4-main.e8ec1fe",
70
+ "@dxos/react-ui-components": "0.8.4-main.e8ec1fe",
71
+ "@dxos/react-ui-editor": "0.8.4-main.e8ec1fe",
72
+ "@dxos/react-ui-form": "0.8.4-main.e8ec1fe",
73
+ "@dxos/react-client": "0.8.4-main.e8ec1fe",
74
+ "@dxos/react-ui-list": "0.8.4-main.e8ec1fe",
75
+ "@dxos/react-ui-stack": "0.8.4-main.e8ec1fe",
76
+ "@dxos/types": "0.8.4-main.e8ec1fe",
77
+ "@dxos/schema": "0.8.4-main.e8ec1fe",
78
+ "@dxos/util": "0.8.4-main.e8ec1fe"
56
79
  },
57
80
  "devDependencies": {
58
- "@effect-rx/rx-react": "0.38.0",
59
- "@effect/platform": "0.90.2",
60
- "@types/react": "~18.2.0",
61
- "@types/react-dom": "~18.2.0",
62
- "effect": "3.17.7",
63
- "react": "~18.2.0",
64
- "react-dom": "~18.2.0",
65
- "vite": "7.1.1",
66
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
67
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
68
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3"
81
+ "@effect-atom/atom-react": "^0.3.4",
82
+ "@effect/platform": "0.92.1",
83
+ "@types/react": "~19.2.2",
84
+ "@types/react-dom": "~19.2.2",
85
+ "effect": "3.18.3",
86
+ "react": "~19.2.0",
87
+ "react-dom": "~19.2.0",
88
+ "vite": "7.1.9",
89
+ "@dxos/react-ui": "0.8.4-main.e8ec1fe",
90
+ "@dxos/react-ui-theme": "0.8.4-main.e8ec1fe",
91
+ "@dxos/storybook-utils": "0.8.4-main.e8ec1fe"
69
92
  },
70
93
  "peerDependencies": {
71
- "@effect-rx/rx-react": "^0.34.1",
94
+ "@effect-atom/atom-react": "^0.3.4",
72
95
  "@effect/platform": "^0.80.12",
73
96
  "effect": "^3.13.3",
74
- "react": "~18.2.0",
75
- "react-dom": "~18.2.0",
76
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
77
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
97
+ "react": "^19.0.0",
98
+ "react-dom": "^19.0.0",
99
+ "@dxos/react-ui": "0.8.4-main.e8ec1fe",
100
+ "@dxos/react-ui-theme": "0.8.4-main.e8ec1fe"
78
101
  },
79
102
  "publishConfig": {
80
103
  "access": "public"
@@ -3,38 +3,44 @@
3
3
  //
4
4
 
5
5
  import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
6
- import { FunctionTrigger, FunctionType } from '@dxos/functions';
6
+ import { Function, Trigger } from '@dxos/functions';
7
7
  import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
8
8
 
9
- import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
9
+ import { AppGraphBuilder, ComputeRuntime, IntentResolver, ReactSurface } from './capabilities';
10
+ import { AutomationEvents } from './events';
10
11
  import { meta } from './meta';
11
12
  import { translations } from './translations';
12
13
 
13
- export const AutomationPlugin = () =>
14
- definePlugin(meta, [
15
- defineModule({
16
- id: `${meta.id}/module/translations`,
17
- activatesOn: Events.SetupTranslations,
18
- activate: () => contributes(Capabilities.Translations, translations),
19
- }),
20
- defineModule({
21
- id: `${meta.id}/module/schema`,
22
- activatesOn: ClientEvents.SetupSchema,
23
- activate: () => contributes(ClientCapabilities.Schema, [FunctionType, FunctionTrigger]),
24
- }),
25
- defineModule({
26
- id: `${meta.id}/module/app-graph-builder`,
27
- activatesOn: Events.SetupAppGraph,
28
- activate: AppGraphBuilder,
29
- }),
30
- defineModule({
31
- id: `${meta.id}/module/intent-resolver`,
32
- activatesOn: Events.SetupIntentResolver,
33
- activate: IntentResolver,
34
- }),
35
- defineModule({
36
- id: `${meta.id}/module/react-surface`,
37
- activatesOn: Events.SetupReactSurface,
38
- activate: ReactSurface,
39
- }),
40
- ]);
14
+ export const AutomationPlugin = definePlugin(meta, () => [
15
+ defineModule({
16
+ id: `${meta.id}/module/translations`,
17
+ activatesOn: Events.SetupTranslations,
18
+ activate: () => contributes(Capabilities.Translations, translations),
19
+ }),
20
+ defineModule({
21
+ id: `${meta.id}/module/schema`,
22
+ activatesOn: ClientEvents.SetupSchema,
23
+ activate: () => contributes(ClientCapabilities.Schema, [Function.Function, Trigger.Trigger]),
24
+ }),
25
+ defineModule({
26
+ id: `${meta.id}/module/app-graph-builder`,
27
+ activatesOn: Events.SetupAppGraph,
28
+ activate: AppGraphBuilder,
29
+ }),
30
+ defineModule({
31
+ id: `${meta.id}/module/intent-resolver`,
32
+ activatesOn: Events.SetupIntentResolver,
33
+ activate: IntentResolver,
34
+ }),
35
+ defineModule({
36
+ id: `${meta.id}/module/react-surface`,
37
+ activatesOn: Events.SetupReactSurface,
38
+ activate: ReactSurface,
39
+ }),
40
+ defineModule({
41
+ id: `${meta.id}/module/compute-runtime`,
42
+ activatesOn: ClientEvents.ClientReady,
43
+ activatesAfter: [AutomationEvents.ComputeRuntimeReady],
44
+ activate: ComputeRuntime,
45
+ }),
46
+ ]);
@@ -2,15 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import { Atom } from '@effect-atom/atom-react';
6
+ import * as Function from 'effect/Function';
7
+ import * as Option from 'effect/Option';
7
8
 
8
9
  import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
9
10
  import { Obj } from '@dxos/echo';
10
- import { ScriptType } from '@dxos/functions';
11
+ import { Script } from '@dxos/functions';
11
12
  import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
12
13
  import { createExtension } from '@dxos/plugin-graph';
13
- import { SPACE_PLUGIN } from '@dxos/plugin-space';
14
+ import { meta as spaceMeta } from '@dxos/plugin-space';
14
15
 
15
16
  import { meta } from '../meta';
16
17
 
@@ -19,10 +20,10 @@ export default (context: PluginContext) =>
19
20
  createExtension({
20
21
  id: `${meta.id}/space-settings-automation`,
21
22
  connector: (node) =>
22
- Rx.make((get) =>
23
- pipe(
23
+ Atom.make((get) =>
24
+ Function.pipe(
24
25
  get(node),
25
- Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),
26
+ Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),
26
27
  Option.map((node) => [
27
28
  {
28
29
  id: `automation-${node.id}`,
@@ -41,10 +42,10 @@ export default (context: PluginContext) =>
41
42
  createExtension({
42
43
  id: `${meta.id}/space-settings-functions`,
43
44
  connector: (node) =>
44
- Rx.make((get) =>
45
- pipe(
45
+ Atom.make((get) =>
46
+ Function.pipe(
46
47
  get(node),
47
- Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),
48
+ Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),
48
49
  Option.map((node) => [
49
50
  {
50
51
  id: `functions-${node.id}`,
@@ -63,10 +64,10 @@ export default (context: PluginContext) =>
63
64
  createExtension({
64
65
  id: `${meta.id}/script-companion`,
65
66
  connector: (node) =>
66
- Rx.make((get) =>
67
- pipe(
67
+ Atom.make((get) =>
68
+ Function.pipe(
68
69
  get(node),
69
- Option.flatMap((node) => (Obj.instanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),
70
+ Option.flatMap((node) => (Obj.instanceOf(Script.Script, node.data) ? Option.some(node) : Option.none())),
70
71
  Option.map((node) => [
71
72
  {
72
73
  id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
@@ -0,0 +1,41 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import type * as ManagedRuntime from 'effect/ManagedRuntime';
6
+
7
+ import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
8
+ import { defineCapability } from '@dxos/app-framework';
9
+ import type { CredentialsService, DatabaseService, FunctionInvocationService, QueueService } from '@dxos/functions';
10
+ import type { InvocationTracer, TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';
11
+ import type { SpaceId } from '@dxos/keys';
12
+
13
+ import { meta } from '../meta';
14
+
15
+ export namespace AutomationCapabilities {
16
+ /**
17
+ * Service stack for executing agents, functions, and triggers.
18
+ */
19
+ export type ComputeServices =
20
+ | TriggerDispatcher
21
+ | AiService.AiService
22
+ | DatabaseService
23
+ | QueueService
24
+ | CredentialsService
25
+ | FunctionInvocationService
26
+ | InvocationTracer
27
+ | TriggerStateStore
28
+ // TODO(dmaretskyi): Those should be provided at AI-chat call site.
29
+ | ToolResolverService
30
+ | ToolExecutionService;
31
+
32
+ export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;
33
+ export interface ComputeRuntimeProvider {
34
+ getRuntime(spaceId: SpaceId): ComputeRuntime;
35
+ }
36
+
37
+ /**
38
+ * Runtime for executing agents, functions, and triggers.
39
+ */
40
+ export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
41
+ }
@@ -0,0 +1,127 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as BrowserKeyValueStore from '@effect/platform-browser/BrowserKeyValueStore';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Layer from 'effect/Layer';
8
+ import * as ManagedRuntime from 'effect/ManagedRuntime';
9
+
10
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
11
+ import { GenericToolkit, makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '@dxos/assistant';
12
+ import { Resource } from '@dxos/context';
13
+ import { Query, Ref } from '@dxos/echo';
14
+ import { CredentialsService, DatabaseService, QueueService } from '@dxos/functions';
15
+ import {
16
+ FunctionImplementationResolver,
17
+ FunctionInvocationServiceLayerWithLocalLoopbackExecutor,
18
+ InvocationTracer,
19
+ RemoteFunctionExecutionService,
20
+ TriggerDispatcher,
21
+ } from '@dxos/functions-runtime';
22
+ import { TriggerStateStore } from '@dxos/functions-runtime';
23
+ import { invariant } from '@dxos/invariant';
24
+ import { type SpaceId } from '@dxos/keys';
25
+ import { ClientCapabilities } from '@dxos/plugin-client';
26
+ import { PropertiesType } from '@dxos/react-client/echo';
27
+
28
+ import { AutomationCapabilities } from './capabilities';
29
+
30
+ export default async (context: PluginContext) => {
31
+ const provider = await new ComputeRuntimeProviderImpl(context).open();
32
+ return contributes(AutomationCapabilities.ComputeRuntime, provider, async () => {
33
+ await provider.close();
34
+ });
35
+ };
36
+
37
+ class ComputeRuntimeProviderImpl extends Resource implements AutomationCapabilities.ComputeRuntimeProvider {
38
+ readonly #runtimes = new Map<SpaceId, AutomationCapabilities.ComputeRuntime>();
39
+ readonly #context: PluginContext;
40
+
41
+ constructor(context: PluginContext) {
42
+ super();
43
+ this.#context = context;
44
+ }
45
+
46
+ protected override async _open() {}
47
+
48
+ protected override async _close() {
49
+ await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
50
+ this.#runtimes.clear();
51
+ }
52
+
53
+ getRuntime(spaceId: SpaceId): AutomationCapabilities.ComputeRuntime {
54
+ if (this.#runtimes.has(spaceId)) {
55
+ return this.#runtimes.get(spaceId)!;
56
+ }
57
+
58
+ const layer = Layer.unwrapEffect(
59
+ Effect.gen(this, function* () {
60
+ const client = this.#context.getCapability(ClientCapabilities.Client);
61
+ const serviceLayer =
62
+ this.#context.getCapability(Capabilities.AiServiceLayer) ?? Layer.die('AiService not found');
63
+
64
+ // TODO(dmaretskyi): Make these reactive.
65
+ const functions = this.#context.getCapabilities(Capabilities.Functions).flat();
66
+ const toolkits = this.#context.getCapabilities(Capabilities.Toolkit);
67
+ const mergedToolkit = GenericToolkit.merge(...toolkits);
68
+ const toolkit = mergedToolkit.toolkit;
69
+ const toolkitLayer = mergedToolkit.layer;
70
+
71
+ const space = client.spaces.get(spaceId);
72
+ invariant(space);
73
+ yield* Effect.promise(() => space.waitUntilReady());
74
+
75
+ return Layer.mergeAll(TriggerDispatcher.layer({ timeControl: 'natural' })).pipe(
76
+ Layer.provideMerge(
77
+ Layer.mergeAll(
78
+ InvocationTracerLive,
79
+ TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
80
+ makeToolResolverFromFunctions(functions, toolkit),
81
+ makeToolExecutionServiceFromFunctions(toolkit, toolkitLayer),
82
+ ),
83
+ ),
84
+ Layer.provideMerge(
85
+ Layer.mergeAll(
86
+ FunctionInvocationServiceLayerWithLocalLoopbackExecutor.pipe(
87
+ Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions })),
88
+ Layer.provideMerge(
89
+ RemoteFunctionExecutionService.fromClient(
90
+ client,
91
+ // If agent is not enabled do not provide spaceId because space context will be unavailable on EDGE.
92
+ client.config.get('runtime.client.edgeFeatures.agents') ? spaceId : undefined,
93
+ ),
94
+ ),
95
+ Layer.provideMerge(serviceLayer),
96
+ Layer.provideMerge(CredentialsService.layerFromDatabase()),
97
+ Layer.provideMerge(space ? DatabaseService.layer(space.db) : DatabaseService.notAvailable),
98
+ Layer.provideMerge(space ? QueueService.layer(space.queues) : QueueService.notAvailable),
99
+ ),
100
+ ),
101
+ ),
102
+ );
103
+ }),
104
+ );
105
+
106
+ const runtime = ManagedRuntime.make(layer);
107
+ this.#runtimes.set(spaceId, runtime);
108
+
109
+ return runtime;
110
+ }
111
+ }
112
+
113
+ const InvocationTracerLive = Layer.unwrapEffect(
114
+ Effect.gen(function* () {
115
+ const {
116
+ objects: [properties],
117
+ } = yield* DatabaseService.runQuery(Query.type(PropertiesType));
118
+ invariant(properties);
119
+ if (!properties.invocationTraceQueue) {
120
+ const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
121
+ properties.invocationTraceQueue = Ref.fromDXN(queue.dxn);
122
+ }
123
+ const queue = properties.invocationTraceQueue.target;
124
+ invariant(queue);
125
+ return InvocationTracer.layerLive({ invocationTraceQueue: queue });
126
+ }),
127
+ );
@@ -5,5 +5,8 @@
5
5
  import { lazy } from '@dxos/app-framework';
6
6
 
7
7
  export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
8
+ export const ComputeRuntime = lazy(() => import('./compute-runtime'));
8
9
  export const IntentResolver = lazy(() => import('./intent-resolver'));
9
10
  export const ReactSurface = lazy(() => import('./react-surface'));
11
+
12
+ export * from './capabilities';
@@ -10,8 +10,8 @@ import {
10
10
  createIntent,
11
11
  createResolver,
12
12
  } from '@dxos/app-framework';
13
- import { Obj, Ref } from '@dxos/echo';
14
- import { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';
13
+ import { Ref } from '@dxos/echo';
14
+ import { Function, Script, Trigger } from '@dxos/functions';
15
15
  import { type DXN } from '@dxos/keys';
16
16
  import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
17
17
  import { SpaceAction } from '@dxos/plugin-space/types';
@@ -24,17 +24,17 @@ export default (context: PluginContext) =>
24
24
  createResolver({
25
25
  intent: AutomationAction.CreateTriggerFromTemplate,
26
26
  resolve: async ({ space, template, enabled = false, scriptName, input }) => {
27
- const trigger = Obj.make(FunctionTrigger, { enabled, input });
27
+ const trigger = Trigger.make({ enabled, input });
28
28
 
29
29
  // TODO(wittjosiah): Factor out function lookup by script name?
30
30
  if (scriptName) {
31
31
  const {
32
32
  objects: [script],
33
- } = await space.db.query(Filter.type(ScriptType, { name: scriptName })).run();
33
+ } = await space.db.query(Filter.type(Script.Script, { name: scriptName })).run();
34
34
  if (script) {
35
35
  const {
36
36
  objects: [fn],
37
- } = await space.db.query(Filter.type(FunctionType, { source: Ref.make(script) })).run();
37
+ } = await space.db.query(Filter.type(Function.Function, { source: Ref.make(script) })).run();
38
38
  if (fn) {
39
39
  trigger.function = Ref.make(fn);
40
40
  }
@@ -4,53 +4,53 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { Capabilities, contributes, createSurface, useLayout } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
+ import { useLayout } from '@dxos/app-framework/react';
8
9
  import { Obj } from '@dxos/echo';
9
- import { ScriptType } from '@dxos/functions';
10
10
  import { getSpace, parseId, useSpace } from '@dxos/react-client/echo';
11
11
 
12
- import { AutomationContainer, FunctionsContainer } from '../components';
12
+ import { AutomationSettings, FunctionsContainer } from '../components';
13
13
  import { meta } from '../meta';
14
14
 
15
15
  export default () =>
16
16
  contributes(Capabilities.ReactSurface, [
17
17
  createSurface({
18
- id: `${meta.id}/space-settings-automation`,
18
+ id: `${meta.id}/space-settings-functions`,
19
19
  role: 'article',
20
- filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-automation`,
20
+ filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-functions`,
21
21
  component: () => {
22
22
  const layout = useLayout();
23
23
  const { spaceId } = parseId(layout.workspace);
24
24
  const space = useSpace(spaceId);
25
- if (!space || !spaceId) {
25
+ if (!space) {
26
26
  return null;
27
27
  }
28
28
 
29
- return <AutomationContainer space={space} />;
29
+ return <FunctionsContainer space={space} />;
30
30
  },
31
31
  }),
32
32
  createSurface({
33
- id: `${meta.id}/space-settings-functions`,
33
+ id: `${meta.id}/space-settings-automation`,
34
34
  role: 'article',
35
- filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-functions`,
35
+ filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-automation`,
36
36
  component: () => {
37
37
  const layout = useLayout();
38
38
  const { spaceId } = parseId(layout.workspace);
39
39
  const space = useSpace(spaceId);
40
- if (!space || !spaceId) {
40
+ if (!space) {
41
41
  return null;
42
42
  }
43
43
 
44
- return <FunctionsContainer space={space} />;
44
+ return <AutomationSettings space={space} />;
45
45
  },
46
46
  }),
47
47
  createSurface({
48
48
  id: `${meta.id}/companion/automation`,
49
49
  role: 'article',
50
- filter: (data): data is { companionTo: ScriptType; subject: 'automation' } =>
51
- Obj.instanceOf(ScriptType, data.companionTo) && data.subject === 'automation',
52
- component: ({ data, role }) => {
53
- return <AutomationContainer space={getSpace(data.companionTo)!} object={data.companionTo} />;
50
+ filter: (data): data is { companionTo: Obj.Any; subject: 'automation' } =>
51
+ Obj.isObject(data.companionTo) && data.subject === 'automation',
52
+ component: ({ data }) => {
53
+ return <AutomationSettings space={getSpace(data.companionTo)!} object={data.companionTo} />;
54
54
  },
55
55
  }),
56
56
  ]);
@@ -2,16 +2,13 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
10
- import { Obj } from '@dxos/echo';
11
- import { FunctionTrigger, FunctionType } from '@dxos/functions';
8
+ import { Function, Trigger } from '@dxos/functions';
12
9
  import { useSpaces } from '@dxos/react-client/echo';
13
10
  import { withClientProvider } from '@dxos/react-client/testing';
14
- import { withLayout, withTheme } from '@dxos/storybook-utils';
11
+ import { withTheme } from '@dxos/react-ui/testing';
15
12
 
16
13
  import { functions } from '../../testing';
17
14
  import { translations } from '../../translations';
@@ -23,7 +20,7 @@ const DefaultStory = () => {
23
20
  const space = spaces[1];
24
21
 
25
22
  return (
26
- <div className='w-96'>
23
+ <div className='is-96'>
27
24
  <AutomationPanel space={space} />
28
25
  </div>
29
26
  );
@@ -34,18 +31,17 @@ const meta = {
34
31
  component: AutomationPanel as any,
35
32
  render: DefaultStory,
36
33
  decorators: [
34
+ withTheme,
37
35
  withClientProvider({
38
36
  createIdentity: true,
39
37
  createSpace: true,
40
- types: [FunctionType, FunctionTrigger],
41
- onSpaceCreated: ({ space }) => {
38
+ types: [Function.Function, Trigger.Trigger],
39
+ onCreateSpace: ({ space }) => {
42
40
  for (const fn of functions) {
43
- space.db.add(Obj.make(FunctionType, fn));
41
+ space.db.add(Function.make(fn));
44
42
  }
45
43
  },
46
44
  }),
47
- withLayout(),
48
- withTheme,
49
45
  ],
50
46
  parameters: {
51
47
  layout: 'centered',