@dxos/plugin-automation 0.8.4-main.fffef41 → 0.9.0
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/AutomationArticle-GN36NUX2.mjs +17 -0
- package/dist/lib/neutral/AutomationCompanion-M26WR6VP.mjs +165 -0
- package/dist/lib/neutral/AutomationCompanion-M26WR6VP.mjs.map +7 -0
- package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
- package/dist/lib/neutral/AutomationPlugin.node.mjs +1132 -0
- package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs +36 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AutomationSettings-YXUJDRQA.mjs +27 -0
- package/dist/lib/neutral/AutomationSettings-YXUJDRQA.mjs.map +7 -0
- package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
- package/dist/lib/neutral/app-graph-builder-BTTHS4VK.mjs +102 -0
- package/dist/lib/neutral/app-graph-builder-BTTHS4VK.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +25 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +19 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-24JKY6NU.mjs +21 -0
- package/dist/lib/neutral/chunk-24JKY6NU.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-DUGOIM7G.mjs +36 -0
- package/dist/lib/neutral/chunk-DUGOIM7G.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FE7YFBX7.mjs +486 -0
- package/dist/lib/neutral/chunk-FE7YFBX7.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GARB7S5R.mjs +157 -0
- package/dist/lib/neutral/chunk-GARB7S5R.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HPUHQ3L6.mjs +64 -0
- package/dist/lib/neutral/chunk-HPUHQ3L6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-SONGOJRB.mjs +8 -0
- package/dist/lib/neutral/chunk-SONGOJRB.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +48 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-automation-OE3TNXYE.mjs +41 -0
- package/dist/lib/neutral/create-automation-OE3TNXYE.mjs.map +7 -0
- package/dist/lib/neutral/create-object-MEJOWGMH.mjs +25 -0
- package/dist/lib/neutral/create-object-MEJOWGMH.mjs.map +7 -0
- package/dist/lib/neutral/create-trigger-from-template-TERHKWJM.mjs +68 -0
- package/dist/lib/neutral/create-trigger-from-template-TERHKWJM.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +47 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +22 -0
- package/dist/lib/neutral/layer-specs-G6GCH7BE.mjs +137 -0
- package/dist/lib/neutral/layer-specs-G6GCH7BE.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/navigation-resolver-I3L5FHJO.mjs +14 -0
- package/dist/lib/neutral/navigation-resolver-I3L5FHJO.mjs.map +7 -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-IBRWUKPC.mjs +54 -0
- package/dist/lib/neutral/react-surface-IBRWUKPC.mjs.map +7 -0
- package/dist/lib/neutral/registry-sync-G6TKKZGK.mjs +86 -0
- package/dist/lib/neutral/registry-sync-G6TKKZGK.mjs.map +7 -0
- package/dist/lib/neutral/templates-ETXVD3VE.mjs +16 -0
- package/dist/lib/neutral/templates-ETXVD3VE.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/translations.mjs +64 -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 +18 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts +3 -1
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/AutomationPlugin.node.d.ts +4 -0
- package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
- package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
- package/dist/types/src/AutomationPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AutomationPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.test.d.ts +2 -0
- package/dist/types/src/capabilities/create-object.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +16 -5
- 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/navigation-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +9 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/registry-sync.d.ts +21 -0
- package/dist/types/src/capabilities/registry-sync.d.ts.map +1 -0
- package/dist/types/src/capabilities/templates.d.ts +6 -0
- package/dist/types/src/capabilities/templates.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 +2 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/index.d.ts +25 -0
- package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/queue.d.ts +13 -0
- package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/subscription.d.ts +15 -0
- package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/create/timer.d.ts +13 -0
- package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/index.d.ts +57 -0
- package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/list.d.ts +7 -0
- package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/options.d.ts +10 -0
- package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/remove.d.ts +8 -0
- package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/index.d.ts +28 -0
- package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts +11 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts +13 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts +11 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/util.d.ts +85 -0
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/components/CreateAutomationPanel/CreateAutomationPanel.d.ts +14 -0
- package/dist/types/src/components/CreateAutomationPanel/CreateAutomationPanel.d.ts.map +1 -0
- package/dist/types/src/components/CreateAutomationPanel/index.d.ts +2 -0
- package/dist/types/src/components/CreateAutomationPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationArticle/AutomationArticle.d.ts +35 -0
- package/dist/types/src/containers/AutomationArticle/AutomationArticle.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationArticle/index.d.ts +3 -0
- package/dist/types/src/containers/AutomationArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationCompanion/AutomationCompanion.d.ts +13 -0
- package/dist/types/src/containers/AutomationCompanion/AutomationCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/AutomationCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +10 -0
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts +2 -0
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +5 -4
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-automation.d.ts +5 -0
- package/dist/types/src/operations/create-automation.d.ts.map +1 -0
- 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/paths.d.ts +3 -0
- package/dist/types/src/paths.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/templates/index.d.ts +10 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +318 -3
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +90 -31
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Automation.d.ts +41 -0
- package/dist/types/src/types/Automation.d.ts.map +1 -0
- package/dist/types/src/types/Automation.test.d.ts +2 -0
- package/dist/types/src/types/Automation.test.d.ts.map +1 -0
- package/dist/types/src/types/AutomationCapabilities.d.ts +42 -0
- package/dist/types/src/types/AutomationCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AutomationOperation.d.ts +31 -0
- package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
- package/dist/types/src/types/Runnable.d.ts +14 -0
- package/dist/types/src/types/Runnable.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +13 -5
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/automations-for-object.d.ts +20 -0
- package/dist/types/src/util/automations-for-object.d.ts.map +1 -0
- package/dist/types/src/util/automations-for-object.test.d.ts +2 -0
- package/dist/types/src/util/automations-for-object.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +136 -71
- package/src/AutomationPlugin.node.ts +48 -0
- package/src/AutomationPlugin.test.ts +27 -0
- package/src/AutomationPlugin.tsx +47 -35
- package/src/AutomationPlugin.workerd.ts +24 -0
- package/src/capabilities/app-graph-builder.ts +81 -78
- package/src/capabilities/create-object.test.ts +18 -0
- package/src/capabilities/create-object.ts +26 -0
- package/src/capabilities/index.ts +17 -7
- package/src/capabilities/layer-specs.ts +196 -0
- package/src/capabilities/navigation-resolver.ts +19 -0
- package/src/capabilities/node.ts +19 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +45 -46
- package/src/capabilities/registry-sync.ts +114 -0
- package/src/capabilities/templates.ts +17 -0
- package/src/capabilities/trigger-runtime-controller.test.ts +107 -0
- package/src/capabilities/trigger-runtime-controller.ts +126 -0
- package/src/commands/index.ts +5 -0
- package/src/commands/trigger/create/index.ts +14 -0
- package/src/commands/trigger/create/queue.ts +87 -0
- package/src/commands/trigger/create/subscription.ts +126 -0
- package/src/commands/trigger/create/timer.ts +90 -0
- package/src/commands/trigger/index.ts +16 -0
- package/src/commands/trigger/list.ts +69 -0
- package/src/commands/trigger/options.ts +47 -0
- package/src/commands/trigger/remove.ts +45 -0
- package/src/commands/trigger/update/index.ts +14 -0
- package/src/commands/trigger/update/queue.ts +191 -0
- package/src/commands/trigger/update/subscription.ts +279 -0
- package/src/commands/trigger/update/timer.ts +195 -0
- package/src/commands/trigger/util.ts +410 -0
- package/src/components/CreateAutomationPanel/CreateAutomationPanel.tsx +68 -0
- package/src/components/CreateAutomationPanel/index.ts +5 -0
- package/src/components/index.ts +1 -8
- package/src/containers/AutomationArticle/AutomationArticle.tsx +586 -0
- package/src/containers/AutomationArticle/index.ts +6 -0
- package/src/containers/AutomationCompanion/AutomationCompanion.tsx +183 -0
- package/src/containers/AutomationCompanion/index.ts +6 -0
- package/src/containers/AutomationSettings/AutomationSettings.tsx +34 -0
- package/src/containers/AutomationSettings/index.ts +5 -0
- package/src/containers/TriggerSettings/TriggerSettings.tsx +48 -0
- package/src/containers/TriggerSettings/index.ts +6 -0
- package/src/containers/index.ts +10 -0
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useTriggerRuntimeControls.ts +38 -19
- package/src/index.ts +1 -6
- package/src/meta.ts +23 -7
- package/src/operations/create-automation.ts +38 -0
- package/src/operations/create-trigger-from-template.ts +70 -0
- package/src/operations/index.ts +10 -0
- package/src/paths.ts +13 -0
- package/src/plugin.ts +11 -0
- package/src/templates/index.ts +22 -0
- package/src/testing/test-functions.ts +43 -9
- package/src/testing.ts +7 -0
- package/src/translations.ts +49 -33
- package/src/types/Automation.test.ts +37 -0
- package/src/types/Automation.ts +45 -0
- package/src/types/AutomationCapabilities.ts +52 -0
- package/src/types/AutomationOperation.ts +61 -0
- package/src/types/Runnable.ts +14 -0
- package/src/types/index.ts +5 -0
- package/src/types/schema.ts +6 -6
- package/src/util/automations-for-object.test.ts +86 -0
- package/src/util/automations-for-object.ts +72 -0
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/AutomationPanel-7OECLR5N.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs +0 -68
- package/dist/lib/browser/AutomationSettings-KCZISXI6.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs +0 -151
- package/dist/lib/browser/FunctionsContainer-MIWEISRR.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-CRW6SJUN.mjs +0 -10
- package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs +0 -81
- package/dist/lib/browser/app-graph-builder-W7LLC6XW.mjs.map +0 -7
- package/dist/lib/browser/chunk-EPEXQP45.mjs +0 -14
- package/dist/lib/browser/chunk-EPEXQP45.mjs.map +0 -7
- package/dist/lib/browser/chunk-JW7XSPYW.mjs +0 -267
- package/dist/lib/browser/chunk-JW7XSPYW.mjs.map +0 -7
- package/dist/lib/browser/chunk-LZQFZO3B.mjs +0 -17
- package/dist/lib/browser/chunk-LZQFZO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-NAPXRXTY.mjs +0 -100
- package/dist/lib/browser/chunk-NAPXRXTY.mjs.map +0 -7
- package/dist/lib/browser/chunk-QKFBHAGN.mjs +0 -184
- package/dist/lib/browser/chunk-QKFBHAGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-TWWFNOIR.mjs +0 -109
- package/dist/lib/browser/chunk-TWWFNOIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-XAKZ4ANY.mjs +0 -15
- package/dist/lib/browser/chunk-XAKZ4ANY.mjs.map +0 -7
- package/dist/lib/browser/chunk-YBPJCY3F.mjs +0 -38
- package/dist/lib/browser/chunk-YBPJCY3F.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs +0 -113
- package/dist/lib/browser/compute-runtime-EIQTHJFZ.mjs.map +0 -7
- package/dist/lib/browser/hooks/index.mjs +0 -13
- package/dist/lib/browser/index.mjs +0 -130
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs +0 -77
- package/dist/lib/browser/intent-resolver-5HR7M7T6.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-YQW7WCFW.mjs +0 -64
- package/dist/lib/browser/react-surface-YQW7WCFW.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -8
- package/dist/lib/node-esm/AutomationPanel-HCVFNHGQ.mjs +0 -12
- package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs +0 -69
- package/dist/lib/node-esm/AutomationSettings-UUUPVNUJ.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs +0 -152
- package/dist/lib/node-esm/FunctionsContainer-6OB3JN5O.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-RVVCS6VH.mjs +0 -11
- package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs +0 -82
- package/dist/lib/node-esm/app-graph-builder-SLQOO7GH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6YRKST6M.mjs +0 -185
- package/dist/lib/node-esm/chunk-6YRKST6M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CEVIVRTY.mjs +0 -19
- package/dist/lib/node-esm/chunk-CEVIVRTY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CPP35BE6.mjs +0 -16
- package/dist/lib/node-esm/chunk-CPP35BE6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ECJKIUBO.mjs +0 -39
- package/dist/lib/node-esm/chunk-ECJKIUBO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KB7NFEYY.mjs +0 -16
- package/dist/lib/node-esm/chunk-KB7NFEYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PICJ2REN.mjs +0 -101
- package/dist/lib/node-esm/chunk-PICJ2REN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RVK52XGK.mjs +0 -110
- package/dist/lib/node-esm/chunk-RVK52XGK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W76WUTZY.mjs +0 -268
- package/dist/lib/node-esm/chunk-W76WUTZY.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-URROOC34.mjs +0 -114
- package/dist/lib/node-esm/compute-runtime-URROOC34.mjs.map +0 -7
- package/dist/lib/node-esm/hooks/index.mjs +0 -14
- package/dist/lib/node-esm/index.mjs +0 -131
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-KDRYB5BC.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-NNHYNBO6.mjs +0 -65
- package/dist/lib/node-esm/react-surface-NNHYNBO6.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -9
- package/dist/types/src/capabilities/capabilities.d.ts +0 -20
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +0 -13
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +0 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +0 -50
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +0 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts +0 -4
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/AutomationSettings.d.ts +0 -5
- package/dist/types/src/components/AutomationSettings.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsContainer.d.ts +0 -7
- package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts +0 -7
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsPanel/index.d.ts +0 -4
- package/dist/types/src/components/FunctionsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +0 -8
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsRegistry/index.d.ts +0 -2
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +0 -12
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +0 -5
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +0 -13
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +0 -51
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/index.d.ts +0 -2
- package/dist/types/src/components/TriggerEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TriggerSettings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +0 -12
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -41
- package/src/capabilities/compute-runtime.ts +0 -127
- package/src/capabilities/intent-resolver.ts +0 -72
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +0 -56
- package/src/components/AutomationPanel/AutomationPanel.tsx +0 -223
- package/src/components/AutomationPanel/index.ts +0 -9
- package/src/components/AutomationSettings.tsx +0 -30
- package/src/components/FunctionsContainer.tsx +0 -36
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +0 -116
- package/src/components/FunctionsPanel/index.ts +0 -8
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +0 -135
- package/src/components/FunctionsRegistry/index.ts +0 -5
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +0 -84
- package/src/components/TriggerEditor/SpecSelector.tsx +0 -65
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +0 -121
- package/src/components/TriggerEditor/TriggerEditor.tsx +0 -127
- package/src/components/TriggerEditor/index.ts +0 -5
- package/src/components/TriggerSettings.tsx +0 -25
- package/src/events.ts +0 -11
- package/src/hooks/useComputeRuntimeCallback.ts +0 -68
- /package/dist/lib/{browser/AutomationPanel-7OECLR5N.mjs.map → neutral/AutomationArticle-GN36NUX2.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-CRW6SJUN.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/hooks/index.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/hooks → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-HCVFNHGQ.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-RVVCS6VH.mjs.map → neutral/testing.mjs.map} +0 -0
- /package/dist/types/src/{components → containers/TriggerSettings}/TriggerSettings.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,103 +1,168 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
-
"
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": {
|
|
18
|
+
"node": "./src/capabilities/node.ts",
|
|
19
|
+
"default": "./src/capabilities/index.ts"
|
|
20
|
+
},
|
|
21
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
22
|
+
"node": "./dist/lib/neutral/capabilities/node.mjs",
|
|
23
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"#components": {
|
|
26
|
+
"source": "./src/components/index.ts",
|
|
27
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
28
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"#containers": {
|
|
31
|
+
"source": "./src/containers/index.ts",
|
|
32
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
33
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"#hooks": {
|
|
36
|
+
"source": "./src/hooks/index.ts",
|
|
37
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
38
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"#meta": {
|
|
41
|
+
"source": "./src/meta.ts",
|
|
42
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
43
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
44
|
+
},
|
|
45
|
+
"#operations": {
|
|
46
|
+
"source": "./src/operations/index.ts",
|
|
47
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
48
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"#plugin": {
|
|
51
|
+
"source": {
|
|
52
|
+
"workerd": "./src/AutomationPlugin.workerd.ts",
|
|
53
|
+
"node": "./src/AutomationPlugin.node.ts",
|
|
54
|
+
"default": "./src/AutomationPlugin.tsx"
|
|
55
|
+
},
|
|
56
|
+
"types": "./dist/types/src/AutomationPlugin.d.ts",
|
|
57
|
+
"workerd": "./dist/lib/neutral/AutomationPlugin.workerd.mjs",
|
|
58
|
+
"node": "./dist/lib/neutral/AutomationPlugin.node.mjs",
|
|
59
|
+
"default": "./dist/lib/neutral/AutomationPlugin.mjs"
|
|
60
|
+
},
|
|
61
|
+
"#testing": "./src/testing/index.ts",
|
|
62
|
+
"#translations": {
|
|
63
|
+
"source": "./src/translations.ts",
|
|
64
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
66
|
+
},
|
|
67
|
+
"#types": {
|
|
68
|
+
"source": "./src/types/index.ts",
|
|
69
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
70
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
11
73
|
"exports": {
|
|
12
74
|
".": {
|
|
13
75
|
"source": "./src/index.ts",
|
|
14
76
|
"types": "./dist/types/src/index.d.ts",
|
|
15
|
-
"
|
|
16
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
77
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
17
78
|
},
|
|
79
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
18
80
|
"./hooks": {
|
|
19
81
|
"source": "./src/hooks/index.ts",
|
|
20
82
|
"types": "./dist/types/src/hooks/index.d.ts",
|
|
21
|
-
"
|
|
22
|
-
"node": "./dist/lib/node-esm/hooks/index.mjs"
|
|
83
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
23
84
|
},
|
|
24
|
-
"./
|
|
25
|
-
"source": "./src/
|
|
26
|
-
"types": "./dist/types/src/
|
|
27
|
-
"
|
|
28
|
-
|
|
85
|
+
"./plugin": {
|
|
86
|
+
"source": "./src/plugin.ts",
|
|
87
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
88
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./testing": {
|
|
91
|
+
"source": "./src/testing.ts",
|
|
92
|
+
"types": "./dist/types/src/testing.d.ts",
|
|
93
|
+
"default": "./dist/lib/neutral/testing.mjs"
|
|
94
|
+
},
|
|
95
|
+
"./translations": {
|
|
96
|
+
"source": "./src/translations.ts",
|
|
97
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
98
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
29
99
|
}
|
|
30
100
|
},
|
|
31
101
|
"types": "dist/types/src/index.d.ts",
|
|
32
|
-
"typesVersions": {
|
|
33
|
-
"*": {
|
|
34
|
-
"hooks": [
|
|
35
|
-
"dist/types/src/hooks/index.d.ts"
|
|
36
|
-
],
|
|
37
|
-
"types": [
|
|
38
|
-
"dist/types/src/types/index.d.ts"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
102
|
"files": [
|
|
43
103
|
"assets",
|
|
44
104
|
"dist",
|
|
45
|
-
"src"
|
|
105
|
+
"src",
|
|
106
|
+
"PLUGIN.mdl"
|
|
46
107
|
],
|
|
47
108
|
"dependencies": {
|
|
48
|
-
"@effect/
|
|
49
|
-
"@effect/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/react-
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
109
|
+
"@effect-atom/atom": "^0.5.3",
|
|
110
|
+
"@effect/cli": "0.75.2",
|
|
111
|
+
"@effect/printer-ansi": "0.49.0",
|
|
112
|
+
"@dxos/ai": "0.9.0",
|
|
113
|
+
"@dxos/cli-util": "0.9.0",
|
|
114
|
+
"@dxos/app-toolkit": "0.9.0",
|
|
115
|
+
"@dxos/client": "0.9.0",
|
|
116
|
+
"@dxos/compute": "0.9.0",
|
|
117
|
+
"@dxos/compute-runtime": "0.9.0",
|
|
118
|
+
"@dxos/app-framework": "0.9.0",
|
|
119
|
+
"@dxos/conductor": "0.9.0",
|
|
120
|
+
"@dxos/client-protocol": "0.9.0",
|
|
121
|
+
"@dxos/echo-react": "0.9.0",
|
|
122
|
+
"@dxos/context": "0.9.0",
|
|
123
|
+
"@dxos/edge-client": "0.9.0",
|
|
124
|
+
"@dxos/echo": "0.9.0",
|
|
125
|
+
"@dxos/effect": "0.9.0",
|
|
126
|
+
"@dxos/functions-runtime": "0.9.0",
|
|
127
|
+
"@dxos/invariant": "0.9.0",
|
|
128
|
+
"@dxos/keys": "0.9.0",
|
|
129
|
+
"@dxos/plugin-client": "0.9.0",
|
|
130
|
+
"@dxos/log": "0.9.0",
|
|
131
|
+
"@dxos/plugin-graph": "0.9.0",
|
|
132
|
+
"@dxos/random": "0.9.0",
|
|
133
|
+
"@dxos/react-client": "0.9.0",
|
|
134
|
+
"@dxos/react-ui-components": "0.9.0",
|
|
135
|
+
"@dxos/react-ui-attention": "0.9.0",
|
|
136
|
+
"@dxos/react-ui-list": "0.9.0",
|
|
137
|
+
"@dxos/react-ui-search": "0.9.0",
|
|
138
|
+
"@dxos/react-ui-form": "0.9.0",
|
|
139
|
+
"@dxos/types": "0.9.0",
|
|
140
|
+
"@dxos/schema": "0.9.0",
|
|
141
|
+
"@dxos/util": "0.9.0",
|
|
142
|
+
"@dxos/plugin-space": "0.9.0"
|
|
79
143
|
},
|
|
80
144
|
"devDependencies": {
|
|
81
|
-
"@effect-atom/atom-react": "^0.
|
|
82
|
-
"@effect/platform": "0.
|
|
83
|
-
"@types/react": "~19.2.
|
|
84
|
-
"@types/react-dom": "~19.2.
|
|
85
|
-
"effect": "3.
|
|
86
|
-
"react": "~19.2.
|
|
87
|
-
"react-dom": "~19.2.
|
|
88
|
-
"vite": "
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/react-ui
|
|
91
|
-
"@dxos/storybook-utils": "0.
|
|
145
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
146
|
+
"@effect/platform": "0.96.1",
|
|
147
|
+
"@types/react": "~19.2.7",
|
|
148
|
+
"@types/react-dom": "~19.2.3",
|
|
149
|
+
"effect": "3.21.3",
|
|
150
|
+
"react": "~19.2.3",
|
|
151
|
+
"react-dom": "~19.2.3",
|
|
152
|
+
"vite": "^8.0.16",
|
|
153
|
+
"@dxos/plugin-testing": "0.9.0",
|
|
154
|
+
"@dxos/react-ui": "0.9.0",
|
|
155
|
+
"@dxos/storybook-utils": "0.9.0",
|
|
156
|
+
"@dxos/ui-theme": "0.9.0"
|
|
92
157
|
},
|
|
93
158
|
"peerDependencies": {
|
|
94
|
-
"@effect-atom/atom-react": "^0.
|
|
95
|
-
"@effect/platform": "
|
|
96
|
-
"effect": "
|
|
97
|
-
"react": "
|
|
98
|
-
"react-dom": "
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/react-ui
|
|
159
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
160
|
+
"@effect/platform": "0.96.1",
|
|
161
|
+
"effect": "3.21.3",
|
|
162
|
+
"react": "~19.2.3",
|
|
163
|
+
"react-dom": "~19.2.3",
|
|
164
|
+
"@dxos/ui-theme": "0.9.0",
|
|
165
|
+
"@dxos/react-ui": "0.9.0"
|
|
101
166
|
},
|
|
102
167
|
"publishConfig": {
|
|
103
168
|
"access": "public"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
+
import { Operation, Trace, Trigger } from '@dxos/compute';
|
|
8
|
+
import { ClientEvents } from '@dxos/plugin-client';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
AppGraphBuilder,
|
|
12
|
+
LayerSpecs,
|
|
13
|
+
OperationHandler,
|
|
14
|
+
RegistrySync,
|
|
15
|
+
Templates,
|
|
16
|
+
TriggerRuntimeController,
|
|
17
|
+
} from '#capabilities';
|
|
18
|
+
import { meta } from '#meta';
|
|
19
|
+
import { Automation } from '#types';
|
|
20
|
+
|
|
21
|
+
import { trigger } from './commands';
|
|
22
|
+
|
|
23
|
+
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
24
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
25
|
+
AppPlugin.addCommandModule({ commands: [trigger] }),
|
|
26
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
27
|
+
AppPlugin.addSchemaModule({
|
|
28
|
+
schema: [Automation.Automation, Operation.PersistentOperation, Trigger.Trigger, Trace.Message],
|
|
29
|
+
}),
|
|
30
|
+
// CreateAutomation (in OperationHandler) resolves AutomationCapabilities.Template, so the template
|
|
31
|
+
// provider must be present wherever the handler is exported.
|
|
32
|
+
Plugin.addModule({ id: 'automation-templates', activatesOn: AppActivationEvents.SetupSchema, activate: Templates }),
|
|
33
|
+
Plugin.addModule({
|
|
34
|
+
activatesOn: ActivationEvents.SetupProcessManager,
|
|
35
|
+
activate: LayerSpecs,
|
|
36
|
+
}),
|
|
37
|
+
Plugin.addModule({
|
|
38
|
+
activatesOn: ClientEvents.ClientReady,
|
|
39
|
+
activate: RegistrySync,
|
|
40
|
+
}),
|
|
41
|
+
Plugin.addModule({
|
|
42
|
+
activatesOn: ActivationEvent.allOf(ActivationEvents.ProcessManagerReady, ClientEvents.SpacesReady),
|
|
43
|
+
activate: TriggerRuntimeController,
|
|
44
|
+
}),
|
|
45
|
+
Plugin.make,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default AutomationPlugin;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { AutomationPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('AutomationPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), AutomationPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// After autoStart: AppGraphBuilder, schema, OperationHandler all auto-cascade.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('schema'), moduleId('OperationHandler')]),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -2,45 +2,57 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
+
import { Operation, Trace, Trigger } from '@dxos/compute';
|
|
8
|
+
import { ClientEvents } from '@dxos/plugin-client';
|
|
8
9
|
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import {
|
|
11
|
+
AppGraphBuilder,
|
|
12
|
+
CreateObject,
|
|
13
|
+
LayerSpecs,
|
|
14
|
+
NavigationResolver,
|
|
15
|
+
OperationHandler,
|
|
16
|
+
ReactSurface,
|
|
17
|
+
RegistrySync,
|
|
18
|
+
Templates,
|
|
19
|
+
TriggerRuntimeController,
|
|
20
|
+
} from '#capabilities';
|
|
21
|
+
import { meta } from '#meta';
|
|
22
|
+
import { translations } from '#translations';
|
|
23
|
+
import { Automation } from '#types';
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
23
|
-
activate: () => contributes(ClientCapabilities.Schema, [Function.Function, Trigger.Trigger]),
|
|
25
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
26
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
27
|
+
|
|
28
|
+
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
29
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
30
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
31
|
+
AppPlugin.addSchemaModule({
|
|
32
|
+
schema: [Automation.Automation, Operation.PersistentOperation, Trigger.Trigger, Trace.Message],
|
|
24
33
|
}),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
35
|
+
AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),
|
|
36
|
+
Plugin.addModule({ id: 'automation-templates', activatesOn: AppActivationEvents.SetupSchema, activate: Templates }),
|
|
37
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
38
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
39
|
+
Plugin.addModule({
|
|
40
|
+
activatesOn: ClientEvents.ClientReady,
|
|
41
|
+
firesBeforeActivation: [ActivationEvents.SetupProcessManager],
|
|
42
|
+
activate: LayerSpecs,
|
|
29
43
|
}),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
activate: IntentResolver,
|
|
44
|
+
Plugin.addModule({
|
|
45
|
+
activatesOn: ClientEvents.ClientReady,
|
|
46
|
+
activate: RegistrySync,
|
|
34
47
|
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
activate: ReactSurface,
|
|
48
|
+
Plugin.addModule({
|
|
49
|
+
activatesOn: ActivationEvent.allOf(ActivationEvents.ProcessManagerReady, ClientEvents.SpacesReady),
|
|
50
|
+
activate: TriggerRuntimeController,
|
|
39
51
|
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
activatesOn: ClientEvents.ClientReady,
|
|
43
|
-
activatesAfter: [AutomationEvents.ComputeRuntimeReady],
|
|
44
|
-
activate: ComputeRuntime,
|
|
52
|
+
AppPlugin.addPluginAssetModule({
|
|
53
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
45
54
|
}),
|
|
46
|
-
|
|
55
|
+
Plugin.make,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export default AutomationPlugin;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
+
import { Operation, Trace, Trigger } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
import { OperationHandler, Templates } from '#capabilities';
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
import { Automation } from '#types';
|
|
12
|
+
|
|
13
|
+
export const AutomationPlugin = Plugin.define(meta).pipe(
|
|
14
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
15
|
+
AppPlugin.addSchemaModule({
|
|
16
|
+
schema: [Automation.Automation, Operation.PersistentOperation, Trigger.Trigger, Trace.Message],
|
|
17
|
+
}),
|
|
18
|
+
// CreateAutomation (in OperationHandler) resolves AutomationCapabilities.Template, so the template
|
|
19
|
+
// provider must be present wherever the handler is exported.
|
|
20
|
+
Plugin.addModule({ id: 'automation-templates', activatesOn: AppActivationEvents.SetupSchema, activate: Templates }),
|
|
21
|
+
Plugin.make,
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default AutomationPlugin;
|
|
@@ -2,86 +2,89 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
7
6
|
import * as Option from 'effect/Option';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities, AppNode, LayoutOperation, createTypeSectionExtension } from '@dxos/app-toolkit';
|
|
10
|
+
import { isSpace } from '@dxos/client/echo';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Type } from '@dxos/echo';
|
|
13
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
14
|
+
import { SETTINGS_SECTION_TYPE } from '@dxos/plugin-space';
|
|
15
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
15
16
|
|
|
16
|
-
import { meta } from '
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { Automation, AutomationOperation } from '#types';
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
id: `functions-${node.id}`,
|
|
52
|
-
type: `${meta.id}/space-settings-functions`,
|
|
53
|
-
data: `${meta.id}/space-settings-functions`,
|
|
54
|
-
properties: {
|
|
55
|
-
label: ['functions panel label', { ns: meta.id }],
|
|
56
|
-
icon: 'ph--function--regular',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
]),
|
|
60
|
-
Option.getOrElse(() => []),
|
|
61
|
-
),
|
|
62
|
-
),
|
|
63
|
-
}),
|
|
64
|
-
createExtension({
|
|
65
|
-
id: `${meta.id}/script-companion`,
|
|
66
|
-
connector: (node) =>
|
|
67
|
-
Atom.make((get) =>
|
|
68
|
-
Function.pipe(
|
|
69
|
-
get(node),
|
|
70
|
-
Option.flatMap((node) => (Obj.instanceOf(Script.Script, node.data) ? Option.some(node) : Option.none())),
|
|
71
|
-
Option.map((node) => [
|
|
72
|
-
{
|
|
73
|
-
id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
74
|
-
type: PLANK_COMPANION_TYPE,
|
|
75
|
-
data: 'automation',
|
|
76
|
-
properties: {
|
|
77
|
-
label: ['script automation label', { ns: meta.id }],
|
|
78
|
-
icon: 'ph--lightning--regular',
|
|
79
|
-
disposition: 'hidden',
|
|
80
|
-
},
|
|
20
|
+
import { blank } from '../templates';
|
|
21
|
+
|
|
22
|
+
export default Capability.makeModule(
|
|
23
|
+
Effect.fnUntraced(function* () {
|
|
24
|
+
const extensions = yield* Effect.all([
|
|
25
|
+
createTypeSectionExtension(Automation.Automation),
|
|
26
|
+
GraphBuilder.createExtension({
|
|
27
|
+
id: 'automationsSectionActions',
|
|
28
|
+
match: (node) => {
|
|
29
|
+
const space = isSpace(node.properties.space) ? node.properties.space : undefined;
|
|
30
|
+
return node.type === Type.getTypename(Automation.Automation) && space ? Option.some(space) : Option.none();
|
|
31
|
+
},
|
|
32
|
+
actions: (space) =>
|
|
33
|
+
Effect.succeed([
|
|
34
|
+
Node.makeAction({
|
|
35
|
+
id: 'create-automation',
|
|
36
|
+
data: () =>
|
|
37
|
+
Effect.gen(function* () {
|
|
38
|
+
const { subject } = yield* Operation.invoke(
|
|
39
|
+
AutomationOperation.CreateAutomation,
|
|
40
|
+
{ db: space.db, templateId: blank.id },
|
|
41
|
+
{ spaceId: space.db.spaceId },
|
|
42
|
+
);
|
|
43
|
+
yield* Operation.invoke(
|
|
44
|
+
LayoutOperation.Open,
|
|
45
|
+
{ subject: [...subject] },
|
|
46
|
+
{ spaceId: space.db.spaceId },
|
|
47
|
+
);
|
|
48
|
+
}),
|
|
49
|
+
properties: {
|
|
50
|
+
label: ['add-object.label', { ns: Type.getTypename(Automation.Automation) }],
|
|
51
|
+
icon: 'ph--plus--regular',
|
|
52
|
+
disposition: 'list-item-primary',
|
|
81
53
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
54
|
+
}),
|
|
55
|
+
]),
|
|
56
|
+
}),
|
|
57
|
+
GraphBuilder.createExtension({
|
|
58
|
+
id: 'spaceSettingsAutomation',
|
|
59
|
+
match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),
|
|
60
|
+
connector: () =>
|
|
61
|
+
Effect.succeed([
|
|
62
|
+
AppNode.makeSettingsPanel({
|
|
63
|
+
id: 'automations',
|
|
64
|
+
type: `${meta.id}.space-settings-automation`,
|
|
65
|
+
label: ['automation-panel.label', { ns: meta.id }],
|
|
66
|
+
icon: 'ph--lightning--regular',
|
|
67
|
+
iconHue: 'indigo',
|
|
68
|
+
position: 'last',
|
|
69
|
+
}),
|
|
70
|
+
]),
|
|
71
|
+
}),
|
|
72
|
+
GraphBuilder.createExtension({
|
|
73
|
+
id: 'automationCompanion',
|
|
74
|
+
match: NodeMatcher.whenEchoObjectMatches,
|
|
75
|
+
connector: () =>
|
|
76
|
+
Effect.succeed([
|
|
77
|
+
AppNode.makeCompanion({
|
|
78
|
+
id: linkedSegment('automation'),
|
|
79
|
+
label: ['automation-companion.label', { ns: meta.id }],
|
|
80
|
+
icon: 'ph--lightning--regular',
|
|
81
|
+
data: 'automation',
|
|
82
|
+
position: 'last',
|
|
83
|
+
}),
|
|
84
|
+
]),
|
|
85
|
+
}),
|
|
86
|
+
]);
|
|
87
|
+
|
|
88
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
89
|
+
}),
|
|
90
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { defaultTemplates } from '../templates';
|
|
8
|
+
|
|
9
|
+
// The full create-object path is exercised by the app e2e (the UI plugin variant can't boot in the headless
|
|
10
|
+
// node harness); this asserts the Blank template the flow depends on.
|
|
11
|
+
describe('Automation create templates', () => {
|
|
12
|
+
test('ships a Blank no-op template', ({ expect }) => {
|
|
13
|
+
const blank = defaultTemplates.find((template) => template.id === 'org.dxos.automation.blank');
|
|
14
|
+
expect(blank).toBeDefined();
|
|
15
|
+
expect(blank!.label).toBe('Blank');
|
|
16
|
+
expect(typeof blank!.scaffold).toBe('function');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
|
+
|
|
12
|
+
import { CreateAutomationPanel } from '#components';
|
|
13
|
+
import { Automation, AutomationOperation } from '#types';
|
|
14
|
+
|
|
15
|
+
type CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];
|
|
16
|
+
|
|
17
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
20
|
+
id: Type.getTypename(Automation.Automation),
|
|
21
|
+
customPanel: CreateAutomationPanel,
|
|
22
|
+
createObject: ({ name, templateId }: { name?: string; templateId: string }, options: CreateOptions) =>
|
|
23
|
+
Operation.invoke(AutomationOperation.CreateAutomation, { db: options.db, templateId, name }),
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
);
|