@dxos/plugin-automation 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65
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-IGLIQY2N.mjs +11 -0
- package/dist/lib/browser/{AutomationSettings-TJYG77L6.mjs → AutomationSettings-EDO3N5WI.mjs} +7 -7
- package/dist/lib/browser/{AutomationSettings-TJYG77L6.mjs.map → AutomationSettings-EDO3N5WI.mjs.map} +1 -1
- package/dist/lib/browser/{FunctionsContainer-XHEQSNNO.mjs → FunctionsContainer-R4ZMYSFJ.mjs} +4 -4
- package/dist/lib/browser/{FunctionsPanel-5WPUZGRB.mjs → FunctionsPanel-NMA4RYJL.mjs} +3 -3
- package/dist/lib/browser/{FunctionsRegistry-XRXIZRLL.mjs → FunctionsRegistry-TMKAEG5E.mjs} +3 -3
- package/dist/lib/browser/TriggerSettings-56AIMOEC.mjs +11 -0
- package/dist/lib/browser/{app-graph-builder-HLARI3VW.mjs → app-graph-builder-74ILZP25.mjs} +16 -18
- package/dist/lib/browser/app-graph-builder-74ILZP25.mjs.map +7 -0
- package/dist/lib/browser/{chunk-U55ZXRYM.mjs → chunk-75XLBFAG.mjs} +4 -5
- package/dist/lib/browser/chunk-75XLBFAG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZNI2CGQP.mjs → chunk-BWEKRPFJ.mjs} +29 -5
- package/dist/lib/browser/chunk-BWEKRPFJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PZNBEKO5.mjs → chunk-EL64ZPPN.mjs} +2 -2
- package/dist/lib/browser/{chunk-PZNBEKO5.mjs.map → chunk-EL64ZPPN.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-XFXYU645.mjs → chunk-FUVAC5EC.mjs} +2 -2
- package/dist/lib/browser/{chunk-WOBCY2FQ.mjs → chunk-GVHAETEQ.mjs} +7 -7
- package/dist/lib/browser/{chunk-WOBCY2FQ.mjs.map → chunk-GVHAETEQ.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-SEG5OCGB.mjs → chunk-H2MV4XE6.mjs} +3 -3
- package/dist/lib/browser/{chunk-4EY2KMCM.mjs → chunk-O23LHDEX.mjs} +4 -7
- package/dist/lib/browser/chunk-O23LHDEX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QPG3AKFX.mjs → chunk-OAZ2JYXV.mjs} +2 -2
- package/dist/lib/browser/{chunk-3P4R5WNC.mjs → chunk-Z7F7X2C5.mjs} +2 -2
- package/dist/lib/browser/cli/index.mjs +21 -14
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/{compute-runtime-L2RVWXY2.mjs → compute-runtime-F3UMRKCL.mjs} +3 -3
- package/dist/lib/browser/hooks/index.mjs +3 -3
- package/dist/lib/browser/index.mjs +11 -11
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-2U6ZQVXR.mjs → operation-resolver-IRC2DZU7.mjs} +8 -7
- package/dist/lib/browser/operation-resolver-IRC2DZU7.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-U6FAYV42.mjs → react-surface-5MFPVWIN.mjs} +14 -18
- package/dist/lib/browser/react-surface-5MFPVWIN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{AutomationPanel-F7MPUR7U.mjs → AutomationPanel-O2BCQA7P.mjs} +4 -4
- package/dist/lib/node-esm/{AutomationSettings-5AHJMILI.mjs → AutomationSettings-LJNRQUX7.mjs} +7 -7
- package/dist/lib/node-esm/{AutomationSettings-5AHJMILI.mjs.map → AutomationSettings-LJNRQUX7.mjs.map} +1 -1
- package/dist/lib/node-esm/{FunctionsContainer-U5UVRKVT.mjs → FunctionsContainer-GYRPQZM7.mjs} +4 -4
- package/dist/lib/node-esm/{FunctionsPanel-UFL5LT2R.mjs → FunctionsPanel-DCXXLSVP.mjs} +3 -3
- package/dist/lib/node-esm/{FunctionsRegistry-574OBZ5T.mjs → FunctionsRegistry-7WCHC64E.mjs} +3 -3
- package/dist/lib/node-esm/FunctionsRegistry-7WCHC64E.mjs.map +7 -0
- package/dist/lib/node-esm/TriggerSettings-ONY5ZUKW.mjs +12 -0
- package/dist/lib/node-esm/TriggerSettings-ONY5ZUKW.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-Z2TMQHVX.mjs → app-graph-builder-VDXPOWCH.mjs} +16 -18
- package/dist/lib/node-esm/app-graph-builder-VDXPOWCH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QNPYY3XZ.mjs → chunk-2UF55HSG.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-4DK33JDH.mjs → chunk-6B4WZRVH.mjs} +7 -7
- package/dist/lib/node-esm/{chunk-4DK33JDH.mjs.map → chunk-6B4WZRVH.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-RTEXGGBX.mjs → chunk-6JVB3IHW.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-7AIKTEAX.mjs → chunk-FPXVLTEY.mjs} +4 -7
- package/dist/lib/node-esm/chunk-FPXVLTEY.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-34HGM46Z.mjs → chunk-JVUE5PMI.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-GXFQR3KI.mjs → chunk-K7T2MVB7.mjs} +4 -5
- package/dist/lib/node-esm/chunk-K7T2MVB7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CMZ4NKSK.mjs → chunk-Q5JSKD6Z.mjs} +29 -5
- package/dist/lib/node-esm/chunk-Q5JSKD6Z.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2X564LII.mjs → chunk-R5YEWJCG.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-5FXNN3MV.mjs → chunk-WC5AT7B3.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-5FXNN3MV.mjs.map → chunk-WC5AT7B3.mjs.map} +1 -1
- package/dist/lib/node-esm/cli/index.mjs +21 -14
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/{compute-runtime-XD6A5Q7Q.mjs → compute-runtime-AMFVJMF2.mjs} +3 -3
- package/dist/lib/node-esm/hooks/index.mjs +3 -3
- package/dist/lib/node-esm/index.mjs +11 -11
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-XWJGBHJZ.mjs → operation-resolver-CBLQHL4N.mjs} +8 -7
- package/dist/lib/node-esm/operation-resolver-CBLQHL4N.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-BVNHCWQ7.mjs → react-surface-Z74AHU4T.mjs} +14 -18
- package/dist/lib/node-esm/react-surface-Z74AHU4T.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/commands/trigger/util.d.ts +2 -2
- package/dist/types/src/cli/commands/trigger/util.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerSettings/index.d.ts +2 -2
- package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +3 -3
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +14 -13
- package/src/capabilities/operation-resolver/operation-resolver.ts +4 -4
- package/src/capabilities/react-surface/react-surface.tsx +9 -13
- package/src/cli/commands/trigger/util.ts +27 -18
- package/src/components/AutomationPanel/AutomationPanel.tsx +1 -2
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +2 -2
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +2 -2
- package/src/components/TriggerEditor/TriggerEditor.tsx +21 -4
- package/src/containers/AutomationSettings/AutomationSettings.tsx +1 -1
- package/src/containers/TriggerSettings/index.ts +2 -3
- package/src/meta.ts +1 -1
- package/src/types/capabilities.ts +1 -1
- package/src/types/events.ts +1 -1
- package/src/types/schema.ts +3 -3
- package/dist/lib/browser/AutomationPanel-EHRSV2DL.mjs +0 -11
- package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs +0 -13
- package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs.map +0 -7
- package/dist/lib/browser/chunk-4EY2KMCM.mjs.map +0 -7
- package/dist/lib/browser/chunk-U55ZXRYM.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZNI2CGQP.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-U6FAYV42.mjs.map +0 -7
- package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs +0 -14
- package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7AIKTEAX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GXFQR3KI.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-BVNHCWQ7.mjs.map +0 -7
- /package/dist/lib/browser/{AutomationPanel-EHRSV2DL.mjs.map → AutomationPanel-IGLIQY2N.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsContainer-XHEQSNNO.mjs.map → FunctionsContainer-R4ZMYSFJ.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-5WPUZGRB.mjs.map → FunctionsPanel-NMA4RYJL.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsRegistry-XRXIZRLL.mjs.map → FunctionsRegistry-TMKAEG5E.mjs.map} +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-F7MPUR7U.mjs.map → browser/TriggerSettings-56AIMOEC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-XFXYU645.mjs.map → chunk-FUVAC5EC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-SEG5OCGB.mjs.map → chunk-H2MV4XE6.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-QPG3AKFX.mjs.map → chunk-OAZ2JYXV.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-3P4R5WNC.mjs.map → chunk-Z7F7X2C5.mjs.map} +0 -0
- /package/dist/lib/browser/{compute-runtime-L2RVWXY2.mjs.map → compute-runtime-F3UMRKCL.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-UFL5LT2R.mjs.map → AutomationPanel-O2BCQA7P.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsContainer-U5UVRKVT.mjs.map → FunctionsContainer-GYRPQZM7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsRegistry-574OBZ5T.mjs.map → FunctionsPanel-DCXXLSVP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-QNPYY3XZ.mjs.map → chunk-2UF55HSG.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-RTEXGGBX.mjs.map → chunk-6JVB3IHW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-34HGM46Z.mjs.map → chunk-JVUE5PMI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-2X564LII.mjs.map → chunk-R5YEWJCG.mjs.map} +0 -0
- /package/dist/lib/node-esm/{compute-runtime-XD6A5Q7Q.mjs.map → compute-runtime-AMFVJMF2.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.d05673bc65",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -59,39 +59,39 @@
|
|
|
59
59
|
"@effect/cli": "0.73.2",
|
|
60
60
|
"@effect/platform-browser": "0.74.0",
|
|
61
61
|
"@effect/printer-ansi": "0.47.0",
|
|
62
|
-
"@dxos/ai": "0.8.4-main.
|
|
63
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/context": "0.8.4-main.
|
|
70
|
-
"@dxos/conductor": "0.8.4-main.
|
|
71
|
-
"@dxos/echo": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/echo
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/functions": "0.8.4-main.
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/invariant": "0.8.4-main.
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/random": "0.8.4-main.
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/util": "0.8.4-main.
|
|
62
|
+
"@dxos/ai": "0.8.4-main.d05673bc65",
|
|
63
|
+
"@dxos/app-framework": "0.8.4-main.d05673bc65",
|
|
64
|
+
"@dxos/assistant": "0.8.4-main.d05673bc65",
|
|
65
|
+
"@dxos/app-toolkit": "0.8.4-main.d05673bc65",
|
|
66
|
+
"@dxos/cli-util": "0.8.4-main.d05673bc65",
|
|
67
|
+
"@dxos/client": "0.8.4-main.d05673bc65",
|
|
68
|
+
"@dxos/async": "0.8.4-main.d05673bc65",
|
|
69
|
+
"@dxos/context": "0.8.4-main.d05673bc65",
|
|
70
|
+
"@dxos/conductor": "0.8.4-main.d05673bc65",
|
|
71
|
+
"@dxos/echo-atom": "0.8.4-main.d05673bc65",
|
|
72
|
+
"@dxos/effect": "0.8.4-main.d05673bc65",
|
|
73
|
+
"@dxos/echo": "0.8.4-main.d05673bc65",
|
|
74
|
+
"@dxos/echo-db": "0.8.4-main.d05673bc65",
|
|
75
|
+
"@dxos/functions": "0.8.4-main.d05673bc65",
|
|
76
|
+
"@dxos/functions-runtime": "0.8.4-main.d05673bc65",
|
|
77
|
+
"@dxos/keys": "0.8.4-main.d05673bc65",
|
|
78
|
+
"@dxos/invariant": "0.8.4-main.d05673bc65",
|
|
79
|
+
"@dxos/operation": "0.8.4-main.d05673bc65",
|
|
80
|
+
"@dxos/plugin-deck": "0.8.4-main.d05673bc65",
|
|
81
|
+
"@dxos/plugin-graph": "0.8.4-main.d05673bc65",
|
|
82
|
+
"@dxos/log": "0.8.4-main.d05673bc65",
|
|
83
|
+
"@dxos/plugin-space": "0.8.4-main.d05673bc65",
|
|
84
|
+
"@dxos/random": "0.8.4-main.d05673bc65",
|
|
85
|
+
"@dxos/react-client": "0.8.4-main.d05673bc65",
|
|
86
|
+
"@dxos/react-ui-components": "0.8.4-main.d05673bc65",
|
|
87
|
+
"@dxos/react-ui-editor": "0.8.4-main.d05673bc65",
|
|
88
|
+
"@dxos/react-ui-form": "0.8.4-main.d05673bc65",
|
|
89
|
+
"@dxos/react-ui-list": "0.8.4-main.d05673bc65",
|
|
90
|
+
"@dxos/react-ui-stack": "0.8.4-main.d05673bc65",
|
|
91
|
+
"@dxos/plugin-client": "0.8.4-main.d05673bc65",
|
|
92
|
+
"@dxos/types": "0.8.4-main.d05673bc65",
|
|
93
|
+
"@dxos/schema": "0.8.4-main.d05673bc65",
|
|
94
|
+
"@dxos/util": "0.8.4-main.d05673bc65"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"react": "~19.2.3",
|
|
103
103
|
"react-dom": "~19.2.3",
|
|
104
104
|
"vite": "^7.1.11",
|
|
105
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
105
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
106
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65",
|
|
107
|
+
"@dxos/storybook-utils": "0.8.4-main.d05673bc65"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
110
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"effect": "3.19.16",
|
|
113
113
|
"react": "~19.2.3",
|
|
114
114
|
"react-dom": "~19.2.3",
|
|
115
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
116
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
116
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65"
|
|
117
117
|
},
|
|
118
118
|
"publishConfig": {
|
|
119
119
|
"access": "public"
|
|
@@ -7,7 +7,8 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { Script } from '@dxos/functions';
|
|
10
|
-
import {
|
|
10
|
+
import { COMPANION_PREFIX } from '@dxos/app-toolkit';
|
|
11
|
+
import { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
11
12
|
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
13
|
import { meta as spaceMeta } from '@dxos/plugin-space';
|
|
13
14
|
|
|
@@ -17,14 +18,14 @@ export default Capability.makeModule(
|
|
|
17
18
|
Effect.fnUntraced(function* () {
|
|
18
19
|
const extensions = yield* Effect.all([
|
|
19
20
|
GraphBuilder.createExtension({
|
|
20
|
-
id: `${meta.id}
|
|
21
|
-
match: NodeMatcher.whenNodeType(`${spaceMeta.id}
|
|
21
|
+
id: `${meta.id}.space-settings-automation`,
|
|
22
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
22
23
|
connector: (node) =>
|
|
23
24
|
Effect.succeed([
|
|
24
25
|
{
|
|
25
|
-
id:
|
|
26
|
-
type: `${meta.id}
|
|
27
|
-
data: `${meta.id}
|
|
26
|
+
id: `${meta.id}.automations`,
|
|
27
|
+
type: `${meta.id}.space-settings-automation`,
|
|
28
|
+
data: `${meta.id}.space-settings-automation`,
|
|
28
29
|
properties: {
|
|
29
30
|
label: ['automation panel label', { ns: meta.id }],
|
|
30
31
|
icon: 'ph--lightning--regular',
|
|
@@ -33,14 +34,14 @@ export default Capability.makeModule(
|
|
|
33
34
|
]),
|
|
34
35
|
}),
|
|
35
36
|
GraphBuilder.createExtension({
|
|
36
|
-
id: `${meta.id}
|
|
37
|
-
match: NodeMatcher.whenNodeType(`${spaceMeta.id}
|
|
37
|
+
id: `${meta.id}.space-settings-functions`,
|
|
38
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
38
39
|
connector: (node) =>
|
|
39
40
|
Effect.succeed([
|
|
40
41
|
{
|
|
41
|
-
id:
|
|
42
|
-
type: `${meta.id}
|
|
43
|
-
data: `${meta.id}
|
|
42
|
+
id: `${meta.id}.functions`,
|
|
43
|
+
type: `${meta.id}.space-settings-functions`,
|
|
44
|
+
data: `${meta.id}.space-settings-functions`,
|
|
44
45
|
properties: {
|
|
45
46
|
label: ['functions panel label', { ns: meta.id }],
|
|
46
47
|
icon: 'ph--function--regular',
|
|
@@ -49,12 +50,12 @@ export default Capability.makeModule(
|
|
|
49
50
|
]),
|
|
50
51
|
}),
|
|
51
52
|
GraphBuilder.createTypeExtension({
|
|
52
|
-
id: `${meta.id}
|
|
53
|
+
id: `${meta.id}.script-companion`,
|
|
53
54
|
type: Script.Script,
|
|
54
55
|
connector: (script) =>
|
|
55
56
|
Effect.succeed([
|
|
56
57
|
{
|
|
57
|
-
id:
|
|
58
|
+
id: `${COMPANION_PREFIX}automation`,
|
|
58
59
|
type: PLANK_COMPANION_TYPE,
|
|
59
60
|
data: 'automation',
|
|
60
61
|
properties: {
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
|
+
import { LayoutOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
9
9
|
import { Obj, Ref } from '@dxos/echo';
|
|
10
10
|
import { Function, Script, Trigger } from '@dxos/functions';
|
|
11
11
|
import { type DXN } from '@dxos/keys';
|
|
12
12
|
import { Operation, OperationResolver } from '@dxos/operation';
|
|
13
|
-
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
14
13
|
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
15
14
|
import { Filter } from '@dxos/react-client/echo';
|
|
16
15
|
|
|
16
|
+
import { meta } from '../../meta';
|
|
17
17
|
import { AutomationOperation } from '../../types';
|
|
18
18
|
|
|
19
19
|
export default Capability.makeModule(
|
|
@@ -70,8 +70,8 @@ export default Capability.makeModule(
|
|
|
70
70
|
hidden: true,
|
|
71
71
|
});
|
|
72
72
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
73
|
-
subject: [
|
|
74
|
-
workspace: db.spaceId,
|
|
73
|
+
subject: [`${getSpacePath(db.spaceId)}/settings/${meta.id}.automations`],
|
|
74
|
+
workspace: getSpacePath(db.spaceId),
|
|
75
75
|
});
|
|
76
76
|
}),
|
|
77
77
|
}),
|
|
@@ -7,9 +7,9 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
-
import { useLayout } from '@dxos/app-toolkit/ui';
|
|
11
10
|
import { Obj } from '@dxos/echo';
|
|
12
|
-
import {
|
|
11
|
+
import { useActiveSpace } from '@dxos/plugin-space';
|
|
12
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
13
13
|
|
|
14
14
|
import { AutomationSettings, FunctionsContainer } from '../../containers';
|
|
15
15
|
import { meta } from '../../meta';
|
|
@@ -18,13 +18,11 @@ export default Capability.makeModule(() =>
|
|
|
18
18
|
Effect.succeed(
|
|
19
19
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
20
20
|
Surface.create({
|
|
21
|
-
id: `${meta.id}
|
|
21
|
+
id: `${meta.id}.space-settings-functions`,
|
|
22
22
|
role: 'article',
|
|
23
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}
|
|
23
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}.space-settings-functions`,
|
|
24
24
|
component: () => {
|
|
25
|
-
const
|
|
26
|
-
const { spaceId } = parseId(layout.workspace);
|
|
27
|
-
const space = useSpace(spaceId);
|
|
25
|
+
const space = useActiveSpace();
|
|
28
26
|
if (!space) {
|
|
29
27
|
return null;
|
|
30
28
|
}
|
|
@@ -33,13 +31,11 @@ export default Capability.makeModule(() =>
|
|
|
33
31
|
},
|
|
34
32
|
}),
|
|
35
33
|
Surface.create({
|
|
36
|
-
id: `${meta.id}
|
|
34
|
+
id: `${meta.id}.space-settings-automation`,
|
|
37
35
|
role: 'article',
|
|
38
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}
|
|
36
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}.space-settings-automation`,
|
|
39
37
|
component: () => {
|
|
40
|
-
const
|
|
41
|
-
const { spaceId } = parseId(layout.workspace);
|
|
42
|
-
const space = useSpace(spaceId);
|
|
38
|
+
const space = useActiveSpace();
|
|
43
39
|
if (!space) {
|
|
44
40
|
return null;
|
|
45
41
|
}
|
|
@@ -48,7 +44,7 @@ export default Capability.makeModule(() =>
|
|
|
48
44
|
},
|
|
49
45
|
}),
|
|
50
46
|
Surface.create({
|
|
51
|
-
id: `${meta.id}
|
|
47
|
+
id: `${meta.id}.companion.automation`,
|
|
52
48
|
role: 'article',
|
|
53
49
|
filter: (data): data is { companionTo: Obj.Unknown; subject: 'automation' } =>
|
|
54
50
|
Obj.isObject(data.companionTo) && data.subject === 'automation',
|
|
@@ -12,10 +12,10 @@ import type * as Schema from 'effect/Schema';
|
|
|
12
12
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
13
13
|
|
|
14
14
|
import { FormBuilder } from '@dxos/cli-util';
|
|
15
|
-
import { Annotation, Database, Entity, Filter, Obj, Ref, Type } from '@dxos/echo';
|
|
15
|
+
import { Annotation, Database, Entity, Feed, Filter, Obj, Ref, Type } from '@dxos/echo';
|
|
16
16
|
import { getProperties } from '@dxos/effect';
|
|
17
17
|
import { Function, Trigger } from '@dxos/functions';
|
|
18
|
-
import {
|
|
18
|
+
import { FeedAnnotation } from '@dxos/schema';
|
|
19
19
|
|
|
20
20
|
export type TriggerRemoteStatus = 'available' | 'not available' | 'n/a';
|
|
21
21
|
|
|
@@ -330,46 +330,55 @@ export const selectTrigger = Effect.fn(function* (kind?: Trigger.Kind) {
|
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
332
|
* Selects a queue interactively from available queues in the database.
|
|
333
|
-
* Queries schemas with
|
|
334
|
-
* and extracts queue DXNs from the objects'
|
|
333
|
+
* Queries schemas with FeedAnnotation, then queries objects of those types,
|
|
334
|
+
* and extracts queue DXNs from the objects' feed properties.
|
|
335
335
|
*/
|
|
336
336
|
export const selectQueue = Effect.fn(function* () {
|
|
337
|
-
// Query schema registry for schemas with
|
|
337
|
+
// Query schema registry for schemas with FeedAnnotation.
|
|
338
338
|
const schemas = yield* Database.runSchemaQuery({ location: ['database', 'runtime'] });
|
|
339
339
|
|
|
340
|
-
// Filter schemas that have
|
|
341
|
-
const
|
|
342
|
-
const annotation =
|
|
340
|
+
// Filter schemas that have FeedAnnotation.
|
|
341
|
+
const feedSchemas = schemas.filter((schema) => {
|
|
342
|
+
const annotation = FeedAnnotation.get(schema);
|
|
343
343
|
return Option.isSome(annotation) && annotation.value === true;
|
|
344
344
|
});
|
|
345
345
|
|
|
346
|
-
if (
|
|
347
|
-
return yield* Effect.fail(new Error('No schemas with
|
|
346
|
+
if (feedSchemas.length === 0) {
|
|
347
|
+
return yield* Effect.fail(new Error('No schemas with Feed annotation found'));
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
// Collect all objects with queues
|
|
350
|
+
// Collect all objects with queues.
|
|
351
351
|
const queueChoices: Array<{ title: string; value: string; description?: string }> = [];
|
|
352
352
|
|
|
353
|
-
// Process each schema,
|
|
354
|
-
for (const schema of
|
|
353
|
+
// Process each feed schema, loading the Feed object to extract queue DXN.
|
|
354
|
+
for (const schema of feedSchemas) {
|
|
355
355
|
yield* Effect.gen(function* () {
|
|
356
356
|
const typename = Type.getTypename(schema);
|
|
357
357
|
const objects = yield* Database.runQuery(Filter.type(typename));
|
|
358
358
|
|
|
359
359
|
for (const obj of objects) {
|
|
360
|
-
// Access the
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
360
|
+
// Access the feed property (which is a Ref<Feed>).
|
|
361
|
+
const feedRef = (obj as any).feed as Ref.Ref<any> | undefined;
|
|
362
|
+
if (!feedRef) {
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const feedObj = yield* Effect.promise(() => feedRef.tryLoad());
|
|
367
|
+
if (!feedObj || !Obj.instanceOf(Feed.Feed, feedObj)) {
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const queueDxn = Feed.getQueueDxn(feedObj);
|
|
372
|
+
if (!queueDxn) {
|
|
363
373
|
continue;
|
|
364
374
|
}
|
|
365
375
|
|
|
366
|
-
const queueDxn = queueRef.dxn.toString();
|
|
367
376
|
const label = Obj.getLabel(obj) ?? obj.id;
|
|
368
377
|
const description = Obj.getTypename(obj);
|
|
369
378
|
|
|
370
379
|
queueChoices.push({
|
|
371
380
|
title: label,
|
|
372
|
-
value: queueDxn,
|
|
381
|
+
value: queueDxn.toString(),
|
|
373
382
|
description,
|
|
374
383
|
});
|
|
375
384
|
}
|
|
@@ -50,7 +50,6 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
50
50
|
annotation: {
|
|
51
51
|
location: ['database', 'runtime'],
|
|
52
52
|
kind: ['user'],
|
|
53
|
-
registered: ['registered'],
|
|
54
53
|
},
|
|
55
54
|
});
|
|
56
55
|
|
|
@@ -236,7 +235,7 @@ const TriggerListItem = ({
|
|
|
236
235
|
)}
|
|
237
236
|
</div>
|
|
238
237
|
|
|
239
|
-
{actionProps ? <List.
|
|
238
|
+
{actionProps ? <List.ItemIconButton {...actionProps} autoHide={false} /> : <div />}
|
|
240
239
|
|
|
241
240
|
{onDelete && <List.ItemDeleteButton onClick={handleDelete} />}
|
|
242
241
|
</List.Item>
|
|
@@ -6,7 +6,7 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
-
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { LayoutOperation, getObjectPathFromObject } from '@dxos/app-toolkit';
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { Function, Script } from '@dxos/functions';
|
|
12
12
|
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
@@ -58,7 +58,7 @@ export const FunctionsPanel = ({ space }: FunctionsPanelProps) => {
|
|
|
58
58
|
(func: Function.Function) => {
|
|
59
59
|
const script = functionToScriptMap[func.id];
|
|
60
60
|
if (script) {
|
|
61
|
-
void invokePromise(LayoutOperation.Open, { subject: [
|
|
61
|
+
void invokePromise(LayoutOperation.Open, { subject: [getObjectPathFromObject(script)] });
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
[functionToScriptMap, invokePromise],
|
|
@@ -159,8 +159,8 @@ export const Spec: Story = {
|
|
|
159
159
|
await expect(combobox).not.toBeDisabled();
|
|
160
160
|
await expect(canvas.queryByLabelText('Method')).not.toBeInTheDocument();
|
|
161
161
|
|
|
162
|
-
// Queue — should show DXN field (the queue address).
|
|
162
|
+
// Queue — should show DXN field (the queue address). DXN is a combobox, not an input, so use getByText.
|
|
163
163
|
await selectKind(combobox, 'q');
|
|
164
|
-
await expect(canvas.
|
|
164
|
+
await expect(canvas.findByText('DXN')).resolves.toBeInTheDocument();
|
|
165
165
|
},
|
|
166
166
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
8
|
-
import { DXN, type Database, Obj, type Query } from '@dxos/echo';
|
|
8
|
+
import { DXN, type Database, Entity, Feed, Obj, type Query } from '@dxos/echo';
|
|
9
9
|
import { Function, Script, Trigger } from '@dxos/functions';
|
|
10
10
|
import { Filter, Ref, useQuery } from '@dxos/react-client/echo';
|
|
11
11
|
import { Input } from '@dxos/react-ui';
|
|
@@ -52,6 +52,7 @@ export const TriggerEditor = ({ db, types, tags, readonlySpec, trigger, ...formP
|
|
|
52
52
|
[trigger],
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
+
const triggerSchema = useMemo(() => omitId(Trigger.Trigger), []);
|
|
55
56
|
const defaultValues = useMemo(() => {
|
|
56
57
|
const { id: _, ...values } = trigger;
|
|
57
58
|
return values;
|
|
@@ -60,9 +61,9 @@ export const TriggerEditor = ({ db, types, tags, readonlySpec, trigger, ...formP
|
|
|
60
61
|
return (
|
|
61
62
|
<Form.Root<TriggerFormSchema>
|
|
62
63
|
{...formProps}
|
|
63
|
-
schema={omitId(Trigger.Trigger)}
|
|
64
|
-
defaultValues={defaultValues}
|
|
65
64
|
db={db}
|
|
65
|
+
schema={triggerSchema}
|
|
66
|
+
defaultValues={defaultValues}
|
|
66
67
|
fieldMap={fieldMap}
|
|
67
68
|
onValuesChanged={handleValuesChanged}
|
|
68
69
|
>
|
|
@@ -85,6 +86,7 @@ const useCustomInputs = ({ db, readonlySpec, types, tags }: UseCustomInputsProps
|
|
|
85
86
|
const functions = useQuery(db, Filter.type(Function.Function));
|
|
86
87
|
const workflows = useQuery(db, Filter.type(ComputeGraph));
|
|
87
88
|
const scripts = useQuery(db, Filter.type(Script.Script));
|
|
89
|
+
const feeds = useQuery(db, Filter.type(Feed.Feed));
|
|
88
90
|
|
|
89
91
|
return useMemo(
|
|
90
92
|
(): FormFieldMap => ({
|
|
@@ -122,6 +124,9 @@ const useCustomInputs = ({ db, readonlySpec, types, tags }: UseCustomInputsProps
|
|
|
122
124
|
// Spec selector.
|
|
123
125
|
'spec.kind': (props) => <SpecSelector {...props} readonly={readonlySpec} />,
|
|
124
126
|
|
|
127
|
+
// Queue feed selector with parent labels.
|
|
128
|
+
'spec.queue': (props) => <SelectField {...props} options={getFeedQueueOptions(feeds)} />,
|
|
129
|
+
|
|
125
130
|
// TODO(wittjosiah): Copied from ViewEditor.
|
|
126
131
|
// Query input editor.
|
|
127
132
|
'spec.query': (props) => {
|
|
@@ -141,7 +146,7 @@ const useCustomInputs = ({ db, readonlySpec, types, tags }: UseCustomInputsProps
|
|
|
141
146
|
// Function input editor.
|
|
142
147
|
input: (props) => <FunctionInputEditor {...props} functions={functions} db={db} />,
|
|
143
148
|
}),
|
|
144
|
-
[workflows, scripts, functions, readonlySpec],
|
|
149
|
+
[workflows, scripts, functions, feeds, readonlySpec],
|
|
145
150
|
);
|
|
146
151
|
};
|
|
147
152
|
|
|
@@ -153,3 +158,15 @@ const getFunctionOptions = (scripts: Script.Script[], functions: Function.Functi
|
|
|
153
158
|
const getLabel = (fn: Function.Function) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
|
|
154
159
|
return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:echo:@:${fn.id}` }));
|
|
155
160
|
};
|
|
161
|
+
|
|
162
|
+
const getFeedQueueOptions = (feeds: Feed.Feed[]) => {
|
|
163
|
+
return feeds.flatMap((feed) => {
|
|
164
|
+
const queueDxn = Feed.getQueueDxn(feed);
|
|
165
|
+
if (!queueDxn) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
const parent = Obj.getParent(feed);
|
|
169
|
+
const label = parent ? Entity.getLabel(parent) : Entity.getLabel(feed);
|
|
170
|
+
return [{ label: label ?? feed.id, value: queueDxn.toString() }];
|
|
171
|
+
});
|
|
172
|
+
};
|
|
@@ -9,7 +9,7 @@ import { Settings } from '@dxos/react-ui-form';
|
|
|
9
9
|
|
|
10
10
|
import { AutomationPanel, type AutomationPanelProps } from '../../components/AutomationPanel';
|
|
11
11
|
import { meta } from '../../meta';
|
|
12
|
-
import { TriggersSettings } from '../TriggerSettings
|
|
12
|
+
import { TriggersSettings } from '../TriggerSettings';
|
|
13
13
|
|
|
14
14
|
export const AutomationSettings = (props: AutomationPanelProps) => {
|
|
15
15
|
const { t } = useTranslation(meta.id);
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'dxos.
|
|
9
|
+
id: 'org.dxos.plugin.automation',
|
|
10
10
|
name: 'Automation',
|
|
11
11
|
description: trim`
|
|
12
12
|
Workflow automation engine that triggers custom actions based on object events and conditions.
|
|
@@ -39,5 +39,5 @@ export namespace AutomationCapabilities {
|
|
|
39
39
|
/**
|
|
40
40
|
* Runtime for executing agents, functions, and triggers.
|
|
41
41
|
*/
|
|
42
|
-
export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}
|
|
42
|
+
export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}.capability.compute-runtime`);
|
|
43
43
|
}
|
package/src/types/events.ts
CHANGED
|
@@ -7,5 +7,5 @@ import { ActivationEvent } from '@dxos/app-framework';
|
|
|
7
7
|
import { meta } from '../meta';
|
|
8
8
|
|
|
9
9
|
export namespace AutomationEvents {
|
|
10
|
-
export const ComputeRuntimeReady = ActivationEvent.make(`${meta.id}
|
|
10
|
+
export const ComputeRuntimeReady = ActivationEvent.make(`${meta.id}.event.compute-runtime-ready`);
|
|
11
11
|
}
|
package/src/types/schema.ts
CHANGED
|
@@ -17,7 +17,7 @@ const TriggerTemplate = Schema.Union(
|
|
|
17
17
|
|
|
18
18
|
export namespace AutomationAction {
|
|
19
19
|
export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(
|
|
20
|
-
`${meta.id}
|
|
20
|
+
`${meta.id}.action.create-trigger-from-template`,
|
|
21
21
|
{
|
|
22
22
|
input: Schema.Struct({
|
|
23
23
|
db: Database.Database,
|
|
@@ -32,11 +32,11 @@ export namespace AutomationAction {
|
|
|
32
32
|
) {}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const AUTOMATION_OPERATION = `${meta.id}
|
|
35
|
+
const AUTOMATION_OPERATION = `${meta.id}.operation`;
|
|
36
36
|
|
|
37
37
|
export namespace AutomationOperation {
|
|
38
38
|
export const CreateTriggerFromTemplate = Operation.make({
|
|
39
|
-
meta: { key: `${AUTOMATION_OPERATION}
|
|
39
|
+
meta: { key: `${AUTOMATION_OPERATION}.create-trigger-from-template`, name: 'Create Trigger From Template' },
|
|
40
40
|
services: [Capability.Service],
|
|
41
41
|
schema: {
|
|
42
42
|
input: Schema.Struct({
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutomationPanel,
|
|
3
|
-
AutomationPanel_default
|
|
4
|
-
} from "./chunk-4EY2KMCM.mjs";
|
|
5
|
-
import "./chunk-ZNI2CGQP.mjs";
|
|
6
|
-
import "./chunk-PZNBEKO5.mjs";
|
|
7
|
-
export {
|
|
8
|
-
AutomationPanel,
|
|
9
|
-
AutomationPanel_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=AutomationPanel-EHRSV2DL.mjs.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TriggersSettings
|
|
3
|
-
} from "./chunk-SEG5OCGB.mjs";
|
|
4
|
-
import "./chunk-QPG3AKFX.mjs";
|
|
5
|
-
import "./chunk-WOBCY2FQ.mjs";
|
|
6
|
-
import "./chunk-PZNBEKO5.mjs";
|
|
7
|
-
|
|
8
|
-
// src/containers/TriggerSettings/index.ts
|
|
9
|
-
var TriggerSettings_default = TriggersSettings;
|
|
10
|
-
export {
|
|
11
|
-
TriggerSettings_default as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=TriggerSettings-HUQT53SV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/TriggerSettings/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { TriggersSettings } from './TriggerSettings';\n\nexport default TriggersSettings;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAMA,IAAA,0BAAeA;",
|
|
6
|
-
"names": ["TriggersSettings"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Script } from '@dxos/functions';\nimport { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { meta as spaceMeta } from '@dxos/plugin-space';\n\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: `${meta.id}/space-settings-automation`,\n match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),\n connector: (node) =>\n Effect.succeed([\n {\n id: `automation-${node.id}`,\n type: `${meta.id}/space-settings-automation`,\n data: `${meta.id}/space-settings-automation`,\n properties: {\n label: ['automation panel label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/space-settings-functions`,\n match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),\n connector: (node) =>\n Effect.succeed([\n {\n id: `functions-${node.id}`,\n type: `${meta.id}/space-settings-functions`,\n data: `${meta.id}/space-settings-functions`,\n properties: {\n label: ['functions panel label', { ns: meta.id }],\n icon: 'ph--function--regular',\n },\n },\n ]),\n }),\n GraphBuilder.createTypeExtension({\n id: `${meta.id}/script-companion`,\n type: Script.Script,\n connector: (script) =>\n Effect.succeed([\n {\n id: [script.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'automation',\n properties: {\n label: ['script automation label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n disposition: 'hidden',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,cAAc;AACvB,SAASC,2BAA2BC,4BAA4B;AAChE,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,QAAQC,iBAAiB;AAIlC,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC,aAAa,GAAGC,UAAUL,EAAE,WAAW;MAC1DM,WAAW,CAACC,SACHC,eAAQ;QACb;UACER,IAAI,cAAcO,KAAKP,EAAE;UACzBS,MAAM,GAAGR,KAAKD,EAAE;UAChBU,MAAM,GAAGT,KAAKD,EAAE;UAChBW,YAAY;YACVC,OAAO;cAAC;cAA0B;gBAAEC,IAAIZ,KAAKD;cAAG;;YAChDc,MAAM;UACR;QACF;OACD;IACL,CAAA;IACAhB,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC,aAAa,GAAGC,UAAUL,EAAE,WAAW;MAC1DM,WAAW,CAACC,SACHC,eAAQ;QACb;UACER,IAAI,aAAaO,KAAKP,EAAE;UACxBS,MAAM,GAAGR,KAAKD,EAAE;UAChBU,MAAM,GAAGT,KAAKD,EAAE;UAChBW,YAAY;YACVC,OAAO;cAAC;cAAyB;gBAAEC,IAAIZ,KAAKD;cAAG;;YAC/Cc,MAAM;UACR;QACF;OACD;IACL,CAAA;IACAhB,aAAaiB,oBAAoB;MAC/Bf,IAAI,GAAGC,KAAKD,EAAE;MACdS,MAAMO,OAAOA;MACbV,WAAW,CAACW,WACHT,eAAQ;QACb;UACER,IAAI;YAACiB,OAAOjB;YAAI;YAAckB,KAAKC,yBAAAA;UACnCV,MAAMW;UACNV,MAAM;UACNC,YAAY;YACVC,OAAO;cAAC;cAA2B;gBAAEC,IAAIZ,KAAKD;cAAG;;YACjDc,MAAM;YACNO,aAAa;UACf;QACF;OACD;IACL,CAAA;GACD;AAED,SAAO5B,WAAW6B,YAAYC,gBAAgBC,iBAAiB5B,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "Script", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "GraphBuilder", "NodeMatcher", "meta", "spaceMeta", "Capability", "makeModule", "fnUntraced", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenNodeType", "spaceMeta", "connector", "node", "succeed", "type", "data", "properties", "label", "ns", "icon", "createTypeExtension", "Script", "script", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "disposition", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|