@dxos/plugin-routine 0.0.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 +105 -0
- package/PLUGIN.mdl +475 -0
- package/README.md +15 -0
- package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs +95 -0
- package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs.map +7 -0
- package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs +249 -0
- package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs.map +7 -0
- package/dist/lib/neutral/RoutinePlugin.mjs +10 -0
- package/dist/lib/neutral/RoutinePlugin.mjs.map +7 -0
- package/dist/lib/neutral/RoutinePlugin.node.mjs +1133 -0
- package/dist/lib/neutral/RoutinePlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/RoutinePlugin.workerd.mjs +36 -0
- package/dist/lib/neutral/RoutinePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs +48 -0
- package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs.map +7 -0
- package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs +236 -0
- package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs.map +7 -0
- package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs +27 -0
- package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-FALWLZTI.mjs +90 -0
- package/dist/lib/neutral/app-graph-builder-FALWLZTI.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-674LDIUJ.mjs +9 -0
- package/dist/lib/neutral/chunk-674LDIUJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CNYAPXUW.mjs +65 -0
- package/dist/lib/neutral/chunk-CNYAPXUW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HLO4LYXT.mjs +44 -0
- package/dist/lib/neutral/chunk-HLO4LYXT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ODQDVFMZ.mjs +8 -0
- package/dist/lib/neutral/chunk-ODQDVFMZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-R7J2MU2M.mjs +263 -0
- package/dist/lib/neutral/chunk-R7J2MU2M.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WLNL77C7.mjs +14 -0
- package/dist/lib/neutral/chunk-WLNL77C7.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1921 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +17 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-V23KVDMJ.mjs +25 -0
- package/dist/lib/neutral/create-object-V23KVDMJ.mjs.map +7 -0
- package/dist/lib/neutral/create-routine-I67BYJA2.mjs +38 -0
- package/dist/lib/neutral/create-routine-I67BYJA2.mjs.map +7 -0
- package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.mjs +70 -0
- package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.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 +27 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/layer-specs-ADQCTTRT.mjs +135 -0
- package/dist/lib/neutral/layer-specs-ADQCTTRT.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs +18 -0
- package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs +13 -0
- package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-GMO7I7YE.mjs +67 -0
- package/dist/lib/neutral/react-surface-GMO7I7YE.mjs.map +7 -0
- package/dist/lib/neutral/registry-sync-PHBU6CH2.mjs +86 -0
- package/dist/lib/neutral/registry-sync-PHBU6CH2.mjs.map +7 -0
- package/dist/lib/neutral/run-routine-HJWXIWLJ.mjs +37 -0
- package/dist/lib/neutral/run-routine-HJWXIWLJ.mjs.map +7 -0
- package/dist/lib/neutral/templates-IIUCEBAX.mjs +49 -0
- package/dist/lib/neutral/templates-IIUCEBAX.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +115 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/trigger-runtime-controller-7FOTH2NP.mjs +77 -0
- package/dist/lib/neutral/trigger-runtime-controller-7FOTH2NP.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +17 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/RoutinePlugin.d.ts +4 -0
- package/dist/types/src/RoutinePlugin.d.ts.map +1 -0
- package/dist/types/src/RoutinePlugin.node.d.ts +4 -0
- package/dist/types/src/RoutinePlugin.node.d.ts.map +1 -0
- package/dist/types/src/RoutinePlugin.test.d.ts +2 -0
- package/dist/types/src/RoutinePlugin.test.d.ts.map +1 -0
- package/dist/types/src/RoutinePlugin.workerd.d.ts +4 -0
- package/dist/types/src/RoutinePlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +5 -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 +12 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/layer-specs.d.ts +5 -0
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts +5 -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 +5 -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/templates.d.ts +5 -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 +13 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts +15 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts +13 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/util.d.ts +46 -0
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/components/CreateRoutinePanel/CreateRoutinePanel.d.ts +14 -0
- package/dist/types/src/components/CreateRoutinePanel/CreateRoutinePanel.d.ts.map +1 -0
- package/dist/types/src/components/CreateRoutinePanel/index.d.ts +2 -0
- package/dist/types/src/components/CreateRoutinePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts +16 -0
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts.map +1 -0
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts +17 -0
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/InstructionsEditor/index.d.ts +2 -0
- package/dist/types/src/components/InstructionsEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/MasterDetail/MasterDetail.d.ts +51 -0
- package/dist/types/src/components/MasterDetail/MasterDetail.d.ts.map +1 -0
- package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts +16 -0
- package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/MasterDetail/index.d.ts +2 -0
- package/dist/types/src/components/MasterDetail/index.d.ts.map +1 -0
- package/dist/types/src/components/RoutineForm/RoutineForm.d.ts +25 -0
- package/dist/types/src/components/RoutineForm/RoutineForm.d.ts.map +1 -0
- package/dist/types/src/components/RoutineForm/index.d.ts +2 -0
- package/dist/types/src/components/RoutineForm/index.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/Schedule.d.ts +80 -0
- package/dist/types/src/components/Schedule/Schedule.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/Schedule.stories.d.ts +23 -0
- package/dist/types/src/components/Schedule/Schedule.stories.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/cron.d.ts +44 -0
- package/dist/types/src/components/Schedule/cron.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/cron.test.d.ts +2 -0
- package/dist/types/src/components/Schedule/cron.test.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/index.d.ts +4 -0
- package/dist/types/src/components/Schedule/index.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/types.d.ts +66 -0
- package/dist/types/src/components/Schedule/types.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +13 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +19 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +21 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +16 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/index.d.ts +2 -0
- package/dist/types/src/components/TemplateEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/types.d.ts +18 -0
- package/dist/types/src/components/TemplateEditor/types.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +24 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +25 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts +15 -0
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.stories.d.ts +15 -0
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.stories.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/index.d.ts +2 -0
- package/dist/types/src/components/TriggerEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +8 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +14 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +20 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts +17 -0
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/RoutineCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts +10 -0
- package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineSettings/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts +9 -0
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineTraceCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/runs.d.ts +34 -0
- package/dist/types/src/containers/RoutineTraceCompanion/runs.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/runs.test.d.ts +2 -0
- package/dist/types/src/containers/RoutineTraceCompanion/runs.test.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts +11 -0
- package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts.map +1 -0
- package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts +6 -0
- package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SkillArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SkillArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +12 -0
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +33 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/operations/create-routine.d.ts +5 -0
- package/dist/types/src/operations/create-routine.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/operations/run-routine.d.ts +5 -0
- package/dist/types/src/operations/run-routine.d.ts.map +1 -0
- package/dist/types/src/paths.d.ts +5 -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 +11 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +328 -0
- package/dist/types/src/testing/test-functions.d.ts.map +1 -0
- 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 +3 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/Routine.d.ts +55 -0
- package/dist/types/src/types/Routine.d.ts.map +1 -0
- package/dist/types/src/types/Routine.test.d.ts +2 -0
- package/dist/types/src/types/Routine.test.d.ts.map +1 -0
- package/dist/types/src/types/RoutineCapabilities.d.ts +44 -0
- package/dist/types/src/types/RoutineCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/RoutineOperation.d.ts +45 -0
- package/dist/types/src/types/RoutineOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +33 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/routines-for-object.d.ts +22 -0
- package/dist/types/src/util/routines-for-object.d.ts.map +1 -0
- package/dist/types/src/util/routines-for-object.test.d.ts +2 -0
- package/dist/types/src/util/routines-for-object.test.d.ts.map +1 -0
- package/dist/types/src/util/run-instructions.d.ts +5 -0
- package/dist/types/src/util/run-instructions.d.ts.map +1 -0
- package/dist/types/src/util/run-instructions.test.d.ts +2 -0
- package/dist/types/src/util/run-instructions.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dx.config.ts +33 -0
- package/package.json +196 -0
- package/src/RoutinePlugin.node.ts +48 -0
- package/src/RoutinePlugin.test.ts +27 -0
- package/src/RoutinePlugin.tsx +58 -0
- package/src/RoutinePlugin.workerd.ts +24 -0
- package/src/capabilities/app-graph-builder.ts +80 -0
- package/src/capabilities/create-object.test.ts +18 -0
- package/src/capabilities/create-object.ts +26 -0
- package/src/capabilities/index.ts +22 -0
- package/src/capabilities/layer-specs.ts +190 -0
- package/src/capabilities/navigation-resolver.ts +21 -0
- package/src/capabilities/node.ts +19 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +66 -0
- 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 +278 -0
- package/src/commands/trigger/update/timer.ts +194 -0
- package/src/commands/trigger/util.ts +412 -0
- package/src/components/CreateRoutinePanel/CreateRoutinePanel.tsx +68 -0
- package/src/components/CreateRoutinePanel/index.ts +5 -0
- package/src/components/InstructionsEditor/InstructionsEditor.stories.tsx +69 -0
- package/src/components/InstructionsEditor/InstructionsEditor.tsx +107 -0
- package/src/components/InstructionsEditor/index.ts +5 -0
- package/src/components/MasterDetail/MasterDetail.stories.tsx +100 -0
- package/src/components/MasterDetail/MasterDetail.tsx +175 -0
- package/src/components/MasterDetail/index.ts +5 -0
- package/src/components/RoutineForm/RoutineForm.tsx +293 -0
- package/src/components/RoutineForm/index.ts +5 -0
- package/src/components/Schedule/Schedule.stories.tsx +73 -0
- package/src/components/Schedule/Schedule.tsx +527 -0
- package/src/components/Schedule/cron.test.ts +230 -0
- package/src/components/Schedule/cron.ts +337 -0
- package/src/components/Schedule/index.ts +8 -0
- package/src/components/Schedule/types.ts +124 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +93 -0
- package/src/components/TemplateEditor/TemplateEditor.tsx +77 -0
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +76 -0
- package/src/components/TemplateEditor/TemplateForm.tsx +204 -0
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/TemplateEditor/index.ts +5 -0
- package/src/components/TemplateEditor/types.tsx +28 -0
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +122 -0
- package/src/components/TriggerEditor/TriggerEditor.tsx +365 -0
- package/src/components/TriggerEditor/TriggerKindSelector.stories.tsx +42 -0
- package/src/components/TriggerEditor/TriggerKindSelector.tsx +87 -0
- package/src/components/TriggerEditor/index.ts +5 -0
- package/src/components/index.ts +11 -0
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +146 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/RoutineCompanion/RoutineCompanion.stories.tsx +82 -0
- package/src/containers/RoutineCompanion/RoutineCompanion.tsx +342 -0
- package/src/containers/RoutineCompanion/index.ts +6 -0
- package/src/containers/RoutineSettings/RoutineSettings.tsx +65 -0
- package/src/containers/RoutineSettings/index.ts +5 -0
- package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.tsx +133 -0
- package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.tsx +125 -0
- package/src/containers/RoutineTraceCompanion/index.ts +5 -0
- package/src/containers/RoutineTraceCompanion/runs.test.ts +140 -0
- package/src/containers/RoutineTraceCompanion/runs.ts +135 -0
- package/src/containers/RoutineTraceCompanion/useRoutineRuns.ts +50 -0
- package/src/containers/SkillArticle/SkillArticle.tsx +29 -0
- package/src/containers/SkillArticle/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useTriggerRuntimeControls.ts +70 -0
- package/src/index.ts +7 -0
- package/src/meta.ts +9 -0
- package/src/operations/create-routine.ts +39 -0
- package/src/operations/create-trigger-from-template.ts +68 -0
- package/src/operations/index.ts +11 -0
- package/src/operations/run-routine.ts +45 -0
- package/src/paths.ts +18 -0
- package/src/plugin.ts +11 -0
- package/src/templates/index.ts +48 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/test-functions.ts +76 -0
- package/src/testing.ts +7 -0
- package/src/translations.ts +125 -0
- package/src/types/Routine.test.ts +51 -0
- package/src/types/Routine.ts +144 -0
- package/src/types/RoutineCapabilities.ts +51 -0
- package/src/types/RoutineOperation.ts +104 -0
- package/src/types/index.ts +9 -0
- package/src/types/schema.ts +31 -0
- package/src/util/index.ts +6 -0
- package/src/util/routines-for-object.test.ts +109 -0
- package/src/util/routines-for-object.ts +89 -0
- package/src/util/run-instructions.test.ts +23 -0
- package/src/util/run-instructions.ts +12 -0
- package/src/vite-env.d.ts +10 -0
package/dx.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Config2 } from '@dxos/app-framework/config';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
export default Config2.make({
|
|
9
|
+
plugin: {
|
|
10
|
+
key: 'org.dxos.plugin.routine',
|
|
11
|
+
name: 'Routine',
|
|
12
|
+
author: 'DXOS',
|
|
13
|
+
description: trim`
|
|
14
|
+
Event-driven workflow automation engine for DXOS Composer.
|
|
15
|
+
A Routine pairs a trigger ("when" — a timer schedule or an incoming feed) with an action
|
|
16
|
+
("then" — a persistent compute operation and instructions), enabling automated pipelines that
|
|
17
|
+
react to changes in real time without manual intervention.
|
|
18
|
+
|
|
19
|
+
Routines are configured in their own article and surfaced on a per-object "Routines" companion
|
|
20
|
+
that lists the routines connected to each object. A per-space TriggerDispatcher manages
|
|
21
|
+
execution: running locally in the browser when computeEnvironment is "local", or delegating to
|
|
22
|
+
the DXOS edge for server-side reliability; the space settings page chooses the runtime location.
|
|
23
|
+
|
|
24
|
+
Operation handlers and skills contributed by any plugin in the application are
|
|
25
|
+
automatically merged and made available to every space's OperationRegistry, so new
|
|
26
|
+
capabilities registered by other plugins become instantly invocable from routines.
|
|
27
|
+
`,
|
|
28
|
+
icon: { key: 'ph--atom--regular' },
|
|
29
|
+
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-routine',
|
|
30
|
+
spec: 'PLUGIN.mdl',
|
|
31
|
+
tags: ['system'],
|
|
32
|
+
},
|
|
33
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dxos/plugin-routine",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Prompt chain plugin",
|
|
5
|
+
"homepage": "https://dxos.org",
|
|
6
|
+
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
|
+
"author": "DXOS.org",
|
|
13
|
+
"sideEffects": true,
|
|
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/RoutinePlugin.workerd.ts",
|
|
53
|
+
"node": "./src/RoutinePlugin.node.ts",
|
|
54
|
+
"default": "./src/RoutinePlugin.tsx"
|
|
55
|
+
},
|
|
56
|
+
"types": "./dist/types/src/RoutinePlugin.d.ts",
|
|
57
|
+
"workerd": "./dist/lib/neutral/RoutinePlugin.workerd.mjs",
|
|
58
|
+
"node": "./dist/lib/neutral/RoutinePlugin.node.mjs",
|
|
59
|
+
"default": "./dist/lib/neutral/RoutinePlugin.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
|
+
},
|
|
73
|
+
"exports": {
|
|
74
|
+
".": {
|
|
75
|
+
"source": "./src/index.ts",
|
|
76
|
+
"types": "./dist/types/src/index.d.ts",
|
|
77
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
78
|
+
},
|
|
79
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
80
|
+
"./components": {
|
|
81
|
+
"source": "./src/components/index.ts",
|
|
82
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
83
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./hooks": {
|
|
86
|
+
"source": "./src/hooks/index.ts",
|
|
87
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
88
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./plugin": {
|
|
91
|
+
"source": "./src/plugin.ts",
|
|
92
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
93
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
94
|
+
},
|
|
95
|
+
"./testing": {
|
|
96
|
+
"source": "./src/testing.ts",
|
|
97
|
+
"types": "./dist/types/src/testing.d.ts",
|
|
98
|
+
"default": "./dist/lib/neutral/testing.mjs"
|
|
99
|
+
},
|
|
100
|
+
"./translations": {
|
|
101
|
+
"source": "./src/translations.ts",
|
|
102
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
103
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
104
|
+
},
|
|
105
|
+
"./types": {
|
|
106
|
+
"source": "./src/types/index.ts",
|
|
107
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
108
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"types": "dist/types/src/index.d.ts",
|
|
112
|
+
"files": [
|
|
113
|
+
"assets",
|
|
114
|
+
"dist",
|
|
115
|
+
"dx.config.ts",
|
|
116
|
+
"src",
|
|
117
|
+
"PLUGIN.mdl"
|
|
118
|
+
],
|
|
119
|
+
"dependencies": {
|
|
120
|
+
"@codemirror/autocomplete": "catalog:",
|
|
121
|
+
"@codemirror/language": "catalog:",
|
|
122
|
+
"@codemirror/state": "catalog:",
|
|
123
|
+
"@codemirror/view": "catalog:",
|
|
124
|
+
"@dxos/ai": "workspace:*",
|
|
125
|
+
"@dxos/app-framework": "workspace:*",
|
|
126
|
+
"@dxos/app-toolkit": "workspace:*",
|
|
127
|
+
"@dxos/assistant-toolkit": "workspace:*",
|
|
128
|
+
"@dxos/cli-util": "workspace:*",
|
|
129
|
+
"@dxos/client": "workspace:*",
|
|
130
|
+
"@dxos/client-protocol": "workspace:*",
|
|
131
|
+
"@dxos/compute": "workspace:*",
|
|
132
|
+
"@dxos/compute-runtime": "workspace:*",
|
|
133
|
+
"@dxos/conductor": "workspace:*",
|
|
134
|
+
"@dxos/context": "workspace:*",
|
|
135
|
+
"@dxos/echo": "workspace:*",
|
|
136
|
+
"@dxos/echo-doc": "workspace:*",
|
|
137
|
+
"@dxos/echo-react": "workspace:*",
|
|
138
|
+
"@dxos/edge-client": "workspace:*",
|
|
139
|
+
"@dxos/effect": "workspace:*",
|
|
140
|
+
"@dxos/functions-runtime": "workspace:*",
|
|
141
|
+
"@dxos/invariant": "workspace:*",
|
|
142
|
+
"@dxos/keys": "workspace:*",
|
|
143
|
+
"@dxos/log": "workspace:*",
|
|
144
|
+
"@dxos/plugin-client": "workspace:*",
|
|
145
|
+
"@dxos/plugin-graph": "workspace:*",
|
|
146
|
+
"@dxos/plugin-markdown": "workspace:*",
|
|
147
|
+
"@dxos/plugin-space": "workspace:*",
|
|
148
|
+
"@dxos/random": "workspace:*",
|
|
149
|
+
"@dxos/react-client": "workspace:*",
|
|
150
|
+
"@dxos/react-ui-attention": "workspace:*",
|
|
151
|
+
"@dxos/react-ui-components": "workspace:*",
|
|
152
|
+
"@dxos/react-ui-editor": "workspace:*",
|
|
153
|
+
"@dxos/react-ui-form": "workspace:*",
|
|
154
|
+
"@dxos/react-ui-list": "workspace:*",
|
|
155
|
+
"@dxos/react-ui-menu": "workspace:*",
|
|
156
|
+
"@dxos/react-ui-search": "workspace:*",
|
|
157
|
+
"@dxos/react-ui-syntax-highlighter": "workspace:*",
|
|
158
|
+
"@dxos/schema": "workspace:*",
|
|
159
|
+
"@dxos/types": "workspace:*",
|
|
160
|
+
"@dxos/ui": "workspace:*",
|
|
161
|
+
"@dxos/ui-editor": "workspace:*",
|
|
162
|
+
"@dxos/util": "workspace:*",
|
|
163
|
+
"@effect-atom/atom": "catalog:",
|
|
164
|
+
"@effect/cli": "catalog:",
|
|
165
|
+
"@effect/printer-ansi": "catalog:",
|
|
166
|
+
"@radix-ui/react-compose-refs": "catalog:",
|
|
167
|
+
"cronstrue": "catalog:"
|
|
168
|
+
},
|
|
169
|
+
"devDependencies": {
|
|
170
|
+
"@dxos/assistant": "workspace:*",
|
|
171
|
+
"@dxos/plugin-testing": "workspace:*",
|
|
172
|
+
"@dxos/react-ui": "workspace:*",
|
|
173
|
+
"@dxos/storybook-utils": "workspace:*",
|
|
174
|
+
"@dxos/ui-theme": "workspace:*",
|
|
175
|
+
"@effect-atom/atom-react": "catalog:",
|
|
176
|
+
"@effect/platform": "catalog:",
|
|
177
|
+
"@types/react": "catalog:",
|
|
178
|
+
"@types/react-dom": "catalog:",
|
|
179
|
+
"effect": "catalog:",
|
|
180
|
+
"react": "catalog:",
|
|
181
|
+
"react-dom": "catalog:",
|
|
182
|
+
"vite": "catalog:"
|
|
183
|
+
},
|
|
184
|
+
"peerDependencies": {
|
|
185
|
+
"@dxos/react-ui": "workspace:*",
|
|
186
|
+
"@dxos/ui-theme": "workspace:*",
|
|
187
|
+
"@effect-atom/atom-react": "catalog:",
|
|
188
|
+
"@effect/platform": "catalog:",
|
|
189
|
+
"effect": "catalog:",
|
|
190
|
+
"react": "catalog:",
|
|
191
|
+
"react-dom": "catalog:"
|
|
192
|
+
},
|
|
193
|
+
"publishConfig": {
|
|
194
|
+
"access": "public"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } 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 { Routine } from '#types';
|
|
20
|
+
|
|
21
|
+
import { trigger } from './commands';
|
|
22
|
+
|
|
23
|
+
export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
24
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
25
|
+
AppPlugin.addCommandModule({ commands: [trigger] }),
|
|
26
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
27
|
+
AppPlugin.addSchemaModule({
|
|
28
|
+
schema: [Routine.Routine, Operation.PersistentOperation, Trigger.Trigger, Trace.Message],
|
|
29
|
+
}),
|
|
30
|
+
// CreateRoutine (in OperationHandler) resolves RoutineCapabilities.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 RoutinePlugin;
|
|
@@ -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 { RoutinePlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('RoutinePlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), RoutinePlugin()],
|
|
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
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { Instructions, Operation, Trace, Trigger } from '@dxos/compute';
|
|
8
|
+
import { ClientEvents } from '@dxos/plugin-client';
|
|
9
|
+
|
|
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 { Routine } from '#types';
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
26
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
27
|
+
|
|
28
|
+
export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
29
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
30
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
31
|
+
AppPlugin.addNavigationResolverModule({ activatesOn: ClientEvents.ClientReady, activate: NavigationResolver }),
|
|
32
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
33
|
+
AppPlugin.addPluginAssetModule({
|
|
34
|
+
asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
35
|
+
}),
|
|
36
|
+
AppPlugin.addSchemaModule({
|
|
37
|
+
schema: [Routine.Routine, Operation.PersistentOperation, Instructions.Instructions, Trigger.Trigger, Trace.Message],
|
|
38
|
+
}),
|
|
39
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
40
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
41
|
+
Plugin.addModule({
|
|
42
|
+
activatesOn: ClientEvents.ClientReady,
|
|
43
|
+
firesBeforeActivation: [ActivationEvents.SetupProcessManager],
|
|
44
|
+
activate: LayerSpecs,
|
|
45
|
+
}),
|
|
46
|
+
Plugin.addModule({
|
|
47
|
+
activatesOn: ClientEvents.ClientReady,
|
|
48
|
+
activate: RegistrySync,
|
|
49
|
+
}),
|
|
50
|
+
Plugin.addModule({ activatesOn: AppActivationEvents.SetupSchema, activate: Templates }),
|
|
51
|
+
Plugin.addModule({
|
|
52
|
+
activatesOn: ActivationEvent.allOf(ActivationEvents.ProcessManagerReady, ClientEvents.SpacesReady),
|
|
53
|
+
activate: TriggerRuntimeController,
|
|
54
|
+
}),
|
|
55
|
+
Plugin.make,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export default RoutinePlugin;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } 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 { Routine } from '#types';
|
|
12
|
+
|
|
13
|
+
export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
14
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
15
|
+
AppPlugin.addSchemaModule({
|
|
16
|
+
schema: [Routine.Routine, Operation.PersistentOperation, Trigger.Trigger, Trace.Message],
|
|
17
|
+
}),
|
|
18
|
+
// CreateRoutine (in OperationHandler) resolves RoutineCapabilities.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 RoutinePlugin;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, Paths, TypeSection } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { Type } from '@dxos/echo';
|
|
11
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
|
+
import { SETTINGS_SECTION_TYPE, SpaceOperation } from '@dxos/plugin-space';
|
|
13
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
14
|
+
import { Position } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { Routine } from '#types';
|
|
18
|
+
|
|
19
|
+
import { getRoutinesPath } from '../paths';
|
|
20
|
+
|
|
21
|
+
export default Capability.makeModule(
|
|
22
|
+
Effect.fnUntraced(function* () {
|
|
23
|
+
const extensions = yield* Effect.all([
|
|
24
|
+
TypeSection.createTypeSectionExtension(Routine.Routine, {
|
|
25
|
+
match: AppNodeMatcher.whenNavTreeGroup(Paths.GroupTypes.ai),
|
|
26
|
+
createObject: (space) =>
|
|
27
|
+
Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
28
|
+
target: space.db,
|
|
29
|
+
typename: Type.getTypename(Routine.Routine),
|
|
30
|
+
targetNodeId: getRoutinesPath(space.db.spaceId),
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
GraphBuilder.createExtension({
|
|
34
|
+
id: 'spaceSettingsAutomation',
|
|
35
|
+
match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),
|
|
36
|
+
connector: () => {
|
|
37
|
+
return Effect.succeed([
|
|
38
|
+
AppNode.makeSettingsPanel({
|
|
39
|
+
id: 'routines',
|
|
40
|
+
type: `${meta.profile.key}.space-settings-automation`,
|
|
41
|
+
label: ['automation-panel.label', { ns: meta.profile.key }],
|
|
42
|
+
icon: 'ph--lightning--regular',
|
|
43
|
+
iconHue: 'emerald',
|
|
44
|
+
position: Position.last,
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
GraphBuilder.createExtension({
|
|
50
|
+
id: 'automationCompanion',
|
|
51
|
+
match: NodeMatcher.whenEchoObjectMatches,
|
|
52
|
+
connector: () =>
|
|
53
|
+
Effect.succeed([
|
|
54
|
+
AppNode.makeCompanion({
|
|
55
|
+
id: linkedSegment('automation'),
|
|
56
|
+
label: ['automation-companion.label', { ns: meta.profile.key }],
|
|
57
|
+
icon: 'ph--lightning--regular',
|
|
58
|
+
data: 'automation',
|
|
59
|
+
position: Position.last,
|
|
60
|
+
}),
|
|
61
|
+
]),
|
|
62
|
+
}),
|
|
63
|
+
GraphBuilder.createTypeExtension({
|
|
64
|
+
id: 'routineRuns',
|
|
65
|
+
type: Routine.Routine,
|
|
66
|
+
connector: () =>
|
|
67
|
+
Effect.succeed([
|
|
68
|
+
AppNode.makeCompanion({
|
|
69
|
+
id: 'runs',
|
|
70
|
+
label: ['routine-runs.label', { ns: meta.profile.key }],
|
|
71
|
+
icon: 'ph--clock-countdown--regular',
|
|
72
|
+
data: 'runs',
|
|
73
|
+
}),
|
|
74
|
+
]),
|
|
75
|
+
}),
|
|
76
|
+
]);
|
|
77
|
+
|
|
78
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
@@ -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('Routine create templates', () => {
|
|
12
|
+
test('ships a Blank no-op template', ({ expect }) => {
|
|
13
|
+
const blank = defaultTemplates.find((template) => template.id === 'org.dxos.routine.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 { CreateRoutinePanel } from '#components';
|
|
13
|
+
import { Routine, RoutineOperation } 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(Routine.Routine),
|
|
21
|
+
customPanel: CreateRoutinePanel,
|
|
22
|
+
createObject: ({ name, templateId }: { name?: string; templateId: string }, options: CreateOptions) =>
|
|
23
|
+
Operation.invoke(RoutineOperation.CreateRoutine, { db: options.db, templateId, name }),
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
8
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
+
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
10
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
11
|
+
export const LayerSpecs = Capability.lazy<void, Capability.Any[]>('LayerSpecs', () => import('./layer-specs'));
|
|
12
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
'OperationHandler',
|
|
14
|
+
() => import('./operation-handler'),
|
|
15
|
+
);
|
|
16
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
17
|
+
export const RegistrySync = Capability.lazy('RegistrySync', () => import('./registry-sync'));
|
|
18
|
+
export const Templates = Capability.lazy('Templates', () => import('./templates'));
|
|
19
|
+
export const TriggerRuntimeController = Capability.lazy(
|
|
20
|
+
'TriggerRuntimeController',
|
|
21
|
+
() => import('./trigger-runtime-controller'),
|
|
22
|
+
);
|