@dxos/plugin-automation 0.8.4-main.b97322e → 0.8.4-main.bcb3aa67d6
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.
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-NQY2QL47.mjs +44 -0
- package/dist/lib/browser/chunk-NQY2QL47.mjs.map +7 -0
- package/dist/lib/browser/chunk-WZKRIDQ6.mjs +54 -0
- package/dist/lib/browser/chunk-WZKRIDQ6.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1122 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-trigger-from-template-J2Z7AAHV.mjs +77 -0
- package/dist/lib/browser/create-trigger-from-template-J2Z7AAHV.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +117 -0
- package/dist/lib/browser/hooks/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +72 -83
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -4
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-POUAOKR5.mjs +56 -0
- package/dist/lib/node-esm/chunk-POUAOKR5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z6J7TDVZ.mjs +45 -0
- package/dist/lib/node-esm/chunk-Z6J7TDVZ.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1123 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-trigger-from-template-TRSHHYEB.mjs +78 -0
- package/dist/lib/node-esm/create-trigger-from-template-TRSHHYEB.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +118 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +72 -83
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -4
- package/dist/types/src/AutomationPlugin.d.ts +2 -1
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +6 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +3 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/commands/index.d.ts +2 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/create/index.d.ts +25 -0
- package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/create/queue.d.ts +13 -0
- package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/create/subscription.d.ts +15 -0
- package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/create/timer.d.ts +13 -0
- package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/index.d.ts +57 -0
- package/dist/types/src/cli/commands/trigger/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/list.d.ts +7 -0
- package/dist/types/src/cli/commands/trigger/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/options.d.ts +11 -0
- package/dist/types/src/cli/commands/trigger/options.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/remove.d.ts +8 -0
- package/dist/types/src/cli/commands/trigger/remove.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/update/index.d.ts +28 -0
- package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/update/queue.d.ts +12 -0
- package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/update/subscription.d.ts +13 -0
- package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/update/timer.d.ts +11 -0
- package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/cli/commands/trigger/util.d.ts +46 -0
- package/dist/types/src/cli/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +47 -4
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +8 -0
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts +4 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -9
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +11 -8
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +116 -4
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +4 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts +3 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/FunctionsContainer}/FunctionsContainer.d.ts +0 -1
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/FunctionsContainer/index.d.ts +3 -0
- package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +6 -0
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +5 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntime.d.ts +7 -0
- package/dist/types/src/hooks/useComputeRuntime.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +13 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeService.d.ts +5 -0
- package/dist/types/src/hooks/useComputeRuntimeService.d.ts.map +1 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +12 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-trigger-from-template.d.ts +5 -0
- package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +19 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +204 -3
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +29 -25
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +24 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +12 -4
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +105 -41
- package/src/AutomationPlugin.tsx +22 -33
- package/src/capabilities/app-graph-builder.ts +55 -79
- package/src/capabilities/compute-runtime.ts +180 -0
- package/src/capabilities/index.ts +9 -4
- package/src/capabilities/node.ts +7 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +46 -45
- package/src/cli/commands/index.ts +5 -0
- package/src/cli/commands/trigger/create/index.ts +14 -0
- package/src/cli/commands/trigger/create/queue.ts +90 -0
- package/src/cli/commands/trigger/create/subscription.ts +129 -0
- package/src/cli/commands/trigger/create/timer.ts +94 -0
- package/src/cli/commands/trigger/index.ts +16 -0
- package/src/cli/commands/trigger/list.ts +68 -0
- package/src/cli/commands/trigger/options.ts +59 -0
- package/src/cli/commands/trigger/remove.ts +45 -0
- package/src/cli/commands/trigger/update/index.ts +14 -0
- package/src/cli/commands/trigger/update/queue.ts +195 -0
- package/src/cli/commands/trigger/update/subscription.ts +279 -0
- package/src/cli/commands/trigger/update/timer.ts +194 -0
- package/src/cli/commands/trigger/util.ts +409 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +24 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +18 -17
- package/src/components/AutomationPanel/AutomationPanel.tsx +240 -90
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +52 -32
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +114 -0
- package/src/components/FunctionsRegistry/index.ts +8 -0
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +42 -35
- package/src/components/TriggerEditor/SpecSelector.tsx +39 -22
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +123 -34
- package/src/components/TriggerEditor/TriggerEditor.tsx +110 -48
- package/src/components/index.ts +1 -2
- package/src/containers/AutomationSettings/AutomationSettings.tsx +27 -0
- package/src/containers/AutomationSettings/index.ts +7 -0
- package/src/containers/FunctionsContainer/FunctionsContainer.tsx +33 -0
- package/src/containers/FunctionsContainer/index.ts +7 -0
- package/src/containers/TriggerSettings/TriggerSettings.tsx +26 -0
- package/src/containers/TriggerSettings/index.ts +6 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useComputeRuntime.ts +15 -0
- package/src/hooks/useComputeRuntimeCallback.ts +67 -0
- package/src/hooks/useComputeRuntimeService.ts +22 -0
- package/src/hooks/useTriggerRuntimeControls.ts +67 -0
- package/src/index.ts +2 -4
- package/src/meta.ts +8 -7
- package/src/operations/create-trigger-from-template.ts +74 -0
- package/src/operations/definitions.ts +27 -0
- package/src/operations/index.ts +9 -0
- package/src/testing/test-functions.ts +10 -7
- package/src/translations.ts +37 -29
- package/src/types/capabilities.ts +54 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +6 -6
- package/dist/lib/browser/AutomationContainer-VZNV2ZQF.mjs +0 -38
- package/dist/lib/browser/AutomationContainer-VZNV2ZQF.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-ZWA6GOFY.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-IOB333TX.mjs +0 -39
- package/dist/lib/browser/FunctionsContainer-IOB333TX.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-56ZKRVM5.mjs +0 -10
- package/dist/lib/browser/app-graph-builder-ZTAUTFI4.mjs +0 -80
- package/dist/lib/browser/app-graph-builder-ZTAUTFI4.mjs.map +0 -7
- package/dist/lib/browser/chunk-ECSTS2UI.mjs +0 -14
- package/dist/lib/browser/chunk-ECSTS2UI.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERTIGJYE.mjs +0 -147
- package/dist/lib/browser/chunk-ERTIGJYE.mjs.map +0 -7
- package/dist/lib/browser/chunk-FSJZXTS2.mjs +0 -230
- package/dist/lib/browser/chunk-FSJZXTS2.mjs.map +0 -7
- package/dist/lib/browser/chunk-GW5U2DGT.mjs +0 -15
- package/dist/lib/browser/chunk-GW5U2DGT.mjs.map +0 -7
- package/dist/lib/browser/chunk-HN7OHFCB.mjs +0 -38
- package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +0 -7
- package/dist/lib/browser/chunk-LYJVTIVD.mjs +0 -94
- package/dist/lib/browser/chunk-LYJVTIVD.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-U3ZAQEFW.mjs +0 -76
- package/dist/lib/browser/intent-resolver-U3ZAQEFW.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4DFSM7OX.mjs +0 -64
- package/dist/lib/browser/react-surface-4DFSM7OX.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-WMIH3F4V.mjs +0 -39
- package/dist/lib/node-esm/AutomationContainer-WMIH3F4V.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-YYUMSK2W.mjs +0 -12
- package/dist/lib/node-esm/AutomationPanel-YYUMSK2W.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-DJWB6WFH.mjs +0 -40
- package/dist/lib/node-esm/FunctionsContainer-DJWB6WFH.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-KGIOZSPZ.mjs +0 -11
- package/dist/lib/node-esm/FunctionsPanel-KGIOZSPZ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-3FP63ZSG.mjs +0 -81
- package/dist/lib/node-esm/app-graph-builder-3FP63ZSG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AZH66CED.mjs +0 -231
- package/dist/lib/node-esm/chunk-AZH66CED.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HIMYPGHF.mjs +0 -148
- package/dist/lib/node-esm/chunk-HIMYPGHF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NK5N3QKD.mjs +0 -17
- package/dist/lib/node-esm/chunk-NK5N3QKD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OEZNHUL2.mjs +0 -39
- package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SGZPTJ47.mjs +0 -16
- package/dist/lib/node-esm/chunk-SGZPTJ47.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZGPUV5VS.mjs +0 -95
- package/dist/lib/node-esm/chunk-ZGPUV5VS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-3QWXEBPX.mjs +0 -77
- package/dist/lib/node-esm/intent-resolver-3QWXEBPX.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-3PNW7NDW.mjs +0 -65
- package/dist/lib/node-esm/react-surface-3PNW7NDW.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/AutomationContainer.d.ts +0 -5
- package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/components/AutomationContainer.tsx +0 -30
- package/src/components/FunctionsContainer.tsx +0 -31
- /package/dist/lib/browser/{AutomationPanel-ZWA6GOFY.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-56ZKRVM5.mjs.map → node-esm/chunk-HSLMI22Q.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,20 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.bcb3aa67d6",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./src/capabilities/index.ts",
|
|
19
|
+
"browser": "./src/capabilities/index.ts",
|
|
20
|
+
"node": "./src/capabilities/node.ts"
|
|
21
|
+
},
|
|
22
|
+
"#components": "./src/components/index.ts",
|
|
23
|
+
"#containers": "./src/containers/index.ts",
|
|
24
|
+
"#hooks": "./src/hooks/index.ts",
|
|
25
|
+
"#meta": "./src/meta.ts",
|
|
26
|
+
"#operations": "./src/operations/index.ts",
|
|
27
|
+
"#testing": "./src/testing/index.ts",
|
|
28
|
+
"#types": "./src/types/index.ts"
|
|
29
|
+
},
|
|
11
30
|
"exports": {
|
|
12
31
|
".": {
|
|
32
|
+
"source": "./src/index.ts",
|
|
13
33
|
"types": "./dist/types/src/index.d.ts",
|
|
14
34
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
35
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
36
|
},
|
|
37
|
+
"./cli": {
|
|
38
|
+
"source": "./src/cli/index.ts",
|
|
39
|
+
"types": "./dist/types/src/cli/index.d.ts",
|
|
40
|
+
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./hooks": {
|
|
43
|
+
"source": "./src/hooks/index.ts",
|
|
44
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
45
|
+
"browser": "./dist/lib/browser/hooks/index.mjs",
|
|
46
|
+
"node": "./dist/lib/node-esm/hooks/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./operations": {
|
|
49
|
+
"source": "./src/operations/index.ts",
|
|
50
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
51
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
52
|
+
"node": "./dist/lib/node-esm/operations/index.mjs"
|
|
53
|
+
},
|
|
17
54
|
"./types": {
|
|
55
|
+
"source": "./src/types/index.ts",
|
|
18
56
|
"types": "./dist/types/src/types/index.d.ts",
|
|
19
57
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
20
58
|
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
@@ -22,7 +60,14 @@
|
|
|
22
60
|
},
|
|
23
61
|
"types": "dist/types/src/index.d.ts",
|
|
24
62
|
"typesVersions": {
|
|
25
|
-
"*": {
|
|
63
|
+
"*": {
|
|
64
|
+
"hooks": [
|
|
65
|
+
"dist/types/src/hooks/index.d.ts"
|
|
66
|
+
],
|
|
67
|
+
"types": [
|
|
68
|
+
"dist/types/src/types/index.d.ts"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
26
71
|
},
|
|
27
72
|
"files": [
|
|
28
73
|
"assets",
|
|
@@ -30,49 +75,68 @@
|
|
|
30
75
|
"src"
|
|
31
76
|
],
|
|
32
77
|
"dependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
78
|
+
"@effect-atom/atom": "^0.5.1",
|
|
79
|
+
"@effect/ai": "0.33.2",
|
|
80
|
+
"@effect/cli": "0.73.2",
|
|
81
|
+
"@effect/platform-browser": "0.74.0",
|
|
82
|
+
"@effect/printer-ansi": "0.47.0",
|
|
83
|
+
"@dxos/ai": "0.8.4-main.bcb3aa67d6",
|
|
84
|
+
"@dxos/app-toolkit": "0.8.4-main.bcb3aa67d6",
|
|
85
|
+
"@dxos/app-framework": "0.8.4-main.bcb3aa67d6",
|
|
86
|
+
"@dxos/assistant": "0.8.4-main.bcb3aa67d6",
|
|
87
|
+
"@dxos/blueprints": "0.8.4-main.bcb3aa67d6",
|
|
88
|
+
"@dxos/async": "0.8.4-main.bcb3aa67d6",
|
|
89
|
+
"@dxos/cli-util": "0.8.4-main.bcb3aa67d6",
|
|
90
|
+
"@dxos/client": "0.8.4-main.bcb3aa67d6",
|
|
91
|
+
"@dxos/conductor": "0.8.4-main.bcb3aa67d6",
|
|
92
|
+
"@dxos/context": "0.8.4-main.bcb3aa67d6",
|
|
93
|
+
"@dxos/effect": "0.8.4-main.bcb3aa67d6",
|
|
94
|
+
"@dxos/echo-db": "0.8.4-main.bcb3aa67d6",
|
|
95
|
+
"@dxos/functions": "0.8.4-main.bcb3aa67d6",
|
|
96
|
+
"@dxos/invariant": "0.8.4-main.bcb3aa67d6",
|
|
97
|
+
"@dxos/echo-atom": "0.8.4-main.bcb3aa67d6",
|
|
98
|
+
"@dxos/keys": "0.8.4-main.bcb3aa67d6",
|
|
99
|
+
"@dxos/functions-runtime": "0.8.4-main.bcb3aa67d6",
|
|
100
|
+
"@dxos/log": "0.8.4-main.bcb3aa67d6",
|
|
101
|
+
"@dxos/operation": "0.8.4-main.bcb3aa67d6",
|
|
102
|
+
"@dxos/plugin-client": "0.8.4-main.bcb3aa67d6",
|
|
103
|
+
"@dxos/plugin-deck": "0.8.4-main.bcb3aa67d6",
|
|
104
|
+
"@dxos/random": "0.8.4-main.bcb3aa67d6",
|
|
105
|
+
"@dxos/plugin-graph": "0.8.4-main.bcb3aa67d6",
|
|
106
|
+
"@dxos/plugin-space": "0.8.4-main.bcb3aa67d6",
|
|
107
|
+
"@dxos/react-client": "0.8.4-main.bcb3aa67d6",
|
|
108
|
+
"@dxos/react-ui-attention": "0.8.4-main.bcb3aa67d6",
|
|
109
|
+
"@dxos/echo": "0.8.4-main.bcb3aa67d6",
|
|
110
|
+
"@dxos/react-ui-list": "0.8.4-main.bcb3aa67d6",
|
|
111
|
+
"@dxos/react-ui-editor": "0.8.4-main.bcb3aa67d6",
|
|
112
|
+
"@dxos/react-ui-stack": "0.8.4-main.bcb3aa67d6",
|
|
113
|
+
"@dxos/react-ui-form": "0.8.4-main.bcb3aa67d6",
|
|
114
|
+
"@dxos/schema": "0.8.4-main.bcb3aa67d6",
|
|
115
|
+
"@dxos/types": "0.8.4-main.bcb3aa67d6",
|
|
116
|
+
"@dxos/util": "0.8.4-main.bcb3aa67d6",
|
|
117
|
+
"@dxos/react-ui-components": "0.8.4-main.bcb3aa67d6"
|
|
54
118
|
},
|
|
55
119
|
"devDependencies": {
|
|
56
|
-
"@effect-
|
|
57
|
-
"@effect/platform": "0.
|
|
58
|
-
"@types/react": "~
|
|
59
|
-
"@types/react-dom": "~
|
|
60
|
-
"effect": "3.
|
|
61
|
-
"react": "~
|
|
62
|
-
"react-dom": "~
|
|
63
|
-
"vite": "
|
|
64
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
120
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
121
|
+
"@effect/platform": "0.94.4",
|
|
122
|
+
"@types/react": "~19.2.7",
|
|
123
|
+
"@types/react-dom": "~19.2.3",
|
|
124
|
+
"effect": "3.20.0",
|
|
125
|
+
"react": "~19.2.3",
|
|
126
|
+
"react-dom": "~19.2.3",
|
|
127
|
+
"vite": "^7.1.11",
|
|
128
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
129
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6",
|
|
130
|
+
"@dxos/storybook-utils": "0.8.4-main.bcb3aa67d6"
|
|
67
131
|
},
|
|
68
132
|
"peerDependencies": {
|
|
69
|
-
"@effect-
|
|
70
|
-
"@effect/platform": "
|
|
71
|
-
"effect": "
|
|
72
|
-
"react": "~
|
|
73
|
-
"react-dom": "~
|
|
74
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
75
|
-
"@dxos/
|
|
133
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
134
|
+
"@effect/platform": "0.94.4",
|
|
135
|
+
"effect": "3.20.0",
|
|
136
|
+
"react": "~19.2.3",
|
|
137
|
+
"react-dom": "~19.2.3",
|
|
138
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
139
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6"
|
|
76
140
|
},
|
|
77
141
|
"publishConfig": {
|
|
78
142
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -2,39 +2,28 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { Trigger } from '@dxos/functions';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
import { ClientEvents } from '@dxos/plugin-client/types';
|
|
8
10
|
|
|
9
|
-
import {
|
|
10
|
-
import { meta } from './meta';
|
|
11
|
+
import { meta } from '#meta';
|
|
11
12
|
import { translations } from './translations';
|
|
13
|
+
import { AutomationEvents } from '#types';
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
]);
|
|
15
|
+
import { AppGraphBuilder, ComputeRuntime, OperationHandler, ReactSurface } from '#capabilities';
|
|
16
|
+
|
|
17
|
+
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
18
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
19
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
20
|
+
AppPlugin.addSchemaModule({ schema: [Operation.PersistentOperation, Trigger.Trigger] }),
|
|
21
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
22
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
23
|
+
Plugin.addModule({
|
|
24
|
+
activatesOn: ClientEvents.ClientReady,
|
|
25
|
+
activatesAfter: [AutomationEvents.ComputeRuntimeReady],
|
|
26
|
+
activate: ComputeRuntime,
|
|
27
|
+
}),
|
|
28
|
+
Plugin.make,
|
|
29
|
+
);
|
|
@@ -2,85 +2,61 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { Option, pipe } from 'effect';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode } from '@dxos/app-toolkit';
|
|
9
|
+
import { Script } from '@dxos/functions';
|
|
10
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
|
+
import { meta as spaceMeta } from '@dxos/plugin-space/meta';
|
|
12
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
14
13
|
|
|
15
|
-
import { meta } from '
|
|
14
|
+
import { meta } from '#meta';
|
|
16
15
|
|
|
17
|
-
export default (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
id: `${meta.id}/script-companion`,
|
|
65
|
-
connector: (node) =>
|
|
66
|
-
Rx.make((get) =>
|
|
67
|
-
pipe(
|
|
68
|
-
get(node),
|
|
69
|
-
Option.flatMap((node) => (Obj.instanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),
|
|
70
|
-
Option.map((node) => [
|
|
71
|
-
{
|
|
72
|
-
id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
73
|
-
type: PLANK_COMPANION_TYPE,
|
|
74
|
-
data: 'automation',
|
|
75
|
-
properties: {
|
|
76
|
-
label: ['script automation label', { ns: meta.id }],
|
|
77
|
-
icon: 'ph--lightning--regular',
|
|
78
|
-
disposition: 'hidden',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
]),
|
|
82
|
-
Option.getOrElse(() => []),
|
|
83
|
-
),
|
|
84
|
-
),
|
|
85
|
-
}),
|
|
86
|
-
]);
|
|
16
|
+
export default Capability.makeModule(
|
|
17
|
+
Effect.fnUntraced(function* () {
|
|
18
|
+
const extensions = yield* Effect.all([
|
|
19
|
+
GraphBuilder.createExtension({
|
|
20
|
+
id: `${meta.id}.space-settings-automation`,
|
|
21
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
22
|
+
connector: (node) =>
|
|
23
|
+
Effect.succeed([
|
|
24
|
+
AppNode.makeSettingsPanel({
|
|
25
|
+
id: `${meta.id}.automations`,
|
|
26
|
+
type: `${meta.id}.space-settings-automation`,
|
|
27
|
+
label: ['automation-panel.label', { ns: meta.id }],
|
|
28
|
+
icon: 'ph--lightning--regular',
|
|
29
|
+
}),
|
|
30
|
+
]),
|
|
31
|
+
}),
|
|
32
|
+
GraphBuilder.createExtension({
|
|
33
|
+
id: `${meta.id}.space-settings-functions`,
|
|
34
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
35
|
+
connector: (node) =>
|
|
36
|
+
Effect.succeed([
|
|
37
|
+
AppNode.makeSettingsPanel({
|
|
38
|
+
id: `${meta.id}.functions`,
|
|
39
|
+
type: `${meta.id}.space-settings-functions`,
|
|
40
|
+
label: ['functions-panel.label', { ns: meta.id }],
|
|
41
|
+
icon: 'ph--function--regular',
|
|
42
|
+
}),
|
|
43
|
+
]),
|
|
44
|
+
}),
|
|
45
|
+
GraphBuilder.createTypeExtension({
|
|
46
|
+
id: `${meta.id}.script-companion`,
|
|
47
|
+
type: Script.Script,
|
|
48
|
+
connector: (script) =>
|
|
49
|
+
Effect.succeed([
|
|
50
|
+
AppNode.makeCompanion({
|
|
51
|
+
id: linkedSegment('automation'),
|
|
52
|
+
label: ['script-automation.label', { ns: meta.id }],
|
|
53
|
+
icon: 'ph--lightning--regular',
|
|
54
|
+
data: 'automation',
|
|
55
|
+
}),
|
|
56
|
+
]),
|
|
57
|
+
}),
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as BrowserKeyValueStore from '@effect/platform-browser/BrowserKeyValueStore';
|
|
6
|
+
import * as KeyValueStore from '@effect/platform/KeyValueStore';
|
|
7
|
+
import { Registry } from '@effect-atom/atom';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Layer from 'effect/Layer';
|
|
10
|
+
import * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
11
|
+
|
|
12
|
+
import { AiService, GenericToolkit } from '@dxos/ai';
|
|
13
|
+
import { Capabilities, Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
14
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
15
|
+
import { AgentService, ToolExecutionServices } from '@dxos/assistant';
|
|
16
|
+
import { ClientService } from '@dxos/client';
|
|
17
|
+
import { SpaceProperties } from '@dxos/client/echo';
|
|
18
|
+
import { Resource } from '@dxos/context';
|
|
19
|
+
import { Database, Feed, Obj, Query, Ref } from '@dxos/echo';
|
|
20
|
+
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
21
|
+
import { CredentialsService, feedServiceFromQueueServiceLayer, QueueService } from '@dxos/functions';
|
|
22
|
+
import {
|
|
23
|
+
FeedTraceSink,
|
|
24
|
+
FunctionImplementationResolver,
|
|
25
|
+
FunctionInvocationServiceLayerWithLocalLoopbackExecutor,
|
|
26
|
+
ProcessManager,
|
|
27
|
+
RemoteFunctionExecutionService,
|
|
28
|
+
ServiceResolver,
|
|
29
|
+
TracingServiceExt,
|
|
30
|
+
TriggerDispatcher,
|
|
31
|
+
TriggerStateStore,
|
|
32
|
+
} from '@dxos/functions-runtime';
|
|
33
|
+
import { invariant } from '@dxos/invariant';
|
|
34
|
+
import { type SpaceId } from '@dxos/keys';
|
|
35
|
+
import { OperationHandlerSet, OperationRegistry } from '@dxos/operation';
|
|
36
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
37
|
+
|
|
38
|
+
import { AutomationCapabilities } from '#types';
|
|
39
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
40
|
+
|
|
41
|
+
export default Capability.makeModule(
|
|
42
|
+
Effect.fnUntraced(function* () {
|
|
43
|
+
const capabilities = yield* Capability.Service;
|
|
44
|
+
const provider = yield* Effect.tryPromise(() => new ComputeRuntimeProviderImpl(capabilities).open());
|
|
45
|
+
return Capability.contributes(AutomationCapabilities.ComputeRuntime, provider, () =>
|
|
46
|
+
Effect.tryPromise(() => provider.close()),
|
|
47
|
+
);
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Adapts plugin capabilities to runtime layers.
|
|
53
|
+
*/
|
|
54
|
+
class ComputeRuntimeProviderImpl extends Resource implements AutomationCapabilities.ComputeRuntimeProvider {
|
|
55
|
+
readonly #runtimes = new Map<SpaceId, AutomationCapabilities.ComputeRuntime>();
|
|
56
|
+
readonly #capabilities: CapabilityManager.CapabilityManager;
|
|
57
|
+
|
|
58
|
+
constructor(capabilities: CapabilityManager.CapabilityManager) {
|
|
59
|
+
super();
|
|
60
|
+
this.#capabilities = capabilities;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
protected override async _open() {}
|
|
64
|
+
|
|
65
|
+
protected override async _close() {
|
|
66
|
+
await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
|
|
67
|
+
this.#runtimes.clear();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
getRuntime(spaceId: SpaceId): AutomationCapabilities.ComputeRuntime {
|
|
71
|
+
if (this.#runtimes.has(spaceId)) {
|
|
72
|
+
return this.#runtimes.get(spaceId)!;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const layer = Layer.unwrapEffect(
|
|
76
|
+
Effect.gen(this, function* () {
|
|
77
|
+
const client = this.#capabilities.get(ClientCapabilities.Client);
|
|
78
|
+
const aiServiceLayer =
|
|
79
|
+
this.#capabilities.get(AppCapabilities.AiServiceLayer) ?? Layer.die('AiService not found');
|
|
80
|
+
const registry = this.#capabilities.get(Capabilities.AtomRegistry);
|
|
81
|
+
|
|
82
|
+
// TODO(dmaretskyi): Make these reactive.
|
|
83
|
+
const operationHandlers = OperationHandlerSet.merge(
|
|
84
|
+
...this.#capabilities.getAll(Capabilities.OperationHandler),
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const genericToolkitProvider = Layer.succeed(GenericToolkit.GenericToolkitProvider, {
|
|
88
|
+
getToolkit: () => {
|
|
89
|
+
const toolkits = this.#capabilities.getAll(AppCapabilities.Toolkit);
|
|
90
|
+
return GenericToolkit.merge(...toolkits);
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const blueprints = this.#capabilities
|
|
95
|
+
.getAll(AppCapabilities.BlueprintDefinition)
|
|
96
|
+
.flatMap((blueprint) => blueprint.make());
|
|
97
|
+
|
|
98
|
+
const space = client.spaces.get(spaceId);
|
|
99
|
+
invariant(space, `Invalid space: ${spaceId}`);
|
|
100
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
101
|
+
|
|
102
|
+
return Layer.mergeAll(
|
|
103
|
+
TriggerDispatcher.layer({ timeControl: 'natural' }),
|
|
104
|
+
Layer.succeed(Blueprint.RegistryService, new Blueprint.Registry(blueprints)),
|
|
105
|
+
).pipe(
|
|
106
|
+
Layer.provideMerge(AgentService.layer()),
|
|
107
|
+
Layer.provideMerge(ProcessManager.layer()),
|
|
108
|
+
Layer.provideMerge(
|
|
109
|
+
ServiceResolver.layerRequirements(
|
|
110
|
+
Database.Service,
|
|
111
|
+
GenericToolkit.GenericToolkitProvider,
|
|
112
|
+
QueueService,
|
|
113
|
+
Feed.Service,
|
|
114
|
+
OperationRegistry.Service,
|
|
115
|
+
AiService.AiService,
|
|
116
|
+
CredentialsService,
|
|
117
|
+
Blueprint.RegistryService,
|
|
118
|
+
),
|
|
119
|
+
),
|
|
120
|
+
Layer.provideMerge(Layer.succeed(Blueprint.RegistryService, new Blueprint.Registry(blueprints))),
|
|
121
|
+
Layer.provideMerge(OperationRegistry.layer),
|
|
122
|
+
Layer.provideMerge(Layer.succeed(Capability.Service, this.#capabilities)),
|
|
123
|
+
Layer.provideMerge(Layer.succeed(Registry.AtomRegistry, registry)),
|
|
124
|
+
Layer.provideMerge(
|
|
125
|
+
Layer.mergeAll(
|
|
126
|
+
TracingServiceLive,
|
|
127
|
+
FeedTraceSink.layerLive,
|
|
128
|
+
TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
|
|
129
|
+
ToolExecutionServices,
|
|
130
|
+
KeyValueStore.layerMemory,
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
Layer.provideMerge(feedServiceFromQueueServiceLayer),
|
|
134
|
+
Layer.provideMerge(OperationHandlerSet.provide(operationHandlers)),
|
|
135
|
+
Layer.provideMerge(
|
|
136
|
+
FunctionInvocationServiceLayerWithLocalLoopbackExecutor.pipe(
|
|
137
|
+
Layer.provideMerge(genericToolkitProvider),
|
|
138
|
+
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions: operationHandlers })),
|
|
139
|
+
Layer.provideMerge(
|
|
140
|
+
RemoteFunctionExecutionService.fromClient(
|
|
141
|
+
client,
|
|
142
|
+
client.config.get('runtime.client.edgeFeatures.agents') ? spaceId : undefined,
|
|
143
|
+
),
|
|
144
|
+
),
|
|
145
|
+
Layer.provideMerge(aiServiceLayer),
|
|
146
|
+
Layer.provideMerge(CredentialsService.layerFromDatabase()),
|
|
147
|
+
Layer.provideMerge(ClientService.fromClient(client)),
|
|
148
|
+
Layer.provideMerge(space ? Database.layer(space.db) : Database.notAvailable),
|
|
149
|
+
Layer.provideMerge(space ? QueueService.layer(space.queues) : QueueService.notAvailable),
|
|
150
|
+
Layer.provideMerge(space ? createFeedServiceLayer(space.queues) : Feed.notAvailable),
|
|
151
|
+
),
|
|
152
|
+
),
|
|
153
|
+
);
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
const runtime = ManagedRuntime.make(layer);
|
|
158
|
+
this.#runtimes.set(spaceId, runtime);
|
|
159
|
+
return runtime;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const TracingServiceLive = Layer.unwrapEffect(
|
|
164
|
+
Effect.gen(function* () {
|
|
165
|
+
const objects = yield* Database.runQuery(Query.type(SpaceProperties));
|
|
166
|
+
const [properties] = objects;
|
|
167
|
+
invariant(properties);
|
|
168
|
+
// TODO(burdon): Check ref target has loaded?
|
|
169
|
+
if (!properties.invocationTraceQueue || !properties.invocationTraceQueue.target) {
|
|
170
|
+
const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
|
|
171
|
+
Obj.change(properties, (obj) => {
|
|
172
|
+
obj.invocationTraceQueue = Ref.fromDXN(queue.dxn);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const queue = properties.invocationTraceQueue!.target;
|
|
177
|
+
invariant(queue);
|
|
178
|
+
return TracingServiceExt.layerInvocationsQueue({ invocationTraceQueue: queue });
|
|
179
|
+
}),
|
|
180
|
+
);
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
6
7
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
8
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
+
export const ComputeRuntime = Capability.lazy('ComputeRuntime', () => import('./compute-runtime'));
|
|
10
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
11
|
+
'OperationHandler',
|
|
12
|
+
() => import('./operation-handler'),
|
|
13
|
+
);
|
|
14
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { AutomationOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, AutomationOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|