@dxos/plugin-automation 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AutomationPanel-T5O4DNQF.mjs +11 -0
- package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
- package/dist/lib/neutral/AutomationPlugin.node.mjs +1112 -0
- package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs +23 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AutomationSettings-UVS5STCS.mjs +31 -0
- package/dist/lib/neutral/AutomationSettings-UVS5STCS.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsContainer-CDCM65U4.mjs +38 -0
- package/dist/lib/neutral/FunctionsContainer-CDCM65U4.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs +97 -0
- package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsRegistry-7ITCFJCW.mjs +95 -0
- package/dist/lib/neutral/FunctionsRegistry-7ITCFJCW.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/neutral/chunk-2UYFDJO6.mjs +12 -0
- package/dist/lib/neutral/chunk-2UYFDJO6.mjs.map +7 -0
- package/dist/lib/{browser/chunk-LZQFZO3B.mjs → neutral/chunk-ATECY555.mjs} +7 -4
- package/dist/lib/neutral/chunk-ATECY555.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CNFKEN7S.mjs +37 -0
- package/dist/lib/neutral/chunk-CNFKEN7S.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DSCOLDT5.mjs +93 -0
- package/dist/lib/neutral/chunk-DSCOLDT5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-JKVVCWSL.mjs +307 -0
- package/dist/lib/neutral/chunk-JKVVCWSL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-K3C5ZTZA.mjs +285 -0
- package/dist/lib/neutral/chunk-K3C5ZTZA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-M3TIHFXN.mjs +8 -0
- package/dist/lib/neutral/chunk-M3TIHFXN.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +16 -0
- package/dist/lib/neutral/compute-runtime-D7MPZJ4R.mjs +222 -0
- package/dist/lib/neutral/compute-runtime-D7MPZJ4R.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-7K3OYOHQ.mjs +68 -0
- package/dist/lib/neutral/create-trigger-from-template-7K3OYOHQ.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/testing.mjs +8 -0
- package/dist/lib/neutral/testing.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/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts +3 -1
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/AutomationPlugin.node.d.ts +4 -0
- 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/AutomationPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AutomationPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +12 -3
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -5
- 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 +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/commands/index.d.ts +2 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/index.d.ts +25 -0
- package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/queue.d.ts +13 -0
- package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/subscription.d.ts +15 -0
- package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/timer.d.ts +13 -0
- package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/index.d.ts +57 -0
- package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/list.d.ts +7 -0
- package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/options.d.ts +11 -0
- package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/remove.d.ts +8 -0
- package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/index.d.ts +28 -0
- package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts +12 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts +13 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts +11 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/util.d.ts +46 -0
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +5 -6
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +32 -28
- 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 +8 -0
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts +4 -0
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -9
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +8 -7
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +104 -30
- 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 +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.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 +5 -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 +5 -4
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -5
- 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/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 +204 -3
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +32 -29
- 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 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +11 -3
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +142 -68
- package/src/AutomationPlugin.node.ts +29 -0
- package/src/AutomationPlugin.test.ts +27 -0
- package/src/AutomationPlugin.tsx +20 -37
- package/src/AutomationPlugin.workerd.ts +18 -0
- package/src/capabilities/app-graph-builder.ts +59 -80
- package/src/capabilities/compute-runtime.ts +266 -78
- package/src/capabilities/index.ts +9 -7
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +49 -45
- package/src/commands/index.ts +5 -0
- package/src/commands/trigger/create/index.ts +14 -0
- package/src/commands/trigger/create/queue.ts +86 -0
- package/src/commands/trigger/create/subscription.ts +125 -0
- package/src/commands/trigger/create/timer.ts +90 -0
- package/src/commands/trigger/index.ts +16 -0
- package/src/commands/trigger/list.ts +70 -0
- package/src/commands/trigger/options.ts +59 -0
- package/src/commands/trigger/remove.ts +44 -0
- package/src/commands/trigger/update/index.ts +14 -0
- package/src/commands/trigger/update/queue.ts +194 -0
- package/src/commands/trigger/update/subscription.ts +278 -0
- package/src/commands/trigger/update/timer.ts +193 -0
- package/src/commands/trigger/util.ts +412 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +14 -7
- package/src/components/AutomationPanel/AutomationPanel.tsx +229 -85
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +42 -34
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +119 -0
- package/src/components/FunctionsRegistry/index.ts +8 -0
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +34 -33
- package/src/components/TriggerEditor/SpecSelector.tsx +25 -19
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +90 -38
- package/src/components/TriggerEditor/TriggerEditor.tsx +89 -48
- 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 +11 -12
- package/src/hooks/useComputeRuntimeService.ts +64 -0
- package/src/hooks/useTriggerRuntimeControls.ts +32 -14
- package/src/index.ts +1 -6
- package/src/meta.ts +5 -4
- package/src/operations/create-trigger-from-template.ts +71 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/testing/test-functions.ts +12 -9
- package/src/testing.ts +7 -0
- package/src/translations.ts +39 -34
- 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 -0
- package/src/types/schema.ts +5 -5
- package/dist/lib/browser/AutomationPanel-LBXJDM6Z.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-IIEI5D2K.mjs +0 -68
- package/dist/lib/browser/AutomationSettings-IIEI5D2K.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-IZTCGNJZ.mjs +0 -36
- package/dist/lib/browser/FunctionsContainer-IZTCGNJZ.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-HFCK3JRB.mjs +0 -10
- package/dist/lib/browser/app-graph-builder-7VKA2GS3.mjs +0 -81
- package/dist/lib/browser/app-graph-builder-7VKA2GS3.mjs.map +0 -7
- package/dist/lib/browser/chunk-CVYJM6OO.mjs +0 -66
- package/dist/lib/browser/chunk-CVYJM6OO.mjs.map +0 -7
- package/dist/lib/browser/chunk-FHSN7G4H.mjs +0 -107
- package/dist/lib/browser/chunk-FHSN7G4H.mjs.map +0 -7
- package/dist/lib/browser/chunk-GCGHLQM2.mjs +0 -15
- package/dist/lib/browser/chunk-GCGHLQM2.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-K5YNWESC.mjs +0 -183
- package/dist/lib/browser/chunk-K5YNWESC.mjs.map +0 -7
- package/dist/lib/browser/chunk-LZQFZO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-XXZNGORC.mjs +0 -14
- package/dist/lib/browser/chunk-XXZNGORC.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-PFYRMGN2.mjs +0 -114
- package/dist/lib/browser/compute-runtime-PFYRMGN2.mjs.map +0 -7
- package/dist/lib/browser/hooks/index.mjs +0 -11
- package/dist/lib/browser/index.mjs +0 -126
- package/dist/lib/browser/index.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/meta.json +0 -1
- package/dist/lib/browser/react-surface-WPMY3EX2.mjs +0 -63
- package/dist/lib/browser/react-surface-WPMY3EX2.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -8
- package/dist/lib/node-esm/AutomationPanel-NVEIUIZP.mjs +0 -12
- package/dist/lib/node-esm/AutomationSettings-VIIEPI2P.mjs +0 -69
- package/dist/lib/node-esm/AutomationSettings-VIIEPI2P.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-KKRCIXGB.mjs +0 -37
- package/dist/lib/node-esm/FunctionsContainer-KKRCIXGB.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-74ELGR7P.mjs +0 -11
- package/dist/lib/node-esm/app-graph-builder-RTOFJNFV.mjs +0 -82
- package/dist/lib/node-esm/app-graph-builder-RTOFJNFV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3BJ6BR3E.mjs +0 -67
- package/dist/lib/node-esm/chunk-3BJ6BR3E.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CEVIVRTY.mjs +0 -19
- package/dist/lib/node-esm/chunk-CEVIVRTY.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-JOCKHLFT.mjs +0 -108
- package/dist/lib/node-esm/chunk-JOCKHLFT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MRYKW5TM.mjs +0 -16
- package/dist/lib/node-esm/chunk-MRYKW5TM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-U5Q2NI7H.mjs +0 -16
- package/dist/lib/node-esm/chunk-U5Q2NI7H.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/chunk-Y7PJXFCJ.mjs +0 -184
- package/dist/lib/node-esm/chunk-Y7PJXFCJ.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-IXCSD3W7.mjs +0 -115
- package/dist/lib/node-esm/compute-runtime-IXCSD3W7.mjs.map +0 -7
- package/dist/lib/node-esm/hooks/index.mjs +0 -12
- package/dist/lib/node-esm/index.mjs +0 -127
- package/dist/lib/node-esm/index.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/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-Y2BBJV2I.mjs +0 -64
- package/dist/lib/node-esm/react-surface-Y2BBJV2I.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -9
- package/dist/types/src/capabilities/capabilities.d.ts +0 -19
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.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.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/capabilities.ts +0 -48
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/components/AutomationSettings.tsx +0 -30
- package/src/components/FunctionsContainer.tsx +0 -29
- package/src/components/TriggerSettings.tsx +0 -25
- package/src/events.ts +0 -11
- /package/dist/lib/{browser/AutomationPanel-LBXJDM6Z.mjs.map → neutral/AutomationPanel-T5O4DNQF.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-HFCK3JRB.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/hooks/index.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/hooks → neutral/components}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-NVEIUIZP.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-74ELGR7P.mjs.map → neutral/operations/index.mjs.map} +0 -0
- /package/dist/types/src/{components → containers/TriggerSettings}/TriggerSettings.d.ts +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
useTriggerRuntimeControls
|
|
4
|
-
} from "./chunk-3BJ6BR3E.mjs";
|
|
5
|
-
import "./chunk-MRYKW5TM.mjs";
|
|
6
|
-
import {
|
|
7
|
-
AutomationPanel
|
|
8
|
-
} from "./chunk-Y7PJXFCJ.mjs";
|
|
9
|
-
import "./chunk-W76WUTZY.mjs";
|
|
10
|
-
import {
|
|
11
|
-
meta
|
|
12
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
13
|
-
|
|
14
|
-
// src/components/AutomationSettings.tsx
|
|
15
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
16
|
-
import React2 from "react";
|
|
17
|
-
import { useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
18
|
-
import { ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
19
|
-
|
|
20
|
-
// src/components/TriggerSettings.tsx
|
|
21
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
22
|
-
import React from "react";
|
|
23
|
-
import { Input, useTranslation } from "@dxos/react-ui";
|
|
24
|
-
import { ControlItemInput } from "@dxos/react-ui-form";
|
|
25
|
-
var TriggersSettings = ({ space }) => {
|
|
26
|
-
var _effect = _useSignals();
|
|
27
|
-
try {
|
|
28
|
-
const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(space);
|
|
29
|
-
const { t } = useTranslation(meta.id);
|
|
30
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
className: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
32
|
-
}, /* @__PURE__ */ React.createElement(ControlItemInput, {
|
|
33
|
-
title: t("runtime label"),
|
|
34
|
-
description: t("runtime description")
|
|
35
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
36
|
-
classNames: "justify-self-end",
|
|
37
|
-
checked: isRunning,
|
|
38
|
-
onCheckedChange: isRunning ? stop : start
|
|
39
|
-
})));
|
|
40
|
-
} finally {
|
|
41
|
-
_effect.f();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// src/components/AutomationSettings.tsx
|
|
46
|
-
var AutomationSettings = (props) => {
|
|
47
|
-
var _effect = _useSignals2();
|
|
48
|
-
try {
|
|
49
|
-
const { t } = useTranslation2(meta.id);
|
|
50
|
-
return /* @__PURE__ */ React2.createElement(ControlPage, null, /* @__PURE__ */ React2.createElement(ControlSection, {
|
|
51
|
-
title: t("automation verbose label", {
|
|
52
|
-
ns: meta.id
|
|
53
|
-
}),
|
|
54
|
-
description: t("automation description", {
|
|
55
|
-
ns: meta.id
|
|
56
|
-
})
|
|
57
|
-
}, /* @__PURE__ */ React2.createElement(AutomationPanel, props), /* @__PURE__ */ React2.createElement(TriggersSettings, {
|
|
58
|
-
space: props.space
|
|
59
|
-
})));
|
|
60
|
-
} finally {
|
|
61
|
-
_effect.f();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
var AutomationSettings_default = AutomationSettings;
|
|
65
|
-
export {
|
|
66
|
-
AutomationSettings,
|
|
67
|
-
AutomationSettings_default as default
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=AutomationSettings-VIIEPI2P.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationSettings.tsx", "../../../src/components/TriggerSettings.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { TriggersSettings } from './TriggerSettings';\n\nexport const AutomationSettings = (props: AutomationPanelProps) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: meta.id })}\n description={t('automation description', { ns: meta.id })}\n >\n <AutomationPanel {...props} />\n <TriggersSettings space={props.space} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default AutomationSettings;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { ControlItemInput } from '@dxos/react-ui-form';\n\nimport { useTriggerRuntimeControls } from '../hooks';\nimport { meta } from '../meta';\n\nexport const TriggersSettings = ({ space }: { space: Space }) => {\n const { triggers, isRunning, start, stop } = useTriggerRuntimeControls(space);\n const { t } = useTranslation(meta.id);\n\n return (\n <div className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>\n <ControlItemInput title={t('runtime label')} description={t('runtime description')}>\n <Input.Switch classNames='justify-self-end' checked={isRunning} onCheckedChange={isRunning ? stop : start} />\n </ControlItemInput>\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;;;;ACH5C,OAAOC,WAAW;AAGlB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,wBAAwB;AAK1B,IAAMC,mBAAmB,CAAC,EAAEC,MAAK,MAAoB;;;AAC1D,UAAM,EAAEC,UAAUC,WAAWC,OAAOC,KAAI,IAAKC,0BAA0BL,KAAAA;AACvE,UAAM,EAAEM,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,WACE,sBAAA,cAACC,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACC,kBAAAA;MAAiBC,OAAOP,EAAE,eAAA;MAAkBQ,aAAaR,EAAE,qBAAA;OAC1D,sBAAA,cAACS,MAAMC,QAAM;MAACC,YAAW;MAAmBC,SAAShB;MAAWiB,iBAAiBjB,YAAYE,OAAOD;;;;;AAI5G;;;ADVO,IAAMiB,qBAAqB,CAACC,UAAAA;;;AACjC,UAAM,EAAEC,EAAC,IAAKC,gBAAeC,KAAKC,EAAE;AACpC,WACE,gBAAAC,OAAA,cAACC,aAAAA,MACC,gBAAAD,OAAA,cAACE,gBAAAA;MACCC,OAAOP,EAAE,4BAA4B;QAAEQ,IAAIN,KAAKC;MAAG,CAAA;MACnDM,aAAaT,EAAE,0BAA0B;QAAEQ,IAAIN,KAAKC;MAAG,CAAA;OAEvD,gBAAAC,OAAA,cAACM,iBAAoBX,KAAAA,GACrB,gBAAAK,OAAA,cAACO,kBAAAA;MAAiBC,OAAOb,MAAMa;;;;;AAIvC;AAEA,IAAA,6BAAed;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlPage", "ControlSection", "React", "Input", "useTranslation", "ControlItemInput", "TriggersSettings", "space", "triggers", "isRunning", "start", "stop", "useTriggerRuntimeControls", "t", "useTranslation", "meta", "id", "div", "className", "ControlItemInput", "title", "description", "Input", "Switch", "classNames", "checked", "onCheckedChange", "AutomationSettings", "props", "t", "useTranslation", "meta", "id", "React", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel", "TriggersSettings", "space"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
FunctionsPanel
|
|
4
|
-
} from "./chunk-JOCKHLFT.mjs";
|
|
5
|
-
import {
|
|
6
|
-
meta
|
|
7
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
8
|
-
|
|
9
|
-
// src/components/FunctionsContainer.tsx
|
|
10
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { useTranslation } from "@dxos/react-ui";
|
|
13
|
-
import { ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
14
|
-
var FunctionsContainer = ({ space }) => {
|
|
15
|
-
var _effect = _useSignals();
|
|
16
|
-
try {
|
|
17
|
-
const { t } = useTranslation(meta.id);
|
|
18
|
-
return /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
|
|
19
|
-
title: t("functions verbose label", {
|
|
20
|
-
ns: meta.id
|
|
21
|
-
}),
|
|
22
|
-
description: t("functions description", {
|
|
23
|
-
ns: meta.id
|
|
24
|
-
})
|
|
25
|
-
}, /* @__PURE__ */ React.createElement(FunctionsPanel, {
|
|
26
|
-
space
|
|
27
|
-
})));
|
|
28
|
-
} finally {
|
|
29
|
-
_effect.f();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var FunctionsContainer_default = FunctionsContainer;
|
|
33
|
-
export {
|
|
34
|
-
FunctionsContainer,
|
|
35
|
-
FunctionsContainer_default as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=FunctionsContainer-KKRCIXGB.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/FunctionsContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport const FunctionsContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(meta.id);\n return (\n <ControlPage>\n <ControlSection\n title={t('functions verbose label', { ns: meta.id })}\n description={t('functions description', { ns: meta.id })}\n >\n <FunctionsPanel space={space} />\n </ControlSection>\n </ControlPage>\n );\n};\n\nexport default FunctionsContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;AAMrC,IAAMC,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;;;AAC5D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,WACE,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAON,EAAE,2BAA2B;QAAEO,IAAIL,KAAKC;MAAG,CAAA;MAClDK,aAAaR,EAAE,yBAAyB;QAAEO,IAAIL,KAAKC;MAAG,CAAA;OAEtD,sBAAA,cAACM,gBAAAA;MAAeV;;;;;AAIxB;AAEA,IAAA,6BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlPage", "ControlSection", "FunctionsContainer", "space", "t", "useTranslation", "meta", "id", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel"]
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
FunctionsPanel,
|
|
4
|
-
FunctionsPanel_default
|
|
5
|
-
} from "./chunk-JOCKHLFT.mjs";
|
|
6
|
-
import "./chunk-CEVIVRTY.mjs";
|
|
7
|
-
export {
|
|
8
|
-
FunctionsPanel,
|
|
9
|
-
FunctionsPanel_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=FunctionsPanel-74ELGR7P.mjs.map
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/app-graph-builder.ts
|
|
7
|
-
import { Rx } from "@effect-rx/rx-react";
|
|
8
|
-
import * as Function from "effect/Function";
|
|
9
|
-
import * as Option from "effect/Option";
|
|
10
|
-
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
11
|
-
import { Obj } from "@dxos/echo";
|
|
12
|
-
import { Script } from "@dxos/functions";
|
|
13
|
-
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
14
|
-
import { createExtension } from "@dxos/plugin-graph";
|
|
15
|
-
import { meta as spaceMeta } from "@dxos/plugin-space";
|
|
16
|
-
var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphBuilder, [
|
|
17
|
-
createExtension({
|
|
18
|
-
id: `${meta.id}/space-settings-automation`,
|
|
19
|
-
connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.type === `${spaceMeta.id}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
20
|
-
{
|
|
21
|
-
id: `automation-${node2.id}`,
|
|
22
|
-
type: `${meta.id}/space-settings-automation`,
|
|
23
|
-
data: `${meta.id}/space-settings-automation`,
|
|
24
|
-
properties: {
|
|
25
|
-
label: [
|
|
26
|
-
"automation panel label",
|
|
27
|
-
{
|
|
28
|
-
ns: meta.id
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
icon: "ph--lightning--regular"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]), Option.getOrElse(() => [])))
|
|
35
|
-
}),
|
|
36
|
-
createExtension({
|
|
37
|
-
id: `${meta.id}/space-settings-functions`,
|
|
38
|
-
connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.type === `${spaceMeta.id}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
39
|
-
{
|
|
40
|
-
id: `functions-${node2.id}`,
|
|
41
|
-
type: `${meta.id}/space-settings-functions`,
|
|
42
|
-
data: `${meta.id}/space-settings-functions`,
|
|
43
|
-
properties: {
|
|
44
|
-
label: [
|
|
45
|
-
"functions panel label",
|
|
46
|
-
{
|
|
47
|
-
ns: meta.id
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
icon: "ph--function--regular"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
]), Option.getOrElse(() => [])))
|
|
54
|
-
}),
|
|
55
|
-
createExtension({
|
|
56
|
-
id: `${meta.id}/script-companion`,
|
|
57
|
-
connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => Obj.instanceOf(Script.Script, node2.data) ? Option.some(node2) : Option.none()), Option.map((node2) => [
|
|
58
|
-
{
|
|
59
|
-
id: [
|
|
60
|
-
node2.id,
|
|
61
|
-
"automation"
|
|
62
|
-
].join(ATTENDABLE_PATH_SEPARATOR),
|
|
63
|
-
type: PLANK_COMPANION_TYPE,
|
|
64
|
-
data: "automation",
|
|
65
|
-
properties: {
|
|
66
|
-
label: [
|
|
67
|
-
"script automation label",
|
|
68
|
-
{
|
|
69
|
-
ns: meta.id
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
icon: "ph--lightning--regular",
|
|
73
|
-
disposition: "hidden"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
]), Option.getOrElse(() => [])))
|
|
77
|
-
})
|
|
78
|
-
]));
|
|
79
|
-
export {
|
|
80
|
-
app_graph_builder_default as default
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=app-graph-builder-RTOFJNFV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { Script } from '@dxos/functions';\nimport { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { createExtension } from '@dxos/plugin-graph';\nimport { meta as spaceMeta } from '@dxos/plugin-space';\n\nimport { meta } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${meta.id}/space-settings-automation`,\n connector: (node) =>\n Rx.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: `automation-${node.id}`,\n type: `${meta.id}/space-settings-automation`,\n data: `${meta.id}/space-settings-automation`,\n properties: {\n label: ['automation panel label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/space-settings-functions`,\n connector: (node) =>\n Rx.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${spaceMeta.id}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: `functions-${node.id}`,\n type: `${meta.id}/space-settings-functions`,\n data: `${meta.id}/space-settings-functions`,\n properties: {\n label: ['functions panel label', { ns: meta.id }],\n icon: 'ph--function--regular',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/script-companion`,\n connector: (node) =>\n Rx.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (Obj.instanceOf(Script.Script, node.data) ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'automation',\n properties: {\n label: ['script automation label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n disposition: 'hidden',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,UAAU;AACnB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,cAAkCC,mBAAmB;AAC9D,SAASC,WAAW;AACpB,SAASC,cAAc;AACvB,SAASC,2BAA2BC,4BAA4B;AAChE,SAASC,uBAAuB;AAChC,SAASC,QAAQC,iBAAiB;AAIlC,IAAA,6BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACEC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKM,SAAS,GAAGC,UAAUV,EAAE,cAAqBW,YAAKR,KAAAA,IAAeS,YAAI,CAAA,GAC7FC,WAAI,CAACV,UAAS;MACnB;QACEH,IAAI,cAAcG,MAAKH,EAAE;QACzBS,MAAM,GAAGR,KAAKD,EAAE;QAChBc,MAAM,GAAGb,KAAKD,EAAE;QAChBe,YAAY;UACVC,OAAO;YAAC;YAA0B;cAAEC,IAAIhB,KAAKD;YAAG;;UAChDkB,MAAM;QACR;MACF;KACD,GACMC,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACApB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACEC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKM,SAAS,GAAGC,UAAUV,EAAE,cAAqBW,YAAKR,KAAAA,IAAeS,YAAI,CAAA,GAC7FC,WAAI,CAACV,UAAS;MACnB;QACEH,IAAI,aAAaG,MAAKH,EAAE;QACxBS,MAAM,GAAGR,KAAKD,EAAE;QAChBc,MAAM,GAAGb,KAAKD,EAAE;QAChBe,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAIhB,KAAKD;YAAG;;UAC/CkB,MAAM;QACR;MACF;KACD,GACMC,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACApB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACEC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUiB,IAAIC,WAAWC,OAAOA,QAAQnB,MAAKW,IAAI,IAAWH,YAAKR,KAAAA,IAAeS,YAAI,CAAA,GAC7FC,WAAI,CAACV,UAAS;MACnB;QACEH,IAAI;UAACG,MAAKH;UAAI;UAAcuB,KAAKC,yBAAAA;QACjCf,MAAMgB;QACNX,MAAM;QACNC,YAAY;UACVC,OAAO;YAAC;YAA2B;cAAEC,IAAIhB,KAAKD;YAAG;;UACjDkB,MAAM;UACNQ,aAAa;QACf;MACF;KACD,GACMP,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
|
|
6
|
-
"names": ["Rx", "Function", "Option", "Capabilities", "contributes", "Obj", "Script", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "createExtension", "meta", "spaceMeta", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "connector", "node", "Rx", "make", "get", "pipe", "flatMap", "type", "spaceMeta", "some", "none", "map", "data", "properties", "label", "ns", "icon", "getOrElse", "Obj", "instanceOf", "Script", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "disposition"]
|
|
7
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AutomationCapabilities
|
|
4
|
-
} from "./chunk-MRYKW5TM.mjs";
|
|
5
|
-
|
|
6
|
-
// src/hooks/useComputeRuntimeCallback.ts
|
|
7
|
-
import { useCallback } from "react";
|
|
8
|
-
import { useCapability } from "@dxos/app-framework";
|
|
9
|
-
|
|
10
|
-
// src/capabilities/index.ts
|
|
11
|
-
import { lazy } from "@dxos/app-framework";
|
|
12
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-RTOFJNFV.mjs"));
|
|
13
|
-
var ComputeRuntime = lazy(() => import("./compute-runtime-IXCSD3W7.mjs"));
|
|
14
|
-
var IntentResolver = lazy(() => import("./intent-resolver-KDRYB5BC.mjs"));
|
|
15
|
-
var ReactSurface = lazy(() => import("./react-surface-Y2BBJV2I.mjs"));
|
|
16
|
-
|
|
17
|
-
// src/hooks/useComputeRuntimeCallback.ts
|
|
18
|
-
var useComputeRuntimeCallback = (space, fn, deps) => {
|
|
19
|
-
const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
20
|
-
const runtime = space !== void 0 ? computeRuntime.getRuntime(space.id) : void 0;
|
|
21
|
-
return useCallback(() => {
|
|
22
|
-
if (!runtime) {
|
|
23
|
-
throw new TypeError("Space not provided to useComputeRuntimeCallback");
|
|
24
|
-
}
|
|
25
|
-
return runtime.runPromise(fn());
|
|
26
|
-
}, [
|
|
27
|
-
runtime,
|
|
28
|
-
...deps ?? []
|
|
29
|
-
]);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// src/hooks/useTriggerRuntimeControls.ts
|
|
33
|
-
import * as Effect from "effect/Effect";
|
|
34
|
-
import { Filter } from "@dxos/echo";
|
|
35
|
-
import { Trigger, TriggerDispatcher } from "@dxos/functions";
|
|
36
|
-
import { useQuery } from "@dxos/react-client/echo";
|
|
37
|
-
import { useAsyncState } from "@dxos/react-ui";
|
|
38
|
-
var useTriggerRuntimeControls = (space) => {
|
|
39
|
-
const triggers = useQuery(space, Filter.type(Trigger.Trigger));
|
|
40
|
-
const [isRunningState, setIsRunningState] = useAsyncState(useComputeRuntimeCallback(space, () => TriggerDispatcher.pipe(Effect.map((t) => t.running))));
|
|
41
|
-
const start = useComputeRuntimeCallback(space, Effect.fnUntraced(function* () {
|
|
42
|
-
const dispatcher = yield* TriggerDispatcher;
|
|
43
|
-
yield* dispatcher.start();
|
|
44
|
-
setIsRunningState(true);
|
|
45
|
-
}));
|
|
46
|
-
const stop = useComputeRuntimeCallback(space, Effect.fnUntraced(function* () {
|
|
47
|
-
const dispatcher = yield* TriggerDispatcher;
|
|
48
|
-
yield* dispatcher.stop();
|
|
49
|
-
setIsRunningState(false);
|
|
50
|
-
}));
|
|
51
|
-
return {
|
|
52
|
-
triggers,
|
|
53
|
-
isRunning: isRunningState ?? false,
|
|
54
|
-
start: () => void start(),
|
|
55
|
-
stop: () => void stop()
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
useComputeRuntimeCallback,
|
|
61
|
-
useTriggerRuntimeControls,
|
|
62
|
-
AppGraphBuilder,
|
|
63
|
-
ComputeRuntime,
|
|
64
|
-
IntentResolver,
|
|
65
|
-
ReactSurface
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=chunk-3BJ6BR3E.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useComputeRuntimeCallback.ts", "../../../src/capabilities/index.ts", "../../../src/hooks/useTriggerRuntimeControls.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport { useCallback } from 'react';\n\nimport { useCapability } from '@dxos/app-framework';\nimport type { Space } from '@dxos/react-client/echo';\n\nimport { AutomationCapabilities } from '../capabilities';\n\n/**\n * Create an effectful function that has access to compute services\n */\n// TODO(burdon): Factor out (figure out cross-plugin capabilities dependencies).\nexport const useComputeRuntimeCallback = <T>(\n space: Space | undefined,\n fn: () => Effect.Effect<T, any, AutomationCapabilities.ComputeServices>,\n deps?: React.DependencyList,\n): (() => Promise<T>) => {\n const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);\n const runtime = space !== undefined ? computeRuntime.getRuntime(space.id) : undefined;\n\n return useCallback(() => {\n if (!runtime) {\n throw new TypeError('Space not provided to useComputeRuntimeCallback');\n }\n\n return runtime.runPromise(fn());\n }, [runtime, ...(deps ?? [])]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ComputeRuntime = lazy(() => import('./compute-runtime'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Filter } from '@dxos/echo';\nimport { Trigger, TriggerDispatcher } from '@dxos/functions';\nimport { type Space, useQuery } from '@dxos/react-client/echo';\nimport { useAsyncState } from '@dxos/react-ui';\n\nimport { useComputeRuntimeCallback } from './useComputeRuntimeCallback';\n\ninterface TriggerRuntimeControls {\n triggers: Trigger.Trigger[];\n isRunning: boolean;\n start: () => void;\n stop: () => void;\n}\n\nexport const useTriggerRuntimeControls = (space: Space | undefined): TriggerRuntimeControls => {\n const triggers = useQuery(space, Filter.type(Trigger.Trigger));\n\n const [isRunningState, setIsRunningState] = useAsyncState(\n useComputeRuntimeCallback(space, () => TriggerDispatcher.pipe(Effect.map((t) => t.running))),\n );\n\n const start = useComputeRuntimeCallback(\n space,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.start();\n setIsRunningState(true);\n }),\n );\n\n const stop = useComputeRuntimeCallback(\n space,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.stop();\n setIsRunningState(false);\n }),\n );\n\n return {\n triggers,\n isRunning: isRunningState ?? false,\n start: () => void start(),\n stop: () => void stop(),\n };\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAKA,SAASA,mBAAmB;AAE5B,SAASC,qBAAqB;;;ACH9B,SAASC,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,iBAAiBF,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMG,eAAeH,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADOvC,IAAMI,4BAA4B,CACvCC,OACAC,IACAC,SAAAA;AAEA,QAAMC,iBAAiBC,cAAcC,uBAAuBC,cAAc;AAC1E,QAAMC,UAAUP,UAAUQ,SAAYL,eAAeM,WAAWT,MAAMU,EAAE,IAAIF;AAE5E,SAAOG,YAAY,MAAA;AACjB,QAAI,CAACJ,SAAS;AACZ,YAAM,IAAIK,UAAU,iDAAA;IACtB;AAEA,WAAOL,QAAQM,WAAWZ,GAAAA,CAAAA;EAC5B,GAAG;IAACM;OAAaL,QAAQ,CAAA;GAAI;AAC/B;;;AE3BA,YAAYY,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,SAASC,yBAAyB;AAC3C,SAAqBC,gBAAgB;AACrC,SAASC,qBAAqB;AAWvB,IAAMC,4BAA4B,CAACC,UAAAA;AACxC,QAAMC,WAAWC,SAASF,OAAOG,OAAOC,KAAKC,QAAQA,OAAO,CAAA;AAE5D,QAAM,CAACC,gBAAgBC,iBAAAA,IAAqBC,cAC1CC,0BAA0BT,OAAO,MAAMU,kBAAkBC,KAAYC,WAAI,CAACC,MAAMA,EAAEC,OAAO,CAAA,CAAA,CAAA;AAG3F,QAAMC,QAAQN,0BACZT,OACOgB,kBAAW,aAAA;AAChB,UAAMC,aAAa,OAAOP;AAC1B,WAAOO,WAAWF,MAAK;AACvBR,sBAAkB,IAAA;EACpB,CAAA,CAAA;AAGF,QAAMW,OAAOT,0BACXT,OACOgB,kBAAW,aAAA;AAChB,UAAMC,aAAa,OAAOP;AAC1B,WAAOO,WAAWC,KAAI;AACtBX,sBAAkB,KAAA;EACpB,CAAA,CAAA;AAGF,SAAO;IACLN;IACAkB,WAAWb,kBAAkB;IAC7BS,OAAO,MAAM,KAAKA,MAAAA;IAClBG,MAAM,MAAM,KAAKA,KAAAA;EACnB;AACF;",
|
|
6
|
-
"names": ["useCallback", "useCapability", "lazy", "AppGraphBuilder", "lazy", "ComputeRuntime", "IntentResolver", "ReactSurface", "useComputeRuntimeCallback", "space", "fn", "deps", "computeRuntime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "runtime", "undefined", "getRuntime", "id", "useCallback", "TypeError", "runPromise", "Effect", "Filter", "Trigger", "TriggerDispatcher", "useQuery", "useAsyncState", "useTriggerRuntimeControls", "space", "triggers", "useQuery", "Filter", "type", "Trigger", "isRunningState", "setIsRunningState", "useAsyncState", "useComputeRuntimeCallback", "TriggerDispatcher", "pipe", "map", "t", "running", "start", "fnUntraced", "dispatcher", "stop", "isRunning"]
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "dxos.org/plugin/automation",
|
|
7
|
-
name: "Automation",
|
|
8
|
-
description: trim`
|
|
9
|
-
Workflow automation engine that triggers custom actions based on object events and conditions.
|
|
10
|
-
Create automated pipelines that respond to changes and streamline repetitive tasks.
|
|
11
|
-
`,
|
|
12
|
-
icon: "ph--robot--regular",
|
|
13
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
meta
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-CEVIVRTY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/automation',\n name: 'Automation',\n description: trim`\n Workflow automation engine that triggers custom actions based on object events and conditions.\n Create automated pipelines that respond to changes and streamline repetitive tasks.\n `,\n icon: 'ph--robot--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',\n};\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "source"]
|
|
7
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
5
|
-
|
|
6
|
-
// src/types/schema.ts
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
8
|
-
import { SpaceSchema } from "@dxos/react-client/echo";
|
|
9
|
-
var TriggerTemplate = Schema.Union(Schema.Struct({
|
|
10
|
-
type: Schema.Literal("timer"),
|
|
11
|
-
cron: Schema.String
|
|
12
|
-
}), Schema.Struct({
|
|
13
|
-
type: Schema.Literal("queue"),
|
|
14
|
-
queueDXN: Schema.Any
|
|
15
|
-
}));
|
|
16
|
-
(function(AutomationAction2) {
|
|
17
|
-
class CreateTriggerFromTemplate extends Schema.TaggedClass()(`${meta.id}/action/create-trigger-from-template`, {
|
|
18
|
-
input: Schema.Struct({
|
|
19
|
-
space: SpaceSchema,
|
|
20
|
-
template: TriggerTemplate,
|
|
21
|
-
enabled: Schema.optional(Schema.Boolean),
|
|
22
|
-
// TODO(wittjosiah): Improve how this lookup is done.
|
|
23
|
-
scriptName: Schema.optional(Schema.String),
|
|
24
|
-
input: Schema.optional(Schema.Record({
|
|
25
|
-
key: Schema.String,
|
|
26
|
-
value: Schema.Any
|
|
27
|
-
}))
|
|
28
|
-
}),
|
|
29
|
-
output: Schema.Void
|
|
30
|
-
}) {
|
|
31
|
-
}
|
|
32
|
-
AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
|
|
33
|
-
})(AutomationAction || (AutomationAction = {}));
|
|
34
|
-
var AutomationAction;
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
AutomationAction
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=chunk-ECJKIUBO.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/schema.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${meta.id}/action/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,mBAAmB;AAI5B,IAAMC,kBAAyBC,aACtBC,cAAO;EAAEC,MAAaC,eAAQ,OAAA;EAAUC,MAAaC;AAAO,CAAA,GAC5DJ,cAAO;EAAEC,MAAaC,eAAQ,OAAA;EAAUG,UAAiBC;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;EACR,MAAMC,kCAAyCC,mBAAW,EAC/D,GAAGC,KAAKC,EAAE,wCACV;IACEC,OAAcZ,cAAO;MACnBa,OAAOC;MACPC,UAAUjB;MACVkB,SAAgBC,gBAAgBC,cAAO;;MAEvCC,YAAmBF,gBAAgBb,aAAM;MACzCQ,OAAcK,gBAAgBG,cAAO;QAAEC,KAAYjB;QAAQkB,OAAchB;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAeC;EACjB,CAAA,EAAA;EACC;oBAbUhB,4BAAAA;AAcf,GAfiBD,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TriggerTemplate", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "CreateTriggerFromTemplate", "TaggedClass", "meta", "id", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
|
|
7
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
5
|
-
|
|
6
|
-
// src/components/FunctionsPanel/FunctionsPanel.tsx
|
|
7
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
8
|
-
import * as Schema from "effect/Schema";
|
|
9
|
-
import React, { useCallback, useMemo } from "react";
|
|
10
|
-
import { LayoutAction, createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
11
|
-
import { Function, Script } from "@dxos/functions";
|
|
12
|
-
import { SpaceAction } from "@dxos/plugin-space/types";
|
|
13
|
-
import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
|
|
14
|
-
import { Button, IconButton, useTranslation } from "@dxos/react-ui";
|
|
15
|
-
import { controlItemClasses } from "@dxos/react-ui-form";
|
|
16
|
-
import { List } from "@dxos/react-ui-list";
|
|
17
|
-
import { ghostHover, mx } from "@dxos/react-ui-theme";
|
|
18
|
-
var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
|
|
19
|
-
var FunctionsPanel = ({ space }) => {
|
|
20
|
-
var _effect = _useSignals();
|
|
21
|
-
try {
|
|
22
|
-
const { t } = useTranslation(meta.id);
|
|
23
|
-
const functions = useQuery(space, Filter.type(Function.Function));
|
|
24
|
-
const scripts = useQuery(space, Filter.type(Script.Script));
|
|
25
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
26
|
-
const functionToScriptMap = useMemo(() => functions.reduce((map, func) => {
|
|
27
|
-
const scriptId = func.source?.target?.id;
|
|
28
|
-
if (scriptId) {
|
|
29
|
-
const script = scripts.find((s) => s.id === scriptId);
|
|
30
|
-
if (script) {
|
|
31
|
-
map[func.id] = script;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return map;
|
|
35
|
-
}, {}), [
|
|
36
|
-
functions,
|
|
37
|
-
scripts
|
|
38
|
-
]);
|
|
39
|
-
const getScriptName = useCallback((func) => {
|
|
40
|
-
const script = functionToScriptMap[func.id];
|
|
41
|
-
return script?.name;
|
|
42
|
-
}, [
|
|
43
|
-
functionToScriptMap
|
|
44
|
-
]);
|
|
45
|
-
const handleGoToScript = useCallback((func) => {
|
|
46
|
-
const script = functionToScriptMap[func.id];
|
|
47
|
-
if (script) {
|
|
48
|
-
void dispatch(createIntent(LayoutAction.Open, {
|
|
49
|
-
part: "main",
|
|
50
|
-
subject: [
|
|
51
|
-
fullyQualifiedId(script)
|
|
52
|
-
]
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
}, [
|
|
56
|
-
functionToScriptMap,
|
|
57
|
-
dispatch
|
|
58
|
-
]);
|
|
59
|
-
const handleDelete = useCallback((func) => dispatch(createIntent(SpaceAction.RemoveObjects, {
|
|
60
|
-
objects: [
|
|
61
|
-
func
|
|
62
|
-
]
|
|
63
|
-
})), [
|
|
64
|
-
dispatch
|
|
65
|
-
]);
|
|
66
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
67
|
-
role: "none",
|
|
68
|
-
className: mx(controlItemClasses)
|
|
69
|
-
}, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
|
|
70
|
-
items: functions,
|
|
71
|
-
isItem: Schema.is(Function.Function),
|
|
72
|
-
getId: (func) => func.id
|
|
73
|
-
}, ({ items }) => /* @__PURE__ */ React.createElement("div", {
|
|
74
|
-
role: "list",
|
|
75
|
-
className: "flex flex-col w-full"
|
|
76
|
-
}, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
|
|
77
|
-
key: func.id,
|
|
78
|
-
item: func,
|
|
79
|
-
classNames: mx(grid, ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
|
|
80
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
81
|
-
className: "flex flex-col truncate"
|
|
82
|
-
}, /* @__PURE__ */ React.createElement(List.ItemTitle, {
|
|
83
|
-
classNames: "truncate"
|
|
84
|
-
}, func.name), getScriptName(func) && /* @__PURE__ */ React.createElement("div", {
|
|
85
|
-
className: "text-xs text-description truncate"
|
|
86
|
-
}, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ React.createElement(Button, {
|
|
87
|
-
onClick: () => handleGoToScript(func)
|
|
88
|
-
}, t("go to function source button label")), /* @__PURE__ */ React.createElement(IconButton, {
|
|
89
|
-
iconOnly: true,
|
|
90
|
-
icon: "ph--trash--regular",
|
|
91
|
-
label: t("delete function button label"),
|
|
92
|
-
onClick: () => handleDelete(func)
|
|
93
|
-
}))))), functions.length === 0 && /* @__PURE__ */ React.createElement("div", {
|
|
94
|
-
className: "text-center plb-4 text-gray-500"
|
|
95
|
-
}, t("no functions found")));
|
|
96
|
-
} finally {
|
|
97
|
-
_effect.f();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// src/components/FunctionsPanel/index.ts
|
|
102
|
-
var FunctionsPanel_default = FunctionsPanel;
|
|
103
|
-
|
|
104
|
-
export {
|
|
105
|
-
FunctionsPanel,
|
|
106
|
-
FunctionsPanel_default
|
|
107
|
-
};
|
|
108
|
-
//# sourceMappingURL=chunk-JOCKHLFT.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/FunctionsPanel/FunctionsPanel.tsx", "../../../src/components/FunctionsPanel/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { Function, Script } from '@dxos/functions';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';\nimport { Button, IconButton, useTranslation } from '@dxos/react-ui';\nimport { controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { meta } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';\n\nexport type FunctionsPanelProps = {\n space: Space;\n};\n\nexport const FunctionsPanel = ({ space }: FunctionsPanelProps) => {\n const { t } = useTranslation(meta.id);\n const functions = useQuery(space, Filter.type(Function.Function));\n const scripts = useQuery(space, Filter.type(Script.Script));\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const functionToScriptMap = useMemo(\n () =>\n functions.reduce(\n (map, func) => {\n const scriptId = func.source?.target?.id;\n if (scriptId) {\n const script = scripts.find((s) => s.id === scriptId);\n if (script) {\n map[func.id] = script;\n }\n }\n return map;\n },\n {} as Record<string, Script.Script>,\n ),\n [functions, scripts],\n );\n\n const getScriptName = useCallback(\n (func: Function.Function) => {\n const script = functionToScriptMap[func.id];\n return script?.name;\n },\n [functionToScriptMap],\n );\n\n const handleGoToScript = useCallback(\n (func: Function.Function) => {\n const script = functionToScriptMap[func.id];\n if (script) {\n void dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [fullyQualifiedId(script)] }));\n }\n },\n [functionToScriptMap, dispatch],\n );\n\n const handleDelete = useCallback(\n (func: Function.Function) => dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [func] })),\n [dispatch],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n {functions.length > 0 && (\n <List.Root<Function.Function> items={functions} isItem={Schema.is(Function.Function)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col w-full'>\n {items?.map((func) => (\n <List.Item<Function.Function>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n {getScriptName(func) && (\n <div className='text-xs text-description truncate'>{getScriptName(func)}</div>\n )}\n </div>\n {functionToScriptMap[func.id] && (\n <Button onClick={() => handleGoToScript(func)}>{t('go to function source button label')}</Button>\n )}\n <IconButton\n iconOnly\n icon='ph--trash--regular'\n label={t('delete function button label')}\n onClick={() => handleDelete(func)}\n />\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {functions.length === 0 && <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from './FunctionsPanel';\nexport default FunctionsPanel;\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,eAAe;AAE5C,SAASC,cAAcC,cAAcC,2BAA2B;AAChE,SAASC,UAAUC,cAAc;AACjC,SAASC,mBAAmB;AAC5B,SAASC,QAAoBC,kBAAkBC,gBAAgB;AAC/D,SAASC,QAAQC,YAAYC,sBAAsB;AACnD,SAASC,0BAA0B;AACnC,SAASC,YAAY;AACrB,SAASC,YAAYC,UAAU;AAI/B,IAAMC,OAAO;AAMN,IAAMC,iBAAiB,CAAC,EAAEC,MAAK,MAAuB;;;AAC3D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,UAAMC,YAAYC,SAASN,OAAOO,OAAOC,KAAKC,SAASA,QAAQ,CAAA;AAC/D,UAAMC,UAAUJ,SAASN,OAAOO,OAAOC,KAAKG,OAAOA,MAAM,CAAA;AACzD,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKC,oBAAAA;AAEtC,UAAMC,sBAAsBC,QAC1B,MACEX,UAAUY,OACR,CAACC,KAAKC,SAAAA;AACJ,YAAMC,WAAWD,KAAKE,QAAQC,QAAQlB;AACtC,UAAIgB,UAAU;AACZ,cAAMG,SAASb,QAAQc,KAAK,CAACC,MAAMA,EAAErB,OAAOgB,QAAAA;AAC5C,YAAIG,QAAQ;AACVL,cAAIC,KAAKf,EAAE,IAAImB;QACjB;MACF;AACA,aAAOL;IACT,GACA,CAAC,CAAA,GAEL;MAACb;MAAWK;KAAQ;AAGtB,UAAMgB,gBAAgBC,YACpB,CAACR,SAAAA;AACC,YAAMI,SAASR,oBAAoBI,KAAKf,EAAE;AAC1C,aAAOmB,QAAQK;IACjB,GACA;MAACb;KAAoB;AAGvB,UAAMc,mBAAmBF,YACvB,CAACR,SAAAA;AACC,YAAMI,SAASR,oBAAoBI,KAAKf,EAAE;AAC1C,UAAImB,QAAQ;AACV,aAAKV,SAASiB,aAAaC,aAAaC,MAAM;UAAEC,MAAM;UAAQC,SAAS;YAACC,iBAAiBZ,MAAAA;;QAAS,CAAA,CAAA;MACpG;IACF,GACA;MAACR;MAAqBF;KAAS;AAGjC,UAAMuB,eAAeT,YACnB,CAACR,SAA4BN,SAASiB,aAAaO,YAAYC,eAAe;MAAEC,SAAS;QAACpB;;IAAM,CAAA,CAAA,GAChG;MAACN;KAAS;AAGZ,WACE,sBAAA,cAAC2B,OAAAA;MAAIC,MAAK;MAAOC,WAAWC,GAAGC,kBAAAA;OAC5BvC,UAAUwC,SAAS,KAClB,sBAAA,cAACC,KAAKC,MAAI;MAAoBC,OAAO3C;MAAW4C,QAAeC,UAAGzC,SAASA,QAAQ;MAAG0C,OAAO,CAAChC,SAASA,KAAKf;OACzG,CAAC,EAAE4C,MAAK,MACP,sBAAA,cAACR,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACxBM,OAAO9B,IAAI,CAACC,SACX,sBAAA,cAAC2B,KAAKM,MAAI;MACRC,KAAKlC,KAAKf;MACVkD,MAAMnC;MACNoC,YAAYZ,GAAG7C,MAAM0D,YAAY,gBAAgB,SAAS,eAAA;OAE1D,sBAAA,cAAChB,OAAAA;MAAIE,WAAU;OACb,sBAAA,cAACI,KAAKW,WAAS;MAACF,YAAW;OAAYpC,KAAKS,IAAI,GAC/CF,cAAcP,IAAAA,KACb,sBAAA,cAACqB,OAAAA;MAAIE,WAAU;OAAqChB,cAAcP,IAAAA,CAAAA,CAAAA,GAGrEJ,oBAAoBI,KAAKf,EAAE,KAC1B,sBAAA,cAACsD,QAAAA;MAAOC,SAAS,MAAM9B,iBAAiBV,IAAAA;OAAQlB,EAAE,oCAAA,CAAA,GAEpD,sBAAA,cAAC2D,YAAAA;MACCC,UAAAA;MACAC,MAAK;MACLC,OAAO9D,EAAE,8BAAA;MACT0D,SAAS,MAAMvB,aAAajB,IAAAA;YASzCd,UAAUwC,WAAW,KAAK,sBAAA,cAACL,OAAAA;MAAIE,WAAU;OAAmCzC,EAAE,oBAAA,CAAA,CAAA;;;;AAGrF;;;ACrGA,IAAA,yBAAe+D;",
|
|
6
|
-
"names": ["Schema", "React", "useCallback", "useMemo", "LayoutAction", "createIntent", "useIntentDispatcher", "Function", "Script", "SpaceAction", "Filter", "fullyQualifiedId", "useQuery", "Button", "IconButton", "useTranslation", "controlItemClasses", "List", "ghostHover", "mx", "grid", "FunctionsPanel", "space", "t", "useTranslation", "meta", "id", "functions", "useQuery", "Filter", "type", "Function", "scripts", "Script", "dispatchPromise", "dispatch", "useIntentDispatcher", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "createIntent", "LayoutAction", "Open", "part", "subject", "fullyQualifiedId", "handleDelete", "SpaceAction", "RemoveObjects", "objects", "div", "role", "className", "mx", "controlItemClasses", "length", "List", "Root", "items", "isItem", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "IconButton", "iconOnly", "icon", "label", "FunctionsPanel"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-CEVIVRTY.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/capabilities.ts
|
|
7
|
-
import { defineCapability } from "@dxos/app-framework";
|
|
8
|
-
(function(AutomationCapabilities2) {
|
|
9
|
-
AutomationCapabilities2.ComputeRuntime = defineCapability(`${meta.id}/capability/compute-runtime`);
|
|
10
|
-
})(AutomationCapabilities || (AutomationCapabilities = {}));
|
|
11
|
-
var AutomationCapabilities;
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
AutomationCapabilities
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-MRYKW5TM.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';\nimport { defineCapability } from '@dxos/app-framework';\nimport type {\n CredentialsService,\n DatabaseService,\n FunctionInvocationService,\n InvocationTracer,\n QueueService,\n TriggerDispatcher,\n TriggerStateStore,\n} from '@dxos/functions';\nimport type { SpaceId } from '@dxos/keys';\n\nimport { meta } from '../meta';\n\nexport namespace AutomationCapabilities {\n /**\n * Service stack for executing agents, functions, and triggers.\n */\n export type ComputeServices =\n | TriggerDispatcher\n | AiService.AiService\n | DatabaseService\n | QueueService\n | CredentialsService\n | FunctionInvocationService\n | InvocationTracer\n | TriggerStateStore\n // TODO(dmaretskyi): Those should be provided at AI-chat call site.\n | ToolResolverService\n | ToolExecutionService;\n\n export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;\n export interface ComputeRuntimeProvider {\n getRuntime(spaceId: SpaceId): ComputeRuntime;\n }\n\n /**\n * Runtime for executing agents, functions, and triggers.\n */\n export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AAOA,SAASA,wBAAwB;UAchBC,yBAAAA;0BAyBFC,iBAAiBC,iBAAyC,GAAGC,KAAKC,EAAE,6BAA6B;AAChH,GA1BiBJ,2BAAAA,yBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["defineCapability", "AutomationCapabilities", "ComputeRuntime", "defineCapability", "meta", "id"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/components/index.ts
|
|
4
|
-
import { lazy } from "react";
|
|
5
|
-
var AutomationPanel = lazy(() => import("./AutomationPanel-NVEIUIZP.mjs"));
|
|
6
|
-
var AutomationSettings = lazy(() => import("./AutomationSettings-VIIEPI2P.mjs"));
|
|
7
|
-
var FunctionsContainer = lazy(() => import("./FunctionsContainer-KKRCIXGB.mjs"));
|
|
8
|
-
var FunctionsPanel = lazy(() => import("./FunctionsPanel-74ELGR7P.mjs"));
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
AutomationPanel,
|
|
12
|
-
AutomationSettings,
|
|
13
|
-
FunctionsContainer,
|
|
14
|
-
FunctionsPanel
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-U5Q2NI7H.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './TriggerEditor';\n\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const AutomationSettings = lazy(() => import('./AutomationSettings'));\nexport const FunctionsContainer = lazy(() => import('./FunctionsContainer'));\nexport const FunctionsPanel = lazy(() => import('./FunctionsPanel'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,YAAY;AAId,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC1C,IAAMC,qBAAqBD,KAAK,MAAM,OAAO,mCAAA,CAAA;AAC7C,IAAME,qBAAqBF,KAAK,MAAM,OAAO,mCAAA,CAAA;AAC7C,IAAMG,iBAAiBH,KAAK,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "AutomationPanel", "lazy", "AutomationSettings", "FunctionsContainer", "FunctionsPanel"]
|
|
7
|
-
}
|