@dxos/plugin-automation 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b
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/neutral/AutomationPanel-64U7W3SJ.mjs +11 -0
- package/dist/lib/neutral/AutomationPlugin.mjs +38 -0
- package/dist/lib/neutral/AutomationPlugin.mjs.map +7 -0
- package/dist/lib/{browser/cli/index.mjs → neutral/AutomationPlugin.node.mjs} +138 -133
- package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AutomationSettings-NNL2AVNT.mjs +31 -0
- package/dist/lib/neutral/AutomationSettings-NNL2AVNT.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsContainer-CU2FVKZF.mjs +38 -0
- package/dist/lib/neutral/FunctionsContainer-CU2FVKZF.mjs.map +7 -0
- package/dist/lib/{browser/chunk-QNEQ23BF.mjs → neutral/FunctionsPanel-GLCUBEDT.mjs} +23 -25
- package/dist/lib/neutral/FunctionsPanel-GLCUBEDT.mjs.map +7 -0
- package/dist/lib/{browser/FunctionsContainer-5NHAAP5H.mjs → neutral/FunctionsRegistry-VRU4FBVH.mjs} +23 -54
- package/dist/lib/neutral/FunctionsRegistry-VRU4FBVH.mjs.map +7 -0
- package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
- package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs +75 -0
- package/dist/lib/neutral/app-graph-builder-GDCGRYEP.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +13 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2JP77CMN.mjs +42 -0
- package/dist/lib/neutral/chunk-2JP77CMN.mjs.map +7 -0
- package/dist/lib/{browser/chunk-PZNBEKO5.mjs → neutral/chunk-ATECY555.mjs} +7 -4
- package/dist/lib/{browser/chunk-PZNBEKO5.mjs.map → neutral/chunk-ATECY555.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-DSCOLDT5.mjs +93 -0
- package/dist/lib/neutral/chunk-DSCOLDT5.mjs.map +7 -0
- package/dist/lib/{browser/chunk-C273ZYLE.mjs → neutral/chunk-FKFFU54G.mjs} +53 -41
- package/dist/lib/neutral/chunk-FKFFU54G.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GDNOJOAR.mjs +8 -0
- package/dist/lib/neutral/chunk-GDNOJOAR.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IGGNE2XI.mjs +12 -0
- package/dist/lib/neutral/chunk-IGGNE2XI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/{node-esm/chunk-EJPZWAGR.mjs → neutral/chunk-N735CP33.mjs} +69 -41
- package/dist/lib/neutral/chunk-N735CP33.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +16 -0
- package/dist/lib/neutral/compute-runtime-2Q5MGOR6.mjs +220 -0
- package/dist/lib/neutral/compute-runtime-2Q5MGOR6.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-trigger-from-template-5FT7O7OU.mjs +69 -0
- package/dist/lib/neutral/create-trigger-from-template-5FT7O7OU.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +129 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +20 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-3OGMAMKV.mjs +57 -0
- package/dist/lib/neutral/react-surface-3OGMAMKV.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +47 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +16 -0
- package/dist/types/src/AutomationPlugin.d.ts +1 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/{cli/plugin.d.ts → AutomationPlugin.node.d.ts} +2 -1
- package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
- package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts +14 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +6 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/index.d.ts +6 -6
- package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/queue.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/subscription.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/timer.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/index.d.ts +7 -7
- package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/list.d.ts +1 -1
- package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/remove.d.ts +1 -1
- package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/update/index.d.ts +5 -5
- package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/util.d.ts +4 -4
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +32 -31
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/index.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 +6 -6
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +4 -4
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +96 -92
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +6 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts +2 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts +4 -0
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/FunctionsContainer/index.d.ts +2 -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/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useComputeRuntime.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntime.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +1 -4
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
- package/dist/types/src/hooks/useComputeRuntimeService.d.ts +17 -0
- package/dist/types/src/hooks/useComputeRuntimeService.d.ts.map +1 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-trigger-from-template.d.ts +5 -0
- package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +78 -76
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +32 -32
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AutomationCapabilities.d.ts +22 -0
- package/dist/types/src/types/AutomationCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AutomationEvents.d.ts +3 -0
- package/dist/types/src/types/AutomationEvents.d.ts.map +1 -0
- package/dist/types/src/types/AutomationOperation.d.ts +19 -0
- package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +9 -30
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +115 -65
- package/src/AutomationPlugin.node.ts +29 -0
- package/src/AutomationPlugin.test.ts +27 -0
- package/src/AutomationPlugin.tsx +11 -9
- package/src/capabilities/app-graph-builder.ts +66 -0
- package/src/capabilities/compute-runtime.ts +325 -0
- package/src/capabilities/index.ts +10 -4
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +59 -0
- package/src/{cli/commands → commands}/trigger/create/queue.ts +6 -9
- package/src/{cli/commands → commands}/trigger/create/subscription.ts +10 -13
- package/src/{cli/commands → commands}/trigger/create/timer.ts +6 -9
- package/src/{cli/commands → commands}/trigger/list.ts +7 -4
- package/src/{cli/commands → commands}/trigger/remove.ts +1 -1
- package/src/{cli/commands → commands}/trigger/update/queue.ts +18 -19
- package/src/{cli/commands → commands}/trigger/update/subscription.ts +17 -17
- package/src/{cli/commands → commands}/trigger/update/timer.ts +18 -18
- package/src/{cli/commands → commands}/trigger/util.ts +39 -24
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +8 -7
- package/src/components/AutomationPanel/AutomationPanel.tsx +76 -66
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +31 -27
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +25 -21
- package/src/components/FunctionsRegistry/index.ts +4 -1
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +6 -6
- package/src/components/TriggerEditor/SpecSelector.tsx +17 -13
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +54 -12
- package/src/components/TriggerEditor/TriggerEditor.tsx +45 -17
- package/src/components/index.ts +1 -2
- package/src/containers/AutomationSettings/AutomationSettings.tsx +31 -0
- package/src/containers/AutomationSettings/index.ts +5 -0
- package/src/containers/FunctionsContainer/FunctionsContainer.tsx +33 -0
- package/src/containers/FunctionsContainer/index.ts +5 -0
- package/src/containers/TriggerSettings/TriggerSettings.tsx +48 -0
- package/src/containers/TriggerSettings/index.ts +6 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useComputeRuntime.ts +30 -0
- package/src/hooks/useComputeRuntimeCallback.ts +4 -39
- package/src/hooks/useComputeRuntimeService.ts +64 -0
- package/src/hooks/useTriggerRuntimeControls.ts +6 -3
- package/src/index.ts +0 -4
- package/src/meta.ts +3 -2
- package/src/operations/create-trigger-from-template.ts +72 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/testing/test-functions.ts +11 -8
- package/src/translations.ts +39 -38
- package/src/types/AutomationCapabilities.ts +48 -0
- package/src/types/AutomationEvents.ts +11 -0
- package/src/types/AutomationOperation.ts +30 -0
- package/src/types/index.ts +4 -2
- package/src/types/schema.ts +3 -24
- package/dist/lib/browser/AutomationPanel-C6MZ22CB.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-D7UO5V3Q.mjs +0 -57
- package/dist/lib/browser/AutomationSettings-D7UO5V3Q.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-5NHAAP5H.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-RD22LYMR.mjs +0 -10
- package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs +0 -85
- package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs.map +0 -7
- package/dist/lib/browser/chunk-C273ZYLE.mjs.map +0 -7
- package/dist/lib/browser/chunk-JFBUK3WR.mjs +0 -14
- package/dist/lib/browser/chunk-JFBUK3WR.mjs.map +0 -7
- package/dist/lib/browser/chunk-JN7QRQQX.mjs +0 -256
- package/dist/lib/browser/chunk-JN7QRQQX.mjs.map +0 -7
- package/dist/lib/browser/chunk-JOXPQ27I.mjs +0 -83
- package/dist/lib/browser/chunk-JOXPQ27I.mjs.map +0 -7
- package/dist/lib/browser/chunk-O5Y2F33G.mjs +0 -8
- package/dist/lib/browser/chunk-O5Y2F33G.mjs.map +0 -7
- package/dist/lib/browser/chunk-P5AEO35Y.mjs +0 -93
- package/dist/lib/browser/chunk-P5AEO35Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-QNEQ23BF.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-BUBHYS4Y.mjs +0 -119
- package/dist/lib/browser/compute-runtime-BUBHYS4Y.mjs.map +0 -7
- package/dist/lib/browser/hooks/index.mjs +0 -13
- package/dist/lib/browser/index.mjs +0 -123
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-IN2FRGOT.mjs +0 -83
- package/dist/lib/browser/operation-resolver-IN2FRGOT.mjs.map +0 -7
- package/dist/lib/browser/react-surface-246NXXJR.mjs +0 -66
- package/dist/lib/browser/react-surface-246NXXJR.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -14
- package/dist/lib/node-esm/AutomationPanel-RTBY7YFM.mjs +0 -12
- package/dist/lib/node-esm/AutomationSettings-GK4RLSDN.mjs +0 -58
- package/dist/lib/node-esm/AutomationSettings-GK4RLSDN.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-AHHZODM5.mjs +0 -126
- package/dist/lib/node-esm/FunctionsContainer-AHHZODM5.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-V2DKWYMU.mjs +0 -11
- package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs +0 -86
- package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5FXNN3MV.mjs +0 -19
- package/dist/lib/node-esm/chunk-5FXNN3MV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AENSLAVD.mjs +0 -99
- package/dist/lib/node-esm/chunk-AENSLAVD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EJPZWAGR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K5Z4UGIO.mjs +0 -16
- package/dist/lib/node-esm/chunk-K5Z4UGIO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-M3UPTGXF.mjs +0 -10
- package/dist/lib/node-esm/chunk-M3UPTGXF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OJEFRZEV.mjs +0 -259
- package/dist/lib/node-esm/chunk-OJEFRZEV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q7EMIPMW.mjs +0 -94
- package/dist/lib/node-esm/chunk-Q7EMIPMW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RX52VKI2.mjs +0 -84
- package/dist/lib/node-esm/chunk-RX52VKI2.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -1109
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-6UEDBN76.mjs +0 -120
- package/dist/lib/node-esm/compute-runtime-6UEDBN76.mjs.map +0 -7
- package/dist/lib/node-esm/hooks/index.mjs +0 -14
- package/dist/lib/node-esm/index.mjs +0 -124
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-67CEAKXP.mjs +0 -84
- package/dist/lib/node-esm/operation-resolver-67CEAKXP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-U6762KPI.mjs +0 -67
- package/dist/lib/node-esm/react-surface-U6762KPI.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -15
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +0 -6
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime/index.d.ts +0 -3
- package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/cli/commands/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/list.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/options.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/remove.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/util.d.ts.map +0 -1
- package/dist/types/src/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.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 +0 -7
- 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/types/capabilities.d.ts +0 -22
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -72
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/compute-runtime/compute-runtime.ts +0 -140
- package/src/capabilities/compute-runtime/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -80
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -61
- package/src/cli/index.ts +0 -5
- package/src/cli/plugin.ts +0 -24
- package/src/components/AutomationSettings.tsx +0 -30
- package/src/components/FunctionsContainer.tsx +0 -36
- package/src/components/TriggerSettings.tsx +0 -26
- package/src/types/capabilities.ts +0 -42
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/AutomationPanel-C6MZ22CB.mjs.map → neutral/AutomationPanel-64U7W3SJ.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-RD22LYMR.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
- /package/dist/lib/{browser/hooks/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/components}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/hooks → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-RTBY7YFM.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-V2DKWYMU.mjs.map → neutral/types/index.mjs.map} +0 -0
- /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/options.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/queue.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/subscription.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/timer.d.ts +0 -0
- /package/src/{cli/commands → commands}/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/create/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/options.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/update/index.ts +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type AutomationPanelProps } from './AutomationPanel';
|
|
3
|
-
export declare const AutomationSettings: (props: AutomationPanelProps) => React.JSX.Element;
|
|
4
|
-
export default AutomationSettings;
|
|
5
|
-
//# sourceMappingURL=AutomationSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/AutomationSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG/E,eAAO,MAAM,kBAAkB,GAAI,OAAO,oBAAoB,sBAa7D,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
export declare const FunctionsContainer: ({ space }: {
|
|
4
|
-
space: Space;
|
|
5
|
-
}) => React.JSX.Element;
|
|
6
|
-
export default FunctionsContainer;
|
|
7
|
-
//# sourceMappingURL=FunctionsContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/FunctionsContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AASrD,eAAO,MAAM,kBAAkB,GAAI,WAAW;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,sBAkB7D,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/TriggerSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAO3C,eAAO,MAAM,gBAAgB,GAAI,QAAQ;IAAE,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAA;CAAE,sBAYjE,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
2
|
-
import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
3
|
-
import { Capability } from '@dxos/app-framework';
|
|
4
|
-
import { type Database } from '@dxos/echo';
|
|
5
|
-
import type { CredentialsService, FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';
|
|
6
|
-
import type { TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';
|
|
7
|
-
import type { SpaceId } from '@dxos/keys';
|
|
8
|
-
export declare namespace AutomationCapabilities {
|
|
9
|
-
/**
|
|
10
|
-
* Service stack for executing agents, functions, and triggers.
|
|
11
|
-
*/
|
|
12
|
-
type ComputeServices = TriggerDispatcher | TriggerStateStore | AiService.AiService | Database.Service | QueueService | CredentialsService | FunctionInvocationService | TracingService | ToolResolverService | ToolExecutionService;
|
|
13
|
-
type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;
|
|
14
|
-
interface ComputeRuntimeProvider {
|
|
15
|
-
getRuntime(spaceId: SpaceId): ComputeRuntime;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Runtime for executing agents, functions, and triggers.
|
|
19
|
-
*/
|
|
20
|
-
const ComputeRuntime: Capability.InterfaceDef<ComputeRuntimeProvider>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,yBAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,KAAY,eAAe,GACvB,iBAAiB,GACjB,iBAAiB,GACjB,SAAS,CAAC,SAAS,GACnB,QAAQ,CAAC,OAAO,GAChB,YAAY,GACZ,kBAAkB,GAClB,yBAAyB,GACzB,cAAc,GAEd,mBAAmB,GACnB,oBAAoB,CAAC;IAEzB,KAAY,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,sBAAsB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC1G,UAAiB,sBAAsB;QACrC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CAAC;KAC9C;IAED;;OAEG;IACI,MAAM,cAAc,iDAAmF,CAAC;CAChH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,mBAAmB,iCAAiE,CAAC;CACnG"}
|
|
@@ -1,72 +0,0 @@
|
|
|
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 { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
11
|
-
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
|
-
import { meta as spaceMeta } from '@dxos/plugin-space';
|
|
13
|
-
|
|
14
|
-
import { meta } from '../../meta';
|
|
15
|
-
|
|
16
|
-
export default Capability.makeModule(
|
|
17
|
-
Effect.fnUntraced(function* () {
|
|
18
|
-
const extensions = yield* Effect.all([
|
|
19
|
-
GraphBuilder.createExtension({
|
|
20
|
-
id: `${meta.id}/space-settings-automation`,
|
|
21
|
-
match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),
|
|
22
|
-
connector: (node) =>
|
|
23
|
-
Effect.succeed([
|
|
24
|
-
{
|
|
25
|
-
id: `automation-${node.id}`,
|
|
26
|
-
type: `${meta.id}/space-settings-automation`,
|
|
27
|
-
data: `${meta.id}/space-settings-automation`,
|
|
28
|
-
properties: {
|
|
29
|
-
label: ['automation panel label', { ns: meta.id }],
|
|
30
|
-
icon: 'ph--lightning--regular',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
]),
|
|
34
|
-
}),
|
|
35
|
-
GraphBuilder.createExtension({
|
|
36
|
-
id: `${meta.id}/space-settings-functions`,
|
|
37
|
-
match: NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`),
|
|
38
|
-
connector: (node) =>
|
|
39
|
-
Effect.succeed([
|
|
40
|
-
{
|
|
41
|
-
id: `functions-${node.id}`,
|
|
42
|
-
type: `${meta.id}/space-settings-functions`,
|
|
43
|
-
data: `${meta.id}/space-settings-functions`,
|
|
44
|
-
properties: {
|
|
45
|
-
label: ['functions panel label', { ns: meta.id }],
|
|
46
|
-
icon: 'ph--function--regular',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
]),
|
|
50
|
-
}),
|
|
51
|
-
GraphBuilder.createTypeExtension({
|
|
52
|
-
id: `${meta.id}/script-companion`,
|
|
53
|
-
type: Script.Script,
|
|
54
|
-
connector: (script) =>
|
|
55
|
-
Effect.succeed([
|
|
56
|
-
{
|
|
57
|
-
id: [script.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
58
|
-
type: PLANK_COMPANION_TYPE,
|
|
59
|
-
data: 'automation',
|
|
60
|
-
properties: {
|
|
61
|
-
label: ['script automation label', { ns: meta.id }],
|
|
62
|
-
icon: 'ph--lightning--regular',
|
|
63
|
-
disposition: 'hidden',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
]),
|
|
67
|
-
}),
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
71
|
-
}),
|
|
72
|
-
);
|
|
@@ -1,140 +0,0 @@
|
|
|
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 { Capabilities, Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
12
|
-
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
13
|
-
import { GenericToolkit, ToolExecutionServices } from '@dxos/assistant';
|
|
14
|
-
import { SpaceProperties } from '@dxos/client/echo';
|
|
15
|
-
import { Resource } from '@dxos/context';
|
|
16
|
-
import { Database, Obj, Query, Ref } from '@dxos/echo';
|
|
17
|
-
import { CredentialsService, QueueService } from '@dxos/functions';
|
|
18
|
-
import {
|
|
19
|
-
FunctionImplementationResolver,
|
|
20
|
-
FunctionInvocationServiceLayerWithLocalLoopbackExecutor,
|
|
21
|
-
RemoteFunctionExecutionService,
|
|
22
|
-
TracingServiceExt,
|
|
23
|
-
TriggerDispatcher,
|
|
24
|
-
TriggerStateStore,
|
|
25
|
-
} from '@dxos/functions-runtime';
|
|
26
|
-
import { invariant } from '@dxos/invariant';
|
|
27
|
-
import { type SpaceId } from '@dxos/keys';
|
|
28
|
-
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
29
|
-
|
|
30
|
-
import { AutomationCapabilities } from '../../types';
|
|
31
|
-
|
|
32
|
-
export default Capability.makeModule(
|
|
33
|
-
Effect.fnUntraced(function* () {
|
|
34
|
-
const capabilities = yield* Capability.Service;
|
|
35
|
-
const provider = yield* Effect.tryPromise(() => new ComputeRuntimeProviderImpl(capabilities).open());
|
|
36
|
-
return Capability.contributes(AutomationCapabilities.ComputeRuntime, provider, () =>
|
|
37
|
-
Effect.tryPromise(() => provider.close()),
|
|
38
|
-
);
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Adapts plugin capabilities to runtime layers.
|
|
44
|
-
*/
|
|
45
|
-
class ComputeRuntimeProviderImpl extends Resource implements AutomationCapabilities.ComputeRuntimeProvider {
|
|
46
|
-
readonly #runtimes = new Map<SpaceId, AutomationCapabilities.ComputeRuntime>();
|
|
47
|
-
readonly #capabilities: CapabilityManager.CapabilityManager;
|
|
48
|
-
|
|
49
|
-
constructor(capabilities: CapabilityManager.CapabilityManager) {
|
|
50
|
-
super();
|
|
51
|
-
this.#capabilities = capabilities;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
protected override async _open() {}
|
|
55
|
-
|
|
56
|
-
protected override async _close() {
|
|
57
|
-
await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
|
|
58
|
-
this.#runtimes.clear();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
getRuntime(spaceId: SpaceId): AutomationCapabilities.ComputeRuntime {
|
|
62
|
-
if (this.#runtimes.has(spaceId)) {
|
|
63
|
-
return this.#runtimes.get(spaceId)!;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const layer = Layer.unwrapEffect(
|
|
67
|
-
Effect.gen(this, function* () {
|
|
68
|
-
const client = this.#capabilities.get(ClientCapabilities.Client);
|
|
69
|
-
const aiServiceLayer =
|
|
70
|
-
this.#capabilities.get(AppCapabilities.AiServiceLayer) ?? Layer.die('AiService not found');
|
|
71
|
-
const registry = this.#capabilities.get(Capabilities.AtomRegistry);
|
|
72
|
-
|
|
73
|
-
// TODO(dmaretskyi): Make these reactive.
|
|
74
|
-
const functions = this.#capabilities.getAll(AppCapabilities.Functions).flat();
|
|
75
|
-
|
|
76
|
-
const genericToolkitProvider = Layer.succeed(GenericToolkit.Provider, {
|
|
77
|
-
getToolkit: () => {
|
|
78
|
-
const toolkits = this.#capabilities.getAll(AppCapabilities.Toolkit);
|
|
79
|
-
return GenericToolkit.merge(...toolkits);
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
const space = client.spaces.get(spaceId);
|
|
84
|
-
invariant(space, `Invalid space: ${spaceId}`);
|
|
85
|
-
yield* Effect.promise(() => space.waitUntilReady());
|
|
86
|
-
|
|
87
|
-
return Layer.mergeAll(TriggerDispatcher.layer({ timeControl: 'natural' })).pipe(
|
|
88
|
-
Layer.provideMerge(Layer.succeed(Registry.AtomRegistry, registry)),
|
|
89
|
-
Layer.provideMerge(
|
|
90
|
-
Layer.mergeAll(
|
|
91
|
-
TracingServiceLive,
|
|
92
|
-
TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
|
|
93
|
-
ToolExecutionServices,
|
|
94
|
-
),
|
|
95
|
-
),
|
|
96
|
-
Layer.provideMerge(
|
|
97
|
-
FunctionInvocationServiceLayerWithLocalLoopbackExecutor.pipe(
|
|
98
|
-
Layer.provideMerge(genericToolkitProvider),
|
|
99
|
-
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions })),
|
|
100
|
-
Layer.provideMerge(
|
|
101
|
-
RemoteFunctionExecutionService.fromClient(
|
|
102
|
-
client,
|
|
103
|
-
// If agent is not enabled do not provide spaceId because space context will be unavailable on EDGE.
|
|
104
|
-
client.config.get('runtime.client.edgeFeatures.agents') ? spaceId : undefined,
|
|
105
|
-
),
|
|
106
|
-
),
|
|
107
|
-
Layer.provideMerge(aiServiceLayer),
|
|
108
|
-
Layer.provideMerge(CredentialsService.layerFromDatabase()),
|
|
109
|
-
Layer.provideMerge(space ? Database.layer(space.db) : Database.notAvailable),
|
|
110
|
-
Layer.provideMerge(space ? QueueService.layer(space.queues) : QueueService.notAvailable),
|
|
111
|
-
),
|
|
112
|
-
),
|
|
113
|
-
);
|
|
114
|
-
}),
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
const runtime = ManagedRuntime.make(layer);
|
|
118
|
-
this.#runtimes.set(spaceId, runtime);
|
|
119
|
-
return runtime;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const TracingServiceLive = Layer.unwrapEffect(
|
|
124
|
-
Effect.gen(function* () {
|
|
125
|
-
const objects = yield* Database.runQuery(Query.type(SpaceProperties));
|
|
126
|
-
const [properties] = objects;
|
|
127
|
-
invariant(properties);
|
|
128
|
-
// TODO(burdon): Check ref target has loaded?
|
|
129
|
-
if (!properties.invocationTraceQueue || !properties.invocationTraceQueue.target) {
|
|
130
|
-
const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
|
|
131
|
-
Obj.change(properties, (m) => {
|
|
132
|
-
m.invocationTraceQueue = Ref.fromDXN(queue.dxn);
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const queue = properties.invocationTraceQueue.target;
|
|
137
|
-
invariant(queue);
|
|
138
|
-
return TracingServiceExt.layerInvocationsQueue({ invocationTraceQueue: queue });
|
|
139
|
-
}),
|
|
140
|
-
);
|
|
@@ -1,80 +0,0 @@
|
|
|
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 } 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 { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
14
|
-
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
15
|
-
import { Filter } from '@dxos/react-client/echo';
|
|
16
|
-
|
|
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: [`automation-settings${ATTENDABLE_PATH_SEPARATOR}${db.spaceId}`],
|
|
74
|
-
workspace: db.spaceId,
|
|
75
|
-
});
|
|
76
|
-
}),
|
|
77
|
-
}),
|
|
78
|
-
]);
|
|
79
|
-
}),
|
|
80
|
-
);
|
|
@@ -1,61 +0,0 @@
|
|
|
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 { useLayout } from '@dxos/app-toolkit/ui';
|
|
11
|
-
import { Obj } from '@dxos/echo';
|
|
12
|
-
import { getSpace, parseId, useSpace } from '@dxos/react-client/echo';
|
|
13
|
-
|
|
14
|
-
import { AutomationSettings, FunctionsContainer } from '../../components';
|
|
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 layout = useLayout();
|
|
26
|
-
const { spaceId } = parseId(layout.workspace);
|
|
27
|
-
const space = useSpace(spaceId);
|
|
28
|
-
if (!space) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return <FunctionsContainer space={space} />;
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
Surface.create({
|
|
36
|
-
id: `${meta.id}/space-settings-automation`,
|
|
37
|
-
role: 'article',
|
|
38
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-automation`,
|
|
39
|
-
component: () => {
|
|
40
|
-
const layout = useLayout();
|
|
41
|
-
const { spaceId } = parseId(layout.workspace);
|
|
42
|
-
const space = useSpace(spaceId);
|
|
43
|
-
if (!space) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return <AutomationSettings space={space} />;
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
Surface.create({
|
|
51
|
-
id: `${meta.id}/companion/automation`,
|
|
52
|
-
role: 'article',
|
|
53
|
-
filter: (data): data is { companionTo: Obj.Unknown; subject: 'automation' } =>
|
|
54
|
-
Obj.isObject(data.companionTo) && data.subject === 'automation',
|
|
55
|
-
component: ({ data }) => {
|
|
56
|
-
return <AutomationSettings space={getSpace(data.companionTo)!} object={data.companionTo} />;
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
]),
|
|
60
|
-
),
|
|
61
|
-
);
|
package/src/cli/index.ts
DELETED
package/src/cli/plugin.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
-
import { ClientEvents } from '@dxos/plugin-client/types';
|
|
8
|
-
|
|
9
|
-
// NOTE: Must not import from index to avoid pulling in react dependencies.
|
|
10
|
-
import { ComputeRuntime } from '../capabilities/compute-runtime';
|
|
11
|
-
import { meta } from '../meta';
|
|
12
|
-
import { AutomationEvents } from '../types';
|
|
13
|
-
|
|
14
|
-
import { trigger } from './commands';
|
|
15
|
-
|
|
16
|
-
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
17
|
-
AppPlugin.addCommandModule({ commands: [trigger] }),
|
|
18
|
-
Plugin.addModule({
|
|
19
|
-
activatesOn: ClientEvents.ClientReady,
|
|
20
|
-
activatesAfter: [AutomationEvents.ComputeRuntimeReady],
|
|
21
|
-
activate: ComputeRuntime,
|
|
22
|
-
}),
|
|
23
|
-
Plugin.make,
|
|
24
|
-
);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { Settings } from '@dxos/react-ui-form';
|
|
9
|
-
|
|
10
|
-
import { meta } from '../meta';
|
|
11
|
-
|
|
12
|
-
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
13
|
-
import { TriggersSettings } from './TriggerSettings';
|
|
14
|
-
|
|
15
|
-
export const AutomationSettings = (props: AutomationPanelProps) => {
|
|
16
|
-
const { t } = useTranslation(meta.id);
|
|
17
|
-
return (
|
|
18
|
-
<Settings.Root>
|
|
19
|
-
<Settings.Section
|
|
20
|
-
title={t('automation verbose label', { ns: meta.id })}
|
|
21
|
-
description={t('automation description', { ns: meta.id })}
|
|
22
|
-
>
|
|
23
|
-
<AutomationPanel {...props} />
|
|
24
|
-
<TriggersSettings db={props.space.db} />
|
|
25
|
-
</Settings.Section>
|
|
26
|
-
</Settings.Root>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default AutomationSettings;
|
|
@@ -1,36 +0,0 @@
|
|
|
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 { meta } from '../meta';
|
|
12
|
-
|
|
13
|
-
import { FunctionsPanel } from './FunctionsPanel';
|
|
14
|
-
import { FunctionsRegistry } from './FunctionsRegistry';
|
|
15
|
-
|
|
16
|
-
export const FunctionsContainer = ({ space }: { space: Space }) => {
|
|
17
|
-
const { t } = useTranslation(meta.id);
|
|
18
|
-
return (
|
|
19
|
-
<Settings.Root>
|
|
20
|
-
<Settings.Section
|
|
21
|
-
title={t('functions verbose label', { ns: meta.id })}
|
|
22
|
-
description={t('functions description', { ns: meta.id })}
|
|
23
|
-
>
|
|
24
|
-
<FunctionsPanel space={space} />
|
|
25
|
-
</Settings.Section>
|
|
26
|
-
<Settings.Section
|
|
27
|
-
title={t('functions registry verbose label', { ns: meta.id })}
|
|
28
|
-
description={t('functions registry description', { ns: meta.id })}
|
|
29
|
-
>
|
|
30
|
-
<FunctionsRegistry space={space} />
|
|
31
|
-
</Settings.Section>
|
|
32
|
-
</Settings.Root>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default FunctionsContainer;
|
|
@@ -1,26 +0,0 @@
|
|
|
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='container-max-width 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
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
6
|
-
|
|
7
|
-
import { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
8
|
-
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import { type Database } from '@dxos/echo';
|
|
10
|
-
import type { CredentialsService, FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';
|
|
11
|
-
import type { TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';
|
|
12
|
-
import type { SpaceId } from '@dxos/keys';
|
|
13
|
-
|
|
14
|
-
import { meta } from '../meta';
|
|
15
|
-
|
|
16
|
-
export namespace AutomationCapabilities {
|
|
17
|
-
/**
|
|
18
|
-
* Service stack for executing agents, functions, and triggers.
|
|
19
|
-
*/
|
|
20
|
-
export type ComputeServices =
|
|
21
|
-
| TriggerDispatcher
|
|
22
|
-
| TriggerStateStore
|
|
23
|
-
| AiService.AiService
|
|
24
|
-
| Database.Service
|
|
25
|
-
| QueueService
|
|
26
|
-
| CredentialsService
|
|
27
|
-
| FunctionInvocationService
|
|
28
|
-
| TracingService
|
|
29
|
-
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
30
|
-
| ToolResolverService
|
|
31
|
-
| ToolExecutionService;
|
|
32
|
-
|
|
33
|
-
export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;
|
|
34
|
-
export interface ComputeRuntimeProvider {
|
|
35
|
-
getRuntime(spaceId: SpaceId): ComputeRuntime;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Runtime for executing agents, functions, and triggers.
|
|
40
|
-
*/
|
|
41
|
-
export const ComputeRuntime = Capability.make<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
|
|
42
|
-
}
|
package/src/types/events.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|