@dxos/plugin-automation 0.8.4-main.c4373fc → 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-EDO3N5WI.mjs +37 -0
- package/dist/lib/browser/AutomationSettings-EDO3N5WI.mjs.map +7 -0
- package/dist/lib/browser/FunctionsContainer-R4ZMYSFJ.mjs +43 -0
- package/dist/lib/browser/FunctionsContainer-R4ZMYSFJ.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsPanel-NRIKAPQV.mjs → FunctionsPanel-NMA4RYJL.mjs} +3 -3
- package/dist/lib/browser/FunctionsRegistry-TMKAEG5E.mjs +10 -0
- package/dist/lib/browser/TriggerSettings-56AIMOEC.mjs +11 -0
- package/dist/lib/browser/app-graph-builder-74ILZP25.mjs +83 -0
- package/dist/lib/browser/app-graph-builder-74ILZP25.mjs.map +7 -0
- package/dist/lib/browser/chunk-75XLBFAG.mjs +97 -0
- package/dist/lib/browser/chunk-75XLBFAG.mjs.map +7 -0
- package/dist/lib/browser/chunk-BWEKRPFJ.mjs +294 -0
- package/dist/lib/browser/chunk-BWEKRPFJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-EL64ZPPN.mjs +17 -0
- package/dist/lib/browser/chunk-EL64ZPPN.mjs.map +7 -0
- package/dist/lib/browser/chunk-FUVAC5EC.mjs +96 -0
- package/dist/lib/browser/chunk-FUVAC5EC.mjs.map +7 -0
- package/dist/lib/browser/chunk-GVHAETEQ.mjs +83 -0
- package/dist/lib/browser/chunk-GVHAETEQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-H2MV4XE6.mjs +31 -0
- package/dist/lib/browser/chunk-H2MV4XE6.mjs.map +7 -0
- package/dist/lib/browser/chunk-O23LHDEX.mjs +269 -0
- package/dist/lib/browser/chunk-O23LHDEX.mjs.map +7 -0
- package/dist/lib/browser/chunk-OAZ2JYXV.mjs +93 -0
- package/dist/lib/browser/chunk-OAZ2JYXV.mjs.map +7 -0
- package/dist/lib/browser/chunk-Z7F7X2C5.mjs +8 -0
- package/dist/lib/browser/chunk-Z7F7X2C5.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1115 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-F3UMRKCL.mjs +124 -0
- package/dist/lib/browser/compute-runtime-F3UMRKCL.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +5 -4
- package/dist/lib/browser/index.mjs +66 -64
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-IRC2DZU7.mjs +84 -0
- package/dist/lib/browser/operation-resolver-IRC2DZU7.mjs.map +7 -0
- package/dist/lib/browser/react-surface-5MFPVWIN.mjs +65 -0
- package/dist/lib/browser/react-surface-5MFPVWIN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -4
- package/dist/lib/node-esm/{AutomationPanel-GHK5UG4K.mjs → AutomationPanel-O2BCQA7P.mjs} +4 -4
- package/dist/lib/node-esm/AutomationPanel-O2BCQA7P.mjs.map +7 -0
- package/dist/lib/node-esm/AutomationSettings-LJNRQUX7.mjs +38 -0
- package/dist/lib/node-esm/AutomationSettings-LJNRQUX7.mjs.map +7 -0
- package/dist/lib/node-esm/FunctionsContainer-GYRPQZM7.mjs +44 -0
- package/dist/lib/node-esm/FunctionsContainer-GYRPQZM7.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsPanel-SAMRTELO.mjs → FunctionsPanel-DCXXLSVP.mjs} +3 -3
- package/dist/lib/node-esm/FunctionsPanel-DCXXLSVP.mjs.map +7 -0
- package/dist/lib/node-esm/FunctionsRegistry-7WCHC64E.mjs +11 -0
- 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-VDXPOWCH.mjs +84 -0
- package/dist/lib/node-esm/app-graph-builder-VDXPOWCH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2UF55HSG.mjs +94 -0
- package/dist/lib/node-esm/chunk-2UF55HSG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6B4WZRVH.mjs +84 -0
- package/dist/lib/node-esm/chunk-6B4WZRVH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6JVB3IHW.mjs +97 -0
- package/dist/lib/node-esm/chunk-6JVB3IHW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FPXVLTEY.mjs +270 -0
- package/dist/lib/node-esm/chunk-FPXVLTEY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JVUE5PMI.mjs +32 -0
- package/dist/lib/node-esm/chunk-JVUE5PMI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-K7T2MVB7.mjs +98 -0
- package/dist/lib/node-esm/chunk-K7T2MVB7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q5JSKD6Z.mjs +295 -0
- package/dist/lib/node-esm/chunk-Q5JSKD6Z.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-R5YEWJCG.mjs +10 -0
- package/dist/lib/node-esm/chunk-R5YEWJCG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WC5AT7B3.mjs +19 -0
- package/dist/lib/node-esm/chunk-WC5AT7B3.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1116 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-AMFVJMF2.mjs +125 -0
- package/dist/lib/node-esm/compute-runtime-AMFVJMF2.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +5 -4
- package/dist/lib/node-esm/index.mjs +66 -64
- 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-CBLQHL4N.mjs +85 -0
- package/dist/lib/node-esm/operation-resolver-CBLQHL4N.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-Z74AHU4T.mjs +66 -0
- package/dist/lib/node-esm/react-surface-Z74AHU4T.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -4
- package/dist/types/src/AutomationPlugin.d.ts +2 -1
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/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 -5
- 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 +6 -7
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +5 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +8 -0
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts +4 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -9
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +10 -8
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +74 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +4 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts +3 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/FunctionsContainer}/FunctionsContainer.d.ts +0 -1
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/FunctionsContainer/index.d.ts +3 -0
- package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +6 -0
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -4
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +6 -5
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- 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 +5 -0
- 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 +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +32 -3
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +66 -47
- package/src/AutomationPlugin.tsx +15 -34
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +73 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/compute-runtime/compute-runtime.ts +146 -0
- package/src/capabilities/compute-runtime/index.ts +7 -0
- package/src/capabilities/index.ts +4 -8
- 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 +57 -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 +404 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +24 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +5 -6
- package/src/components/AutomationPanel/AutomationPanel.tsx +188 -86
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +34 -22
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +110 -0
- package/src/components/FunctionsRegistry/index.ts +8 -0
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +34 -33
- package/src/components/TriggerEditor/SpecSelector.tsx +12 -11
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +89 -23
- package/src/components/TriggerEditor/TriggerEditor.tsx +101 -86
- package/src/components/index.ts +1 -2
- package/src/{components → containers/AutomationSettings}/AutomationSettings.tsx +9 -12
- package/src/containers/AutomationSettings/index.ts +7 -0
- package/src/containers/FunctionsContainer/FunctionsContainer.tsx +33 -0
- package/src/containers/FunctionsContainer/index.ts +7 -0
- package/src/containers/TriggerSettings/TriggerSettings.tsx +26 -0
- package/src/containers/TriggerSettings/index.ts +6 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/useComputeRuntimeCallback.ts +45 -8
- package/src/hooks/useTriggerRuntimeControls.ts +30 -15
- package/src/index.ts +2 -2
- package/src/meta.ts +8 -5
- package/src/testing/test-functions.ts +6 -6
- package/src/translations.ts +7 -0
- package/src/{capabilities → types}/capabilities.ts +9 -14
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +24 -3
- package/dist/lib/browser/AutomationPanel-PNBH5L5C.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-3LABN6ER.mjs +0 -69
- package/dist/lib/browser/AutomationSettings-3LABN6ER.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-HHBMPUOD.mjs +0 -36
- package/dist/lib/browser/FunctionsContainer-HHBMPUOD.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DV5HMFX4.mjs +0 -81
- package/dist/lib/browser/app-graph-builder-DV5HMFX4.mjs.map +0 -7
- package/dist/lib/browser/chunk-5ARH77PV.mjs +0 -15
- package/dist/lib/browser/chunk-5ARH77PV.mjs.map +0 -7
- package/dist/lib/browser/chunk-AY67OUDA.mjs +0 -14
- package/dist/lib/browser/chunk-AY67OUDA.mjs.map +0 -7
- package/dist/lib/browser/chunk-DLLE4FKP.mjs +0 -94
- package/dist/lib/browser/chunk-DLLE4FKP.mjs.map +0 -7
- package/dist/lib/browser/chunk-LC3QQU47.mjs +0 -171
- package/dist/lib/browser/chunk-LC3QQU47.mjs.map +0 -7
- package/dist/lib/browser/chunk-MVPRI3DB.mjs +0 -53
- package/dist/lib/browser/chunk-MVPRI3DB.mjs.map +0 -7
- package/dist/lib/browser/chunk-NIJWEQRD.mjs +0 -283
- package/dist/lib/browser/chunk-NIJWEQRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-QT3YWUOT.mjs +0 -14
- package/dist/lib/browser/chunk-QT3YWUOT.mjs.map +0 -7
- package/dist/lib/browser/chunk-VGBZKM3O.mjs +0 -38
- package/dist/lib/browser/chunk-VGBZKM3O.mjs.map +0 -7
- package/dist/lib/browser/chunk-WWURMV25.mjs +0 -13
- package/dist/lib/browser/chunk-WWURMV25.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-YJREH6WP.mjs +0 -160
- package/dist/lib/browser/compute-runtime-YJREH6WP.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-D2OHKQRR.mjs +0 -77
- package/dist/lib/browser/intent-resolver-D2OHKQRR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JXFO46V4.mjs +0 -63
- package/dist/lib/browser/react-surface-JXFO46V4.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationSettings-XENNIIZM.mjs +0 -70
- package/dist/lib/node-esm/AutomationSettings-XENNIIZM.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-ZKVOBUHV.mjs +0 -37
- package/dist/lib/node-esm/FunctionsContainer-ZKVOBUHV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TR2WXPX2.mjs +0 -82
- package/dist/lib/node-esm/app-graph-builder-TR2WXPX2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3EWMZAU6.mjs +0 -172
- package/dist/lib/node-esm/chunk-3EWMZAU6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5MQJPJR2.mjs +0 -15
- package/dist/lib/node-esm/chunk-5MQJPJR2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CJUI6AKX.mjs +0 -39
- package/dist/lib/node-esm/chunk-CJUI6AKX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EX74SIDO.mjs +0 -284
- package/dist/lib/node-esm/chunk-EX74SIDO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LWASMQIF.mjs +0 -16
- package/dist/lib/node-esm/chunk-LWASMQIF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QCA543ZR.mjs +0 -54
- package/dist/lib/node-esm/chunk-QCA543ZR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-U7LJXQS4.mjs +0 -16
- package/dist/lib/node-esm/chunk-U7LJXQS4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WHCSOUNN.mjs +0 -16
- package/dist/lib/node-esm/chunk-WHCSOUNN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YQXW3JXD.mjs +0 -95
- package/dist/lib/node-esm/chunk-YQXW3JXD.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-CMEPAYND.mjs +0 -161
- package/dist/lib/node-esm/compute-runtime-CMEPAYND.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-2LGBVXT5.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-2LGBVXT5.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-YDJ43B3N.mjs +0 -64
- package/dist/lib/node-esm/react-surface-YDJ43B3N.mjs.map +0 -7
- 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/capabilities.d.ts +0 -19
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
- package/dist/types/src/capabilities/compute-runtime.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/AutomationSettings.d.ts +0 -5
- package/dist/types/src/components/AutomationSettings.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
- package/dist/types/src/components/TriggerSettings.d.ts +0 -6
- package/dist/types/src/components/TriggerSettings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -87
- package/src/capabilities/compute-runtime.ts +0 -138
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/capabilities/react-surface.tsx +0 -55
- package/src/components/FunctionsContainer.tsx +0 -29
- package/src/components/TriggerSettings.tsx +0 -25
- package/src/events.ts +0 -11
- /package/dist/lib/browser/{AutomationPanel-PNBH5L5C.mjs.map → AutomationPanel-IGLIQY2N.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-NRIKAPQV.mjs.map → FunctionsPanel-NMA4RYJL.mjs.map} +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-GHK5UG4K.mjs.map → browser/FunctionsRegistry-TMKAEG5E.mjs.map} +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-SAMRTELO.mjs.map → browser/TriggerSettings-56AIMOEC.mjs.map} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
8
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { FunctionsPanel } from '../../components/FunctionsPanel';
|
|
12
|
+
import { FunctionsRegistry } from '../../components/FunctionsRegistry';
|
|
13
|
+
import { meta } from '../../meta';
|
|
14
|
+
|
|
15
|
+
export const FunctionsContainer = ({ space }: { space: Space }) => {
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
|
+
return (
|
|
18
|
+
<Settings.Root>
|
|
19
|
+
<Settings.Section
|
|
20
|
+
title={t('functions verbose label', { ns: meta.id })}
|
|
21
|
+
description={t('functions description', { ns: meta.id })}
|
|
22
|
+
>
|
|
23
|
+
<FunctionsPanel space={space} />
|
|
24
|
+
</Settings.Section>
|
|
25
|
+
<Settings.Section
|
|
26
|
+
title={t('functions registry verbose label', { ns: meta.id })}
|
|
27
|
+
description={t('functions registry description', { ns: meta.id })}
|
|
28
|
+
>
|
|
29
|
+
<FunctionsRegistry space={space} />
|
|
30
|
+
</Settings.Section>
|
|
31
|
+
</Settings.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type Database } from '@dxos/echo';
|
|
8
|
+
import { Input, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { useTriggerRuntimeControls } from '../../hooks';
|
|
12
|
+
import { meta } from '../../meta';
|
|
13
|
+
|
|
14
|
+
export const TriggersSettings = ({ db }: { db: Database.Database }) => {
|
|
15
|
+
const { state, start, stop } = useTriggerRuntimeControls(db);
|
|
16
|
+
const isRunning = state?.enabled ?? false;
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className='grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
21
|
+
<Settings.ItemInput title={t('runtime label')} description={t('runtime description')}>
|
|
22
|
+
<Input.Switch classNames='justify-self-end' checked={isRunning} onCheckedChange={isRunning ? stop : start} />
|
|
23
|
+
</Settings.ItemInput>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
export const AutomationSettings: ComponentType<any> = lazy(() => import('./AutomationSettings'));
|
|
8
|
+
export const FunctionsContainer: ComponentType<any> = lazy(() => import('./FunctionsContainer'));
|
|
9
|
+
export const TriggerSettings: ComponentType<any> = lazy(() => import('./TriggerSettings'));
|
|
@@ -2,29 +2,66 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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';
|
|
7
9
|
|
|
8
|
-
import { useCapability } from '@dxos/app-framework';
|
|
9
|
-
import type
|
|
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';
|
|
10
14
|
|
|
11
|
-
import { AutomationCapabilities } from '../
|
|
15
|
+
import { AutomationCapabilities } from '../types';
|
|
12
16
|
|
|
13
17
|
/**
|
|
14
18
|
* Create an effectful function that has access to compute services
|
|
15
19
|
*/
|
|
20
|
+
// TODO(burdon): Factor out (figure out cross-plugin capabilities dependencies).
|
|
16
21
|
export const useComputeRuntimeCallback = <T>(
|
|
17
|
-
|
|
22
|
+
id: Key.SpaceId | undefined,
|
|
18
23
|
fn: () => Effect.Effect<T, any, AutomationCapabilities.ComputeServices>,
|
|
19
|
-
deps?:
|
|
24
|
+
deps?: DependencyList,
|
|
20
25
|
): (() => Promise<T>) => {
|
|
21
26
|
const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
22
|
-
const runtime =
|
|
27
|
+
const runtime = id !== undefined ? computeRuntime.getRuntime(id) : undefined;
|
|
23
28
|
|
|
24
29
|
return useCallback(() => {
|
|
25
30
|
if (!runtime) {
|
|
26
31
|
throw new TypeError('Space not provided to useComputeRuntimeCallback');
|
|
27
32
|
}
|
|
33
|
+
|
|
28
34
|
return runtime.runPromise(fn());
|
|
29
35
|
}, [runtime, ...(deps ?? [])]);
|
|
30
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
|
+
});
|
|
@@ -2,50 +2,65 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import type * as Context from 'effect/Context';
|
|
5
7
|
import * as Effect from 'effect/Effect';
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
6
9
|
|
|
7
|
-
import { Filter } from '@dxos/echo';
|
|
8
|
-
import {
|
|
9
|
-
import { type
|
|
10
|
-
import {
|
|
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';
|
|
11
14
|
|
|
12
15
|
import { useComputeRuntimeCallback } from './useComputeRuntimeCallback';
|
|
13
16
|
|
|
14
17
|
interface TriggerRuntimeControls {
|
|
15
|
-
triggers:
|
|
16
|
-
|
|
18
|
+
triggers: Trigger.Trigger[];
|
|
19
|
+
|
|
20
|
+
state: TriggerDispatcherState | undefined;
|
|
21
|
+
|
|
17
22
|
start: () => void;
|
|
18
23
|
stop: () => void;
|
|
19
24
|
}
|
|
20
25
|
|
|
21
|
-
export const useTriggerRuntimeControls = (
|
|
22
|
-
const triggers = useQuery(
|
|
26
|
+
export const useTriggerRuntimeControls = (db: Database.Database | undefined): TriggerRuntimeControls => {
|
|
27
|
+
const triggers = useQuery(db, Filter.type(Trigger.Trigger));
|
|
23
28
|
|
|
24
|
-
const [
|
|
25
|
-
|
|
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
|
+
}),
|
|
26
37
|
);
|
|
27
38
|
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
void init();
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
const state = useAtomValue(dispatcher?.state ?? Atom.make(undefined));
|
|
44
|
+
|
|
28
45
|
const start = useComputeRuntimeCallback(
|
|
29
|
-
|
|
46
|
+
db?.spaceId,
|
|
30
47
|
Effect.fnUntraced(function* () {
|
|
31
48
|
const dispatcher = yield* TriggerDispatcher;
|
|
32
49
|
yield* dispatcher.start();
|
|
33
|
-
setIsRunningState(true);
|
|
34
50
|
}),
|
|
35
51
|
);
|
|
36
52
|
|
|
37
53
|
const stop = useComputeRuntimeCallback(
|
|
38
|
-
|
|
54
|
+
db?.spaceId,
|
|
39
55
|
Effect.fnUntraced(function* () {
|
|
40
56
|
const dispatcher = yield* TriggerDispatcher;
|
|
41
57
|
yield* dispatcher.stop();
|
|
42
|
-
setIsRunningState(false);
|
|
43
58
|
}),
|
|
44
59
|
);
|
|
45
60
|
|
|
46
61
|
return {
|
|
47
62
|
triggers,
|
|
48
|
-
|
|
63
|
+
state,
|
|
49
64
|
start: () => void start(),
|
|
50
65
|
stop: () => void stop(),
|
|
51
66
|
};
|
package/src/index.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export { AutomationCapabilities } from './capabilities';
|
|
6
5
|
export * from './components';
|
|
7
6
|
export * from './meta';
|
|
8
|
-
export * from './
|
|
7
|
+
export * from './hooks';
|
|
8
|
+
export * from './types';
|
|
9
9
|
|
|
10
10
|
export * from './AutomationPlugin';
|
package/src/meta.ts
CHANGED
|
@@ -2,13 +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 meta:
|
|
8
|
-
id: 'dxos.
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
|
+
id: 'org.dxos.plugin.automation',
|
|
9
10
|
name: 'Automation',
|
|
10
|
-
description:
|
|
11
|
-
|
|
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
|
+
`,
|
|
12
15
|
icon: 'ph--robot--regular',
|
|
13
16
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',
|
|
14
17
|
};
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { TestSchema } from '@dxos/client/testing';
|
|
8
|
+
import { JsonSchema, Ref } from '@dxos/echo';
|
|
9
9
|
|
|
10
10
|
export const functions = [
|
|
11
11
|
{
|
|
12
12
|
name: 'example.com/function/chess',
|
|
13
13
|
version: '0.1.0',
|
|
14
|
-
inputSchema:
|
|
14
|
+
inputSchema: JsonSchema.toJsonSchema(
|
|
15
15
|
Schema.Struct({
|
|
16
16
|
level: Schema.Number.annotations({
|
|
17
17
|
title: 'Level',
|
|
@@ -23,7 +23,7 @@ export const functions = [
|
|
|
23
23
|
name: 'example.com/function/forex',
|
|
24
24
|
version: '0.1.0',
|
|
25
25
|
binding: 'FOREX',
|
|
26
|
-
inputSchema:
|
|
26
|
+
inputSchema: JsonSchema.toJsonSchema(
|
|
27
27
|
Schema.Struct({
|
|
28
28
|
from: Schema.String.annotations({ title: 'Currency from' }),
|
|
29
29
|
to: Schema.String.annotations({ title: 'Currency to' }),
|
|
@@ -33,9 +33,9 @@ export const functions = [
|
|
|
33
33
|
{
|
|
34
34
|
name: 'example.com/function/ping-contact',
|
|
35
35
|
version: '0.0.1',
|
|
36
|
-
inputSchema:
|
|
36
|
+
inputSchema: JsonSchema.toJsonSchema(
|
|
37
37
|
Schema.Struct({
|
|
38
|
-
contact:
|
|
38
|
+
contact: Ref.Ref(TestSchema.ContactType).annotations({ title: 'Contact' }),
|
|
39
39
|
}),
|
|
40
40
|
),
|
|
41
41
|
},
|
package/src/translations.ts
CHANGED
|
@@ -22,12 +22,19 @@ export const translations = [
|
|
|
22
22
|
|
|
23
23
|
'functions panel label': 'Functions',
|
|
24
24
|
'functions verbose label': 'Manage deployed functions',
|
|
25
|
+
'functions registry verbose label': 'Functions registry',
|
|
26
|
+
'functions registry description': 'Import functions from the registry',
|
|
25
27
|
'functions description': 'You can manage all the functions deployed from your space on EDGE here.',
|
|
26
28
|
'function copy id': 'Copy Function ID',
|
|
27
29
|
'no functions found': 'No functions found',
|
|
28
30
|
'go to function source button label': 'Show function source',
|
|
31
|
+
'delete function button label': 'Delete function',
|
|
32
|
+
|
|
33
|
+
'function parameters label': 'Function parameters',
|
|
29
34
|
|
|
30
35
|
'trigger editor title': 'Configure Trigger',
|
|
36
|
+
'trigger editor description':
|
|
37
|
+
'Triggers are used to run functions at specific times or when specific events occur.',
|
|
31
38
|
'new trigger label': 'Add Trigger',
|
|
32
39
|
'trigger type timer': 'Timer',
|
|
33
40
|
'trigger type webhook': 'Webhook',
|
|
@@ -5,16 +5,10 @@
|
|
|
5
5
|
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
6
6
|
|
|
7
7
|
import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
8
|
-
import {
|
|
9
|
-
import type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
FunctionInvocationService,
|
|
13
|
-
InvocationTracer,
|
|
14
|
-
QueueService,
|
|
15
|
-
TriggerDispatcher,
|
|
16
|
-
TriggerStateStore,
|
|
17
|
-
} from '@dxos/functions';
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { type Database, type Feed } from '@dxos/echo';
|
|
10
|
+
import type { CredentialsService, FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';
|
|
11
|
+
import type { TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';
|
|
18
12
|
import type { SpaceId } from '@dxos/keys';
|
|
19
13
|
|
|
20
14
|
import { meta } from '../meta';
|
|
@@ -25,13 +19,14 @@ export namespace AutomationCapabilities {
|
|
|
25
19
|
*/
|
|
26
20
|
export type ComputeServices =
|
|
27
21
|
| TriggerDispatcher
|
|
22
|
+
| TriggerStateStore
|
|
28
23
|
| AiService.AiService
|
|
29
|
-
|
|
|
24
|
+
| Database.Service
|
|
25
|
+
| Feed.Service
|
|
30
26
|
| QueueService
|
|
31
27
|
| CredentialsService
|
|
32
28
|
| FunctionInvocationService
|
|
33
|
-
|
|
|
34
|
-
| TriggerStateStore
|
|
29
|
+
| TracingService
|
|
35
30
|
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
36
31
|
| ToolResolverService
|
|
37
32
|
| ToolExecutionService;
|
|
@@ -44,5 +39,5 @@ export namespace AutomationCapabilities {
|
|
|
44
39
|
/**
|
|
45
40
|
* Runtime for executing agents, functions, and triggers.
|
|
46
41
|
*/
|
|
47
|
-
export const ComputeRuntime =
|
|
42
|
+
export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}.capability.compute-runtime`);
|
|
48
43
|
}
|
|
@@ -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
|
+
}
|
package/src/types/index.ts
CHANGED
package/src/types/schema.ts
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
8
10
|
|
|
9
11
|
import { meta } from '../meta';
|
|
10
12
|
|
|
@@ -15,10 +17,10 @@ const TriggerTemplate = Schema.Union(
|
|
|
15
17
|
|
|
16
18
|
export namespace AutomationAction {
|
|
17
19
|
export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(
|
|
18
|
-
`${meta.id}
|
|
20
|
+
`${meta.id}.action.create-trigger-from-template`,
|
|
19
21
|
{
|
|
20
22
|
input: Schema.Struct({
|
|
21
|
-
|
|
23
|
+
db: Database.Database,
|
|
22
24
|
template: TriggerTemplate,
|
|
23
25
|
enabled: Schema.optional(Schema.Boolean),
|
|
24
26
|
// TODO(wittjosiah): Improve how this lookup is done.
|
|
@@ -29,3 +31,22 @@ export namespace AutomationAction {
|
|
|
29
31
|
},
|
|
30
32
|
) {}
|
|
31
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,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutomationPanel,
|
|
3
|
-
AutomationPanel_default
|
|
4
|
-
} from "./chunk-LC3QQU47.mjs";
|
|
5
|
-
import "./chunk-NIJWEQRD.mjs";
|
|
6
|
-
import "./chunk-WWURMV25.mjs";
|
|
7
|
-
export {
|
|
8
|
-
AutomationPanel,
|
|
9
|
-
AutomationPanel_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=AutomationPanel-PNBH5L5C.mjs.map
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useTriggerRuntimeControls
|
|
3
|
-
} from "./chunk-MVPRI3DB.mjs";
|
|
4
|
-
import "./chunk-QT3YWUOT.mjs";
|
|
5
|
-
import "./chunk-5ARH77PV.mjs";
|
|
6
|
-
import {
|
|
7
|
-
AutomationPanel
|
|
8
|
-
} from "./chunk-LC3QQU47.mjs";
|
|
9
|
-
import "./chunk-NIJWEQRD.mjs";
|
|
10
|
-
import {
|
|
11
|
-
meta
|
|
12
|
-
} from "./chunk-WWURMV25.mjs";
|
|
13
|
-
|
|
14
|
-
// src/components/AutomationSettings.tsx
|
|
15
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
16
|
-
import React2 from "react";
|
|
17
|
-
import { useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
18
|
-
import { ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
19
|
-
|
|
20
|
-
// src/components/TriggerSettings.tsx
|
|
21
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
22
|
-
import React from "react";
|
|
23
|
-
import { Input, useTranslation } from "@dxos/react-ui";
|
|
24
|
-
import { ControlItemInput } from "@dxos/react-ui-form";
|
|
25
|
-
var TriggersSettings = ({ space }) => {
|
|
26
|
-
var _effect = _useSignals();
|
|
27
|
-
try {
|
|
28
|
-
const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(space);
|
|
29
|
-
const { t } = useTranslation(meta.id);
|
|
30
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
className: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
32
|
-
}, /* @__PURE__ */ React.createElement(ControlItemInput, {
|
|
33
|
-
title: t("runtime label"),
|
|
34
|
-
description: t("runtime description")
|
|
35
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
36
|
-
classNames: "justify-self-end",
|
|
37
|
-
checked: isRunning,
|
|
38
|
-
onCheckedChange: isRunning ? stop : start
|
|
39
|
-
})));
|
|
40
|
-
} finally {
|
|
41
|
-
_effect.f();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// src/components/AutomationSettings.tsx
|
|
46
|
-
var AutomationSettings = (props) => {
|
|
47
|
-
var _effect = _useSignals2();
|
|
48
|
-
try {
|
|
49
|
-
const { t } = useTranslation2(meta.id);
|
|
50
|
-
return /* @__PURE__ */ React2.createElement(ControlPage, null, /* @__PURE__ */ React2.createElement(ControlSection, {
|
|
51
|
-
title: t("automation verbose label", {
|
|
52
|
-
ns: meta.id
|
|
53
|
-
}),
|
|
54
|
-
description: t("automation description", {
|
|
55
|
-
ns: meta.id
|
|
56
|
-
})
|
|
57
|
-
}, /* @__PURE__ */ React2.createElement(AutomationPanel, props), /* @__PURE__ */ React2.createElement(TriggersSettings, {
|
|
58
|
-
space: props.space
|
|
59
|
-
})));
|
|
60
|
-
} finally {
|
|
61
|
-
_effect.f();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
var AutomationSettings_default = AutomationSettings;
|
|
65
|
-
export {
|
|
66
|
-
AutomationSettings,
|
|
67
|
-
AutomationSettings_default as default
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=AutomationSettings-3LABN6ER.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationSettings.tsx", "../../../src/components/TriggerSettings.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { TriggersSettings } from './TriggerSettings';\n\nexport const AutomationSettings = (props: AutomationPanelProps) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: meta.id })}\n description={t('automation description', { ns: meta.id })}\n >\n <AutomationPanel {...props} />\n <TriggersSettings space={props.space} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default AutomationSettings;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { ControlItemInput } from '@dxos/react-ui-form';\n\nimport { useTriggerRuntimeControls } from '../hooks';\nimport { meta } from '../meta';\n\nexport const TriggersSettings = ({ space }: { space: Space }) => {\n const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(space);\n const { t } = useTranslation(meta.id);\n\n return (\n <div className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>\n <ControlItemInput title={t('runtime label')} description={t('runtime description')}>\n <Input.Switch classNames='justify-self-end' checked={isRunning} onCheckedChange={isRunning ? stop : start} />\n </ControlItemInput>\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;;;;ACH5C,OAAOC,WAAW;AAGlB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,wBAAwB;AAK1B,IAAMC,mBAAmB,CAAC,EAAEC,MAAK,MAAoB;;;AAC1D,UAAM,EAAEC,UAAUC,WAAWC,OAAOC,KAAI,IAAKC,0BAA0BL,KAAAA;AACvE,UAAM,EAAEM,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,WACE,sBAAA,cAACC,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACC,kBAAAA;MAAiBC,OAAOP,EAAE,eAAA;MAAkBQ,aAAaR,EAAE,qBAAA;OAC1D,sBAAA,cAACS,MAAMC,QAAM;MAACC,YAAW;MAAmBC,SAAShB;MAAWiB,iBAAiBjB,YAAYE,OAAOD;;;;;AAI5G;;;ADVO,IAAMiB,qBAAqB,CAACC,UAAAA;;;AACjC,UAAM,EAAEC,EAAC,IAAKC,gBAAeC,KAAKC,EAAE;AACpC,WACE,gBAAAC,OAAA,cAACC,aAAAA,MACC,gBAAAD,OAAA,cAACE,gBAAAA;MACCC,OAAOP,EAAE,4BAA4B;QAAEQ,IAAIN,KAAKC;MAAG,CAAA;MACnDM,aAAaT,EAAE,0BAA0B;QAAEQ,IAAIN,KAAKC;MAAG,CAAA;OAEvD,gBAAAC,OAAA,cAACM,iBAAoBX,KAAAA,GACrB,gBAAAK,OAAA,cAACO,kBAAAA;MAAiBC,OAAOb,MAAMa;;;;;AAIvC;AAEA,IAAA,6BAAed;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlPage", "ControlSection", "React", "Input", "useTranslation", "ControlItemInput", "TriggersSettings", "space", "triggers", "isRunning", "start", "stop", "useTriggerRuntimeControls", "t", "useTranslation", "meta", "id", "div", "className", "ControlItemInput", "title", "description", "Input", "Switch", "classNames", "checked", "onCheckedChange", "AutomationSettings", "props", "t", "useTranslation", "meta", "id", "React", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel", "TriggersSettings", "space"]
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FunctionsPanel
|
|
3
|
-
} from "./chunk-DLLE4FKP.mjs";
|
|
4
|
-
import {
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-WWURMV25.mjs";
|
|
7
|
-
|
|
8
|
-
// 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
|
-
var FunctionsContainer = ({ space }) => {
|
|
14
|
-
var _effect = _useSignals();
|
|
15
|
-
try {
|
|
16
|
-
const { t } = useTranslation(meta.id);
|
|
17
|
-
return /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
|
|
18
|
-
title: t("functions verbose label", {
|
|
19
|
-
ns: meta.id
|
|
20
|
-
}),
|
|
21
|
-
description: t("functions description", {
|
|
22
|
-
ns: meta.id
|
|
23
|
-
})
|
|
24
|
-
}, /* @__PURE__ */ React.createElement(FunctionsPanel, {
|
|
25
|
-
space
|
|
26
|
-
})));
|
|
27
|
-
} finally {
|
|
28
|
-
_effect.f();
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
var FunctionsContainer_default = FunctionsContainer;
|
|
32
|
-
export {
|
|
33
|
-
FunctionsContainer,
|
|
34
|
-
FunctionsContainer_default as default
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=FunctionsContainer-HHBMPUOD.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';\n\nimport { meta } from '../meta';\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport const FunctionsContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('functions verbose label', { ns: meta.id })}\n description={t('functions description', { ns: meta.id })}\n >\n <FunctionsPanel space={space} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default FunctionsContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;AAMrC,IAAMC,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;;;AAC5D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,WACE,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAON,EAAE,2BAA2B;QAAEO,IAAIL,KAAKC;MAAG,CAAA;MAClDK,aAAaR,EAAE,yBAAyB;QAAEO,IAAIL,KAAKC;MAAG,CAAA;OAEtD,sBAAA,cAACM,gBAAAA;MAAeV;;;;;AAIxB;AAEA,IAAA,6BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlPage", "ControlSection", "FunctionsContainer", "space", "t", "useTranslation", "meta", "id", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel"]
|
|
7
|
-
}
|