@dxos/plugin-automation 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/PLUGIN.mdl +428 -0
- package/README.md +1 -1
- package/dist/lib/neutral/AutomationPanel-OKF2MDLO.mjs +12 -0
- package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
- package/dist/lib/{browser/cli/index.mjs → neutral/AutomationPlugin.node.mjs} +191 -186
- 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-GQF5UFM6.mjs +32 -0
- package/dist/lib/neutral/AutomationSettings-GQF5UFM6.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsContainer-YBTQGCL3.mjs +38 -0
- package/dist/lib/neutral/FunctionsContainer-YBTQGCL3.mjs.map +7 -0
- package/dist/lib/{browser/chunk-U55ZXRYM.mjs → neutral/FunctionsPanel-L32Z67B7.mjs} +24 -25
- package/dist/lib/neutral/FunctionsPanel-L32Z67B7.mjs.map +7 -0
- package/dist/lib/{browser/chunk-XFXYU645.mjs → neutral/FunctionsRegistry-RTCY3LXE.mjs} +24 -25
- package/dist/lib/neutral/FunctionsRegistry-RTCY3LXE.mjs.map +7 -0
- package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
- package/dist/lib/neutral/app-graph-builder-Q3LJLICE.mjs +75 -0
- package/dist/lib/neutral/app-graph-builder-Q3LJLICE.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +19 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +17 -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-7YWISQOZ.mjs +54 -0
- package/dist/lib/neutral/chunk-7YWISQOZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-C7H62AU3.mjs +435 -0
- package/dist/lib/neutral/chunk-C7H62AU3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CMM3AFHR.mjs +111 -0
- package/dist/lib/neutral/chunk-CMM3AFHR.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-LRVJEKMN.mjs +40 -0
- package/dist/lib/neutral/chunk-LRVJEKMN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MBIODLCB.mjs +12 -0
- package/dist/lib/neutral/chunk-MBIODLCB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NCCFEPBZ.mjs +76 -0
- package/dist/lib/neutral/chunk-NCCFEPBZ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-ZNI2CGQP.mjs → neutral/chunk-RCBE37YU.mjs} +158 -60
- package/dist/lib/neutral/chunk-RCBE37YU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TJOQNSS5.mjs +8 -0
- package/dist/lib/neutral/chunk-TJOQNSS5.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +16 -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-5YUHZOFA.mjs +68 -0
- package/dist/lib/neutral/create-trigger-from-template-5YUHZOFA.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +10 -0
- package/dist/lib/neutral/index.mjs +16 -0
- package/dist/lib/neutral/layer-specs-OXK75RDW.mjs +141 -0
- package/dist/lib/neutral/layer-specs-OXK75RDW.mjs.map +7 -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-FOOBGYNG.mjs +57 -0
- package/dist/lib/neutral/react-surface-FOOBGYNG.mjs.map +7 -0
- package/dist/lib/neutral/registry-sync-JYDDTBAE.mjs +82 -0
- package/dist/lib/neutral/registry-sync-JYDDTBAE.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/translations.mjs +60 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/trigger-runtime-controller-BOEJYGWC.mjs +77 -0
- package/dist/lib/neutral/trigger-runtime-controller-BOEJYGWC.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -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/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.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +6 -0
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +8 -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.map +1 -0
- package/dist/types/src/capabilities/registry-sync.d.ts +21 -0
- package/dist/types/src/capabilities/registry-sync.d.ts.map +1 -0
- package/dist/types/src/capabilities/trigger-runtime-controller.d.ts +5 -0
- package/dist/types/src/capabilities/trigger-runtime-controller.d.ts.map +1 -0
- package/dist/types/src/capabilities/trigger-runtime-controller.test.d.ts +2 -0
- package/dist/types/src/capabilities/trigger-runtime-controller.test.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 +2 -2
- 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 +8 -8
- 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/{cli/commands → commands}/trigger/options.d.ts +1 -2
- 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/{cli/commands → commands}/trigger/update/queue.d.ts +2 -3
- 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/commands/trigger/util.d.ts +85 -0
- 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 +45 -32
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/TriggerEdgeMetadata.d.ts +18 -0
- package/dist/types/src/components/AutomationPanel/TriggerEdgeMetadata.d.ts.map +1 -0
- 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.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 +109 -93
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/util.d.ts +14 -0
- package/dist/types/src/components/TriggerEditor/util.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +3 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/index.d.ts +1 -2
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts +2 -4
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/FunctionsContainer/index.d.ts +1 -2
- package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +3 -3
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerSettings/index.d.ts +2 -2
- package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useEdgeTriggersDispatcherStatus.d.ts +13 -0
- package/dist/types/src/hooks/useEdgeTriggersDispatcherStatus.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 +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 +162 -46
- 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 +45 -33
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AutomationOperation.d.ts +21 -0
- package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +11 -32
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +124 -75
- package/src/AutomationPlugin.node.ts +35 -0
- package/src/AutomationPlugin.test.ts +27 -0
- package/src/AutomationPlugin.tsx +33 -11
- package/src/AutomationPlugin.workerd.ts +18 -0
- package/src/capabilities/app-graph-builder.ts +66 -0
- package/src/capabilities/index.ts +15 -4
- package/src/capabilities/layer-specs.ts +197 -0
- package/src/capabilities/node.ts +18 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +59 -0
- package/src/capabilities/registry-sync.ts +110 -0
- package/src/capabilities/trigger-runtime-controller.test.ts +103 -0
- package/src/capabilities/trigger-runtime-controller.ts +126 -0
- package/src/{cli/commands → commands}/trigger/create/queue.ts +14 -16
- package/src/{cli/commands → commands}/trigger/create/subscription.ts +8 -11
- package/src/{cli/commands → commands}/trigger/create/timer.ts +4 -7
- package/src/{cli/commands → commands}/trigger/list.ts +7 -4
- package/src/{cli/commands → commands}/trigger/options.ts +3 -15
- package/src/{cli/commands → commands}/trigger/remove.ts +5 -5
- package/src/{cli/commands → commands}/trigger/update/queue.ts +39 -43
- package/src/{cli/commands → commands}/trigger/update/subscription.ts +22 -21
- package/src/{cli/commands → commands}/trigger/update/timer.ts +22 -20
- package/src/{cli/commands → commands}/trigger/util.ts +53 -38
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +12 -5
- package/src/components/AutomationPanel/AutomationPanel.tsx +120 -58
- package/src/components/AutomationPanel/TriggerEdgeMetadata.tsx +148 -0
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +35 -27
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +32 -23
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +9 -13
- package/src/components/TriggerEditor/SpecSelector.tsx +18 -14
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +36 -18
- package/src/components/TriggerEditor/TriggerEditor.tsx +120 -25
- package/src/components/TriggerEditor/util.ts +51 -0
- package/src/containers/AutomationSettings/AutomationSettings.tsx +12 -8
- package/src/containers/AutomationSettings/index.ts +1 -3
- package/src/containers/FunctionsContainer/FunctionsContainer.tsx +11 -11
- package/src/containers/FunctionsContainer/index.ts +1 -3
- package/src/containers/TriggerSettings/TriggerSettings.tsx +32 -10
- package/src/containers/TriggerSettings/index.ts +2 -3
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useEdgeTriggersDispatcherStatus.ts +78 -0
- package/src/hooks/useTriggerRuntimeControls.ts +13 -8
- package/src/index.ts +0 -4
- package/src/meta.ts +27 -7
- package/src/operations/create-trigger-from-template.ts +70 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/testing/test-functions.ts +38 -4
- package/src/testing.ts +7 -0
- package/src/translations.ts +52 -39
- package/src/types/AutomationOperation.ts +39 -0
- package/src/types/index.ts +2 -2
- package/src/types/schema.ts +4 -25
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/AutomationPanel-EHRSV2DL.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs +0 -37
- package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs +0 -43
- package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-5WPUZGRB.mjs +0 -10
- package/dist/lib/browser/FunctionsRegistry-XRXIZRLL.mjs +0 -10
- package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs +0 -13
- package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs.map +0 -7
- 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-3P4R5WNC.mjs +0 -8
- package/dist/lib/browser/chunk-3P4R5WNC.mjs.map +0 -7
- package/dist/lib/browser/chunk-4EY2KMCM.mjs +0 -272
- package/dist/lib/browser/chunk-4EY2KMCM.mjs.map +0 -7
- package/dist/lib/browser/chunk-PZNBEKO5.mjs +0 -17
- package/dist/lib/browser/chunk-PZNBEKO5.mjs.map +0 -7
- package/dist/lib/browser/chunk-QPG3AKFX.mjs +0 -93
- package/dist/lib/browser/chunk-QPG3AKFX.mjs.map +0 -7
- package/dist/lib/browser/chunk-SEG5OCGB.mjs +0 -31
- package/dist/lib/browser/chunk-SEG5OCGB.mjs.map +0 -7
- package/dist/lib/browser/chunk-U55ZXRYM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WOBCY2FQ.mjs +0 -83
- package/dist/lib/browser/chunk-WOBCY2FQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XFXYU645.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZNI2CGQP.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-L2RVWXY2.mjs +0 -124
- package/dist/lib/browser/compute-runtime-L2RVWXY2.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-2U6ZQVXR.mjs +0 -83
- package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-U6FAYV42.mjs +0 -69
- package/dist/lib/browser/react-surface-U6FAYV42.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -14
- package/dist/lib/node-esm/AutomationPanel-F7MPUR7U.mjs +0 -12
- package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs +0 -38
- package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs +0 -44
- package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-UFL5LT2R.mjs +0 -11
- package/dist/lib/node-esm/FunctionsRegistry-574OBZ5T.mjs +0 -11
- package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs +0 -14
- package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs.map +0 -7
- 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-2X564LII.mjs +0 -10
- package/dist/lib/node-esm/chunk-2X564LII.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-34HGM46Z.mjs +0 -32
- package/dist/lib/node-esm/chunk-34HGM46Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4DK33JDH.mjs +0 -84
- package/dist/lib/node-esm/chunk-4DK33JDH.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-7AIKTEAX.mjs +0 -273
- package/dist/lib/node-esm/chunk-7AIKTEAX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs +0 -271
- package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GXFQR3KI.mjs +0 -99
- package/dist/lib/node-esm/chunk-GXFQR3KI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs +0 -94
- package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RTEXGGBX.mjs +0 -97
- package/dist/lib/node-esm/chunk-RTEXGGBX.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-XD6A5Q7Q.mjs +0 -125
- package/dist/lib/node-esm/compute-runtime-XD6A5Q7Q.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-XWJGBHJZ.mjs +0 -84
- package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-BVNHCWQ7.mjs +0 -70
- package/dist/lib/node-esm/react-surface-BVNHCWQ7.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.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.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 +0 -46
- 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/hooks/useComputeRuntimeCallback.d.ts +0 -12
- package/dist/types/src/hooks/useComputeRuntimeCallback.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 -146
- 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/hooks/useComputeRuntimeCallback.ts +0 -67
- package/src/types/capabilities.ts +0 -43
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/AutomationPanel-EHRSV2DL.mjs.map → neutral/AutomationPanel-OKF2MDLO.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-5WPUZGRB.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsRegistry-XRXIZRLL.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 → neutral}/hooks/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-F7MPUR7U.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-UFL5LT2R.mjs.map → neutral/operations/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/FunctionsRegistry-574OBZ5T.mjs.map → neutral/testing.mjs.map} +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/{cli/commands → commands}/index.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/update/index.ts +0 -0
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-5FXNN3MV.mjs";
|
|
5
|
-
|
|
6
|
-
// src/components/FunctionsPanel/FunctionsPanel.tsx
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
8
|
-
import React, { useCallback, useMemo } from "react";
|
|
9
|
-
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
10
|
-
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
11
|
-
import { Obj } from "@dxos/echo";
|
|
12
|
-
import { Function, Script } from "@dxos/functions";
|
|
13
|
-
import { SpaceOperation } from "@dxos/plugin-space/types";
|
|
14
|
-
import { Filter, useQuery } from "@dxos/react-client/echo";
|
|
15
|
-
import { Button, IconButton, useTranslation } from "@dxos/react-ui";
|
|
16
|
-
import { Settings } from "@dxos/react-ui-form";
|
|
17
|
-
import { List } from "@dxos/react-ui-list";
|
|
18
|
-
import { ghostHover, mx } from "@dxos/ui-theme";
|
|
19
|
-
var FunctionsPanel = ({ space }) => {
|
|
20
|
-
const { t } = useTranslation(meta.id);
|
|
21
|
-
const functions = useQuery(space.db, Filter.type(Function.Function));
|
|
22
|
-
const scripts = useQuery(space.db, Filter.type(Script.Script));
|
|
23
|
-
const { invokePromise } = useOperationInvoker();
|
|
24
|
-
const functionToScriptMap = useMemo(() => functions.reduce((map, func) => {
|
|
25
|
-
const scriptId = func.source?.target?.id;
|
|
26
|
-
if (scriptId) {
|
|
27
|
-
const script = scripts.find((s) => s.id === scriptId);
|
|
28
|
-
if (script) {
|
|
29
|
-
map[func.id] = script;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return map;
|
|
33
|
-
}, {}), [
|
|
34
|
-
functions,
|
|
35
|
-
scripts
|
|
36
|
-
]);
|
|
37
|
-
const getScriptName = useCallback((func) => {
|
|
38
|
-
const script = functionToScriptMap[func.id];
|
|
39
|
-
return script?.name;
|
|
40
|
-
}, [
|
|
41
|
-
functionToScriptMap
|
|
42
|
-
]);
|
|
43
|
-
const handleGoToScript = useCallback((func) => {
|
|
44
|
-
const script = functionToScriptMap[func.id];
|
|
45
|
-
if (script) {
|
|
46
|
-
void invokePromise(LayoutOperation.Open, {
|
|
47
|
-
subject: [
|
|
48
|
-
Obj.getDXN(script).toString()
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}, [
|
|
53
|
-
functionToScriptMap,
|
|
54
|
-
invokePromise
|
|
55
|
-
]);
|
|
56
|
-
const handleDelete = useCallback((func) => invokePromise(SpaceOperation.RemoveObjects, {
|
|
57
|
-
objects: [
|
|
58
|
-
func
|
|
59
|
-
]
|
|
60
|
-
}), [
|
|
61
|
-
invokePromise
|
|
62
|
-
]);
|
|
63
|
-
return /* @__PURE__ */ React.createElement(Settings.Container, null, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
|
|
64
|
-
items: functions,
|
|
65
|
-
isItem: Schema.is(Function.Function),
|
|
66
|
-
getId: (func) => func.id
|
|
67
|
-
}, ({ items }) => /* @__PURE__ */ React.createElement("div", {
|
|
68
|
-
role: "list",
|
|
69
|
-
className: "flex flex-col w-full"
|
|
70
|
-
}, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
|
|
71
|
-
key: func.id,
|
|
72
|
-
item: func,
|
|
73
|
-
classNames: mx("grid grid-cols-[1fr_auto] min-h-[2.5rem] min-h-[3rem] px-2 items-center", ghostHover)
|
|
74
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
75
|
-
className: "flex flex-col truncate"
|
|
76
|
-
}, /* @__PURE__ */ React.createElement(List.ItemTitle, {
|
|
77
|
-
classNames: "truncate"
|
|
78
|
-
}, func.name), getScriptName(func) && /* @__PURE__ */ React.createElement("div", {
|
|
79
|
-
className: "text-xs text-description truncate"
|
|
80
|
-
}, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ React.createElement(Button, {
|
|
81
|
-
onClick: () => handleGoToScript(func)
|
|
82
|
-
}, t("go to function source button label")), /* @__PURE__ */ React.createElement(IconButton, {
|
|
83
|
-
iconOnly: true,
|
|
84
|
-
icon: "ph--trash--regular",
|
|
85
|
-
label: t("delete function button label"),
|
|
86
|
-
onClick: () => handleDelete(func)
|
|
87
|
-
}))))), functions.length === 0 && /* @__PURE__ */ React.createElement("div", {
|
|
88
|
-
className: "text-center py-4 text-description"
|
|
89
|
-
}, t("no functions found")));
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// src/components/FunctionsPanel/index.ts
|
|
93
|
-
var FunctionsPanel_default = FunctionsPanel;
|
|
94
|
-
|
|
95
|
-
export {
|
|
96
|
-
FunctionsPanel,
|
|
97
|
-
FunctionsPanel_default
|
|
98
|
-
};
|
|
99
|
-
//# sourceMappingURL=chunk-GXFQR3KI.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 { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Obj } from '@dxos/echo';\nimport { Function, Script } from '@dxos/functions';\nimport { SpaceOperation } from '@dxos/plugin-space/types';\nimport { Filter, type Space, useQuery } from '@dxos/react-client/echo';\nimport { Button, IconButton, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\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.db, Filter.type(Function.Function));\n const scripts = useQuery(space.db, Filter.type(Script.Script));\n const { invokePromise } = useOperationInvoker();\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 invokePromise(LayoutOperation.Open, { subject: [Obj.getDXN(script).toString()] });\n }\n },\n [functionToScriptMap, invokePromise],\n );\n\n const handleDelete = useCallback(\n (func: Function.Function) => invokePromise(SpaceOperation.RemoveObjects, { objects: [func] }),\n [invokePromise],\n );\n\n return (\n <Settings.Container>\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 grid-cols-[1fr_auto] min-h-[2.5rem] min-h-[3rem] px-2 items-center', ghostHover)}\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 py-4 text-description'>{t('no functions found')}</div>}\n </Settings.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from './FunctionsPanel';\nexport default FunctionsPanel;\n"],
|
|
5
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ayoutOperation", "Obj", "Function", "Script", "SpaceOperation", "Filter", "useQuery", "Button", "IconButton", "useTranslation", "Settings", "List", "ghostHover", "mx", "FunctionsPanel", "space", "t", "useTranslation", "meta", "id", "functions", "useQuery", "db", "Filter", "type", "Function", "scripts", "Script", "invokePromise", "useOperationInvoker", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "LayoutOperation", "Open", "subject", "Obj", "getDXN", "toString", "handleDelete", "SpaceOperation", "RemoveObjects", "objects", "Settings", "Container", "length", "List", "Root", "items", "isItem", "is", "getId", "div", "role", "className", "Item", "key", "item", "classNames", "mx", "ghostHover", "ItemTitle", "Button", "onClick", "IconButton", "iconOnly", "icon", "label", "FunctionsPanel"]
|
|
7
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AutomationCapabilities
|
|
4
|
-
} from "./chunk-4DK33JDH.mjs";
|
|
5
|
-
|
|
6
|
-
// src/hooks/useComputeRuntimeCallback.ts
|
|
7
|
-
import * as Cause from "effect/Cause";
|
|
8
|
-
import * as Effect from "effect/Effect";
|
|
9
|
-
import * as Exit from "effect/Exit";
|
|
10
|
-
import { useCallback } from "react";
|
|
11
|
-
import { useCapability } from "@dxos/app-framework/ui";
|
|
12
|
-
import { FunctionInvocationService, TracingService } from "@dxos/functions";
|
|
13
|
-
import { log } from "@dxos/log";
|
|
14
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-automation/src/hooks/useComputeRuntimeCallback.ts";
|
|
15
|
-
var useComputeRuntimeCallback = (id, fn, deps) => {
|
|
16
|
-
const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
17
|
-
const runtime = id !== void 0 ? computeRuntime.getRuntime(id) : void 0;
|
|
18
|
-
return useCallback(() => {
|
|
19
|
-
if (!runtime) {
|
|
20
|
-
throw new TypeError("Space not provided to useComputeRuntimeCallback");
|
|
21
|
-
}
|
|
22
|
-
return runtime.runPromise(fn());
|
|
23
|
-
}, [
|
|
24
|
-
runtime,
|
|
25
|
-
...deps ?? []
|
|
26
|
-
]);
|
|
27
|
-
};
|
|
28
|
-
var invokeFunctionWithTracing = (functionDef, inputData) => Effect.gen(function* () {
|
|
29
|
-
const tracer = yield* TracingService;
|
|
30
|
-
const trace = yield* tracer.traceInvocationStart({
|
|
31
|
-
target: void 0,
|
|
32
|
-
payload: {
|
|
33
|
-
data: {}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
const result = yield* FunctionInvocationService.invokeFunction(functionDef, inputData).pipe(Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop), Effect.exit);
|
|
37
|
-
if (Exit.isFailure(result)) {
|
|
38
|
-
const error = Cause.prettyErrors(result.cause)[0];
|
|
39
|
-
log.error(error.message, error.cause ?? error.stack, {
|
|
40
|
-
F: __dxlog_file,
|
|
41
|
-
L: 57,
|
|
42
|
-
S: this,
|
|
43
|
-
C: (f, a) => f(...a)
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
yield* tracer.traceInvocationEnd({
|
|
47
|
-
trace,
|
|
48
|
-
// TODO(dmaretskyi): Might miss errors.
|
|
49
|
-
exception: Exit.isFailure(result) ? Cause.prettyErrors(result.cause)[0] : void 0
|
|
50
|
-
});
|
|
51
|
-
return result;
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// src/hooks/useTriggerRuntimeControls.ts
|
|
55
|
-
import { Atom, useAtomValue } from "@effect-atom/atom-react";
|
|
56
|
-
import * as Effect2 from "effect/Effect";
|
|
57
|
-
import { useEffect, useState } from "react";
|
|
58
|
-
import { Filter } from "@dxos/echo";
|
|
59
|
-
import { Trigger } from "@dxos/functions";
|
|
60
|
-
import { TriggerDispatcher } from "@dxos/functions-runtime";
|
|
61
|
-
import { useQuery } from "@dxos/react-client/echo";
|
|
62
|
-
var useTriggerRuntimeControls = (db) => {
|
|
63
|
-
const triggers = useQuery(db, Filter.type(Trigger.Trigger));
|
|
64
|
-
const [dispatcher, setDispatcher] = useState(void 0);
|
|
65
|
-
const init = useComputeRuntimeCallback(db?.spaceId, Effect2.fnUntraced(function* () {
|
|
66
|
-
const dispatcher2 = yield* TriggerDispatcher;
|
|
67
|
-
setDispatcher(dispatcher2);
|
|
68
|
-
}));
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
void init();
|
|
71
|
-
}, []);
|
|
72
|
-
const state = useAtomValue(dispatcher?.state ?? Atom.make(void 0));
|
|
73
|
-
const start = useComputeRuntimeCallback(db?.spaceId, Effect2.fnUntraced(function* () {
|
|
74
|
-
const dispatcher2 = yield* TriggerDispatcher;
|
|
75
|
-
yield* dispatcher2.start();
|
|
76
|
-
}));
|
|
77
|
-
const stop = useComputeRuntimeCallback(db?.spaceId, Effect2.fnUntraced(function* () {
|
|
78
|
-
const dispatcher2 = yield* TriggerDispatcher;
|
|
79
|
-
yield* dispatcher2.stop();
|
|
80
|
-
}));
|
|
81
|
-
return {
|
|
82
|
-
triggers,
|
|
83
|
-
state,
|
|
84
|
-
start: () => void start(),
|
|
85
|
-
stop: () => void stop()
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
useComputeRuntimeCallback,
|
|
91
|
-
invokeFunctionWithTracing,
|
|
92
|
-
useTriggerRuntimeControls
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=chunk-QNPYY3XZ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useComputeRuntimeCallback.ts", "../../../src/hooks/useTriggerRuntimeControls.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Cause from 'effect/Cause';\nimport * as Effect from 'effect/Effect';\nimport * as Exit from 'effect/Exit';\nimport { type DependencyList, useCallback } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type Key } from '@dxos/echo';\nimport { type FunctionDefinition, FunctionInvocationService, TracingService } from '@dxos/functions';\nimport { log } from '@dxos/log';\n\nimport { AutomationCapabilities } from '../types';\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 id: Key.SpaceId | undefined,\n fn: () => Effect.Effect<T, any, AutomationCapabilities.ComputeServices>,\n deps?: DependencyList,\n): (() => Promise<T>) => {\n const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);\n const runtime = id !== undefined ? computeRuntime.getRuntime(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// TODO(wittjosiah): Function invoking should automatically be traced (DX-647).\nexport const invokeFunctionWithTracing = <I, O>(functionDef: FunctionDefinition<I, O>, inputData: I) =>\n Effect.gen(function* () {\n const tracer = yield* TracingService;\n const trace = yield* tracer.traceInvocationStart({\n target: undefined,\n payload: {\n data: {},\n },\n });\n\n // Invoke the function.\n const result = yield* FunctionInvocationService.invokeFunction(functionDef, inputData).pipe(\n Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop),\n Effect.exit,\n );\n\n if (Exit.isFailure(result)) {\n const error = Cause.prettyErrors(result.cause)[0];\n log.error(error.message, error.cause ?? error.stack);\n }\n\n yield* tracer.traceInvocationEnd({\n trace,\n // TODO(dmaretskyi): Might miss errors.\n exception: Exit.isFailure(result) ? Cause.prettyErrors(result.cause)[0] : undefined,\n });\n\n return result;\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom, useAtomValue } from '@effect-atom/atom-react';\nimport type * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport { useEffect, useState } from 'react';\n\nimport { type Database, Filter } from '@dxos/echo';\nimport { Trigger } from '@dxos/functions';\nimport { TriggerDispatcher, type TriggerDispatcherState } from '@dxos/functions-runtime';\nimport { useQuery } from '@dxos/react-client/echo';\n\nimport { useComputeRuntimeCallback } from './useComputeRuntimeCallback';\n\ninterface TriggerRuntimeControls {\n triggers: Trigger.Trigger[];\n\n state: TriggerDispatcherState | undefined;\n\n start: () => void;\n stop: () => void;\n}\n\nexport const useTriggerRuntimeControls = (db: Database.Database | undefined): TriggerRuntimeControls => {\n const triggers = useQuery(db, Filter.type(Trigger.Trigger));\n\n const [dispatcher, setDispatcher] = useState<Context.Tag.Service<TriggerDispatcher> | undefined>(undefined);\n\n const init = useComputeRuntimeCallback(\n db?.spaceId,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n setDispatcher(dispatcher);\n }),\n );\n\n useEffect(() => {\n void init();\n }, []);\n\n const state = useAtomValue(dispatcher?.state ?? Atom.make(undefined));\n\n const start = useComputeRuntimeCallback(\n db?.spaceId,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.start();\n }),\n );\n\n const stop = useComputeRuntimeCallback(\n db?.spaceId,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.stop();\n }),\n );\n\n return {\n triggers,\n state,\n start: () => void start(),\n stop: () => void stop(),\n };\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,WAAW;AACvB,YAAYC,YAAY;AACxB,YAAYC,UAAU;AACtB,SAA8BC,mBAAmB;AAEjD,SAASC,qBAAqB;AAE9B,SAAkCC,2BAA2BC,sBAAsB;AACnF,SAASC,WAAW;;AAQb,IAAMC,4BAA4B,CACvCC,IACAC,IACAC,SAAAA;AAEA,QAAMC,iBAAiBC,cAAcC,uBAAuBC,cAAc;AAC1E,QAAMC,UAAUP,OAAOQ,SAAYL,eAAeM,WAAWT,EAAAA,IAAMQ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AChB,UAAMP,cAAa,OAAOQ;AAC1BP,kBAAcD,WAAAA;EAChB,CAAA,CAAA;AAGFS,YAAU,MAAA;AACR,SAAKL,KAAAA;EACP,GAAG,CAAA,CAAE;AAEL,QAAMM,QAAQC,aAAaX,YAAYU,SAASE,KAAKC,KAAKV,MAAAA,CAAAA;AAE1D,QAAMW,QAAQT,0BACZX,IAAIY,SACGC,mBAAW,aAAA;AAChB,UAAMP,cAAa,OAAOQ;AAC1B,WAAOR,YAAWc,MAAK;EACzB,CAAA,CAAA;AAGF,QAAMC,OAAOV,0BACXX,IAAIY,SACGC,mBAAW,aAAA;AAChB,UAAMP,cAAa,OAAOQ;AAC1B,WAAOR,YAAWe,KAAI;EACxB,CAAA,CAAA;AAGF,SAAO;IACLpB;IACAe;IACAI,OAAO,MAAM,KAAKA,MAAAA;IAClBC,MAAM,MAAM,KAAKA,KAAAA;EACnB;AACF;",
|
|
6
|
-
"names": ["Cause", "Effect", "Exit", "useCallback", "useCapability", "FunctionInvocationService", "TracingService", "log", "useComputeRuntimeCallback", "id", "fn", "deps", "computeRuntime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "runtime", "undefined", "getRuntime", "useCallback", "TypeError", "runPromise", "invokeFunctionWithTracing", "functionDef", "inputData", "gen", "tracer", "TracingService", "trace", "traceInvocationStart", "target", "payload", "data", "result", "FunctionInvocationService", "invokeFunction", "pipe", "provide", "invocationTraceQueue", "layerInvocation", "layerNoop", "exit", "isFailure", "error", "prettyErrors", "cause", "log", "message", "stack", "traceInvocationEnd", "exception", "Atom", "useAtomValue", "Effect", "useEffect", "useState", "Filter", "Trigger", "TriggerDispatcher", "useQuery", "useTriggerRuntimeControls", "db", "triggers", "useQuery", "Filter", "type", "Trigger", "dispatcher", "setDispatcher", "useState", "undefined", "init", "useComputeRuntimeCallback", "spaceId", "fnUntraced", "TriggerDispatcher", "useEffect", "state", "useAtomValue", "Atom", "make", "start", "stop"]
|
|
7
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-5FXNN3MV.mjs";
|
|
5
|
-
|
|
6
|
-
// src/components/FunctionsRegistry/FunctionsRegistry.tsx
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
8
|
-
import { useState } from "react";
|
|
9
|
-
import React, { useCallback } from "react";
|
|
10
|
-
import { Function } from "@dxos/functions";
|
|
11
|
-
import { getDeployedFunctions } from "@dxos/functions-runtime/edge";
|
|
12
|
-
import { useClient } from "@dxos/react-client";
|
|
13
|
-
import { Filter, Query, useQuery } from "@dxos/react-client/echo";
|
|
14
|
-
import { IconButton, useAsyncEffect, useTranslation } from "@dxos/react-ui";
|
|
15
|
-
import { Settings } from "@dxos/react-ui-form";
|
|
16
|
-
import { List } from "@dxos/react-ui-list";
|
|
17
|
-
import { ghostHover, mx } from "@dxos/ui-theme";
|
|
18
|
-
var grid = "grid grid-cols-[1fr_1fr_auto] min-h-[2.5rem]";
|
|
19
|
-
var FunctionsRegistry = ({ space }) => {
|
|
20
|
-
const client = useClient();
|
|
21
|
-
const [loading, setLoading] = useState(true);
|
|
22
|
-
const [functions, setFunctions] = useState([]);
|
|
23
|
-
const { t } = useTranslation(meta.id);
|
|
24
|
-
const dbFunctions = useQuery(space.db, Filter.type(Function.Function));
|
|
25
|
-
const state = (func) => {
|
|
26
|
-
const dbFunction = dbFunctions.find((f) => f.key === func.key);
|
|
27
|
-
if (!dbFunction) {
|
|
28
|
-
return "import";
|
|
29
|
-
}
|
|
30
|
-
if (dbFunction.version === func.version && dbFunction.updated === func.updated) {
|
|
31
|
-
return "none";
|
|
32
|
-
}
|
|
33
|
-
return "update";
|
|
34
|
-
};
|
|
35
|
-
useAsyncEffect(async () => {
|
|
36
|
-
setLoading(true);
|
|
37
|
-
const functions2 = await getDeployedFunctions(client, true);
|
|
38
|
-
setFunctions(functions2);
|
|
39
|
-
setLoading(false);
|
|
40
|
-
}, []);
|
|
41
|
-
const hanleImportOrUpdate = useCallback(async (func) => {
|
|
42
|
-
const functions2 = await space.db.query(Query.type(Function.Function, {
|
|
43
|
-
key: func.key
|
|
44
|
-
})).run();
|
|
45
|
-
const [existingFunc] = functions2;
|
|
46
|
-
if (!existingFunc) {
|
|
47
|
-
space.db.add(func);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
Function.setFrom(existingFunc, func);
|
|
51
|
-
}, [
|
|
52
|
-
space
|
|
53
|
-
]);
|
|
54
|
-
return /* @__PURE__ */ React.createElement(Settings.Container, null, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
|
|
55
|
-
items: functions,
|
|
56
|
-
isItem: Schema.is(Function.Function),
|
|
57
|
-
getId: (func) => func.id
|
|
58
|
-
}, ({ items }) => /* @__PURE__ */ React.createElement("div", {
|
|
59
|
-
role: "list",
|
|
60
|
-
className: "flex flex-col w-full"
|
|
61
|
-
}, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
|
|
62
|
-
key: func.id,
|
|
63
|
-
item: func,
|
|
64
|
-
classNames: mx(grid, ghostHover, "items-center", "px-2", "min-h-[3rem]")
|
|
65
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
66
|
-
className: "flex flex-col truncate"
|
|
67
|
-
}, /* @__PURE__ */ React.createElement(List.ItemTitle, {
|
|
68
|
-
classNames: "truncate"
|
|
69
|
-
}, func.name), /* @__PURE__ */ React.createElement("div", {
|
|
70
|
-
className: "text-xs text-description truncate"
|
|
71
|
-
}, func.key)), /* @__PURE__ */ React.createElement("div", {
|
|
72
|
-
className: "flex flex-col truncate"
|
|
73
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
74
|
-
className: "text-xs text-description truncate"
|
|
75
|
-
}, func.version), /* @__PURE__ */ React.createElement("div", {
|
|
76
|
-
className: "text-xs text-description truncate"
|
|
77
|
-
}, func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : "")), /* @__PURE__ */ React.createElement(IconButton, {
|
|
78
|
-
iconOnly: true,
|
|
79
|
-
icon: state(func) === "update" ? "ph--arrows-clockwise--regular" : "ph--download--regular",
|
|
80
|
-
label: state(func) === "update" ? t("update function button label") : t("import function button label"),
|
|
81
|
-
disabled: state(func) === "none",
|
|
82
|
-
onClick: () => hanleImportOrUpdate(func)
|
|
83
|
-
}))))), functions.length === 0 && !loading && /* @__PURE__ */ React.createElement("div", {
|
|
84
|
-
className: "text-center py-4 text-gray-500"
|
|
85
|
-
}, t("no functions found")), loading && /* @__PURE__ */ React.createElement("div", {
|
|
86
|
-
className: "text-center py-4 text-gray-500"
|
|
87
|
-
}, t("loading functions")));
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// src/components/FunctionsRegistry/index.ts
|
|
91
|
-
var FunctionsRegistry_default = FunctionsRegistry;
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
FunctionsRegistry,
|
|
95
|
-
FunctionsRegistry_default
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=chunk-RTEXGGBX.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/FunctionsRegistry/FunctionsRegistry.tsx", "../../../src/components/FunctionsRegistry/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport { useState } from 'react';\nimport React, { useCallback } from 'react';\n\nimport { Function } from '@dxos/functions';\nimport { getDeployedFunctions } from '@dxos/functions-runtime/edge';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, Query, type Space, useQuery } from '@dxos/react-client/echo';\nimport { IconButton, useAsyncEffect, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_1fr_auto] min-h-[2.5rem]';\n\ntype FunctionsRegistryProps = {\n space: Space;\n};\n\nexport const FunctionsRegistry = ({ space }: FunctionsRegistryProps) => {\n const client = useClient();\n const [loading, setLoading] = useState(true);\n const [functions, setFunctions] = useState<Function.Function[]>([]);\n const { t } = useTranslation(meta.id);\n\n const dbFunctions = useQuery(space.db, Filter.type(Function.Function));\n\n const state = (func: Function.Function) => {\n const dbFunction = dbFunctions.find((f) => f.key === func.key);\n if (!dbFunction) {\n return 'import';\n }\n if (dbFunction.version === func.version && dbFunction.updated === func.updated) {\n return 'none';\n }\n return 'update';\n };\n\n useAsyncEffect(async () => {\n setLoading(true);\n const functions = await getDeployedFunctions(client, true);\n setFunctions(functions);\n setLoading(false);\n }, []);\n\n const hanleImportOrUpdate = useCallback(\n async (func: Function.Function) => {\n const functions = await space.db.query(Query.type(Function.Function, { key: func.key })).run();\n const [existingFunc] = functions;\n if (!existingFunc) {\n space.db.add(func);\n return;\n }\n Function.setFrom(existingFunc, func);\n },\n [space],\n );\n\n return (\n <Settings.Container>\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', 'px-2', 'min-h-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n <div className='text-xs text-description truncate'>{func.key}</div>\n </div>\n <div className='flex flex-col truncate'>\n <div className='text-xs text-description truncate'>{func.version}</div>\n <div className='text-xs text-description truncate'>\n {func.updated ? `Uploaded ${new Date(func.updated).toLocaleString()}` : ''}\n </div>\n </div>\n\n <IconButton\n iconOnly\n icon={state(func) === 'update' ? 'ph--arrows-clockwise--regular' : 'ph--download--regular'}\n label={\n state(func) === 'update' ? t('update function button label') : t('import function button label')\n }\n disabled={state(func) === 'none'}\n onClick={() => hanleImportOrUpdate(func)}\n />\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {functions.length === 0 && !loading && (\n <div className='text-center py-4 text-gray-500'>{t('no functions found')}</div>\n )}\n {loading && <div className='text-center py-4 text-gray-500'>{t('loading functions')}</div>}\n </Settings.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsRegistry } from './FunctionsRegistry';\n\nexport { FunctionsRegistry };\nexport default FunctionsRegistry;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,SAASC,gBAAgB;AACzB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,gBAAgB;AACzB,SAASC,4BAA4B;AACrC,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,OAAmBC,gBAAgB;AACpD,SAASC,YAAYC,gBAAgBC,sBAAsB;AAC3D,SAASC,gBAAgB;AACzB,SAASC,YAAY;AACrB,SAASC,YAAYC,UAAU;AAI/B,IAAMC,OAAO;AAMN,IAAMC,oBAAoB,CAAC,EAAEC,MAAK,MAA0B;AACjE,QAAMC,SAASC,UAAAA;AACf,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAS,IAAA;AACvC,QAAM,CAACC,WAAWC,YAAAA,IAAgBF,SAA8B,CAAA,CAAE;AAClE,QAAM,EAAEG,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,QAAMC,cAAcC,SAASb,MAAMc,IAAIC,OAAOC,KAAKC,SAASA,QAAQ,CAAA;AAEpE,QAAMC,QAAQ,CAACC,SAAAA;AACb,UAAMC,aAAaR,YAAYS,KAAK,CAACC,MAAMA,EAAEC,QAAQJ,KAAKI,GAAG;AAC7D,QAAI,CAACH,YAAY;AACf,aAAO;IACT;AACA,QAAIA,WAAWI,YAAYL,KAAKK,WAAWJ,WAAWK,YAAYN,KAAKM,SAAS;AAC9E,aAAO;IACT;AACA,WAAO;EACT;AAEAC,iBAAe,YAAA;AACbtB,eAAW,IA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+B,KAAKrC,KAAKM,OAAO,EAAEgC,eAAc,CAAA,KAAO,EAAA,CAAA,GAI5E,sBAAA,cAACC,YAAAA;IACCC,UAAAA;IACAC,MAAM1C,MAAMC,IAAAA,MAAU,WAAW,kCAAkC;IACnE0C,OACE3C,MAAMC,IAAAA,MAAU,WAAWX,EAAE,8BAAA,IAAkCA,EAAE,8BAAA;IAEnEsD,UAAU5C,MAAMC,IAAAA,MAAU;IAC1B4C,SAAS,MAAMnC,oBAAoBT,IAAAA;UAShDb,UAAUgC,WAAW,KAAK,CAACnC,WAC1B,sBAAA,cAAC0C,OAAAA;IAAIE,WAAU;KAAkCvC,EAAE,oBAAA,CAAA,GAEpDL,WAAW,sBAAA,cAAC0C,OAAAA;IAAIE,WAAU;KAAkCvC,EAAE,mBAAA,CAAA,CAAA;AAGrE;;;ACtGA,IAAA,4BAAewD;",
|
|
6
|
-
"names": ["Schema", "useState", "React", "useCallback", "Function", "getDeployedFunctions", "useClient", "Filter", "Query", "useQuery", "IconButton", "useAsyncEffect", "useTranslation", "Settings", "List", "ghostHover", "mx", "grid", "FunctionsRegistry", "space", "client", "useClient", "loading", "setLoading", "useState", "functions", "setFunctions", "t", "useTranslation", "meta", "id", "dbFunctions", "useQuery", "db", "Filter", "type", "Function", "state", "func", "dbFunction", "find", "f", "key", "version", "updated", "useAsyncEffect", "getDeployedFunctions", "hanleImportOrUpdate", "useCallback", "query", "Query", "run", "existingFunc", "add", "setFrom", "Settings", "Container", "length", "List", "Root", "items", "isItem", "is", "getId", "div", "role", "className", "map", "Item", "item", "classNames", "mx", "ghostHover", "ItemTitle", "name", "Date", "toLocaleString", "IconButton", "iconOnly", "icon", "label", "disabled", "onClick", "FunctionsRegistry"]
|
|
7
|
-
}
|