@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
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/PLUGIN.mdl
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: org.dxos.plugin.automation
|
|
3
|
+
name: AutomationPlugin
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
A workflow automation engine plugin for DXOS Composer that enables event-driven
|
|
8
|
+
pipelines connecting ECHO objects to persistent compute functions.
|
|
9
|
+
|
|
10
|
+
Triggers listen for ECHO mutations, timer schedules, incoming feeds (email, webhook),
|
|
11
|
+
or data subscriptions and invoke `PersistentOperation` handlers when their conditions
|
|
12
|
+
fire. Each trigger carries optional structured input and is dispatched by a
|
|
13
|
+
per-space `TriggerDispatcher` that runs locally in the browser or is delegated to
|
|
14
|
+
the DXOS edge when the space `computeEnvironment` is `edge`.
|
|
15
|
+
|
|
16
|
+
The plugin integrates with the `@dxos/compute` operation registry and the
|
|
17
|
+
`@dxos/functions-runtime` execution layer. Blueprint, operation-handler, and
|
|
18
|
+
toolkit contributions from other plugins are gathered at application scope and
|
|
19
|
+
merged before being offered to space-level operation registries, so any plugin
|
|
20
|
+
that contributes a `Capabilities.OperationHandler` automatically becomes
|
|
21
|
+
invocable from an automation trigger.
|
|
22
|
+
|
|
23
|
+
Users interact with automations through the `AutomationPanel` settings surface,
|
|
24
|
+
which lists active triggers for a space (or for a specific ECHO object) and
|
|
25
|
+
opens the `TriggerEditor` form to create, configure, and enable/disable
|
|
26
|
+
individual triggers.
|
|
27
|
+
|
|
28
|
+
## Extensions
|
|
29
|
+
|
|
30
|
+
The following extension dialects are used in this document.
|
|
31
|
+
Each extension is defined in the Appendix or resolved via its URI.
|
|
32
|
+
|
|
33
|
+
| Term | URI |
|
|
34
|
+
|-------------|-------------------------------|
|
|
35
|
+
| `type` | `org.dxos.mdl.type@1.0` |
|
|
36
|
+
| `feat` | `org.dxos.mdl.feat@1.0` |
|
|
37
|
+
| `test` | `org.dxos.mdl.test@1.0` |
|
|
38
|
+
| `component` | `org.dxos.mdl.component@1.0` |
|
|
39
|
+
| `op` | `org.dxos.mdl.op@1.0` |
|
|
40
|
+
|
|
41
|
+
## Types
|
|
42
|
+
|
|
43
|
+
Existing types used by this plugin (defined in `@dxos/compute` and `@dxos/functions-runtime`):
|
|
44
|
+
|
|
45
|
+
| Type | Source | Role in AutomationPlugin |
|
|
46
|
+
|----------------------|---------------------------|--------------------------------------------------------------------|
|
|
47
|
+
| `Trigger` | `@dxos/compute` | Persistent trigger configuration (spec, function ref, input, enabled) |
|
|
48
|
+
| `PersistentOperation`| `@dxos/compute` | Registered compute function callable from a trigger |
|
|
49
|
+
| `Trace.Message` | `@dxos/compute` | Execution trace record appended after each trigger run |
|
|
50
|
+
| `Script` | `@dxos/compute` | Source script that produces one or more `PersistentOperation`s |
|
|
51
|
+
| `Feed` | `@dxos/echo` | Feed object that a `feed`-spec trigger listens to |
|
|
52
|
+
| `ComputeGraph` | `@dxos/conductor` | Visual workflow graph selectable as a trigger function |
|
|
53
|
+
|
|
54
|
+
New types defined by this plugin:
|
|
55
|
+
|
|
56
|
+
```mdl
|
|
57
|
+
type TriggerTemplate
|
|
58
|
+
desc: |
|
|
59
|
+
Lightweight description of a trigger's spec used when creating a trigger
|
|
60
|
+
from a pre-defined template (e.g. from a Blueprint action).
|
|
61
|
+
literals: timer | feed
|
|
62
|
+
fields:
|
|
63
|
+
type: timer | feed
|
|
64
|
+
cron?: string # required when type === timer; cron expression
|
|
65
|
+
feed?: Feed # required when type === feed; the feed to subscribe to
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Components
|
|
69
|
+
|
|
70
|
+
```mdl
|
|
71
|
+
component AutomationPanel
|
|
72
|
+
desc: |
|
|
73
|
+
Settings surface that lists all triggers for a space (or filtered to a
|
|
74
|
+
specific ECHO object) and provides inline create / edit / delete via the
|
|
75
|
+
TriggerEditor form. Displayed inside Settings.Panel at the path
|
|
76
|
+
`<spacePath>/settings/org.dxos.plugin.automation.automations`.
|
|
77
|
+
props:
|
|
78
|
+
space: Space
|
|
79
|
+
object?: Obj.Unknown # when set, only triggers matching this object are shown
|
|
80
|
+
initialTrigger?: Trigger # pre-populate TriggerEditor for a new trigger
|
|
81
|
+
onDone?: () => void
|
|
82
|
+
state:
|
|
83
|
+
trigger?: Trigger # trigger currently open in TriggerEditor (undefined = list view)
|
|
84
|
+
selected?: Trigger # the existing trigger being edited (undefined = new)
|
|
85
|
+
slots:
|
|
86
|
+
(none)
|
|
87
|
+
actions:
|
|
88
|
+
handleAdd() # open TriggerEditor with a blank Trigger
|
|
89
|
+
handleSelect(t: Trigger) # open TriggerEditor for an existing trigger
|
|
90
|
+
handleDelete(t: Trigger) # remove trigger from space.db
|
|
91
|
+
handleSave(t: Trigger) # persist new or update selected trigger
|
|
92
|
+
handleCancel()
|
|
93
|
+
handleForceRunTrigger(t: Trigger) # invoke timer trigger immediately
|
|
94
|
+
handleResetCursor(t: Trigger) # clear feed cursor on a feed trigger
|
|
95
|
+
layout: |
|
|
96
|
+
┌──────────────────────────────────┐
|
|
97
|
+
│ [list view — triggers exist] │
|
|
98
|
+
│ ┌────────────────────────────┐ │
|
|
99
|
+
│ │ ○ fn-name [▶] [✕] │ │
|
|
100
|
+
│ │ ● fn-name [↺] [✕] │ │
|
|
101
|
+
│ └────────────────────────────┘ │
|
|
102
|
+
│ ───────────────────────────── │
|
|
103
|
+
│ [+ New Trigger] │
|
|
104
|
+
├──────────────────────────────────┤
|
|
105
|
+
│ [editor view — trigger selected] │
|
|
106
|
+
│ Settings.Item │
|
|
107
|
+
│ └── TriggerEditor │
|
|
108
|
+
└──────────────────────────────────┘
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```mdl
|
|
112
|
+
component TriggerEditor
|
|
113
|
+
desc: |
|
|
114
|
+
Form-driven editor for a single Trigger. Renders a Form.Root backed by the
|
|
115
|
+
Trigger schema with custom field overrides for function/workflow selection,
|
|
116
|
+
spec kind selector, feed selector, subscription query builder, and
|
|
117
|
+
structured input editor.
|
|
118
|
+
props:
|
|
119
|
+
db: Database
|
|
120
|
+
trigger: Trigger
|
|
121
|
+
types: TypeOption[] # available ECHO types for query builder
|
|
122
|
+
tags: Tag[] # available tags for query builder
|
|
123
|
+
readonlySpec?: boolean # lock spec.kind and spec.query (e.g. editing from an object context)
|
|
124
|
+
onSave: (t: Partial<Trigger>) => void
|
|
125
|
+
onCancel: () => void
|
|
126
|
+
state:
|
|
127
|
+
(managed by Form.Root)
|
|
128
|
+
slots:
|
|
129
|
+
(none)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```mdl
|
|
133
|
+
component FunctionsPanel
|
|
134
|
+
desc: |
|
|
135
|
+
Settings surface listing all PersistentOperation objects in a space.
|
|
136
|
+
Each row shows the function name, optional source script name, a
|
|
137
|
+
"go to script" icon button, and a delete button.
|
|
138
|
+
props:
|
|
139
|
+
space: Space
|
|
140
|
+
state:
|
|
141
|
+
functions: PersistentOperation[]
|
|
142
|
+
scripts: Script[]
|
|
143
|
+
slots:
|
|
144
|
+
(none)
|
|
145
|
+
actions:
|
|
146
|
+
handleGoToScript(fn: PersistentOperation) # navigate to source Script
|
|
147
|
+
handleDelete(fn: PersistentOperation) # remove function via SpaceOperation
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Operations
|
|
151
|
+
|
|
152
|
+
```mdl
|
|
153
|
+
op CreateTriggerFromTemplate
|
|
154
|
+
desc: |
|
|
155
|
+
Creates a new Trigger from a lightweight template, optionally wiring it to
|
|
156
|
+
a named Script's PersistentOperation, and navigates to the automations
|
|
157
|
+
settings panel for the target space.
|
|
158
|
+
input:
|
|
159
|
+
db: Database
|
|
160
|
+
template: TriggerTemplate
|
|
161
|
+
enabled?: boolean # default false
|
|
162
|
+
scriptName?: string # if provided, looks up Script by name and wires function ref
|
|
163
|
+
input?: Record<string, any> # optional structured input forwarded to the trigger
|
|
164
|
+
output: void
|
|
165
|
+
effects: [echo:write, layout:navigate]
|
|
166
|
+
requires: [SpaceOperation.AddObject, LayoutOperation.Open]
|
|
167
|
+
note: |
|
|
168
|
+
Resolves the named Script, finds its linked PersistentOperation, and sets
|
|
169
|
+
trigger.function = Ref.make(fn). Template type determines spec:
|
|
170
|
+
timer → Trigger.specTimer(cron)
|
|
171
|
+
feed → Trigger.specFeed(feed)
|
|
172
|
+
Trigger is added as a hidden object so it does not appear in the main graph.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Features
|
|
176
|
+
|
|
177
|
+
```mdl
|
|
178
|
+
feat F-1: Trigger Management
|
|
179
|
+
|
|
180
|
+
req F-1.1: User can create a Trigger in any space via AutomationPanel.
|
|
181
|
+
req F-1.2: User can edit an existing Trigger's function, spec, and input.
|
|
182
|
+
req F-1.3: User can delete a Trigger; it is removed from space.db.
|
|
183
|
+
req F-1.4: User can enable or disable a Trigger via an inline toggle.
|
|
184
|
+
req F-1.5:
|
|
185
|
+
when: object context provided to AutomationPanel
|
|
186
|
+
then: only triggers matching that object's type or query are shown
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```mdl
|
|
190
|
+
feat F-2: Trigger Dispatch
|
|
191
|
+
|
|
192
|
+
req F-2.1:
|
|
193
|
+
when: space.properties.computeEnvironment === "local"
|
|
194
|
+
then: TriggerDispatcher starts for that space
|
|
195
|
+
|
|
196
|
+
req F-2.2:
|
|
197
|
+
when: space.properties.computeEnvironment === "edge" or "disabled"
|
|
198
|
+
then: TriggerDispatcher stops for that space
|
|
199
|
+
|
|
200
|
+
req F-2.3:
|
|
201
|
+
when: computeEnvironment changes
|
|
202
|
+
then: any in-flight dispatcher transition is cancelled before the new one starts
|
|
203
|
+
|
|
204
|
+
req F-2.4:
|
|
205
|
+
when: trigger spec.kind === "timer" and enabled === true
|
|
206
|
+
then: TriggerDispatcher fires trigger according to cron expression
|
|
207
|
+
|
|
208
|
+
req F-2.5:
|
|
209
|
+
when: trigger spec.kind === "feed"
|
|
210
|
+
then: TriggerDispatcher processes new messages from the linked Feed
|
|
211
|
+
|
|
212
|
+
req F-2.6:
|
|
213
|
+
when: trigger spec.kind === "subscription"
|
|
214
|
+
then: TriggerDispatcher invokes trigger on matching ECHO object mutations
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
```mdl
|
|
218
|
+
feat F-3: Force Run and Cursor Reset
|
|
219
|
+
|
|
220
|
+
req F-3.1:
|
|
221
|
+
when: timer trigger is enabled and computeEnvironment !== "disabled"
|
|
222
|
+
then: user can force-run the trigger immediately from AutomationPanel
|
|
223
|
+
|
|
224
|
+
req F-3.2:
|
|
225
|
+
when: computeEnvironment === "local"
|
|
226
|
+
then: force-run invokes TriggerDispatcher.invokeTrigger directly in-process
|
|
227
|
+
|
|
228
|
+
req F-3.3:
|
|
229
|
+
when: computeEnvironment === "edge"
|
|
230
|
+
then: force-run calls FunctionsServiceClient.forceRunCronTrigger via HTTP
|
|
231
|
+
|
|
232
|
+
req F-3.4:
|
|
233
|
+
when: trigger spec.kind === "feed" and a cursor is stored
|
|
234
|
+
then: user can reset the cursor to reprocess the feed from the beginning
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
```mdl
|
|
238
|
+
feat F-4: Operation Registry
|
|
239
|
+
|
|
240
|
+
req F-4.1:
|
|
241
|
+
when: plugin activates
|
|
242
|
+
then: all Capabilities.OperationHandler contributions are merged into a single OperationHandlerProvider
|
|
243
|
+
|
|
244
|
+
req F-4.2: OperationRegistry per space resolves operations from the merged OperationHandlerProvider.
|
|
245
|
+
req F-4.3: Blueprint registry is populated from AppCapabilities.BlueprintDefinition contributions.
|
|
246
|
+
req F-4.4: OpaqueToolkit aggregates AppCapabilities.Toolkit contributions for agent invocation.
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
```mdl
|
|
250
|
+
feat F-5: Trace Sink
|
|
251
|
+
|
|
252
|
+
req F-5.1:
|
|
253
|
+
when: a trigger executes
|
|
254
|
+
then: execution trace messages are written to the space Feed via FeedTraceSink
|
|
255
|
+
|
|
256
|
+
req F-5.2: FeedTraceSink is contributed to Capabilities.TraceSink and routed via makeRoutingSink.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
```mdl
|
|
260
|
+
feat F-6: Create Trigger From Template
|
|
261
|
+
|
|
262
|
+
req F-6.1:
|
|
263
|
+
when: op:CreateTriggerFromTemplate is invoked
|
|
264
|
+
then: a Trigger is created and added as a hidden ECHO object in the target space
|
|
265
|
+
|
|
266
|
+
req F-6.2:
|
|
267
|
+
when: scriptName is provided
|
|
268
|
+
then: the Trigger.function is wired to the PersistentOperation linked to that Script
|
|
269
|
+
|
|
270
|
+
req F-6.3:
|
|
271
|
+
when: template.type === "timer"
|
|
272
|
+
then: Trigger.spec is set via Trigger.specTimer(template.cron)
|
|
273
|
+
|
|
274
|
+
req F-6.4:
|
|
275
|
+
when: template.type === "feed"
|
|
276
|
+
then: Trigger.spec is set via Trigger.specFeed(template.feed)
|
|
277
|
+
|
|
278
|
+
req F-6.5:
|
|
279
|
+
when: trigger is created
|
|
280
|
+
then: layout navigates to the automations settings panel for the space
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Acceptance
|
|
284
|
+
|
|
285
|
+
```mdl
|
|
286
|
+
test T-1: Create trigger via AutomationPanel
|
|
287
|
+
given: AutomationPanel rendered for a space with no triggers
|
|
288
|
+
when: user clicks "New Trigger"
|
|
289
|
+
then:
|
|
290
|
+
- TriggerEditor shown with a blank Trigger
|
|
291
|
+
- selected state is undefined (new trigger mode)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
```mdl
|
|
295
|
+
test T-2: Save new trigger
|
|
296
|
+
given: TriggerEditor open with blank Trigger
|
|
297
|
+
when: user fills in a function and spec, then saves
|
|
298
|
+
then:
|
|
299
|
+
- space.db.add called with a new Trigger
|
|
300
|
+
- list view restored
|
|
301
|
+
- onDone called
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
```mdl
|
|
305
|
+
test T-3: Edit existing trigger
|
|
306
|
+
given: AutomationPanel listing one trigger
|
|
307
|
+
when: user clicks the trigger row
|
|
308
|
+
then:
|
|
309
|
+
- TriggerEditor opens pre-populated with that trigger's values
|
|
310
|
+
- selected state holds the original trigger
|
|
311
|
+
- saving calls Obj.update on the original trigger
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
```mdl
|
|
315
|
+
test T-4: Enable/disable toggle
|
|
316
|
+
given: AutomationPanel showing trigger with enabled = false
|
|
317
|
+
when: user flips the toggle
|
|
318
|
+
then:
|
|
319
|
+
- Obj.update sets trigger.enabled = true
|
|
320
|
+
- toggle reflects new state immediately
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
```mdl
|
|
324
|
+
test T-5: Force run timer trigger (local)
|
|
325
|
+
given: timer trigger enabled, computeEnvironment = "local"
|
|
326
|
+
when: user clicks the force-run button
|
|
327
|
+
then:
|
|
328
|
+
- TriggerDispatcher.invokeTrigger called with a TimerEvent
|
|
329
|
+
- no error surfaced to user
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
```mdl
|
|
333
|
+
test T-6: Dispatcher lifecycle on environment change
|
|
334
|
+
given: space computeEnvironment = "local", dispatcher running
|
|
335
|
+
when: space.properties.computeEnvironment changes to "edge"
|
|
336
|
+
then:
|
|
337
|
+
- in-flight transition fiber interrupted
|
|
338
|
+
- TriggerDispatcher.stop() called for that space
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
```mdl
|
|
342
|
+
test T-7: CreateTriggerFromTemplate with timer
|
|
343
|
+
given: db contains Script "daily-summary", computeEnvironment = "local"
|
|
344
|
+
when: op:CreateTriggerFromTemplate invoked with template={type:"timer",cron:"0 8 * * *"}, scriptName="daily-summary"
|
|
345
|
+
then:
|
|
346
|
+
- Trigger created with spec.kind === "timer", spec.cron === "0 8 * * *"
|
|
347
|
+
- Trigger.function wired to PersistentOperation linked to "daily-summary" script
|
|
348
|
+
- Trigger added as hidden ECHO object
|
|
349
|
+
- layout navigates to automations settings panel
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
```mdl
|
|
353
|
+
test T-8: CreateTriggerFromTemplate with feed
|
|
354
|
+
given: db contains a Feed object "email-feed"
|
|
355
|
+
when: op:CreateTriggerFromTemplate invoked with template={type:"feed",feed:<email-feed>}
|
|
356
|
+
then:
|
|
357
|
+
- Trigger created with spec.kind === "feed", spec.feed === Ref to email-feed
|
|
358
|
+
- Trigger added as hidden ECHO object
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Appendix: Extension Definitions
|
|
364
|
+
|
|
365
|
+
Extension block types used in this document are defined below using
|
|
366
|
+
the core `ext` primitive — the only construct the base language provides.
|
|
367
|
+
|
|
368
|
+
```mdl
|
|
369
|
+
ext type
|
|
370
|
+
uri: org.dxos.mdl.type@1.0
|
|
371
|
+
desc: A named data structure with typed fields and optional literals.
|
|
372
|
+
fields:
|
|
373
|
+
desc?: Prose
|
|
374
|
+
fields?: FieldMap # name[?]: TypeExpr (# inline comment)
|
|
375
|
+
literals?: UnionList # a | b | c
|
|
376
|
+
extends?: TypeRef[]
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
```mdl
|
|
380
|
+
ext feat
|
|
381
|
+
uri: org.dxos.mdl.feat@1.0
|
|
382
|
+
desc: A named feature grouping one or more requirements.
|
|
383
|
+
fields:
|
|
384
|
+
desc?: Prose
|
|
385
|
+
req: RequirementList
|
|
386
|
+
nesting: self # feat blocks may contain feat blocks
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
```mdl
|
|
390
|
+
ext test
|
|
391
|
+
uri: org.dxos.mdl.test@1.0
|
|
392
|
+
desc: An acceptance scenario expressed as given / when / then steps.
|
|
393
|
+
fields:
|
|
394
|
+
given?: Step | Step[]
|
|
395
|
+
when?: Step | Step[]
|
|
396
|
+
then: Step | Step[]
|
|
397
|
+
tags?: TagList
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
```mdl
|
|
401
|
+
ext component
|
|
402
|
+
uri: org.dxos.mdl.component@1.0
|
|
403
|
+
desc: A UI component with props, internal state, slots, actions, and events.
|
|
404
|
+
fields:
|
|
405
|
+
desc?: Prose
|
|
406
|
+
props?: FieldMap # external inputs (immutable inside component)
|
|
407
|
+
state?: FieldMap # internal reactive state
|
|
408
|
+
slots?: FieldMap # named ReactNode injection points
|
|
409
|
+
actions?: ActionMap # methods the component exposes or handles
|
|
410
|
+
emits?: EventMap # events the component raises to its parent
|
|
411
|
+
layout?: CodeBlock # ASCII sketch of visual structure (non-normative)
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```mdl
|
|
415
|
+
ext op
|
|
416
|
+
uri: org.dxos.mdl.op@1.0
|
|
417
|
+
desc: |
|
|
418
|
+
A named operation with typed inputs, outputs, and declared errors.
|
|
419
|
+
Pure ops have no effects or requires. Effectful ops declare both.
|
|
420
|
+
fields:
|
|
421
|
+
desc?: Prose
|
|
422
|
+
input?: FieldMap # named input parameters
|
|
423
|
+
output?: TypeExpr # return type
|
|
424
|
+
errors?: ErrorMap # name: Prose (when this error occurs)
|
|
425
|
+
effects?: EffectList # echo:read | echo:write | http | fs | ...
|
|
426
|
+
requires?: ServiceList # injected service dependencies
|
|
427
|
+
note?: Prose # implementation guidance (non-normative)
|
|
428
|
+
```
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ Automation plugin.
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutomationPanel,
|
|
3
|
+
AutomationPanel_default
|
|
4
|
+
} from "./chunk-C7H62AU3.mjs";
|
|
5
|
+
import "./chunk-CMM3AFHR.mjs";
|
|
6
|
+
import "./chunk-RCBE37YU.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
AutomationPanel,
|
|
10
|
+
AutomationPanel_default as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=AutomationPanel-OKF2MDLO.mjs.map
|