@dxos/plugin-automation 0.8.4-main.72ec0f3 → 0.8.4-main.8360d9e660
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-XGJGVBDD.mjs +37 -0
- package/dist/lib/browser/AutomationSettings-XGJGVBDD.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-CRW6SJUN.mjs → FunctionsPanel-NMA4RYJL.mjs} +3 -3
- package/dist/lib/browser/FunctionsRegistry-TMKAEG5E.mjs +10 -0
- package/dist/lib/browser/TriggerSettings-GW5OEM2G.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-5WMYSXEH.mjs +83 -0
- package/dist/lib/browser/chunk-5WMYSXEH.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-LZQFZO3B.mjs → chunk-EL64ZPPN.mjs} +2 -2
- 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-LHJEQVX5.mjs +8 -0
- package/dist/lib/browser/chunk-LHJEQVX5.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-PUYY7B5F.mjs +31 -0
- package/dist/lib/browser/chunk-PUYY7B5F.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZBEMNWNY.mjs +93 -0
- package/dist/lib/browser/chunk-ZBEMNWNY.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-I3I2BIRE.mjs +130 -0
- package/dist/lib/browser/compute-runtime-I3I2BIRE.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +3 -3
- package/dist/lib/browser/index.mjs +55 -62
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-NGN4BEWN.mjs +84 -0
- package/dist/lib/browser/operation-resolver-NGN4BEWN.mjs.map +7 -0
- package/dist/lib/browser/react-surface-SXDIM3RM.mjs +65 -0
- package/dist/lib/browser/react-surface-SXDIM3RM.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -4
- package/dist/lib/node-esm/{AutomationPanel-HCVFNHGQ.mjs → AutomationPanel-O2BCQA7P.mjs} +4 -4
- package/dist/lib/node-esm/AutomationPanel-O2BCQA7P.mjs.map +7 -0
- package/dist/lib/node-esm/AutomationSettings-W52ZO2XI.mjs +38 -0
- package/dist/lib/node-esm/AutomationSettings-W52ZO2XI.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-RVVCS6VH.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-2GKFPECW.mjs +12 -0
- package/dist/lib/node-esm/TriggerSettings-2GKFPECW.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-6JVB3IHW.mjs +97 -0
- package/dist/lib/node-esm/chunk-6JVB3IHW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BNWZ2NNI.mjs +32 -0
- package/dist/lib/node-esm/chunk-BNWZ2NNI.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-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-V3VUE2NR.mjs +10 -0
- package/dist/lib/node-esm/chunk-V3VUE2NR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CEVIVRTY.mjs → chunk-WC5AT7B3.mjs} +2 -2
- package/dist/lib/node-esm/chunk-WC5AT7B3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XCFO2IXT.mjs +84 -0
- package/dist/lib/node-esm/chunk-XCFO2IXT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PICJ2REN.mjs → chunk-XQO3HK62.mjs} +30 -37
- package/dist/lib/node-esm/chunk-XQO3HK62.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-7HCSIYFG.mjs +131 -0
- package/dist/lib/node-esm/compute-runtime-7HCSIYFG.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +3 -3
- package/dist/lib/node-esm/index.mjs +55 -62
- 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-ANGACQZG.mjs +85 -0
- package/dist/lib/node-esm/operation-resolver-ANGACQZG.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-QVLVDEVW.mjs +66 -0
- package/dist/lib/node-esm/react-surface-QVLVDEVW.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 +4 -5
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +2 -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.map +1 -1
- package/dist/types/src/components/FunctionsRegistry/index.d.ts +3 -1
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +10 -7
- 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 +7 -6
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +72 -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 +6 -6
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +4 -3
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -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 +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +23 -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 +67 -50
- package/src/AutomationPlugin.tsx +14 -33
- 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 +155 -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 +3 -3
- package/src/components/AutomationPanel/AutomationPanel.tsx +165 -69
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +17 -24
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +18 -43
- package/src/components/FunctionsRegistry/index.ts +4 -1
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +32 -31
- package/src/components/TriggerEditor/SpecSelector.tsx +9 -7
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +75 -30
- package/src/components/TriggerEditor/TriggerEditor.tsx +90 -45
- 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/{components → containers/FunctionsContainer}/FunctionsContainer.tsx +10 -13
- 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 +10 -11
- package/src/hooks/useTriggerRuntimeControls.ts +28 -14
- package/src/index.ts +1 -2
- package/src/meta.ts +3 -3
- package/src/testing/test-functions.ts +6 -6
- package/src/translations.ts +4 -0
- package/src/{capabilities → types}/capabilities.ts +11 -7
- 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-7OECLR5N.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs +0 -68
- package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs +0 -151
- package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs +0 -81
- package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs.map +0 -7
- package/dist/lib/browser/chunk-EPEXQP45.mjs +0 -14
- package/dist/lib/browser/chunk-EPEXQP45.mjs.map +0 -7
- package/dist/lib/browser/chunk-JW7XSPYW.mjs +0 -267
- package/dist/lib/browser/chunk-JW7XSPYW.mjs.map +0 -7
- package/dist/lib/browser/chunk-LZQFZO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-NAPXRXTY.mjs +0 -100
- package/dist/lib/browser/chunk-NAPXRXTY.mjs.map +0 -7
- package/dist/lib/browser/chunk-QKFBHAGN.mjs +0 -184
- package/dist/lib/browser/chunk-QKFBHAGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-TWWFNOIR.mjs +0 -109
- package/dist/lib/browser/chunk-TWWFNOIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-XAKZ4ANY.mjs +0 -15
- package/dist/lib/browser/chunk-XAKZ4ANY.mjs.map +0 -7
- package/dist/lib/browser/chunk-YBPJCY3F.mjs +0 -38
- package/dist/lib/browser/chunk-YBPJCY3F.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs +0 -113
- package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs +0 -77
- package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YQW7WCFW.mjs +0 -64
- package/dist/lib/browser/react-surface-YQW7WCFW.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs +0 -69
- package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs +0 -152
- package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs +0 -82
- package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6YRKST6M.mjs +0 -185
- package/dist/lib/node-esm/chunk-6YRKST6M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CEVIVRTY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CPP35BE6.mjs +0 -16
- package/dist/lib/node-esm/chunk-CPP35BE6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ECJKIUBO.mjs +0 -39
- package/dist/lib/node-esm/chunk-ECJKIUBO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KB7NFEYY.mjs +0 -16
- package/dist/lib/node-esm/chunk-KB7NFEYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PICJ2REN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RVK52XGK.mjs +0 -110
- package/dist/lib/node-esm/chunk-RVK52XGK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W76WUTZY.mjs +0 -268
- package/dist/lib/node-esm/chunk-W76WUTZY.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-URROOC34.mjs +0 -114
- package/dist/lib/node-esm/compute-runtime-URROOC34.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-NNHYNBO6.mjs +0 -65
- package/dist/lib/node-esm/react-surface-NNHYNBO6.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 -20
- 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 -127
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/capabilities/react-surface.tsx +0 -56
- package/src/components/TriggerSettings.tsx +0 -25
- package/src/events.ts +0 -11
- /package/dist/lib/browser/{AutomationPanel-7OECLR5N.mjs.map → AutomationPanel-IGLIQY2N.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-CRW6SJUN.mjs.map → FunctionsPanel-NMA4RYJL.mjs.map} +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-HCVFNHGQ.mjs.map → browser/FunctionsRegistry-TMKAEG5E.mjs.map} +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-RVVCS6VH.mjs.map → browser/TriggerSettings-GW5OEM2G.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.8360d9e660",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
@@ -15,6 +19,11 @@
|
|
|
15
19
|
"browser": "./dist/lib/browser/index.mjs",
|
|
16
20
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
17
21
|
},
|
|
22
|
+
"./cli": {
|
|
23
|
+
"source": "./src/cli/index.ts",
|
|
24
|
+
"types": "./dist/types/src/cli/index.d.ts",
|
|
25
|
+
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
26
|
+
},
|
|
18
27
|
"./hooks": {
|
|
19
28
|
"source": "./src/hooks/index.ts",
|
|
20
29
|
"types": "./dist/types/src/hooks/index.d.ts",
|
|
@@ -45,59 +54,67 @@
|
|
|
45
54
|
"src"
|
|
46
55
|
],
|
|
47
56
|
"dependencies": {
|
|
48
|
-
"@effect/
|
|
49
|
-
"@effect/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/plugin-
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
57
|
+
"@effect-atom/atom": "^0.5.1",
|
|
58
|
+
"@effect/ai": "0.33.2",
|
|
59
|
+
"@effect/cli": "0.73.2",
|
|
60
|
+
"@effect/platform-browser": "0.74.0",
|
|
61
|
+
"@effect/printer-ansi": "0.47.0",
|
|
62
|
+
"@dxos/app-framework": "0.8.4-main.8360d9e660",
|
|
63
|
+
"@dxos/ai": "0.8.4-main.8360d9e660",
|
|
64
|
+
"@dxos/app-toolkit": "0.8.4-main.8360d9e660",
|
|
65
|
+
"@dxos/assistant": "0.8.4-main.8360d9e660",
|
|
66
|
+
"@dxos/blueprints": "0.8.4-main.8360d9e660",
|
|
67
|
+
"@dxos/client": "0.8.4-main.8360d9e660",
|
|
68
|
+
"@dxos/conductor": "0.8.4-main.8360d9e660",
|
|
69
|
+
"@dxos/context": "0.8.4-main.8360d9e660",
|
|
70
|
+
"@dxos/cli-util": "0.8.4-main.8360d9e660",
|
|
71
|
+
"@dxos/echo": "0.8.4-main.8360d9e660",
|
|
72
|
+
"@dxos/echo-atom": "0.8.4-main.8360d9e660",
|
|
73
|
+
"@dxos/echo-db": "0.8.4-main.8360d9e660",
|
|
74
|
+
"@dxos/effect": "0.8.4-main.8360d9e660",
|
|
75
|
+
"@dxos/functions": "0.8.4-main.8360d9e660",
|
|
76
|
+
"@dxos/invariant": "0.8.4-main.8360d9e660",
|
|
77
|
+
"@dxos/functions-runtime": "0.8.4-main.8360d9e660",
|
|
78
|
+
"@dxos/log": "0.8.4-main.8360d9e660",
|
|
79
|
+
"@dxos/operation": "0.8.4-main.8360d9e660",
|
|
80
|
+
"@dxos/keys": "0.8.4-main.8360d9e660",
|
|
81
|
+
"@dxos/plugin-client": "0.8.4-main.8360d9e660",
|
|
82
|
+
"@dxos/plugin-space": "0.8.4-main.8360d9e660",
|
|
83
|
+
"@dxos/plugin-deck": "0.8.4-main.8360d9e660",
|
|
84
|
+
"@dxos/random": "0.8.4-main.8360d9e660",
|
|
85
|
+
"@dxos/plugin-graph": "0.8.4-main.8360d9e660",
|
|
86
|
+
"@dxos/react-client": "0.8.4-main.8360d9e660",
|
|
87
|
+
"@dxos/react-ui-editor": "0.8.4-main.8360d9e660",
|
|
88
|
+
"@dxos/react-ui-form": "0.8.4-main.8360d9e660",
|
|
89
|
+
"@dxos/react-ui-list": "0.8.4-main.8360d9e660",
|
|
90
|
+
"@dxos/react-ui-stack": "0.8.4-main.8360d9e660",
|
|
91
|
+
"@dxos/schema": "0.8.4-main.8360d9e660",
|
|
92
|
+
"@dxos/types": "0.8.4-main.8360d9e660",
|
|
93
|
+
"@dxos/util": "0.8.4-main.8360d9e660",
|
|
94
|
+
"@dxos/react-ui-components": "0.8.4-main.8360d9e660",
|
|
95
|
+
"@dxos/async": "0.8.4-main.8360d9e660"
|
|
79
96
|
},
|
|
80
97
|
"devDependencies": {
|
|
81
|
-
"@effect-atom/atom-react": "^0.
|
|
82
|
-
"@effect/platform": "0.
|
|
83
|
-
"@types/react": "~19.2.
|
|
84
|
-
"@types/react-dom": "~19.2.
|
|
85
|
-
"effect": "3.
|
|
86
|
-
"react": "~19.2.
|
|
87
|
-
"react-dom": "~19.2.
|
|
88
|
-
"vite": "7.1.
|
|
89
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
98
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
99
|
+
"@effect/platform": "0.94.4",
|
|
100
|
+
"@types/react": "~19.2.7",
|
|
101
|
+
"@types/react-dom": "~19.2.3",
|
|
102
|
+
"effect": "3.19.16",
|
|
103
|
+
"react": "~19.2.3",
|
|
104
|
+
"react-dom": "~19.2.3",
|
|
105
|
+
"vite": "^7.1.11",
|
|
106
|
+
"@dxos/react-ui": "0.8.4-main.8360d9e660",
|
|
107
|
+
"@dxos/ui-theme": "0.8.4-main.8360d9e660",
|
|
108
|
+
"@dxos/storybook-utils": "0.8.4-main.8360d9e660"
|
|
92
109
|
},
|
|
93
110
|
"peerDependencies": {
|
|
94
|
-
"@effect-atom/atom-react": "^0.
|
|
95
|
-
"@effect/platform": "
|
|
96
|
-
"effect": "
|
|
97
|
-
"react": "
|
|
98
|
-
"react-dom": "
|
|
99
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
100
|
-
"@dxos/
|
|
111
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
112
|
+
"@effect/platform": "0.94.4",
|
|
113
|
+
"effect": "3.19.16",
|
|
114
|
+
"react": "~19.2.3",
|
|
115
|
+
"react-dom": "~19.2.3",
|
|
116
|
+
"@dxos/react-ui": "0.8.4-main.8360d9e660",
|
|
117
|
+
"@dxos/ui-theme": "0.8.4-main.8360d9e660"
|
|
101
118
|
},
|
|
102
119
|
"publishConfig": {
|
|
103
120
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -2,45 +2,26 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
import { Function, Trigger } from '@dxos/functions';
|
|
7
|
-
import {
|
|
8
|
+
import { ClientEvents } from '@dxos/plugin-client/types';
|
|
8
9
|
|
|
9
|
-
import { AppGraphBuilder, ComputeRuntime,
|
|
10
|
-
import { AutomationEvents } from './events';
|
|
10
|
+
import { AppGraphBuilder, ComputeRuntime, OperationResolver, ReactSurface } from './capabilities';
|
|
11
11
|
import { meta } from './meta';
|
|
12
12
|
import { translations } from './translations';
|
|
13
|
+
import { AutomationEvents } from './types';
|
|
13
14
|
|
|
14
|
-
export const AutomationPlugin =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
id: `${meta.id}/module/schema`,
|
|
22
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
23
|
-
activate: () => contributes(ClientCapabilities.Schema, [Function.Function, Trigger.Trigger]),
|
|
24
|
-
}),
|
|
25
|
-
defineModule({
|
|
26
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
27
|
-
activatesOn: Events.SetupAppGraph,
|
|
28
|
-
activate: AppGraphBuilder,
|
|
29
|
-
}),
|
|
30
|
-
defineModule({
|
|
31
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
32
|
-
activatesOn: Events.SetupIntentResolver,
|
|
33
|
-
activate: IntentResolver,
|
|
34
|
-
}),
|
|
35
|
-
defineModule({
|
|
36
|
-
id: `${meta.id}/module/react-surface`,
|
|
37
|
-
activatesOn: Events.SetupReactSurface,
|
|
38
|
-
activate: ReactSurface,
|
|
39
|
-
}),
|
|
40
|
-
defineModule({
|
|
41
|
-
id: `${meta.id}/module/compute-runtime`,
|
|
15
|
+
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
16
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
17
|
+
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
18
|
+
AppPlugin.addSchemaModule({ schema: [Function.Function, Trigger.Trigger] }),
|
|
19
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
20
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
21
|
+
Plugin.addModule({
|
|
42
22
|
activatesOn: ClientEvents.ClientReady,
|
|
43
23
|
activatesAfter: [AutomationEvents.ComputeRuntimeReady],
|
|
44
24
|
activate: ComputeRuntime,
|
|
45
25
|
}),
|
|
46
|
-
|
|
26
|
+
Plugin.make,
|
|
27
|
+
);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { Script } from '@dxos/functions';
|
|
10
|
+
import { COMPANION_PREFIX } from '@dxos/app-toolkit';
|
|
11
|
+
import { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
12
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
13
|
+
import { meta as spaceMeta } from '@dxos/plugin-space';
|
|
14
|
+
|
|
15
|
+
import { meta } from '../../meta';
|
|
16
|
+
|
|
17
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
const extensions = yield* Effect.all([
|
|
20
|
+
GraphBuilder.createExtension({
|
|
21
|
+
id: `${meta.id}.space-settings-automation`,
|
|
22
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
23
|
+
connector: (node) =>
|
|
24
|
+
Effect.succeed([
|
|
25
|
+
{
|
|
26
|
+
id: `${meta.id}.automations`,
|
|
27
|
+
type: `${meta.id}.space-settings-automation`,
|
|
28
|
+
data: `${meta.id}.space-settings-automation`,
|
|
29
|
+
properties: {
|
|
30
|
+
label: ['automation panel label', { ns: meta.id }],
|
|
31
|
+
icon: 'ph--lightning--regular',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
]),
|
|
35
|
+
}),
|
|
36
|
+
GraphBuilder.createExtension({
|
|
37
|
+
id: `${meta.id}.space-settings-functions`,
|
|
38
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
39
|
+
connector: (node) =>
|
|
40
|
+
Effect.succeed([
|
|
41
|
+
{
|
|
42
|
+
id: `${meta.id}.functions`,
|
|
43
|
+
type: `${meta.id}.space-settings-functions`,
|
|
44
|
+
data: `${meta.id}.space-settings-functions`,
|
|
45
|
+
properties: {
|
|
46
|
+
label: ['functions panel label', { ns: meta.id }],
|
|
47
|
+
icon: 'ph--function--regular',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
]),
|
|
51
|
+
}),
|
|
52
|
+
GraphBuilder.createTypeExtension({
|
|
53
|
+
id: `${meta.id}.script-companion`,
|
|
54
|
+
type: Script.Script,
|
|
55
|
+
connector: (script) =>
|
|
56
|
+
Effect.succeed([
|
|
57
|
+
{
|
|
58
|
+
id: `${COMPANION_PREFIX}automation`,
|
|
59
|
+
type: PLANK_COMPANION_TYPE,
|
|
60
|
+
data: 'automation',
|
|
61
|
+
properties: {
|
|
62
|
+
label: ['script automation label', { ns: meta.id }],
|
|
63
|
+
icon: 'ph--lightning--regular',
|
|
64
|
+
disposition: 'hidden',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
]),
|
|
68
|
+
}),
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as BrowserKeyValueStore from '@effect/platform-browser/BrowserKeyValueStore';
|
|
6
|
+
import { Registry } from '@effect-atom/atom';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Layer from 'effect/Layer';
|
|
9
|
+
import * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
10
|
+
|
|
11
|
+
import { GenericToolkit } from '@dxos/ai';
|
|
12
|
+
import { Capabilities, Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
13
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
14
|
+
import { ToolExecutionServices } from '@dxos/assistant';
|
|
15
|
+
import { SpaceProperties } from '@dxos/client/echo';
|
|
16
|
+
import { Resource } from '@dxos/context';
|
|
17
|
+
import { Database, Feed, Obj, Query, Ref } from '@dxos/echo';
|
|
18
|
+
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
19
|
+
import { CredentialsService, QueueService } from '@dxos/functions';
|
|
20
|
+
import {
|
|
21
|
+
FunctionImplementationResolver,
|
|
22
|
+
FunctionInvocationServiceLayerWithLocalLoopbackExecutor,
|
|
23
|
+
RemoteFunctionExecutionService,
|
|
24
|
+
TracingServiceExt,
|
|
25
|
+
TriggerDispatcher,
|
|
26
|
+
TriggerStateStore,
|
|
27
|
+
} from '@dxos/functions-runtime';
|
|
28
|
+
import { invariant } from '@dxos/invariant';
|
|
29
|
+
import { type SpaceId } from '@dxos/keys';
|
|
30
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
31
|
+
|
|
32
|
+
import { AutomationCapabilities } from '../../types';
|
|
33
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
34
|
+
|
|
35
|
+
export default Capability.makeModule(
|
|
36
|
+
Effect.fnUntraced(function* () {
|
|
37
|
+
const capabilities = yield* Capability.Service;
|
|
38
|
+
const provider = yield* Effect.tryPromise(() => new ComputeRuntimeProviderImpl(capabilities).open());
|
|
39
|
+
return Capability.contributes(AutomationCapabilities.ComputeRuntime, provider, () =>
|
|
40
|
+
Effect.tryPromise(() => provider.close()),
|
|
41
|
+
);
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Adapts plugin capabilities to runtime layers.
|
|
47
|
+
*/
|
|
48
|
+
class ComputeRuntimeProviderImpl extends Resource implements AutomationCapabilities.ComputeRuntimeProvider {
|
|
49
|
+
readonly #runtimes = new Map<SpaceId, AutomationCapabilities.ComputeRuntime>();
|
|
50
|
+
readonly #capabilities: CapabilityManager.CapabilityManager;
|
|
51
|
+
|
|
52
|
+
constructor(capabilities: CapabilityManager.CapabilityManager) {
|
|
53
|
+
super();
|
|
54
|
+
this.#capabilities = capabilities;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
protected override async _open() {}
|
|
58
|
+
|
|
59
|
+
protected override async _close() {
|
|
60
|
+
await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
|
|
61
|
+
this.#runtimes.clear();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
getRuntime(spaceId: SpaceId): AutomationCapabilities.ComputeRuntime {
|
|
65
|
+
if (this.#runtimes.has(spaceId)) {
|
|
66
|
+
return this.#runtimes.get(spaceId)!;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const layer = Layer.unwrapEffect(
|
|
70
|
+
Effect.gen(this, function* () {
|
|
71
|
+
const client = this.#capabilities.get(ClientCapabilities.Client);
|
|
72
|
+
const aiServiceLayer =
|
|
73
|
+
this.#capabilities.get(AppCapabilities.AiServiceLayer) ?? Layer.die('AiService not found');
|
|
74
|
+
const registry = this.#capabilities.get(Capabilities.AtomRegistry);
|
|
75
|
+
|
|
76
|
+
// TODO(dmaretskyi): Make these reactive.
|
|
77
|
+
const functions = [
|
|
78
|
+
...this.#capabilities.getAll(AppCapabilities.Functions).flat(),
|
|
79
|
+
...this.#capabilities.getAll(AppCapabilities.BlueprintDefinition).flatMap((blueprint) => blueprint.functions),
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
const genericToolkitProvider = Layer.succeed(GenericToolkit.Provider, {
|
|
83
|
+
getToolkit: () => {
|
|
84
|
+
const toolkits = this.#capabilities.getAll(AppCapabilities.Toolkit);
|
|
85
|
+
return GenericToolkit.merge(...toolkits);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const blueprints = this.#capabilities
|
|
90
|
+
.getAll(AppCapabilities.BlueprintDefinition)
|
|
91
|
+
.flatMap((blueprint) => blueprint.make());
|
|
92
|
+
|
|
93
|
+
const space = client.spaces.get(spaceId);
|
|
94
|
+
invariant(space, `Invalid space: ${spaceId}`);
|
|
95
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
96
|
+
|
|
97
|
+
return Layer.mergeAll(
|
|
98
|
+
TriggerDispatcher.layer({ timeControl: 'natural' }),
|
|
99
|
+
// TODO(dmaretskyi): Make blueprints reactive and registry accept an atom.
|
|
100
|
+
Layer.succeed(Blueprint.RegistryService, new Blueprint.Registry(blueprints)),
|
|
101
|
+
).pipe(
|
|
102
|
+
Layer.provideMerge(Layer.succeed(Registry.AtomRegistry, registry)),
|
|
103
|
+
Layer.provideMerge(
|
|
104
|
+
Layer.mergeAll(
|
|
105
|
+
TracingServiceLive,
|
|
106
|
+
TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
|
|
107
|
+
ToolExecutionServices,
|
|
108
|
+
),
|
|
109
|
+
),
|
|
110
|
+
Layer.provideMerge(
|
|
111
|
+
FunctionInvocationServiceLayerWithLocalLoopbackExecutor.pipe(
|
|
112
|
+
Layer.provideMerge(genericToolkitProvider),
|
|
113
|
+
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions })),
|
|
114
|
+
Layer.provideMerge(
|
|
115
|
+
RemoteFunctionExecutionService.fromClient(
|
|
116
|
+
client,
|
|
117
|
+
// If agent is not enabled do not provide spaceId because space context will be unavailable on EDGE.
|
|
118
|
+
client.config.get('runtime.client.edgeFeatures.agents') ? spaceId : undefined,
|
|
119
|
+
),
|
|
120
|
+
),
|
|
121
|
+
Layer.provideMerge(aiServiceLayer),
|
|
122
|
+
Layer.provideMerge(CredentialsService.layerFromDatabase()),
|
|
123
|
+
Layer.provideMerge(space ? Database.layer(space.db) : Database.notAvailable),
|
|
124
|
+
Layer.provideMerge(space ? QueueService.layer(space.queues) : QueueService.notAvailable),
|
|
125
|
+
Layer.provideMerge(space ? createFeedServiceLayer(space.queues) : Feed.notAvailable),
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
);
|
|
129
|
+
}),
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
const runtime = ManagedRuntime.make(layer);
|
|
133
|
+
this.#runtimes.set(spaceId, runtime);
|
|
134
|
+
return runtime;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const TracingServiceLive = Layer.unwrapEffect(
|
|
139
|
+
Effect.gen(function* () {
|
|
140
|
+
const objects = yield* Database.runQuery(Query.type(SpaceProperties));
|
|
141
|
+
const [properties] = objects;
|
|
142
|
+
invariant(properties);
|
|
143
|
+
// TODO(burdon): Check ref target has loaded?
|
|
144
|
+
if (!properties.invocationTraceQueue || !properties.invocationTraceQueue.target) {
|
|
145
|
+
const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
|
|
146
|
+
Obj.change(properties, (m) => {
|
|
147
|
+
m.invocationTraceQueue = Ref.fromDXN(queue.dxn);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const queue = properties.invocationTraceQueue.target;
|
|
152
|
+
invariant(queue);
|
|
153
|
+
return TracingServiceExt.layerInvocationsQueue({ invocationTraceQueue: queue });
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
10
|
-
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
|
-
|
|
12
|
-
export * from './capabilities';
|
|
5
|
+
export * from './app-graph-builder';
|
|
6
|
+
export * from './compute-runtime';
|
|
7
|
+
export * from './operation-resolver';
|
|
8
|
+
export * from './react-surface';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
9
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
10
|
+
import { Function, Script, Trigger } from '@dxos/functions';
|
|
11
|
+
import { type DXN } from '@dxos/keys';
|
|
12
|
+
import { Operation, OperationResolver } from '@dxos/operation';
|
|
13
|
+
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
14
|
+
import { Filter } from '@dxos/react-client/echo';
|
|
15
|
+
|
|
16
|
+
import { meta } from '../../meta';
|
|
17
|
+
import { AutomationOperation } from '../../types';
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
return Capability.contributes(Capabilities.OperationResolver, [
|
|
22
|
+
OperationResolver.make({
|
|
23
|
+
operation: AutomationOperation.CreateTriggerFromTemplate,
|
|
24
|
+
handler: Effect.fnUntraced(function* ({ db, template, enabled = false, scriptName, input }) {
|
|
25
|
+
const trigger = Trigger.make({ enabled, input });
|
|
26
|
+
|
|
27
|
+
// TODO(wittjosiah): Factor out function lookup by script name?
|
|
28
|
+
if (scriptName) {
|
|
29
|
+
const scripts = yield* Effect.promise(() =>
|
|
30
|
+
db.query(Filter.type(Script.Script, { name: scriptName })).run(),
|
|
31
|
+
);
|
|
32
|
+
const [script] = scripts;
|
|
33
|
+
if (script) {
|
|
34
|
+
const functions = yield* Effect.promise(() =>
|
|
35
|
+
db.query(Filter.type(Function.Function, { source: Ref.make(script) })).run(),
|
|
36
|
+
);
|
|
37
|
+
const [fn] = functions;
|
|
38
|
+
if (fn) {
|
|
39
|
+
Obj.change(trigger, (t) => {
|
|
40
|
+
t.function = Ref.make(fn);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
switch (template.type) {
|
|
47
|
+
case 'timer': {
|
|
48
|
+
Obj.change(trigger, (t) => {
|
|
49
|
+
t.spec = { kind: 'timer', cron: template.cron };
|
|
50
|
+
});
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case 'queue': {
|
|
54
|
+
Obj.change(trigger, (t) => {
|
|
55
|
+
t.spec = {
|
|
56
|
+
kind: 'queue',
|
|
57
|
+
queue: (template.queueDXN as DXN).toString(),
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
default: {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
68
|
+
object: trigger,
|
|
69
|
+
target: db,
|
|
70
|
+
hidden: true,
|
|
71
|
+
});
|
|
72
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
73
|
+
subject: [`${getSpacePath(db.spaceId)}/settings/${meta.id}.automations`],
|
|
74
|
+
workspace: getSpacePath(db.spaceId),
|
|
75
|
+
});
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
]);
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { useActiveSpace } from '@dxos/plugin-space';
|
|
12
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
13
|
+
|
|
14
|
+
import { AutomationSettings, FunctionsContainer } from '../../containers';
|
|
15
|
+
import { meta } from '../../meta';
|
|
16
|
+
|
|
17
|
+
export default Capability.makeModule(() =>
|
|
18
|
+
Effect.succeed(
|
|
19
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
20
|
+
Surface.create({
|
|
21
|
+
id: `${meta.id}.space-settings-functions`,
|
|
22
|
+
role: 'article',
|
|
23
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}.space-settings-functions`,
|
|
24
|
+
component: () => {
|
|
25
|
+
const space = useActiveSpace();
|
|
26
|
+
if (!space) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return <FunctionsContainer space={space} />;
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
Surface.create({
|
|
34
|
+
id: `${meta.id}.space-settings-automation`,
|
|
35
|
+
role: 'article',
|
|
36
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}.space-settings-automation`,
|
|
37
|
+
component: () => {
|
|
38
|
+
const space = useActiveSpace();
|
|
39
|
+
if (!space) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return <AutomationSettings space={space} />;
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
Surface.create({
|
|
47
|
+
id: `${meta.id}.companion.automation`,
|
|
48
|
+
role: 'article',
|
|
49
|
+
filter: (data): data is { companionTo: Obj.Unknown; subject: 'automation' } =>
|
|
50
|
+
Obj.isObject(data.companionTo) && data.subject === 'automation',
|
|
51
|
+
component: ({ data }) => {
|
|
52
|
+
return <AutomationSettings space={getSpace(data.companionTo)!} object={data.companionTo} />;
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
]),
|
|
56
|
+
),
|
|
57
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
|
|
7
|
+
import { queue } from './queue';
|
|
8
|
+
import { subscription } from './subscription';
|
|
9
|
+
import { timer } from './timer';
|
|
10
|
+
|
|
11
|
+
export const create = Command.make('create').pipe(
|
|
12
|
+
Command.withDescription('Create a trigger.'),
|
|
13
|
+
Command.withSubcommands([subscription, timer, queue]),
|
|
14
|
+
);
|