@dxos/plugin-automation 0.8.4-main.5ea62a8 → 0.8.4-main.a4bbb77
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/AutomationPanel-4QA5G3ZY.mjs +11 -0
- package/dist/lib/browser/AutomationSettings-6XLG2PCK.mjs +69 -0
- package/dist/lib/browser/AutomationSettings-6XLG2PCK.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsContainer-U4HASI4P.mjs → FunctionsContainer-BQ6VBDIG.mjs} +7 -7
- package/dist/lib/browser/FunctionsContainer-BQ6VBDIG.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsPanel-I443Y6KB.mjs → FunctionsPanel-QBTOFFNU.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-4OFKIRAI.mjs → app-graph-builder-6TP6ZNYG.mjs} +7 -7
- package/dist/lib/browser/app-graph-builder-6TP6ZNYG.mjs.map +7 -0
- package/dist/lib/browser/chunk-BDJPBZGC.mjs +14 -0
- package/dist/lib/browser/chunk-BDJPBZGC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-Z5DT4MHW.mjs → chunk-EAQL33PI.mjs} +4 -4
- package/dist/lib/browser/chunk-EAQL33PI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HN7OHFCB.mjs → chunk-F4K5EMWL.mjs} +2 -2
- package/dist/lib/browser/{chunk-S4SM663I.mjs → chunk-IN2YC7NY.mjs} +4 -4
- package/dist/lib/browser/{chunk-S4SM663I.mjs.map → chunk-IN2YC7NY.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-PUUREQ2B.mjs → chunk-LNMCGQC2.mjs} +7 -7
- package/dist/lib/browser/chunk-LNMCGQC2.mjs.map +7 -0
- package/dist/lib/browser/chunk-M2WQCY2T.mjs +53 -0
- package/dist/lib/browser/chunk-M2WQCY2T.mjs.map +7 -0
- package/dist/lib/browser/chunk-U66KBK53.mjs +14 -0
- package/dist/lib/browser/chunk-U66KBK53.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GW5U2DGT.mjs → chunk-WWURMV25.mjs} +2 -4
- package/dist/lib/browser/chunk-WWURMV25.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZTXBAXUT.mjs +15 -0
- package/dist/lib/browser/chunk-ZTXBAXUT.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-OFQPXD5I.mjs +158 -0
- package/dist/lib/browser/compute-runtime-OFQPXD5I.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +12 -0
- package/dist/lib/browser/index.mjs +23 -14
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-4PSYSQQG.mjs → intent-resolver-JXVWRAAH.mjs} +5 -5
- package/dist/lib/browser/{intent-resolver-4PSYSQQG.mjs.map → intent-resolver-JXVWRAAH.mjs.map} +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-N4ZVZH4O.mjs → react-surface-NG3MJCDH.mjs} +17 -17
- package/dist/lib/browser/react-surface-NG3MJCDH.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{AutomationPanel-KUP2555Y.mjs → AutomationPanel-WMVR3IST.mjs} +4 -4
- package/dist/lib/node-esm/AutomationSettings-4IW7RGMN.mjs +70 -0
- package/dist/lib/node-esm/AutomationSettings-4IW7RGMN.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsContainer-VZIVURH6.mjs → FunctionsContainer-LHUUOLA5.mjs} +7 -7
- package/dist/lib/node-esm/FunctionsContainer-LHUUOLA5.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsPanel-ELINCXPW.mjs → FunctionsPanel-SHTQIMDV.mjs} +3 -3
- package/dist/lib/node-esm/FunctionsPanel-SHTQIMDV.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-555IHYOB.mjs → app-graph-builder-3A2NIPR5.mjs} +7 -7
- package/dist/lib/node-esm/app-graph-builder-3A2NIPR5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2L2X4JMP.mjs +16 -0
- package/dist/lib/node-esm/chunk-2L2X4JMP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NK5N3QKD.mjs → chunk-5MQJPJR2.mjs} +2 -4
- package/dist/lib/node-esm/chunk-5MQJPJR2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-B6O6UBS7.mjs +16 -0
- package/dist/lib/node-esm/chunk-B6O6UBS7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OEZNHUL2.mjs → chunk-CEWZ2CDM.mjs} +2 -2
- package/dist/lib/node-esm/chunk-DSEZPWSO.mjs +54 -0
- package/dist/lib/node-esm/chunk-DSEZPWSO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JU7JA5X4.mjs → chunk-MN5S5J4O.mjs} +7 -7
- package/dist/lib/node-esm/chunk-MN5S5J4O.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZOJVKPCA.mjs → chunk-N7NES6SZ.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-ZOJVKPCA.mjs.map → chunk-N7NES6SZ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-CX2AILIS.mjs → chunk-PBULJE4B.mjs} +4 -4
- package/dist/lib/node-esm/chunk-PBULJE4B.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UTZIMYCX.mjs +16 -0
- package/dist/lib/node-esm/chunk-UTZIMYCX.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-W5UJNSQY.mjs +159 -0
- package/dist/lib/node-esm/compute-runtime-W5UJNSQY.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +13 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +23 -14
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-6ZGBUILG.mjs → intent-resolver-ROEBZXSS.mjs} +5 -5
- package/dist/lib/node-esm/{intent-resolver-6ZGBUILG.mjs.map → intent-resolver-ROEBZXSS.mjs.map} +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-XE7ILYWA.mjs → react-surface-A4KTYX6Z.mjs} +17 -17
- package/dist/lib/node-esm/react-surface-A4KTYX6Z.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/AutomationPlugin.d.ts +1 -1
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +18 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +2 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +4 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +2 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/AutomationSettings.d.ts +5 -0
- package/dist/types/src/components/AutomationSettings.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +4 -3
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TriggerSettings.d.ts +6 -0
- package/dist/types/src/components/TriggerSettings.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +11 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -37
- package/src/AutomationPlugin.tsx +33 -29
- package/src/capabilities/app-graph-builder.ts +3 -3
- package/src/capabilities/capabilities.ts +47 -0
- package/src/capabilities/compute-runtime.ts +136 -0
- package/src/capabilities/index.ts +3 -0
- package/src/capabilities/react-surface.tsx +11 -11
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +3 -6
- package/src/components/AutomationPanel/AutomationPanel.tsx +7 -7
- package/src/components/{AutomationContainer.tsx → AutomationSettings.tsx} +8 -6
- package/src/components/FunctionsContainer.tsx +4 -4
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +2 -2
- package/src/components/TriggerEditor/SpecSelector.tsx +2 -2
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +4 -6
- package/src/components/TriggerSettings.tsx +25 -0
- package/src/components/index.ts +1 -1
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useComputeRuntimeCallback.ts +30 -0
- package/src/hooks/useTriggerRuntimeControls.ts +52 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +1 -3
- package/src/translations.ts +4 -0
- package/dist/lib/browser/AutomationContainer-A46DB774.mjs +0 -35
- package/dist/lib/browser/AutomationContainer-A46DB774.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-TQXXZHLR.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-U4HASI4P.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-4OFKIRAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-GW5U2DGT.mjs.map +0 -7
- package/dist/lib/browser/chunk-IAUUJ5RL.mjs +0 -14
- package/dist/lib/browser/chunk-IAUUJ5RL.mjs.map +0 -7
- package/dist/lib/browser/chunk-PUUREQ2B.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5DT4MHW.mjs.map +0 -7
- package/dist/lib/browser/react-surface-N4ZVZH4O.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-5S3BBZVY.mjs +0 -36
- package/dist/lib/node-esm/AutomationContainer-5S3BBZVY.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-VZIVURH6.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-555IHYOB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7XZGYNT6.mjs +0 -16
- package/dist/lib/node-esm/chunk-7XZGYNT6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CX2AILIS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JU7JA5X4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NK5N3QKD.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-XE7ILYWA.mjs.map +0 -7
- package/dist/types/src/components/AutomationContainer.d.ts +0 -5
- package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
- /package/dist/lib/browser/{AutomationPanel-TQXXZHLR.mjs.map → AutomationPanel-4QA5G3ZY.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-I443Y6KB.mjs.map → FunctionsPanel-QBTOFFNU.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-HN7OHFCB.mjs.map → chunk-F4K5EMWL.mjs.map} +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-KUP2555Y.mjs.map → browser/hooks/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-ELINCXPW.mjs.map → AutomationPanel-WMVR3IST.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-OEZNHUL2.mjs.map → chunk-CEWZ2CDM.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.
|
|
3
|
+
"version": "0.8.4-main.a4bbb77",
|
|
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,55 @@
|
|
|
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.
|
|
37
|
-
"@dxos/
|
|
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/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
51
|
+
"@preact/signals-core": "^1.12.1",
|
|
52
|
+
"@dxos/ai": "0.8.4-main.a4bbb77",
|
|
53
|
+
"@dxos/app-framework": "0.8.4-main.a4bbb77",
|
|
54
|
+
"@dxos/assistant": "0.8.4-main.a4bbb77",
|
|
55
|
+
"@dxos/async": "0.8.4-main.a4bbb77",
|
|
56
|
+
"@dxos/conductor": "0.8.4-main.a4bbb77",
|
|
57
|
+
"@dxos/echo": "0.8.4-main.a4bbb77",
|
|
58
|
+
"@dxos/keys": "0.8.4-main.a4bbb77",
|
|
59
|
+
"@dxos/echo-schema": "0.8.4-main.a4bbb77",
|
|
60
|
+
"@dxos/functions": "0.8.4-main.a4bbb77",
|
|
61
|
+
"@dxos/log": "0.8.4-main.a4bbb77",
|
|
62
|
+
"@dxos/invariant": "0.8.4-main.a4bbb77",
|
|
63
|
+
"@dxos/live-object": "0.8.4-main.a4bbb77",
|
|
64
|
+
"@dxos/plugin-client": "0.8.4-main.a4bbb77",
|
|
65
|
+
"@dxos/plugin-deck": "0.8.4-main.a4bbb77",
|
|
66
|
+
"@dxos/plugin-space": "0.8.4-main.a4bbb77",
|
|
67
|
+
"@dxos/random": "0.8.4-main.a4bbb77",
|
|
68
|
+
"@dxos/plugin-graph": "0.8.4-main.a4bbb77",
|
|
69
|
+
"@dxos/context": "0.8.4-main.a4bbb77",
|
|
70
|
+
"@dxos/react-ui-form": "0.8.4-main.a4bbb77",
|
|
71
|
+
"@dxos/react-client": "0.8.4-main.a4bbb77",
|
|
72
|
+
"@dxos/react-ui-list": "0.8.4-main.a4bbb77",
|
|
73
|
+
"@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
|
|
74
|
+
"@dxos/util": "0.8.4-main.a4bbb77"
|
|
56
75
|
},
|
|
57
76
|
"devDependencies": {
|
|
58
|
-
"@effect-rx/rx-react": "0.
|
|
59
|
-
"@effect/platform": "0.
|
|
60
|
-
"@types/react": "~
|
|
61
|
-
"@types/react-dom": "~
|
|
62
|
-
"effect": "3.
|
|
63
|
-
"react": "~
|
|
64
|
-
"react-dom": "~
|
|
65
|
-
"vite": "7.1.
|
|
66
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
77
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
78
|
+
"@effect/platform": "0.92.1",
|
|
79
|
+
"@types/react": "~19.2.0",
|
|
80
|
+
"@types/react-dom": "~19.2.0",
|
|
81
|
+
"effect": "3.18.3",
|
|
82
|
+
"react": "~19.2.0",
|
|
83
|
+
"react-dom": "~19.2.0",
|
|
84
|
+
"vite": "7.1.9",
|
|
85
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77",
|
|
86
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
|
|
87
|
+
"@dxos/storybook-utils": "0.8.4-main.a4bbb77"
|
|
69
88
|
},
|
|
70
89
|
"peerDependencies": {
|
|
71
90
|
"@effect-rx/rx-react": "^0.34.1",
|
|
72
91
|
"@effect/platform": "^0.80.12",
|
|
73
92
|
"effect": "^3.13.3",
|
|
74
|
-
"react": "
|
|
75
|
-
"react-dom": "
|
|
76
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
77
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
93
|
+
"react": "^19.0.0",
|
|
94
|
+
"react-dom": "^19.0.0",
|
|
95
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77",
|
|
96
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
|
|
78
97
|
},
|
|
79
98
|
"publishConfig": {
|
|
80
99
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -6,35 +6,39 @@ import { Capabilities, Events, contributes, defineModule, definePlugin } from '@
|
|
|
6
6
|
import { FunctionTrigger, FunctionType } 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
10
|
import { meta } from './meta';
|
|
11
11
|
import { translations } from './translations';
|
|
12
12
|
|
|
13
|
-
export const AutomationPlugin = () =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
13
|
+
export const AutomationPlugin = definePlugin(meta, () => [
|
|
14
|
+
defineModule({
|
|
15
|
+
id: `${meta.id}/module/translations`,
|
|
16
|
+
activatesOn: Events.SetupTranslations,
|
|
17
|
+
activate: () => contributes(Capabilities.Translations, translations),
|
|
18
|
+
}),
|
|
19
|
+
defineModule({
|
|
20
|
+
id: `${meta.id}/module/schema`,
|
|
21
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
22
|
+
activate: () => contributes(ClientCapabilities.Schema, [FunctionType, FunctionTrigger]),
|
|
23
|
+
}),
|
|
24
|
+
defineModule({
|
|
25
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
26
|
+
activatesOn: Events.SetupAppGraph,
|
|
27
|
+
activate: AppGraphBuilder,
|
|
28
|
+
}),
|
|
29
|
+
defineModule({
|
|
30
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
31
|
+
activatesOn: Events.SetupIntentResolver,
|
|
32
|
+
activate: IntentResolver,
|
|
33
|
+
}),
|
|
34
|
+
defineModule({
|
|
35
|
+
id: `${meta.id}/module/react-surface`,
|
|
36
|
+
activatesOn: Events.SetupReactSurface,
|
|
37
|
+
activate: ReactSurface,
|
|
38
|
+
}),
|
|
39
|
+
defineModule({
|
|
40
|
+
id: `${meta.id}/module/compute-runtime`,
|
|
41
|
+
activatesOn: ClientEvents.ClientReady,
|
|
42
|
+
activate: ComputeRuntime,
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
@@ -10,7 +10,7 @@ import { Obj } from '@dxos/echo';
|
|
|
10
10
|
import { ScriptType } from '@dxos/functions';
|
|
11
11
|
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
12
12
|
import { createExtension } from '@dxos/plugin-graph';
|
|
13
|
-
import {
|
|
13
|
+
import { meta as spaceMeta } from '@dxos/plugin-space';
|
|
14
14
|
|
|
15
15
|
import { meta } from '../meta';
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@ export default (context: PluginContext) =>
|
|
|
22
22
|
Rx.make((get) =>
|
|
23
23
|
pipe(
|
|
24
24
|
get(node),
|
|
25
|
-
Option.flatMap((node) => (node.type === `${
|
|
25
|
+
Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),
|
|
26
26
|
Option.map((node) => [
|
|
27
27
|
{
|
|
28
28
|
id: `automation-${node.id}`,
|
|
@@ -44,7 +44,7 @@ export default (context: PluginContext) =>
|
|
|
44
44
|
Rx.make((get) =>
|
|
45
45
|
pipe(
|
|
46
46
|
get(node),
|
|
47
|
-
Option.flatMap((node) => (node.type === `${
|
|
47
|
+
Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),
|
|
48
48
|
Option.map((node) => [
|
|
49
49
|
{
|
|
50
50
|
id: `functions-${node.id}`,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ManagedRuntime } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
8
|
+
import { defineCapability } from '@dxos/app-framework';
|
|
9
|
+
import type {
|
|
10
|
+
CredentialsService,
|
|
11
|
+
DatabaseService,
|
|
12
|
+
FunctionInvocationService,
|
|
13
|
+
InvocationTracer,
|
|
14
|
+
QueueService,
|
|
15
|
+
TriggerDispatcher,
|
|
16
|
+
TriggerStateStore,
|
|
17
|
+
} from '@dxos/functions';
|
|
18
|
+
import type { SpaceId } from '@dxos/keys';
|
|
19
|
+
|
|
20
|
+
import { meta } from '../meta';
|
|
21
|
+
|
|
22
|
+
export namespace AutomationCapabilities {
|
|
23
|
+
/**
|
|
24
|
+
* Service stack for executing agents, functions, and triggers.
|
|
25
|
+
*/
|
|
26
|
+
export type ComputeServices =
|
|
27
|
+
| TriggerDispatcher
|
|
28
|
+
| AiService.AiService
|
|
29
|
+
| DatabaseService
|
|
30
|
+
| QueueService
|
|
31
|
+
| CredentialsService
|
|
32
|
+
| FunctionInvocationService
|
|
33
|
+
| InvocationTracer
|
|
34
|
+
| TriggerStateStore
|
|
35
|
+
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
36
|
+
| ToolResolverService
|
|
37
|
+
| ToolExecutionService;
|
|
38
|
+
|
|
39
|
+
export interface ComputeRuntimeProvider {
|
|
40
|
+
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<ComputeServices, never>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Runtime for executing agents, functions, and triggers.
|
|
45
|
+
*/
|
|
46
|
+
export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
|
|
47
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Toolkit } from '@effect/ai';
|
|
6
|
+
import { BrowserKeyValueStore } from '@effect/platform-browser';
|
|
7
|
+
import { Effect, Layer, ManagedRuntime } from 'effect';
|
|
8
|
+
|
|
9
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
|
+
import { makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '@dxos/assistant';
|
|
11
|
+
import { Resource } from '@dxos/context';
|
|
12
|
+
import { Query, Ref } from '@dxos/echo';
|
|
13
|
+
import {
|
|
14
|
+
CredentialsService,
|
|
15
|
+
DatabaseService,
|
|
16
|
+
FunctionImplementationResolver,
|
|
17
|
+
FunctionInvocationService,
|
|
18
|
+
InvocationTracer,
|
|
19
|
+
LocalFunctionExecutionService,
|
|
20
|
+
QueueService,
|
|
21
|
+
RemoteFunctionExecutionService,
|
|
22
|
+
TriggerDispatcher,
|
|
23
|
+
} from '@dxos/functions';
|
|
24
|
+
import { TriggerStateStore } from '@dxos/functions';
|
|
25
|
+
import { invariant } from '@dxos/invariant';
|
|
26
|
+
import { type SpaceId } from '@dxos/keys';
|
|
27
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
28
|
+
import { PropertiesType } from '@dxos/react-client/echo';
|
|
29
|
+
|
|
30
|
+
import { AutomationCapabilities } from './capabilities';
|
|
31
|
+
|
|
32
|
+
export default async (context: PluginContext) => {
|
|
33
|
+
const provider = await new ComputeRuntimeProviderImpl(context).open();
|
|
34
|
+
return contributes(AutomationCapabilities.ComputeRuntime, provider, async () => {
|
|
35
|
+
await provider.close();
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
class ComputeRuntimeProviderImpl extends Resource implements AutomationCapabilities.ComputeRuntimeProvider {
|
|
40
|
+
readonly #runtimes = new Map<SpaceId, ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>>();
|
|
41
|
+
readonly #context: PluginContext;
|
|
42
|
+
|
|
43
|
+
constructor(context: PluginContext) {
|
|
44
|
+
super();
|
|
45
|
+
this.#context = context;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
protected override async _open() {}
|
|
49
|
+
|
|
50
|
+
protected override async _close() {
|
|
51
|
+
await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
|
|
52
|
+
this.#runtimes.clear();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never> {
|
|
56
|
+
if (this.#runtimes.has(spaceId)) {
|
|
57
|
+
return this.#runtimes.get(spaceId)!;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const layer = Layer.unwrapEffect(
|
|
61
|
+
Effect.gen(this, function* () {
|
|
62
|
+
const client = this.#context.getCapability(ClientCapabilities.Client);
|
|
63
|
+
const serviceLayer =
|
|
64
|
+
this.#context.getCapability(Capabilities.AiServiceLayer) ?? Layer.die('AiService not found');
|
|
65
|
+
|
|
66
|
+
// TODO(dmaretskyi): Make those reactive.
|
|
67
|
+
const functions = this.#context.getCapabilities(Capabilities.Functions);
|
|
68
|
+
const toolkits = this.#context.getCapabilities(Capabilities.Toolkit);
|
|
69
|
+
const handlers = this.#context.getCapabilities(Capabilities.ToolkitHandler);
|
|
70
|
+
|
|
71
|
+
const allFunctions = functions.flat();
|
|
72
|
+
// TODO(wittjosiah): Don't cast.
|
|
73
|
+
const toolkit = Toolkit.merge(...toolkits) as Toolkit.Toolkit<any>;
|
|
74
|
+
const handlersLayer = Layer.mergeAll(Layer.empty, ...handlers);
|
|
75
|
+
|
|
76
|
+
const space = client.spaces.get(spaceId);
|
|
77
|
+
invariant(space);
|
|
78
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
79
|
+
|
|
80
|
+
return Layer.mergeAll(TriggerDispatcher.layer({ timeControl: 'natural' })).pipe(
|
|
81
|
+
Layer.provideMerge(
|
|
82
|
+
Layer.mergeAll(
|
|
83
|
+
InvocationTracerLive,
|
|
84
|
+
TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
|
|
85
|
+
makeToolResolverFromFunctions(allFunctions, toolkit),
|
|
86
|
+
makeToolExecutionServiceFromFunctions(toolkit, handlersLayer),
|
|
87
|
+
),
|
|
88
|
+
),
|
|
89
|
+
Layer.provideMerge(
|
|
90
|
+
Layer.mergeAll(
|
|
91
|
+
FunctionInvocationService.layer.pipe(
|
|
92
|
+
Layer.provideMerge(
|
|
93
|
+
LocalFunctionExecutionService.layerLive.pipe(
|
|
94
|
+
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions: allFunctions })),
|
|
95
|
+
Layer.provideMerge(
|
|
96
|
+
RemoteFunctionExecutionService.fromClient(
|
|
97
|
+
client.edge.baseUrl,
|
|
98
|
+
// If agent is not enabled do not provide spaceId because space context will be unavailable on EDGE.
|
|
99
|
+
client.config.get('runtime.client.edgeFeatures.agents') ? spaceId : undefined,
|
|
100
|
+
),
|
|
101
|
+
),
|
|
102
|
+
Layer.provideMerge(serviceLayer),
|
|
103
|
+
Layer.provideMerge(CredentialsService.layerFromDatabase()),
|
|
104
|
+
Layer.provideMerge(space ? DatabaseService.layer(space.db) : DatabaseService.notAvailable),
|
|
105
|
+
Layer.provideMerge(space ? QueueService.layer(space.queues) : QueueService.notAvailable),
|
|
106
|
+
),
|
|
107
|
+
),
|
|
108
|
+
),
|
|
109
|
+
),
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const runtime = ManagedRuntime.make(layer);
|
|
116
|
+
this.#runtimes.set(spaceId, runtime);
|
|
117
|
+
|
|
118
|
+
return runtime;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const InvocationTracerLive = Layer.unwrapEffect(
|
|
123
|
+
Effect.gen(function* () {
|
|
124
|
+
const {
|
|
125
|
+
objects: [properties],
|
|
126
|
+
} = yield* DatabaseService.runQuery(Query.type(PropertiesType));
|
|
127
|
+
invariant(properties);
|
|
128
|
+
if (!properties.invocationTraceQueue) {
|
|
129
|
+
const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
|
|
130
|
+
properties.invocationTraceQueue = Ref.fromDXN(queue.dxn);
|
|
131
|
+
}
|
|
132
|
+
const queue = properties.invocationTraceQueue.target;
|
|
133
|
+
invariant(queue);
|
|
134
|
+
return InvocationTracer.layerLive({ invocationTraceQueue: queue });
|
|
135
|
+
}),
|
|
136
|
+
);
|
|
@@ -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';
|
|
@@ -9,39 +9,39 @@ import { Obj } from '@dxos/echo';
|
|
|
9
9
|
import { ScriptType } from '@dxos/functions';
|
|
10
10
|
import { getSpace, parseId, useSpace } from '@dxos/react-client/echo';
|
|
11
11
|
|
|
12
|
-
import {
|
|
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-
|
|
18
|
+
id: `${meta.id}/space-settings-functions`,
|
|
19
19
|
role: 'article',
|
|
20
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-
|
|
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
|
|
25
|
+
if (!space) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
return <
|
|
29
|
+
return <FunctionsContainer space={space} />;
|
|
30
30
|
},
|
|
31
31
|
}),
|
|
32
32
|
createSurface({
|
|
33
|
-
id: `${meta.id}/space-settings-
|
|
33
|
+
id: `${meta.id}/space-settings-automation`,
|
|
34
34
|
role: 'article',
|
|
35
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-
|
|
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
|
|
40
|
+
if (!space) {
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
return <
|
|
44
|
+
return <AutomationSettings space={space} />;
|
|
45
45
|
},
|
|
46
46
|
}),
|
|
47
47
|
createSurface({
|
|
@@ -49,8 +49,8 @@ export default () =>
|
|
|
49
49
|
role: 'article',
|
|
50
50
|
filter: (data): data is { companionTo: ScriptType; subject: 'automation' } =>
|
|
51
51
|
Obj.instanceOf(ScriptType, data.companionTo) && data.subject === 'automation',
|
|
52
|
-
component: ({ data
|
|
53
|
-
return <
|
|
52
|
+
component: ({ data }) => {
|
|
53
|
+
return <AutomationSettings space={getSpace(data.companionTo)!} object={data.companionTo} />;
|
|
54
54
|
},
|
|
55
55
|
}),
|
|
56
56
|
]);
|
|
@@ -2,8 +2,6 @@
|
|
|
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
|
|
|
@@ -11,7 +9,7 @@ import { Obj } from '@dxos/echo';
|
|
|
11
9
|
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
12
10
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
13
11
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import {
|
|
12
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
15
13
|
|
|
16
14
|
import { functions } from '../../testing';
|
|
17
15
|
import { translations } from '../../translations';
|
|
@@ -34,18 +32,17 @@ const meta = {
|
|
|
34
32
|
component: AutomationPanel as any,
|
|
35
33
|
render: DefaultStory,
|
|
36
34
|
decorators: [
|
|
35
|
+
withTheme,
|
|
37
36
|
withClientProvider({
|
|
38
37
|
createIdentity: true,
|
|
39
38
|
createSpace: true,
|
|
40
39
|
types: [FunctionType, FunctionTrigger],
|
|
41
|
-
|
|
40
|
+
onCreateSpace: ({ space }) => {
|
|
42
41
|
for (const fn of functions) {
|
|
43
42
|
space.db.add(Obj.make(FunctionType, fn));
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
45
|
}),
|
|
47
|
-
withLayout(),
|
|
48
|
-
withTheme,
|
|
49
46
|
],
|
|
50
47
|
parameters: {
|
|
51
48
|
layout: 'centered',
|
|
@@ -9,26 +9,26 @@ import { Filter, Obj } from '@dxos/echo';
|
|
|
9
9
|
import { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';
|
|
10
10
|
import { type Client, useClient } from '@dxos/react-client';
|
|
11
11
|
import { type Space, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
12
|
-
import { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { Clipboard, IconButton, Input, Separator, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
13
13
|
import { ControlItem, controlItemClasses } from '@dxos/react-ui-form';
|
|
14
14
|
import { List } from '@dxos/react-ui-list';
|
|
15
15
|
import { ghostHover, mx } from '@dxos/react-ui-theme';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { meta } from '../../meta';
|
|
18
18
|
import { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';
|
|
19
19
|
|
|
20
20
|
const grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';
|
|
21
21
|
|
|
22
|
-
export type AutomationPanelProps = {
|
|
22
|
+
export type AutomationPanelProps = ThemedClassName<{
|
|
23
23
|
space: Space;
|
|
24
24
|
object?: Obj.Any;
|
|
25
25
|
initialTrigger?: FunctionTrigger;
|
|
26
26
|
onDone?: () => void;
|
|
27
|
-
}
|
|
27
|
+
}>;
|
|
28
28
|
|
|
29
29
|
// TODO(burdon): Factor out common layout with ViewEditor.
|
|
30
|
-
export const AutomationPanel = ({ space, object, initialTrigger, onDone }: AutomationPanelProps) => {
|
|
31
|
-
const { t } = useTranslation(
|
|
30
|
+
export const AutomationPanel = ({ classNames, space, object, initialTrigger, onDone }: AutomationPanelProps) => {
|
|
31
|
+
const { t } = useTranslation(meta.id);
|
|
32
32
|
const client = useClient();
|
|
33
33
|
const triggers = useQuery(space, Filter.type(FunctionTrigger));
|
|
34
34
|
const functions = useQuery(space, Filter.type(FunctionType));
|
|
@@ -79,7 +79,7 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
|
-
<div className={controlItemClasses}>
|
|
82
|
+
<div className={mx(controlItemClasses, classNames)}>
|
|
83
83
|
{triggers.length > 0 && (
|
|
84
84
|
<List.Root<FunctionTrigger> items={triggers} isItem={Schema.is(FunctionTrigger)} getId={(field) => field.id}>
|
|
85
85
|
{({ items: triggers }) => (
|
|
@@ -7,22 +7,24 @@ import React from 'react';
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
13
|
+
import { TriggersSettings } from './TriggerSettings';
|
|
13
14
|
|
|
14
|
-
export const
|
|
15
|
-
const { t } = useTranslation(
|
|
15
|
+
export const AutomationSettings = (props: AutomationPanelProps) => {
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
16
17
|
return (
|
|
17
18
|
<ControlPage>
|
|
18
19
|
<ControlSection
|
|
19
|
-
title={t('automation verbose label', { ns:
|
|
20
|
-
description={t('automation description', { ns:
|
|
20
|
+
title={t('automation verbose label', { ns: meta.id })}
|
|
21
|
+
description={t('automation description', { ns: meta.id })}
|
|
21
22
|
>
|
|
22
23
|
<AutomationPanel {...props} />
|
|
24
|
+
<TriggersSettings space={props.space} />
|
|
23
25
|
</ControlSection>
|
|
24
26
|
</ControlPage>
|
|
25
27
|
);
|
|
26
28
|
};
|
|
27
29
|
|
|
28
|
-
export default
|
|
30
|
+
export default AutomationSettings;
|
|
@@ -8,17 +8,17 @@ import { type Space } from '@dxos/react-client/echo';
|
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../meta';
|
|
12
12
|
|
|
13
13
|
import { FunctionsPanel } from './FunctionsPanel';
|
|
14
14
|
|
|
15
15
|
export const FunctionsContainer = ({ space }: { space: Space }) => {
|
|
16
|
-
const { t } = useTranslation(
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
17
|
return (
|
|
18
18
|
<ControlPage>
|
|
19
19
|
<ControlSection
|
|
20
|
-
title={t('functions verbose label', { ns:
|
|
21
|
-
description={t('functions description', { ns:
|
|
20
|
+
title={t('functions verbose label', { ns: meta.id })}
|
|
21
|
+
description={t('functions description', { ns: meta.id })}
|
|
22
22
|
>
|
|
23
23
|
<FunctionsPanel space={space} />
|
|
24
24
|
</ControlSection>
|
|
@@ -13,7 +13,7 @@ import { controlItemClasses } from '@dxos/react-ui-form';
|
|
|
13
13
|
import { List } from '@dxos/react-ui-list';
|
|
14
14
|
import { ghostHover, mx } from '@dxos/react-ui-theme';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { meta } from '../../meta';
|
|
17
17
|
|
|
18
18
|
const grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';
|
|
19
19
|
|
|
@@ -22,7 +22,7 @@ export type FunctionsPanelProps = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const FunctionsPanel = ({ space }: FunctionsPanelProps) => {
|
|
25
|
-
const { t } = useTranslation(
|
|
25
|
+
const { t } = useTranslation(meta.id);
|
|
26
26
|
const functions = useQuery(space, Filter.type(FunctionType));
|
|
27
27
|
const scripts = useQuery(space, Filter.type(ScriptType));
|
|
28
28
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
@@ -8,12 +8,12 @@ import { type FunctionTrigger, TriggerKinds, type TriggerType } from '@dxos/func
|
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { type InputProps, SelectInput, useInputProps } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
12
|
|
|
13
13
|
export type SpecSelectorProps = InputProps;
|
|
14
14
|
|
|
15
15
|
export const SpecSelector = (props: SpecSelectorProps) => {
|
|
16
|
-
const { t } = useTranslation(
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
17
|
const specProps = useInputProps(['spec' satisfies keyof FunctionTrigger]);
|
|
18
18
|
|
|
19
19
|
const handleTypeChange = useCallback(
|