@dxos/plugin-automation 0.8.3 → 0.8.4-main.1068cf700f
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-C6MZ22CB.mjs +11 -0
- package/dist/lib/browser/AutomationSettings-D7UO5V3Q.mjs +57 -0
- package/dist/lib/browser/AutomationSettings-D7UO5V3Q.mjs.map +7 -0
- package/dist/lib/browser/FunctionsContainer-5NHAAP5H.mjs +125 -0
- package/dist/lib/browser/FunctionsContainer-5NHAAP5H.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs → FunctionsPanel-RD22LYMR.mjs} +3 -3
- package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs +85 -0
- package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs.map +7 -0
- package/dist/lib/browser/chunk-C273ZYLE.mjs +258 -0
- package/dist/lib/browser/chunk-C273ZYLE.mjs.map +7 -0
- package/dist/lib/browser/chunk-JFBUK3WR.mjs +14 -0
- package/dist/lib/browser/chunk-JFBUK3WR.mjs.map +7 -0
- package/dist/lib/browser/chunk-JN7QRQQX.mjs +256 -0
- package/dist/lib/browser/chunk-JN7QRQQX.mjs.map +7 -0
- package/dist/lib/browser/chunk-JOXPQ27I.mjs +83 -0
- package/dist/lib/browser/chunk-JOXPQ27I.mjs.map +7 -0
- package/dist/lib/browser/chunk-O5Y2F33G.mjs +8 -0
- package/dist/lib/browser/chunk-O5Y2F33G.mjs.map +7 -0
- package/dist/lib/browser/chunk-P5AEO35Y.mjs +93 -0
- package/dist/lib/browser/chunk-P5AEO35Y.mjs.map +7 -0
- package/dist/lib/browser/chunk-PZNBEKO5.mjs +17 -0
- package/dist/lib/browser/chunk-PZNBEKO5.mjs.map +7 -0
- package/dist/lib/browser/chunk-QNEQ23BF.mjs +98 -0
- package/dist/lib/browser/chunk-QNEQ23BF.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1108 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-BUBHYS4Y.mjs +119 -0
- package/dist/lib/browser/compute-runtime-BUBHYS4Y.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +13 -0
- package/dist/lib/browser/index.mjs +73 -51
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-IN2FRGOT.mjs +83 -0
- package/dist/lib/browser/operation-resolver-IN2FRGOT.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-Z7A272CA.mjs → react-surface-246NXXJR.mjs} +26 -24
- package/dist/lib/browser/react-surface-246NXXJR.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +14 -0
- package/dist/lib/node-esm/{AutomationPanel-Y3ODAHH7.mjs → AutomationPanel-RTBY7YFM.mjs} +4 -4
- package/dist/lib/node-esm/AutomationSettings-GK4RLSDN.mjs +58 -0
- package/dist/lib/node-esm/AutomationSettings-GK4RLSDN.mjs.map +7 -0
- package/dist/lib/node-esm/FunctionsContainer-AHHZODM5.mjs +126 -0
- package/dist/lib/node-esm/FunctionsContainer-AHHZODM5.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs → FunctionsPanel-V2DKWYMU.mjs} +3 -3
- package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs +86 -0
- package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5FXNN3MV.mjs +19 -0
- package/dist/lib/node-esm/chunk-5FXNN3MV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AENSLAVD.mjs +99 -0
- package/dist/lib/node-esm/chunk-AENSLAVD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EJPZWAGR.mjs +257 -0
- package/dist/lib/node-esm/chunk-EJPZWAGR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-K5Z4UGIO.mjs +16 -0
- package/dist/lib/node-esm/chunk-K5Z4UGIO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-M3UPTGXF.mjs +10 -0
- package/dist/lib/node-esm/chunk-M3UPTGXF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OJEFRZEV.mjs +259 -0
- package/dist/lib/node-esm/chunk-OJEFRZEV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q7EMIPMW.mjs +94 -0
- package/dist/lib/node-esm/chunk-Q7EMIPMW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RX52VKI2.mjs +84 -0
- package/dist/lib/node-esm/chunk-RX52VKI2.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1109 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-6UEDBN76.mjs +120 -0
- package/dist/lib/node-esm/compute-runtime-6UEDBN76.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +14 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +73 -51
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-67CEAKXP.mjs +84 -0
- package/dist/lib/node-esm/operation-resolver-67CEAKXP.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-TP6IYSR4.mjs → react-surface-U6762KPI.mjs} +26 -24
- package/dist/lib/node-esm/react-surface-U6762KPI.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +15 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- 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/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +6 -0
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime/index.d.ts +3 -0
- package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- 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 +49 -4
- 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/FunctionsContainer.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 +2 -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 +117 -4
- 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 +1 -1
- 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 +12 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.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 -0
- 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/testing/test-functions.d.ts +202 -3
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +35 -29
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +22 -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 +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +54 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +84 -44
- package/src/AutomationPlugin.tsx +20 -33
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +72 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/compute-runtime/compute-runtime.ts +140 -0
- package/src/capabilities/compute-runtime/index.ts +7 -0
- package/src/capabilities/index.ts +4 -5
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +80 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +61 -0
- 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 +89 -0
- package/src/cli/commands/trigger/create/subscription.ts +128 -0
- package/src/cli/commands/trigger/create/timer.ts +93 -0
- package/src/cli/commands/trigger/index.ts +16 -0
- package/src/cli/commands/trigger/list.ts +67 -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 +278 -0
- package/src/cli/commands/trigger/update/timer.ts +193 -0
- package/src/cli/commands/trigger/util.ts +395 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +24 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +17 -18
- package/src/components/AutomationPanel/AutomationPanel.tsx +235 -89
- package/src/components/AutomationSettings.tsx +30 -0
- package/src/components/FunctionsContainer.tsx +19 -14
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +41 -26
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +110 -0
- package/src/components/FunctionsRegistry/index.ts +5 -0
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +41 -34
- package/src/components/TriggerEditor/SpecSelector.tsx +29 -21
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +79 -33
- package/src/components/TriggerEditor/TriggerEditor.tsx +81 -48
- package/src/components/TriggerSettings.tsx +26 -0
- package/src/components/index.ts +1 -1
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useComputeRuntimeCallback.ts +67 -0
- package/src/hooks/useTriggerRuntimeControls.ts +67 -0
- package/src/index.ts +2 -0
- package/src/meta.ts +8 -7
- package/src/testing/test-functions.ts +3 -3
- package/src/translations.ts +15 -4
- package/src/types/capabilities.ts +42 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +7 -0
- package/src/types/schema.ts +52 -0
- package/dist/lib/browser/AutomationContainer-OGNK3HD5.mjs +0 -38
- package/dist/lib/browser/AutomationContainer-OGNK3HD5.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-PRIIAXD5.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-JY7V7PLF.mjs +0 -39
- package/dist/lib/browser/FunctionsContainer-JY7V7PLF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-T34RV5UA.mjs +0 -80
- package/dist/lib/browser/app-graph-builder-T34RV5UA.mjs.map +0 -7
- package/dist/lib/browser/chunk-4E2KPMLB.mjs +0 -39
- package/dist/lib/browser/chunk-4E2KPMLB.mjs.map +0 -7
- package/dist/lib/browser/chunk-C5VOC5EE.mjs +0 -147
- package/dist/lib/browser/chunk-C5VOC5EE.mjs.map +0 -7
- package/dist/lib/browser/chunk-IHAKPP5A.mjs +0 -15
- package/dist/lib/browser/chunk-IHAKPP5A.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5VLW7UZ.mjs +0 -230
- package/dist/lib/browser/chunk-N5VLW7UZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-RHSCK7AU.mjs +0 -94
- package/dist/lib/browser/chunk-RHSCK7AU.mjs.map +0 -7
- package/dist/lib/browser/chunk-VQWJ5UYA.mjs +0 -14
- package/dist/lib/browser/chunk-VQWJ5UYA.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AX46HSU7.mjs +0 -76
- package/dist/lib/browser/intent-resolver-AX46HSU7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-Z7A272CA.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs +0 -66
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs.map +0 -7
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs +0 -32
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs.map +0 -7
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs +0 -67
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs.map +0 -7
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs +0 -31
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs +0 -96
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs.map +0 -7
- package/dist/lib/node/chunk-3EF7MLFX.cjs +0 -38
- package/dist/lib/node/chunk-3EF7MLFX.cjs.map +0 -7
- package/dist/lib/node/chunk-6X3XJ4VI.cjs +0 -122
- package/dist/lib/node/chunk-6X3XJ4VI.cjs.map +0 -7
- package/dist/lib/node/chunk-GIIVTK4O.cjs +0 -58
- package/dist/lib/node/chunk-GIIVTK4O.cjs.map +0 -7
- package/dist/lib/node/chunk-IXUCZ3YY.cjs +0 -173
- package/dist/lib/node/chunk-IXUCZ3YY.cjs.map +0 -7
- package/dist/lib/node/chunk-LQ6XK4N5.cjs +0 -253
- package/dist/lib/node/chunk-LQ6XK4N5.cjs.map +0 -7
- package/dist/lib/node/chunk-TH4XDKAY.cjs +0 -49
- package/dist/lib/node/chunk-TH4XDKAY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -124
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs +0 -92
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-OI6CDHEI.cjs +0 -87
- package/dist/lib/node/react-surface-OI6CDHEI.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -30
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-ANCUYDDA.mjs +0 -39
- package/dist/lib/node-esm/AutomationContainer-ANCUYDDA.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-25M5VT3J.mjs +0 -40
- package/dist/lib/node-esm/FunctionsContainer-25M5VT3J.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-DYWAKQM3.mjs +0 -81
- package/dist/lib/node-esm/app-graph-builder-DYWAKQM3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2IH4VB3R.mjs +0 -95
- package/dist/lib/node-esm/chunk-2IH4VB3R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2T2OZC3A.mjs +0 -148
- package/dist/lib/node-esm/chunk-2T2OZC3A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs +0 -40
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HCCLRNMJ.mjs +0 -17
- package/dist/lib/node-esm/chunk-HCCLRNMJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFHDB2OA.mjs +0 -231
- package/dist/lib/node-esm/chunk-UFHDB2OA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WJHKFPX2.mjs +0 -16
- package/dist/lib/node-esm/chunk-WJHKFPX2.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-WXHFNJJI.mjs +0 -77
- package/dist/lib/node-esm/intent-resolver-WXHFNJJI.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TP6IYSR4.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -9
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- 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/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.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/types.d.ts +0 -25
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -86
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/capabilities/react-surface.tsx +0 -56
- package/src/components/AutomationContainer.tsx +0 -30
- package/src/types.ts +0 -33
- /package/dist/lib/browser/{AutomationPanel-PRIIAXD5.mjs.map → AutomationPanel-C6MZ22CB.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs.map → FunctionsPanel-RD22LYMR.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → hooks/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-Y3ODAHH7.mjs.map → browser/types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs.map → AutomationPanel-RTBY7YFM.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → FunctionsPanel-V2DKWYMU.mjs.map} +0 -0
package/src/components/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { lazy } from 'react';
|
|
|
6
6
|
|
|
7
7
|
export * from './TriggerEditor';
|
|
8
8
|
|
|
9
|
-
export const AutomationContainer = lazy(() => import('./AutomationContainer'));
|
|
10
9
|
export const AutomationPanel = lazy(() => import('./AutomationPanel'));
|
|
10
|
+
export const AutomationSettings = lazy(() => import('./AutomationSettings'));
|
|
11
11
|
export const FunctionsContainer = lazy(() => import('./FunctionsContainer'));
|
|
12
12
|
export const FunctionsPanel = lazy(() => import('./FunctionsPanel'));
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Cause from 'effect/Cause';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Exit from 'effect/Exit';
|
|
8
|
+
import { type DependencyList, useCallback } from 'react';
|
|
9
|
+
|
|
10
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
11
|
+
import { type Key } from '@dxos/echo';
|
|
12
|
+
import { type FunctionDefinition, FunctionInvocationService, TracingService } from '@dxos/functions';
|
|
13
|
+
import { log } from '@dxos/log';
|
|
14
|
+
|
|
15
|
+
import { AutomationCapabilities } from '../types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Create an effectful function that has access to compute services
|
|
19
|
+
*/
|
|
20
|
+
// TODO(burdon): Factor out (figure out cross-plugin capabilities dependencies).
|
|
21
|
+
export const useComputeRuntimeCallback = <T>(
|
|
22
|
+
id: Key.SpaceId | undefined,
|
|
23
|
+
fn: () => Effect.Effect<T, any, AutomationCapabilities.ComputeServices>,
|
|
24
|
+
deps?: DependencyList,
|
|
25
|
+
): (() => Promise<T>) => {
|
|
26
|
+
const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
27
|
+
const runtime = id !== undefined ? computeRuntime.getRuntime(id) : undefined;
|
|
28
|
+
|
|
29
|
+
return useCallback(() => {
|
|
30
|
+
if (!runtime) {
|
|
31
|
+
throw new TypeError('Space not provided to useComputeRuntimeCallback');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return runtime.runPromise(fn());
|
|
35
|
+
}, [runtime, ...(deps ?? [])]);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// TODO(wittjosiah): Function invoking should automatically be traced (DX-647).
|
|
39
|
+
export const invokeFunctionWithTracing = <I, O>(functionDef: FunctionDefinition<I, O>, inputData: I) =>
|
|
40
|
+
Effect.gen(function* () {
|
|
41
|
+
const tracer = yield* TracingService;
|
|
42
|
+
const trace = yield* tracer.traceInvocationStart({
|
|
43
|
+
target: undefined,
|
|
44
|
+
payload: {
|
|
45
|
+
data: {},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Invoke the function.
|
|
50
|
+
const result = yield* FunctionInvocationService.invokeFunction(functionDef, inputData).pipe(
|
|
51
|
+
Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop),
|
|
52
|
+
Effect.exit,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
if (Exit.isFailure(result)) {
|
|
56
|
+
const error = Cause.prettyErrors(result.cause)[0];
|
|
57
|
+
log.error(error.message, error.cause ?? error.stack);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
yield* tracer.traceInvocationEnd({
|
|
61
|
+
trace,
|
|
62
|
+
// TODO(dmaretskyi): Might miss errors.
|
|
63
|
+
exception: Exit.isFailure(result) ? Cause.prettyErrors(result.cause)[0] : undefined,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return result;
|
|
67
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import type * as Context from 'effect/Context';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
9
|
+
|
|
10
|
+
import { type Database, Filter } from '@dxos/echo';
|
|
11
|
+
import { Trigger } from '@dxos/functions';
|
|
12
|
+
import { TriggerDispatcher, type TriggerDispatcherState } from '@dxos/functions-runtime';
|
|
13
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
14
|
+
|
|
15
|
+
import { useComputeRuntimeCallback } from './useComputeRuntimeCallback';
|
|
16
|
+
|
|
17
|
+
interface TriggerRuntimeControls {
|
|
18
|
+
triggers: Trigger.Trigger[];
|
|
19
|
+
|
|
20
|
+
state: TriggerDispatcherState | undefined;
|
|
21
|
+
|
|
22
|
+
start: () => void;
|
|
23
|
+
stop: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const useTriggerRuntimeControls = (db: Database.Database | undefined): TriggerRuntimeControls => {
|
|
27
|
+
const triggers = useQuery(db, Filter.type(Trigger.Trigger));
|
|
28
|
+
|
|
29
|
+
const [dispatcher, setDispatcher] = useState<Context.Tag.Service<TriggerDispatcher> | undefined>(undefined);
|
|
30
|
+
|
|
31
|
+
const init = useComputeRuntimeCallback(
|
|
32
|
+
db?.spaceId,
|
|
33
|
+
Effect.fnUntraced(function* () {
|
|
34
|
+
const dispatcher = yield* TriggerDispatcher;
|
|
35
|
+
setDispatcher(dispatcher);
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
void init();
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
const state = useAtomValue(dispatcher?.state ?? Atom.make(undefined));
|
|
44
|
+
|
|
45
|
+
const start = useComputeRuntimeCallback(
|
|
46
|
+
db?.spaceId,
|
|
47
|
+
Effect.fnUntraced(function* () {
|
|
48
|
+
const dispatcher = yield* TriggerDispatcher;
|
|
49
|
+
yield* dispatcher.start();
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const stop = useComputeRuntimeCallback(
|
|
54
|
+
db?.spaceId,
|
|
55
|
+
Effect.fnUntraced(function* () {
|
|
56
|
+
const dispatcher = yield* TriggerDispatcher;
|
|
57
|
+
yield* dispatcher.stop();
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
triggers,
|
|
63
|
+
state,
|
|
64
|
+
start: () => void start(),
|
|
65
|
+
stop: () => void stop(),
|
|
66
|
+
};
|
|
67
|
+
};
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
6
7
|
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
export const meta: PluginMeta = {
|
|
10
|
-
id: AUTOMATION_PLUGIN,
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
|
+
id: 'dxos.org/plugin/automation',
|
|
11
10
|
name: 'Automation',
|
|
12
|
-
description:
|
|
13
|
-
|
|
11
|
+
description: trim`
|
|
12
|
+
Workflow automation engine that triggers custom actions based on object events and conditions.
|
|
13
|
+
Create automated pipelines that respond to changes and streamline repetitive tasks.
|
|
14
|
+
`,
|
|
14
15
|
icon: 'ph--robot--regular',
|
|
15
16
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',
|
|
16
17
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { TestSchema } from '@dxos/client/testing';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
9
|
|
|
10
10
|
export const functions = [
|
|
@@ -35,7 +35,7 @@ export const functions = [
|
|
|
35
35
|
version: '0.0.1',
|
|
36
36
|
inputSchema: Type.toJsonSchema(
|
|
37
37
|
Schema.Struct({
|
|
38
|
-
contact: Type.Ref(ContactType).annotations({ title: 'Contact' }),
|
|
38
|
+
contact: Type.Ref(TestSchema.ContactType).annotations({ title: 'Contact' }),
|
|
39
39
|
}),
|
|
40
40
|
),
|
|
41
41
|
},
|
package/src/translations.ts
CHANGED
|
@@ -2,24 +2,35 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
8
10
|
{
|
|
9
11
|
'en-US': {
|
|
10
|
-
[
|
|
12
|
+
[meta.id]: {
|
|
11
13
|
'plugin name': 'Automation',
|
|
12
14
|
'automation panel label': 'Automations',
|
|
13
15
|
'script automation label': 'Automation',
|
|
14
16
|
'automation verbose label': 'Manage automations',
|
|
15
17
|
'automation description': 'You can manage all the triggers which automate your space here.',
|
|
16
18
|
|
|
19
|
+
'runtime label': 'Enable Local Runtime',
|
|
20
|
+
'runtime description':
|
|
21
|
+
'This will start a trigger dispatcher locally for this space to run triggers on your device while Composer is running.',
|
|
22
|
+
|
|
17
23
|
'functions panel label': 'Functions',
|
|
18
24
|
'functions verbose label': 'Manage deployed functions',
|
|
25
|
+
'functions registry verbose label': 'Functions registry',
|
|
26
|
+
'functions registry description': 'Import functions from the registry',
|
|
19
27
|
'functions description': 'You can manage all the functions deployed from your space on EDGE here.',
|
|
20
28
|
'function copy id': 'Copy Function ID',
|
|
21
29
|
'no functions found': 'No functions found',
|
|
22
30
|
'go to function source button label': 'Show function source',
|
|
31
|
+
'delete function button label': 'Delete function',
|
|
32
|
+
|
|
33
|
+
'function parameters label': 'Function parameters',
|
|
23
34
|
|
|
24
35
|
'trigger editor title': 'Configure Trigger',
|
|
25
36
|
'new trigger label': 'Add Trigger',
|
|
@@ -39,4 +50,4 @@ export default [
|
|
|
39
50
|
},
|
|
40
51
|
},
|
|
41
52
|
},
|
|
42
|
-
];
|
|
53
|
+
] as const satisfies Resource[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
6
|
+
|
|
7
|
+
import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { type Database } from '@dxos/echo';
|
|
10
|
+
import type { CredentialsService, FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';
|
|
11
|
+
import type { TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';
|
|
12
|
+
import type { SpaceId } from '@dxos/keys';
|
|
13
|
+
|
|
14
|
+
import { meta } from '../meta';
|
|
15
|
+
|
|
16
|
+
export namespace AutomationCapabilities {
|
|
17
|
+
/**
|
|
18
|
+
* Service stack for executing agents, functions, and triggers.
|
|
19
|
+
*/
|
|
20
|
+
export type ComputeServices =
|
|
21
|
+
| TriggerDispatcher
|
|
22
|
+
| TriggerStateStore
|
|
23
|
+
| AiService.AiService
|
|
24
|
+
| Database.Service
|
|
25
|
+
| QueueService
|
|
26
|
+
| CredentialsService
|
|
27
|
+
| FunctionInvocationService
|
|
28
|
+
| TracingService
|
|
29
|
+
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
30
|
+
| ToolResolverService
|
|
31
|
+
| ToolExecutionService;
|
|
32
|
+
|
|
33
|
+
export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;
|
|
34
|
+
export interface ComputeRuntimeProvider {
|
|
35
|
+
getRuntime(spaceId: SpaceId): ComputeRuntime;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Runtime for executing agents, functions, and triggers.
|
|
40
|
+
*/
|
|
41
|
+
export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
|
|
42
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvent } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from '../meta';
|
|
8
|
+
|
|
9
|
+
export namespace AutomationEvents {
|
|
10
|
+
export const ComputeRuntimeReady = ActivationEvent.make(`${meta.id}/event/compute-runtime-ready`);
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
|
|
13
|
+
const TriggerTemplate = Schema.Union(
|
|
14
|
+
Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),
|
|
15
|
+
Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export namespace AutomationAction {
|
|
19
|
+
export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(
|
|
20
|
+
`${meta.id}/action/create-trigger-from-template`,
|
|
21
|
+
{
|
|
22
|
+
input: Schema.Struct({
|
|
23
|
+
db: Database.Database,
|
|
24
|
+
template: TriggerTemplate,
|
|
25
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
26
|
+
// TODO(wittjosiah): Improve how this lookup is done.
|
|
27
|
+
scriptName: Schema.optional(Schema.String),
|
|
28
|
+
input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
29
|
+
}),
|
|
30
|
+
output: Schema.Void,
|
|
31
|
+
},
|
|
32
|
+
) {}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const AUTOMATION_OPERATION = `${meta.id}/operation`;
|
|
36
|
+
|
|
37
|
+
export namespace AutomationOperation {
|
|
38
|
+
export const CreateTriggerFromTemplate = Operation.make({
|
|
39
|
+
meta: { key: `${AUTOMATION_OPERATION}/create-trigger-from-template`, name: 'Create Trigger From Template' },
|
|
40
|
+
services: [Capability.Service],
|
|
41
|
+
schema: {
|
|
42
|
+
input: Schema.Struct({
|
|
43
|
+
db: Database.Database,
|
|
44
|
+
template: TriggerTemplate,
|
|
45
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
46
|
+
scriptName: Schema.optional(Schema.String),
|
|
47
|
+
input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
48
|
+
}),
|
|
49
|
+
output: Schema.Void,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutomationPanel
|
|
3
|
-
} from "./chunk-C5VOC5EE.mjs";
|
|
4
|
-
import "./chunk-N5VLW7UZ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
AUTOMATION_PLUGIN
|
|
7
|
-
} from "./chunk-IHAKPP5A.mjs";
|
|
8
|
-
|
|
9
|
-
// packages/plugins/plugin-automation/src/components/AutomationContainer.tsx
|
|
10
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { useTranslation } from "@dxos/react-ui";
|
|
13
|
-
import { ControlSection, ControlPage } from "@dxos/react-ui-form";
|
|
14
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
15
|
-
var AutomationContainer = (props) => {
|
|
16
|
-
var _effect = _useSignals();
|
|
17
|
-
try {
|
|
18
|
-
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
19
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
20
|
-
classNames: "block overflow-y-auto"
|
|
21
|
-
}, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
|
|
22
|
-
title: t("automation verbose label", {
|
|
23
|
-
ns: AUTOMATION_PLUGIN
|
|
24
|
-
}),
|
|
25
|
-
description: t("automation description", {
|
|
26
|
-
ns: AUTOMATION_PLUGIN
|
|
27
|
-
})
|
|
28
|
-
}, /* @__PURE__ */ React.createElement(AutomationPanel, props))));
|
|
29
|
-
} finally {
|
|
30
|
-
_effect.f();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var AutomationContainer_default = AutomationContainer;
|
|
34
|
-
export {
|
|
35
|
-
AutomationContainer,
|
|
36
|
-
AutomationContainer_default as default
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=AutomationContainer-OGNK3HD5.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = (props: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('automation description', { ns: AUTOMATION_PLUGIN })}\n >\n <AutomationPanel {...props} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgBC,mBAAmB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,sBAAsB,CAACC,UAAAA;;;AAClC,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,4BAA4B;QAAES,IAAIP;MAAkB,CAAA;MAC7DQ,aAAaV,EAAE,0BAA0B;QAAES,IAAIP;MAAkB,CAAA;OAEjE,sBAAA,cAACS,iBAAoBZ,KAAAA,CAAAA,CAAAA,CAAAA;;;;AAK/B;AAEA,IAAA,8BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlSection", "ControlPage", "StackItem", "AutomationContainer", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutomationPanel,
|
|
3
|
-
AutomationPanel_default
|
|
4
|
-
} from "./chunk-C5VOC5EE.mjs";
|
|
5
|
-
import "./chunk-N5VLW7UZ.mjs";
|
|
6
|
-
import "./chunk-IHAKPP5A.mjs";
|
|
7
|
-
export {
|
|
8
|
-
AutomationPanel,
|
|
9
|
-
AutomationPanel_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=AutomationPanel-PRIIAXD5.mjs.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FunctionsPanel
|
|
3
|
-
} from "./chunk-RHSCK7AU.mjs";
|
|
4
|
-
import {
|
|
5
|
-
AUTOMATION_PLUGIN
|
|
6
|
-
} from "./chunk-IHAKPP5A.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-automation/src/components/FunctionsContainer.tsx
|
|
9
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
10
|
-
import React from "react";
|
|
11
|
-
import { useTranslation } from "@dxos/react-ui";
|
|
12
|
-
import { ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
13
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
14
|
-
var FunctionsContainer = ({ space }) => {
|
|
15
|
-
var _effect = _useSignals();
|
|
16
|
-
try {
|
|
17
|
-
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
18
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
19
|
-
classNames: "block overflow-y-auto"
|
|
20
|
-
}, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
|
|
21
|
-
title: t("functions verbose label", {
|
|
22
|
-
ns: AUTOMATION_PLUGIN
|
|
23
|
-
}),
|
|
24
|
-
description: t("functions description", {
|
|
25
|
-
ns: AUTOMATION_PLUGIN
|
|
26
|
-
})
|
|
27
|
-
}, /* @__PURE__ */ React.createElement(FunctionsPanel, {
|
|
28
|
-
space
|
|
29
|
-
}))));
|
|
30
|
-
} finally {
|
|
31
|
-
_effect.f();
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var FunctionsContainer_default = FunctionsContainer;
|
|
35
|
-
export {
|
|
36
|
-
FunctionsContainer,
|
|
37
|
-
FunctionsContainer_default as default
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=FunctionsContainer-JY7V7PLF.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/FunctionsContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { FunctionsPanel } from './FunctionsPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const FunctionsContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('functions verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('functions description', { ns: AUTOMATION_PLUGIN })}\n >\n <FunctionsPanel space={space} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default FunctionsContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;;;AAC5D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,2BAA2B;QAAES,IAAIP;MAAkB,CAAA;MAC5DQ,aAAaV,EAAE,yBAAyB;QAAES,IAAIP;MAAkB,CAAA;OAEhE,sBAAA,cAACS,gBAAAA;MAAeZ;;;;;AAK1B;AAEA,IAAA,6BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlPage", "ControlSection", "StackItem", "FunctionsContainer", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel"]
|
|
7
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-IHAKPP5A.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-automation/src/capabilities/app-graph-builder.ts
|
|
6
|
-
import { Rx } from "@effect-rx/rx-react";
|
|
7
|
-
import { Option, pipe } from "effect";
|
|
8
|
-
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
9
|
-
import { Obj } from "@dxos/echo";
|
|
10
|
-
import { ScriptType } from "@dxos/functions";
|
|
11
|
-
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from "@dxos/plugin-deck/types";
|
|
12
|
-
import { createExtension } from "@dxos/plugin-graph";
|
|
13
|
-
import { SPACE_PLUGIN } from "@dxos/plugin-space";
|
|
14
|
-
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
|
|
15
|
-
createExtension({
|
|
16
|
-
id: `${meta.id}/space-settings-automation`,
|
|
17
|
-
connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.type === `${SPACE_PLUGIN}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
18
|
-
{
|
|
19
|
-
id: `automation-${node2.id}`,
|
|
20
|
-
type: `${meta.id}/space-settings-automation`,
|
|
21
|
-
data: `${meta.id}/space-settings-automation`,
|
|
22
|
-
properties: {
|
|
23
|
-
label: [
|
|
24
|
-
"automation panel label",
|
|
25
|
-
{
|
|
26
|
-
ns: meta.id
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
icon: "ph--lightning--regular"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
]), Option.getOrElse(() => [])))
|
|
33
|
-
}),
|
|
34
|
-
createExtension({
|
|
35
|
-
id: `${meta.id}/space-settings-functions`,
|
|
36
|
-
connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.type === `${SPACE_PLUGIN}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
37
|
-
{
|
|
38
|
-
id: `functions-${node2.id}`,
|
|
39
|
-
type: `${meta.id}/space-settings-functions`,
|
|
40
|
-
data: `${meta.id}/space-settings-functions`,
|
|
41
|
-
properties: {
|
|
42
|
-
label: [
|
|
43
|
-
"functions panel label",
|
|
44
|
-
{
|
|
45
|
-
ns: meta.id
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
icon: "ph--function--regular"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]), Option.getOrElse(() => [])))
|
|
52
|
-
}),
|
|
53
|
-
createExtension({
|
|
54
|
-
id: `${meta.id}/script-companion`,
|
|
55
|
-
connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => Obj.instanceOf(ScriptType, node2.data) ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
56
|
-
{
|
|
57
|
-
id: [
|
|
58
|
-
node2.id,
|
|
59
|
-
"automation"
|
|
60
|
-
].join(ATTENDABLE_PATH_SEPARATOR),
|
|
61
|
-
type: PLANK_COMPANION_TYPE,
|
|
62
|
-
data: "automation",
|
|
63
|
-
properties: {
|
|
64
|
-
label: [
|
|
65
|
-
"script automation label",
|
|
66
|
-
{
|
|
67
|
-
ns: meta.id
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
icon: "ph--lightning--regular",
|
|
71
|
-
disposition: "hidden"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
]), Option.getOrElse(() => [])))
|
|
75
|
-
})
|
|
76
|
-
]);
|
|
77
|
-
export {
|
|
78
|
-
app_graph_builder_default as default
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=app-graph-builder-T34RV5UA.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { ScriptType } from '@dxos/functions';\nimport { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';\nimport { createExtension } from '@dxos/plugin-graph';\nimport { SPACE_PLUGIN } from '@dxos/plugin-space';\n\nimport { meta } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${meta.id}/space-settings-automation`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\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 Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/space-settings-functions`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\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 Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/script-companion`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (Obj.instanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: [node.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 Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,mBAAuC;AAC9D,SAASC,WAAW;AACpB,SAASC,kBAAkB;AAC3B,SAASC,sBAAsBC,iCAAiC;AAChE,SAASC,uBAAuB;AAChC,SAASC,oBAAoB;AAI7B,IAAA,4BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,YAAAA,cAA0BH,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GACpGL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,cAAcG,MAAKH,EAAE;QACzBU,MAAM,GAAGT,KAAKD,EAAE;QAChBe,MAAM,GAAGd,KAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAA0B;cAAEC,IAAIjB,KAAKD;YAAG;;UAChDmB,MAAM;QACR;MACF;KACD,GACDX,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACArB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,YAAAA,cAA0BH,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GACpGL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,aAAaG,MAAKH,EAAE;QACxBU,MAAM,GAAGT,KAAKD,EAAE;QAChBe,MAAM,GAAGd,KAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAIjB,KAAKD;YAAG;;UAC/CmB,MAAM;QACR;MACF;KACD,GACDX,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACArB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUkB,IAAIC,WAAWC,YAAYpB,MAAKY,IAAI,IAAIP,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GACjGL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI;UAACG,MAAKH;UAAI;UAAcwB,KAAKC,yBAAAA;QACjCf,MAAMgB;QACNX,MAAM;QACNC,YAAY;UACVC,OAAO;YAAC;YAA2B;cAAEC,IAAIjB,KAAKD;YAAG;;UACjDmB,MAAM;UACNQ,aAAa;QACf;MACF;KACD,GACDnB,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
|
|
6
|
-
"names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "Obj", "ScriptType", "PLANK_COMPANION_TYPE", "ATTENDABLE_PATH_SEPARATOR", "createExtension", "SPACE_PLUGIN", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "connector", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "type", "SPACE_PLUGIN", "some", "none", "map", "data", "properties", "label", "ns", "icon", "getOrElse", "Obj", "instanceOf", "ScriptType", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "disposition"]
|
|
7
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AUTOMATION_PLUGIN
|
|
3
|
-
} from "./chunk-IHAKPP5A.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-automation/src/types.ts
|
|
6
|
-
import { Schema } from "effect";
|
|
7
|
-
import { SpaceSchema } from "@dxos/react-client/echo";
|
|
8
|
-
var TriggerTemplate = Schema.Union(Schema.Struct({
|
|
9
|
-
type: Schema.Literal("timer"),
|
|
10
|
-
cron: Schema.String
|
|
11
|
-
}), Schema.Struct({
|
|
12
|
-
type: Schema.Literal("queue"),
|
|
13
|
-
queueDXN: Schema.Any
|
|
14
|
-
}));
|
|
15
|
-
(function(AutomationAction2) {
|
|
16
|
-
const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;
|
|
17
|
-
class CreateTriggerFromTemplate extends Schema.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
|
|
18
|
-
input: Schema.Struct({
|
|
19
|
-
space: SpaceSchema,
|
|
20
|
-
template: TriggerTemplate,
|
|
21
|
-
enabled: Schema.optional(Schema.Boolean),
|
|
22
|
-
// TODO(wittjosiah): Improve how this lookup is done.
|
|
23
|
-
scriptName: Schema.optional(Schema.String),
|
|
24
|
-
input: Schema.optional(Schema.Record({
|
|
25
|
-
key: Schema.String,
|
|
26
|
-
value: Schema.Any
|
|
27
|
-
}))
|
|
28
|
-
}),
|
|
29
|
-
output: Schema.Void
|
|
30
|
-
}) {
|
|
31
|
-
}
|
|
32
|
-
AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
|
|
33
|
-
})(AutomationAction || (AutomationAction = {}));
|
|
34
|
-
var AutomationAction;
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
AutomationAction
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=chunk-4E2KPMLB.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${AUTOMATION_ACTION}/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAI5B,IAAMC,kBAAkBC,OAAOC,MAC7BD,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUC,MAAML,OAAOM;AAAO,CAAA,GACnEN,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUG,UAAUP,OAAOQ;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,iBAAAA;EAEtB,MAAMC,kCAAkCZ,OAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,OAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,OAAOmB,SAASnB,OAAOoB,OAAO;;MAEvCC,YAAYrB,OAAOmB,SAASnB,OAAOM,MAAM;MACzCQ,OAAOd,OAAOmB,SAASnB,OAAOsB,OAAO;QAAEC,KAAKvB,OAAOM;QAAQkB,OAAOxB,OAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,OAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TriggerTemplate", "Schema", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "CreateTriggerFromTemplate", "TaggedClass", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
|
|
7
|
-
}
|