@dxos/plugin-routine 0.9.1-staging.ee54ba693a → 0.11.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/PLUGIN.mdl +18 -13
- package/dist/lib/RoutinePlugin.mjs +2 -0
- package/dist/lib/RoutinePlugin.node.mjs +894 -0
- package/dist/lib/RoutinePlugin.node.mjs.map +1 -0
- package/dist/lib/RoutinePlugin.workerd.mjs +20 -0
- package/dist/lib/RoutinePlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +12 -0
- package/dist/lib/capabilities/node.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +14 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-RoutineArticle.mjs +79 -0
- package/dist/lib/chunk-RoutineArticle.mjs.map +1 -0
- package/dist/lib/chunk-RoutineCompanion.mjs +192 -0
- package/dist/lib/chunk-RoutineCompanion.mjs.map +1 -0
- package/dist/lib/chunk-RoutinePlugin.mjs +38 -0
- package/dist/lib/chunk-RoutinePlugin.mjs.map +1 -0
- package/dist/lib/chunk-RoutineSettings.mjs +50 -0
- package/dist/lib/chunk-RoutineSettings.mjs.map +1 -0
- package/dist/lib/chunk-RoutineTraceCompanion.mjs +208 -0
- package/dist/lib/chunk-RoutineTraceCompanion.mjs.map +1 -0
- package/dist/lib/chunk-SkillArticle.mjs +28 -0
- package/dist/lib/chunk-SkillArticle.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +71 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-create-object.mjs +23 -0
- package/dist/lib/chunk-create-object.mjs.map +1 -0
- package/dist/lib/chunk-create-routine.mjs +34 -0
- package/dist/lib/chunk-create-routine.mjs.map +1 -0
- package/dist/lib/chunk-create-trigger-from-template.mjs +48 -0
- package/dist/lib/chunk-create-trigger-from-template.mjs.map +1 -0
- package/dist/lib/chunk-layer-specs.mjs +179 -0
- package/dist/lib/chunk-layer-specs.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-HLO4LYXT.mjs → chunk-meta.mjs} +19 -27
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-paths.mjs +11 -0
- package/dist/lib/chunk-paths.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +64 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-registry-sync.mjs +104 -0
- package/dist/lib/chunk-registry-sync.mjs.map +1 -0
- package/dist/lib/chunk-run-routine.mjs +57 -0
- package/dist/lib/chunk-run-routine.mjs.map +1 -0
- package/dist/lib/chunk-templates.mjs +37 -0
- package/dist/lib/chunk-templates.mjs.map +1 -0
- package/dist/lib/chunk-trigger-runtime-controller.mjs +73 -0
- package/dist/lib/chunk-trigger-runtime-controller.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +149 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-util.mjs +142 -0
- package/dist/lib/chunk-util.mjs.map +1 -0
- package/dist/lib/components.mjs +1645 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +11 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/hooks.mjs +37 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +5 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +2 -0
- package/dist/lib/translations.mjs +110 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/RoutinePlugin.d.ts.map +1 -1
- package/dist/types/src/RoutinePlugin.node.d.ts.map +1 -1
- package/dist/types/src/RoutinePlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/registry-sync.d.ts +1 -1
- package/dist/types/src/capabilities/templates.d.ts +1 -1
- package/dist/types/src/capabilities/trigger-runtime-controller.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/{queue.d.ts → feed.d.ts} +2 -2
- package/dist/types/src/commands/trigger/create/feed.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/{queue.d.ts → feed.d.ts} +2 -2
- package/dist/types/src/commands/trigger/update/feed.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/util.d.ts +1 -1
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -1
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts +7 -5
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts.map +1 -1
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts +3 -3
- package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/RoutineCard/RoutineCard.d.ts +9 -0
- package/dist/types/src/components/RoutineCard/RoutineCard.d.ts.map +1 -0
- package/dist/types/src/components/RoutineCard/RoutineCard.stories.d.ts +21 -0
- package/dist/types/src/components/RoutineCard/RoutineCard.stories.d.ts.map +1 -0
- package/dist/types/src/components/RoutineCard/index.d.ts +2 -0
- package/dist/types/src/components/RoutineCard/index.d.ts.map +1 -0
- package/dist/types/src/components/RoutineForm/RoutineForm.d.ts +7 -2
- package/dist/types/src/components/RoutineForm/RoutineForm.d.ts.map +1 -1
- package/dist/types/src/components/Schedule/Schedule.d.ts +2 -26
- package/dist/types/src/components/Schedule/Schedule.d.ts.map +1 -1
- package/dist/types/src/components/Schedule/days.d.ts +24 -0
- package/dist/types/src/components/Schedule/days.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/describe-schedule.d.ts +3 -0
- package/dist/types/src/components/Schedule/describe-schedule.d.ts.map +1 -0
- package/dist/types/src/components/Schedule/index.d.ts +2 -0
- package/dist/types/src/components/Schedule/index.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts +5 -2
- package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/trigger-kind-icon.d.ts +5 -0
- package/dist/types/src/components/TriggerEditor/trigger-kind-icon.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +5 -10
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +6 -2
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts +4 -12
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts +4 -8
- package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts +5 -3
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts +1 -1
- package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts.map +1 -1
- package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts +4 -1
- package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts.map +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/run-routine.d.ts.map +1 -1
- package/dist/types/src/operations/run-routine.test.d.ts +2 -0
- package/dist/types/src/operations/run-routine.test.d.ts.map +1 -0
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +1 -1
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-functions.d.ts +30 -6
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/RoutineCapabilities.d.ts +9 -3
- package/dist/types/src/types/RoutineCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/RoutineOperation.d.ts +2 -3
- package/dist/types/src/types/RoutineOperation.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/routines-for-object.d.ts +6 -3
- package/dist/types/src/util/routines-for-object.d.ts.map +1 -1
- package/dist/types/src/util/wire.d.ts +21 -0
- package/dist/types/src/util/wire.d.ts.map +1 -0
- package/dist/types/src/util/wire.test.d.ts +2 -0
- package/dist/types/src/util/wire.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +3 -2
- package/package.json +73 -71
- package/src/RoutinePlugin.node.ts +1 -2
- package/src/RoutinePlugin.tsx +2 -4
- package/src/RoutinePlugin.workerd.ts +1 -2
- package/src/capabilities/app-graph-builder.ts +9 -7
- package/src/capabilities/create-object.ts +2 -2
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/layer-specs.ts +78 -12
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +18 -22
- package/src/capabilities/trigger-runtime-controller.test.ts +12 -18
- package/src/capabilities/trigger-runtime-controller.ts +22 -25
- package/src/commands/trigger/create/{queue.ts → feed.ts} +1 -1
- package/src/commands/trigger/create/index.ts +2 -2
- package/src/commands/trigger/update/{queue.ts → feed.ts} +1 -1
- package/src/commands/trigger/update/index.ts +2 -2
- package/src/commands/trigger/util.ts +1 -2
- package/src/components/InstructionsEditor/InstructionsEditor.stories.tsx +7 -6
- package/src/components/InstructionsEditor/InstructionsEditor.tsx +31 -19
- package/src/components/RoutineCard/RoutineCard.stories.tsx +95 -0
- package/src/components/RoutineCard/RoutineCard.tsx +60 -0
- package/src/components/{MasterDetail → RoutineCard}/index.ts +1 -1
- package/src/components/RoutineForm/RoutineForm.tsx +60 -52
- package/src/components/Schedule/Schedule.stories.tsx +1 -1
- package/src/components/Schedule/Schedule.tsx +4 -73
- package/src/components/Schedule/days.ts +18 -0
- package/src/components/Schedule/describe-schedule.ts +64 -0
- package/src/components/Schedule/index.ts +2 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +1 -1
- package/src/components/TemplateEditor/TemplateForm.tsx +1 -1
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +3 -3
- package/src/components/TriggerEditor/TriggerEditor.tsx +79 -66
- package/src/components/TriggerEditor/TriggerKindSelector.tsx +4 -30
- package/src/components/TriggerEditor/trigger-kind-icon.ts +38 -0
- package/src/components/index.ts +1 -1
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +78 -19
- package/src/containers/RoutineArticle/RoutineArticle.tsx +8 -4
- package/src/containers/RoutineCompanion/RoutineCompanion.stories.tsx +5 -4
- package/src/containers/RoutineCompanion/RoutineCompanion.tsx +11 -7
- package/src/containers/RoutineSettings/RoutineSettings.tsx +22 -33
- package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.tsx +6 -5
- package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.tsx +3 -1
- package/src/containers/RoutineTraceCompanion/useRoutineRuns.ts +3 -5
- package/src/containers/SkillArticle/SkillArticle.tsx +2 -0
- package/src/hooks/useTriggerRuntimeControls.ts +2 -2
- package/src/index.ts +1 -0
- package/src/operations/create-routine.ts +1 -1
- package/src/operations/create-trigger-from-template.ts +2 -2
- package/src/operations/run-routine.test.ts +150 -0
- package/src/operations/run-routine.ts +18 -2
- package/src/paths.ts +5 -5
- package/src/templates/index.ts +5 -3
- package/src/translations.ts +5 -6
- package/src/types/RoutineCapabilities.ts +10 -4
- package/src/types/RoutineOperation.ts +7 -6
- package/src/types/index.ts +0 -1
- package/src/util/index.ts +1 -0
- package/src/util/routines-for-object.test.ts +37 -5
- package/src/util/routines-for-object.ts +33 -8
- package/src/util/wire.test.ts +77 -0
- package/src/util/wire.ts +76 -0
- package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs +0 -95
- package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs.map +0 -7
- package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs +0 -249
- package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs.map +0 -7
- package/dist/lib/neutral/RoutinePlugin.mjs +0 -10
- package/dist/lib/neutral/RoutinePlugin.mjs.map +0 -7
- package/dist/lib/neutral/RoutinePlugin.node.mjs +0 -1133
- package/dist/lib/neutral/RoutinePlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/RoutinePlugin.workerd.mjs +0 -36
- package/dist/lib/neutral/RoutinePlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs +0 -48
- package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs.map +0 -7
- package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs +0 -236
- package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs.map +0 -7
- package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs +0 -27
- package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-FALWLZTI.mjs +0 -90
- package/dist/lib/neutral/app-graph-builder-FALWLZTI.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -25
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/node.mjs +0 -19
- package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
- package/dist/lib/neutral/chunk-674LDIUJ.mjs +0 -9
- package/dist/lib/neutral/chunk-674LDIUJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HLO4LYXT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-P3TDQKOO.mjs +0 -8
- package/dist/lib/neutral/chunk-P3TDQKOO.mjs.map +0 -7
- package/dist/lib/neutral/chunk-R7J2MU2M.mjs +0 -263
- package/dist/lib/neutral/chunk-R7J2MU2M.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WLNL77C7.mjs +0 -14
- package/dist/lib/neutral/chunk-WLNL77C7.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YGWSAKLD.mjs +0 -65
- package/dist/lib/neutral/chunk-YGWSAKLD.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -1921
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -17
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-object-V23KVDMJ.mjs +0 -25
- package/dist/lib/neutral/create-object-V23KVDMJ.mjs.map +0 -7
- package/dist/lib/neutral/create-routine-6QBY6TWF.mjs +0 -38
- package/dist/lib/neutral/create-routine-6QBY6TWF.mjs.map +0 -7
- package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.mjs +0 -70
- package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -47
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -27
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/layer-specs-2TWJU5HI.mjs +0 -135
- package/dist/lib/neutral/layer-specs-2TWJU5HI.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs +0 -18
- package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs +0 -13
- package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-GMO7I7YE.mjs +0 -67
- package/dist/lib/neutral/react-surface-GMO7I7YE.mjs.map +0 -7
- package/dist/lib/neutral/registry-sync-DYPOC7ZG.mjs +0 -86
- package/dist/lib/neutral/registry-sync-DYPOC7ZG.mjs.map +0 -7
- package/dist/lib/neutral/run-routine-AEWO6SYD.mjs +0 -37
- package/dist/lib/neutral/run-routine-AEWO6SYD.mjs.map +0 -7
- package/dist/lib/neutral/templates-IIUCEBAX.mjs +0 -49
- package/dist/lib/neutral/templates-IIUCEBAX.mjs.map +0 -7
- package/dist/lib/neutral/testing.mjs +0 -8
- package/dist/lib/neutral/testing.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -115
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/trigger-runtime-controller-WIDDFGQT.mjs +0 -77
- package/dist/lib/neutral/trigger-runtime-controller-WIDDFGQT.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -17
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
- package/dist/types/src/commands/trigger/create/queue.d.ts.map +0 -1
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +0 -1
- package/dist/types/src/components/MasterDetail/MasterDetail.d.ts +0 -51
- package/dist/types/src/components/MasterDetail/MasterDetail.d.ts.map +0 -1
- package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts +0 -16
- package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/MasterDetail/index.d.ts +0 -2
- package/dist/types/src/components/MasterDetail/index.d.ts.map +0 -1
- package/dist/types/src/types/Routine.d.ts +0 -55
- package/dist/types/src/types/Routine.d.ts.map +0 -1
- package/dist/types/src/types/Routine.test.d.ts +0 -2
- package/dist/types/src/types/Routine.test.d.ts.map +0 -1
- package/src/capabilities/navigation-resolver.ts +0 -21
- package/src/components/MasterDetail/MasterDetail.stories.tsx +0 -100
- package/src/components/MasterDetail/MasterDetail.tsx +0 -175
- package/src/types/Routine.test.ts +0 -51
- package/src/types/Routine.ts +0 -144
package/dx.config.ts
CHANGED
|
@@ -18,8 +18,9 @@ export default Config2.make({
|
|
|
18
18
|
|
|
19
19
|
Routines are configured in their own article and surfaced on a per-object "Routines" companion
|
|
20
20
|
that lists the routines connected to each object. A per-space TriggerDispatcher manages
|
|
21
|
-
execution: running locally in the browser
|
|
22
|
-
the
|
|
21
|
+
execution: running each trigger locally in the browser, or delegating it to the DXOS edge for
|
|
22
|
+
server-side reliability when the trigger's "remote" flag is set; the space settings page toggles
|
|
23
|
+
trigger execution for the whole space.
|
|
23
24
|
|
|
24
25
|
Operation handlers and skills contributed by any plugin in the application are
|
|
25
26
|
automatically merged and made available to every space's OperationRegistry, so new
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-routine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -19,33 +19,33 @@
|
|
|
19
19
|
"default": "./src/capabilities/index.ts"
|
|
20
20
|
},
|
|
21
21
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
22
|
-
"node": "./dist/lib/
|
|
23
|
-
"default": "./dist/lib/
|
|
22
|
+
"node": "./dist/lib/capabilities/node.mjs",
|
|
23
|
+
"default": "./dist/lib/capabilities.mjs"
|
|
24
24
|
},
|
|
25
25
|
"#components": {
|
|
26
26
|
"source": "./src/components/index.ts",
|
|
27
27
|
"types": "./dist/types/src/components/index.d.ts",
|
|
28
|
-
"default": "./dist/lib/
|
|
28
|
+
"default": "./dist/lib/components.mjs"
|
|
29
29
|
},
|
|
30
30
|
"#containers": {
|
|
31
31
|
"source": "./src/containers/index.ts",
|
|
32
32
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
33
|
-
"default": "./dist/lib/
|
|
33
|
+
"default": "./dist/lib/containers.mjs"
|
|
34
34
|
},
|
|
35
35
|
"#hooks": {
|
|
36
36
|
"source": "./src/hooks/index.ts",
|
|
37
37
|
"types": "./dist/types/src/hooks/index.d.ts",
|
|
38
|
-
"default": "./dist/lib/
|
|
38
|
+
"default": "./dist/lib/hooks.mjs"
|
|
39
39
|
},
|
|
40
40
|
"#meta": {
|
|
41
41
|
"source": "./src/meta.ts",
|
|
42
42
|
"types": "./dist/types/src/meta.d.ts",
|
|
43
|
-
"default": "./dist/lib/
|
|
43
|
+
"default": "./dist/lib/meta.mjs"
|
|
44
44
|
},
|
|
45
45
|
"#operations": {
|
|
46
46
|
"source": "./src/operations/index.ts",
|
|
47
47
|
"types": "./dist/types/src/operations/index.d.ts",
|
|
48
|
-
"default": "./dist/lib/
|
|
48
|
+
"default": "./dist/lib/operations.mjs"
|
|
49
49
|
},
|
|
50
50
|
"#plugin": {
|
|
51
51
|
"source": {
|
|
@@ -54,58 +54,58 @@
|
|
|
54
54
|
"default": "./src/RoutinePlugin.tsx"
|
|
55
55
|
},
|
|
56
56
|
"types": "./dist/types/src/RoutinePlugin.d.ts",
|
|
57
|
-
"workerd": "./dist/lib/
|
|
58
|
-
"node": "./dist/lib/
|
|
59
|
-
"default": "./dist/lib/
|
|
57
|
+
"workerd": "./dist/lib/RoutinePlugin.workerd.mjs",
|
|
58
|
+
"node": "./dist/lib/RoutinePlugin.node.mjs",
|
|
59
|
+
"default": "./dist/lib/RoutinePlugin.mjs"
|
|
60
60
|
},
|
|
61
61
|
"#testing": "./src/testing/index.ts",
|
|
62
62
|
"#translations": {
|
|
63
63
|
"source": "./src/translations.ts",
|
|
64
64
|
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
-
"default": "./dist/lib/
|
|
65
|
+
"default": "./dist/lib/translations.mjs"
|
|
66
66
|
},
|
|
67
67
|
"#types": {
|
|
68
68
|
"source": "./src/types/index.ts",
|
|
69
69
|
"types": "./dist/types/src/types/index.d.ts",
|
|
70
|
-
"default": "./dist/lib/
|
|
70
|
+
"default": "./dist/lib/types.mjs"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"exports": {
|
|
74
74
|
".": {
|
|
75
75
|
"source": "./src/index.ts",
|
|
76
76
|
"types": "./dist/types/src/index.d.ts",
|
|
77
|
-
"
|
|
77
|
+
"import": "./dist/lib/index.mjs"
|
|
78
78
|
},
|
|
79
79
|
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
80
80
|
"./components": {
|
|
81
81
|
"source": "./src/components/index.ts",
|
|
82
82
|
"types": "./dist/types/src/components/index.d.ts",
|
|
83
|
-
"
|
|
83
|
+
"import": "./dist/lib/components.mjs"
|
|
84
84
|
},
|
|
85
85
|
"./hooks": {
|
|
86
86
|
"source": "./src/hooks/index.ts",
|
|
87
87
|
"types": "./dist/types/src/hooks/index.d.ts",
|
|
88
|
-
"
|
|
88
|
+
"import": "./dist/lib/hooks.mjs"
|
|
89
89
|
},
|
|
90
90
|
"./plugin": {
|
|
91
91
|
"source": "./src/plugin.ts",
|
|
92
92
|
"types": "./dist/types/src/plugin.d.ts",
|
|
93
|
-
"
|
|
93
|
+
"import": "./dist/lib/plugin.mjs"
|
|
94
94
|
},
|
|
95
95
|
"./testing": {
|
|
96
96
|
"source": "./src/testing.ts",
|
|
97
97
|
"types": "./dist/types/src/testing.d.ts",
|
|
98
|
-
"
|
|
98
|
+
"import": "./dist/lib/testing.mjs"
|
|
99
99
|
},
|
|
100
100
|
"./translations": {
|
|
101
101
|
"source": "./src/translations.ts",
|
|
102
102
|
"types": "./dist/types/src/translations.d.ts",
|
|
103
|
-
"
|
|
103
|
+
"import": "./dist/lib/translations.mjs"
|
|
104
104
|
},
|
|
105
105
|
"./types": {
|
|
106
106
|
"source": "./src/types/index.ts",
|
|
107
107
|
"types": "./dist/types/src/types/index.d.ts",
|
|
108
|
-
"
|
|
108
|
+
"import": "./dist/lib/types.mjs"
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -117,54 +117,56 @@
|
|
|
117
117
|
"PLUGIN.mdl"
|
|
118
118
|
],
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@codemirror/autocomplete": "^6.20.
|
|
121
|
-
"@codemirror/language": "^6.12.
|
|
122
|
-
"@codemirror/state": "^6.
|
|
123
|
-
"@codemirror/view": "^6.43.
|
|
120
|
+
"@codemirror/autocomplete": "^6.20.3",
|
|
121
|
+
"@codemirror/language": "^6.12.4",
|
|
122
|
+
"@codemirror/state": "^6.7.1",
|
|
123
|
+
"@codemirror/view": "^6.43.6",
|
|
124
124
|
"@effect-atom/atom": "^0.5.3",
|
|
125
125
|
"@effect/cli": "0.75.2",
|
|
126
126
|
"@effect/printer-ansi": "0.49.0",
|
|
127
127
|
"@radix-ui/react-compose-refs": "1.1.1",
|
|
128
128
|
"cronstrue": "^2.56.0",
|
|
129
|
-
"@dxos/ai": "0.
|
|
130
|
-
"@dxos/app-
|
|
131
|
-
"@dxos/app-
|
|
132
|
-
"@dxos/assistant-toolkit": "0.
|
|
133
|
-
"@dxos/cli-util": "0.
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/client": "0.
|
|
136
|
-
"@dxos/compute
|
|
137
|
-
"@dxos/
|
|
138
|
-
"@dxos/
|
|
139
|
-
"@dxos/context": "0.
|
|
140
|
-
"@dxos/echo": "0.
|
|
141
|
-
"@dxos/echo-
|
|
142
|
-
"@dxos/
|
|
143
|
-
"@dxos/
|
|
144
|
-
"@dxos/
|
|
145
|
-
"@dxos/
|
|
146
|
-
"@dxos/
|
|
147
|
-
"@dxos/
|
|
148
|
-
"@dxos/
|
|
149
|
-
"@dxos/
|
|
150
|
-
"@dxos/plugin-
|
|
151
|
-
"@dxos/plugin-
|
|
152
|
-
"@dxos/
|
|
153
|
-
"@dxos/
|
|
154
|
-
"@dxos/react-client": "0.
|
|
155
|
-
"@dxos/react-ui-
|
|
156
|
-
"@dxos/react-ui-
|
|
157
|
-
"@dxos/react-ui-
|
|
158
|
-
"@dxos/react-ui-
|
|
159
|
-
"@dxos/react-ui-
|
|
160
|
-
"@dxos/react-ui-
|
|
161
|
-
"@dxos/react-ui-
|
|
162
|
-
"@dxos/
|
|
163
|
-
"@dxos/
|
|
164
|
-
"@dxos/
|
|
165
|
-
"@dxos/
|
|
166
|
-
"@dxos/
|
|
167
|
-
"@dxos/
|
|
129
|
+
"@dxos/ai": "0.11.0",
|
|
130
|
+
"@dxos/app-framework": "0.11.0",
|
|
131
|
+
"@dxos/app-toolkit": "0.11.0",
|
|
132
|
+
"@dxos/assistant-toolkit": "0.11.0",
|
|
133
|
+
"@dxos/cli-util": "0.11.0",
|
|
134
|
+
"@dxos/client-protocol": "0.11.0",
|
|
135
|
+
"@dxos/client": "0.11.0",
|
|
136
|
+
"@dxos/compute": "0.11.0",
|
|
137
|
+
"@dxos/compute-runtime": "0.11.0",
|
|
138
|
+
"@dxos/conductor": "0.11.0",
|
|
139
|
+
"@dxos/context": "0.11.0",
|
|
140
|
+
"@dxos/echo-doc": "0.11.0",
|
|
141
|
+
"@dxos/echo-react": "0.11.0",
|
|
142
|
+
"@dxos/edge-compute": "0.11.0",
|
|
143
|
+
"@dxos/edge-client": "0.11.0",
|
|
144
|
+
"@dxos/effect": "0.11.0",
|
|
145
|
+
"@dxos/keys": "0.11.0",
|
|
146
|
+
"@dxos/invariant": "0.11.0",
|
|
147
|
+
"@dxos/link": "0.11.0",
|
|
148
|
+
"@dxos/log": "0.11.0",
|
|
149
|
+
"@dxos/plugin-client": "0.11.0",
|
|
150
|
+
"@dxos/plugin-graph": "0.11.0",
|
|
151
|
+
"@dxos/plugin-markdown": "0.11.0",
|
|
152
|
+
"@dxos/random": "0.11.0",
|
|
153
|
+
"@dxos/plugin-space": "0.11.0",
|
|
154
|
+
"@dxos/react-client": "0.11.0",
|
|
155
|
+
"@dxos/react-ui-attention": "0.11.0",
|
|
156
|
+
"@dxos/react-ui-components": "0.11.0",
|
|
157
|
+
"@dxos/react-ui-editor": "0.11.0",
|
|
158
|
+
"@dxos/react-ui-form": "0.11.0",
|
|
159
|
+
"@dxos/react-ui-list": "0.11.0",
|
|
160
|
+
"@dxos/react-ui-menu": "0.11.0",
|
|
161
|
+
"@dxos/react-ui-search": "0.11.0",
|
|
162
|
+
"@dxos/react-ui-syntax-highlighter": "0.11.0",
|
|
163
|
+
"@dxos/schema": "0.11.0",
|
|
164
|
+
"@dxos/types": "0.11.0",
|
|
165
|
+
"@dxos/ui": "0.11.0",
|
|
166
|
+
"@dxos/ui-editor": "0.11.0",
|
|
167
|
+
"@dxos/util": "0.11.0",
|
|
168
|
+
"@dxos/agent-runtime": "0.11.0",
|
|
169
|
+
"@dxos/echo": "0.11.0"
|
|
168
170
|
},
|
|
169
171
|
"devDependencies": {
|
|
170
172
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -174,12 +176,12 @@
|
|
|
174
176
|
"effect": "3.21.4",
|
|
175
177
|
"react": "~19.2.7",
|
|
176
178
|
"react-dom": "~19.2.7",
|
|
177
|
-
"vite": "^8.
|
|
178
|
-
"@dxos/assistant": "0.
|
|
179
|
-
"@dxos/
|
|
180
|
-
"@dxos/
|
|
181
|
-
"@dxos/storybook-utils": "0.
|
|
182
|
-
"@dxos/ui-theme": "0.
|
|
179
|
+
"vite": "^8.1.4",
|
|
180
|
+
"@dxos/assistant": "0.11.0",
|
|
181
|
+
"@dxos/react-ui": "0.11.0",
|
|
182
|
+
"@dxos/plugin-testing": "0.11.0",
|
|
183
|
+
"@dxos/storybook-utils": "0.11.0",
|
|
184
|
+
"@dxos/ui-theme": "0.11.0"
|
|
183
185
|
},
|
|
184
186
|
"peerDependencies": {
|
|
185
187
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -187,8 +189,8 @@
|
|
|
187
189
|
"effect": "3.21.4",
|
|
188
190
|
"react": "~19.2.7",
|
|
189
191
|
"react-dom": "~19.2.7",
|
|
190
|
-
"@dxos/react-ui": "0.
|
|
191
|
-
"@dxos/ui-theme": "0.
|
|
192
|
+
"@dxos/react-ui": "^0.11.0",
|
|
193
|
+
"@dxos/ui-theme": "^0.11.0"
|
|
192
194
|
},
|
|
193
195
|
"publishConfig": {
|
|
194
196
|
"access": "public"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
-
import { Operation, Trace, Trigger } from '@dxos/compute';
|
|
7
|
+
import { Operation, Routine, Trace, Trigger } from '@dxos/compute';
|
|
8
8
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
9
9
|
|
|
10
10
|
import {
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
TriggerRuntimeController,
|
|
17
17
|
} from '#capabilities';
|
|
18
18
|
import { meta } from '#meta';
|
|
19
|
-
import { Routine } from '#types';
|
|
20
19
|
|
|
21
20
|
import { trigger } from './commands';
|
|
22
21
|
|
package/src/RoutinePlugin.tsx
CHANGED
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
-
import { Instructions, Operation, Trace, Trigger } from '@dxos/compute';
|
|
7
|
+
import { Instructions, Operation, Routine, Trace, Trigger } from '@dxos/compute';
|
|
8
8
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
11
|
AppGraphBuilder,
|
|
12
12
|
CreateObject,
|
|
13
13
|
LayerSpecs,
|
|
14
|
-
NavigationResolver,
|
|
15
14
|
OperationHandler,
|
|
16
15
|
ReactSurface,
|
|
17
16
|
RegistrySync,
|
|
@@ -20,7 +19,6 @@ import {
|
|
|
20
19
|
} from '#capabilities';
|
|
21
20
|
import { meta } from '#meta';
|
|
22
21
|
import { translations } from '#translations';
|
|
23
|
-
import { Routine } from '#types';
|
|
24
22
|
|
|
25
23
|
// eslint-disable-next-line import/no-relative-packages
|
|
26
24
|
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
@@ -28,7 +26,6 @@ import pluginSpec from '../PLUGIN.mdl?raw';
|
|
|
28
26
|
export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
29
27
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
30
28
|
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
31
|
-
AppPlugin.addNavigationResolverModule({ activatesOn: ClientEvents.ClientReady, activate: NavigationResolver }),
|
|
32
29
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
33
30
|
AppPlugin.addPluginAssetModule({
|
|
34
31
|
asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
@@ -39,6 +36,7 @@ export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
|
39
36
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
40
37
|
AppPlugin.addTranslationsModule({ translations }),
|
|
41
38
|
Plugin.addModule({
|
|
39
|
+
// TODO(dmaretskyi): Seems to be contributing too late.
|
|
42
40
|
activatesOn: ClientEvents.ClientReady,
|
|
43
41
|
firesBeforeActivation: [ActivationEvents.SetupProcessManager],
|
|
44
42
|
activate: LayerSpecs,
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
-
import { Operation, Trace, Trigger } from '@dxos/compute';
|
|
7
|
+
import { Operation, Routine, Trace, Trigger } from '@dxos/compute';
|
|
8
8
|
|
|
9
9
|
import { OperationHandler, Templates } from '#capabilities';
|
|
10
10
|
import { meta } from '#meta';
|
|
11
|
-
import { Routine } from '#types';
|
|
12
11
|
|
|
13
12
|
export const RoutinePlugin = Plugin.define(meta).pipe(
|
|
14
13
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AppCapabilities, AppNode, AppNodeMatcher,
|
|
9
|
-
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, GraphPath, TypeSection } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation, Routine } from '@dxos/compute';
|
|
10
10
|
import { Type } from '@dxos/echo';
|
|
11
11
|
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
12
|
import { SETTINGS_SECTION_TYPE, SpaceOperation } from '@dxos/plugin-space';
|
|
13
|
-
import {
|
|
13
|
+
import { SETTINGS_SECTION_ID } from '@dxos/plugin-space/types';
|
|
14
14
|
import { Position } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { meta } from '#meta';
|
|
17
|
-
import { Routine } from '#types';
|
|
18
17
|
|
|
19
18
|
import { getRoutinesPath } from '../paths';
|
|
20
19
|
|
|
@@ -22,7 +21,9 @@ export default Capability.makeModule(
|
|
|
22
21
|
Effect.fnUntraced(function* () {
|
|
23
22
|
const extensions = yield* Effect.all([
|
|
24
23
|
TypeSection.createTypeSectionExtension(Routine.Routine, {
|
|
25
|
-
|
|
24
|
+
urlKey: 'routine',
|
|
25
|
+
match: AppNodeMatcher.whenNavTreeGroup(GraphPath.GroupTypes.ai),
|
|
26
|
+
groupSegment: GraphPath.GroupSegments.ai,
|
|
26
27
|
createObject: (space) =>
|
|
27
28
|
Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
28
29
|
target: space.db,
|
|
@@ -32,6 +33,7 @@ export default Capability.makeModule(
|
|
|
32
33
|
}),
|
|
33
34
|
GraphBuilder.createExtension({
|
|
34
35
|
id: 'spaceSettingsAutomation',
|
|
36
|
+
url: { key: 'routines', kind: 'singleton', path: [SETTINGS_SECTION_ID] },
|
|
35
37
|
match: NodeMatcher.whenNodeType(SETTINGS_SECTION_TYPE),
|
|
36
38
|
connector: () => {
|
|
37
39
|
return Effect.succeed([
|
|
@@ -52,7 +54,7 @@ export default Capability.makeModule(
|
|
|
52
54
|
connector: () =>
|
|
53
55
|
Effect.succeed([
|
|
54
56
|
AppNode.makeCompanion({
|
|
55
|
-
|
|
57
|
+
variant: 'automation',
|
|
56
58
|
label: ['automation-companion.label', { ns: meta.profile.key }],
|
|
57
59
|
icon: 'ph--lightning--regular',
|
|
58
60
|
data: 'automation',
|
|
@@ -66,7 +68,7 @@ export default Capability.makeModule(
|
|
|
66
68
|
connector: () =>
|
|
67
69
|
Effect.succeed([
|
|
68
70
|
AppNode.makeCompanion({
|
|
69
|
-
|
|
71
|
+
variant: 'runs',
|
|
70
72
|
label: ['routine-runs.label', { ns: meta.profile.key }],
|
|
71
73
|
icon: 'ph--clock-countdown--regular',
|
|
72
74
|
data: 'runs',
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Operation, Routine } from '@dxos/compute';
|
|
9
9
|
import { Type } from '@dxos/echo';
|
|
10
10
|
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
11
|
|
|
12
12
|
import { CreateRoutinePanel } from '#components';
|
|
13
|
-
import {
|
|
13
|
+
import { RoutineOperation } from '#types';
|
|
14
14
|
|
|
15
15
|
type CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];
|
|
16
16
|
|
|
@@ -6,7 +6,6 @@ import { Capability } from '@dxos/app-framework';
|
|
|
6
6
|
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
-
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
10
9
|
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
11
10
|
export const LayerSpecs = Capability.lazy<void, Capability.Any[]>('LayerSpecs', () => import('./layer-specs'));
|
|
12
11
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
@@ -10,15 +10,19 @@ import { OpaqueToolkit } from '@dxos/ai';
|
|
|
10
10
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
11
11
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
12
|
import { ClientService } from '@dxos/client';
|
|
13
|
-
import { LayerSpec, Operation, OperationHandlerSet } from '@dxos/compute';
|
|
14
|
-
import { ProcessManager } from '@dxos/compute-runtime';
|
|
15
|
-
import { Database, Registry } from '@dxos/echo';
|
|
13
|
+
import { LayerSpec, Operation, OperationHandlerSet, Trigger } from '@dxos/compute';
|
|
16
14
|
import {
|
|
17
15
|
FeedTraceSink,
|
|
18
|
-
|
|
16
|
+
ProcessManager,
|
|
17
|
+
RemoteOperationInvoker,
|
|
18
|
+
RemoteProcessManager,
|
|
19
|
+
RemoteTriggerManager,
|
|
19
20
|
TriggerDispatcher,
|
|
21
|
+
TriggerMonitor,
|
|
20
22
|
TriggerStateStore,
|
|
21
|
-
} from '@dxos/
|
|
23
|
+
} from '@dxos/compute-runtime';
|
|
24
|
+
import { Database, Registry } from '@dxos/echo';
|
|
25
|
+
import { EdgeOperationInvoker, EdgeProcessManager, EdgeTriggerManager } from '@dxos/edge-compute';
|
|
22
26
|
import { invariant } from '@dxos/invariant';
|
|
23
27
|
|
|
24
28
|
//
|
|
@@ -142,26 +146,71 @@ const FeedTraceSinkSpec = LayerSpec.make(
|
|
|
142
146
|
);
|
|
143
147
|
|
|
144
148
|
/**
|
|
145
|
-
* Space-scoped
|
|
146
|
-
* (`runtime.client.edgeFeatures.agents`)
|
|
149
|
+
* Space-scoped remote operation invoker (EDGE). When edge agents are enabled
|
|
150
|
+
* (`runtime.client.edgeFeatures.agents`) operations are invoked without a space
|
|
147
151
|
* binding (the edge routes them); otherwise they are scoped to the space. The
|
|
148
152
|
* config is read inside the factory — at slice-materialisation time, once
|
|
149
153
|
* `ClientService` is available — so the owning module does not need the client
|
|
150
154
|
* at activation time and can activate on `SetupProcessManager`.
|
|
151
155
|
*/
|
|
152
|
-
const
|
|
156
|
+
const RemoteOperationInvokerSpec = LayerSpec.make(
|
|
153
157
|
{
|
|
154
158
|
affinity: 'space',
|
|
155
159
|
requires: [ClientService],
|
|
156
|
-
provides: [
|
|
160
|
+
provides: [RemoteOperationInvoker.Service],
|
|
157
161
|
},
|
|
158
162
|
(context) =>
|
|
159
163
|
Layer.unwrapEffect(
|
|
160
164
|
Effect.gen(function* () {
|
|
161
|
-
invariant(context.space, 'space context required for
|
|
165
|
+
invariant(context.space, 'space context required for RemoteOperationInvoker');
|
|
162
166
|
const client = yield* ClientService;
|
|
163
167
|
const edgeAgents = client.config.get('runtime.client.edgeFeatures.agents');
|
|
164
|
-
return
|
|
168
|
+
return EdgeOperationInvoker.fromClient(client, edgeAgents ? undefined : context.space);
|
|
169
|
+
}),
|
|
170
|
+
),
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Space-scoped remote (EDGE) trigger manager, consumed by the aggregate
|
|
175
|
+
* {@link TriggerMonitor}. Uses the EDGE implementation whenever an edge service
|
|
176
|
+
* is configured (a trigger is routed here by its own `remote` flag, so the
|
|
177
|
+
* manager should exist wherever edge is reachable), otherwise a no-op.
|
|
178
|
+
*/
|
|
179
|
+
const RemoteTriggerManagerSpec = LayerSpec.make(
|
|
180
|
+
{
|
|
181
|
+
affinity: 'space',
|
|
182
|
+
requires: [ClientService, AtomRegistry.AtomRegistry],
|
|
183
|
+
provides: [RemoteTriggerManager.Service],
|
|
184
|
+
},
|
|
185
|
+
(context) =>
|
|
186
|
+
Layer.unwrapEffect(
|
|
187
|
+
Effect.gen(function* () {
|
|
188
|
+
invariant(context.space, 'space context required for RemoteTriggerManager');
|
|
189
|
+
const client = yield* ClientService;
|
|
190
|
+
const edgeUrl = client.config.values.runtime?.services?.edge?.url;
|
|
191
|
+
return edgeUrl ? EdgeTriggerManager.fromClient(client, context.space) : RemoteTriggerManager.layerNoop;
|
|
192
|
+
}),
|
|
193
|
+
),
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Application-scoped remote (EDGE) process manager, providing the progress meter's cancel control.
|
|
198
|
+
* Uses the EDGE implementation whenever an edge service is configured — cancel is addressed by trigger
|
|
199
|
+
* id + space, so it is not space-scoped — otherwise a read-only no-op. Resolved by the progress trace
|
|
200
|
+
* sink to route an edge-run trigger's cancel; the aggregate {@link TriggerMonitor} view is unaffected.
|
|
201
|
+
*/
|
|
202
|
+
const RemoteProcessManagerSpec = LayerSpec.make(
|
|
203
|
+
{
|
|
204
|
+
affinity: 'application',
|
|
205
|
+
requires: [ClientService, AtomRegistry.AtomRegistry],
|
|
206
|
+
provides: [RemoteProcessManager.Service],
|
|
207
|
+
},
|
|
208
|
+
() =>
|
|
209
|
+
Layer.unwrapEffect(
|
|
210
|
+
Effect.gen(function* () {
|
|
211
|
+
const client = yield* ClientService;
|
|
212
|
+
const edgeUrl = client.config.values.runtime?.services?.edge?.url;
|
|
213
|
+
return edgeUrl ? EdgeProcessManager.fromClient(client) : RemoteProcessManager.layerNoop;
|
|
165
214
|
}),
|
|
166
215
|
),
|
|
167
216
|
);
|
|
@@ -175,6 +224,20 @@ const TriggerDispatcherSpec = LayerSpec.make(
|
|
|
175
224
|
() => TriggerDispatcher.layer({ timeControl: 'natural' }),
|
|
176
225
|
);
|
|
177
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Aggregate {@link Trigger.TriggerMonitorService} over the local
|
|
229
|
+
* {@link TriggerDispatcher} and the remote {@link RemoteTriggerManager.Service}.
|
|
230
|
+
* Provides a unified view of trigger state across local and edge environments.
|
|
231
|
+
*/
|
|
232
|
+
const TriggerMonitorSpec = LayerSpec.make(
|
|
233
|
+
{
|
|
234
|
+
affinity: 'space',
|
|
235
|
+
requires: [TriggerDispatcher, Database.Service, AtomRegistry.AtomRegistry, RemoteTriggerManager.Service],
|
|
236
|
+
provides: [Trigger.TriggerMonitorService],
|
|
237
|
+
},
|
|
238
|
+
() => TriggerMonitor.layer,
|
|
239
|
+
);
|
|
240
|
+
|
|
178
241
|
export default Capability.makeModule(() =>
|
|
179
242
|
Effect.succeed([
|
|
180
243
|
Capability.contributes(Capabilities.LayerSpec, OperationHandlerProviderSpec),
|
|
@@ -184,7 +247,10 @@ export default Capability.makeModule(() =>
|
|
|
184
247
|
Capability.contributes(Capabilities.LayerSpec, TriggerStateStoreSpec),
|
|
185
248
|
Capability.contributes(Capabilities.LayerSpec, FeedTraceSinkSpec),
|
|
186
249
|
Capability.contributes(Capabilities.LayerSpec, TriggerDispatcherSpec),
|
|
187
|
-
Capability.contributes(Capabilities.LayerSpec,
|
|
250
|
+
Capability.contributes(Capabilities.LayerSpec, RemoteTriggerManagerSpec),
|
|
251
|
+
Capability.contributes(Capabilities.LayerSpec, TriggerMonitorSpec),
|
|
252
|
+
Capability.contributes(Capabilities.LayerSpec, RemoteOperationInvokerSpec),
|
|
253
|
+
Capability.contributes(Capabilities.LayerSpec, RemoteProcessManagerSpec),
|
|
188
254
|
Capability.contributes(Capabilities.TraceSink, ({ resolver }) => FeedTraceSink.makeRoutingSink({ resolver })),
|
|
189
255
|
]),
|
|
190
256
|
);
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
8
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
-
import { AppSurface
|
|
11
|
-
import { Skill } from '@dxos/compute';
|
|
9
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
|
+
import { Routine, Skill } from '@dxos/compute';
|
|
12
11
|
|
|
12
|
+
import { RoutineCard } from '#components';
|
|
13
13
|
import { RoutineArticle, RoutineCompanion, RoutineSettings, RoutineTraceCompanion, SkillArticle } from '#containers';
|
|
14
14
|
import { meta } from '#meta';
|
|
15
|
-
import { Routine } from '#types';
|
|
16
15
|
|
|
17
16
|
export default Capability.makeModule(() =>
|
|
18
17
|
Effect.succeed(
|
|
@@ -20,21 +19,19 @@ export default Capability.makeModule(() =>
|
|
|
20
19
|
Surface.create({
|
|
21
20
|
id: 'spaceSettingsAutomation',
|
|
22
21
|
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.space-settings-automation`),
|
|
23
|
-
component:
|
|
24
|
-
const space = useActiveSpace();
|
|
25
|
-
if (!space) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return <RoutineSettings space={space} />;
|
|
30
|
-
},
|
|
22
|
+
component: RoutineSettings,
|
|
31
23
|
}),
|
|
32
24
|
Surface.create({
|
|
33
25
|
id: 'automation.article',
|
|
34
26
|
filter: AppSurface.object(AppSurface.Article, Routine.Routine),
|
|
35
|
-
component:
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
component: RoutineArticle,
|
|
28
|
+
props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),
|
|
29
|
+
}),
|
|
30
|
+
Surface.create({
|
|
31
|
+
id: 'routine.card',
|
|
32
|
+
filter: AppSurface.object(AppSurface.CardContent, Routine.Routine),
|
|
33
|
+
component: RoutineCard,
|
|
34
|
+
props: ({ data: { subject } }) => ({ subject }),
|
|
38
35
|
}),
|
|
39
36
|
Surface.create({
|
|
40
37
|
id: 'companion.automation',
|
|
@@ -42,9 +39,8 @@ export default Capability.makeModule(() =>
|
|
|
42
39
|
AppSurface.literal(AppSurface.Article, 'automation'),
|
|
43
40
|
AppSurface.companion(AppSurface.Article),
|
|
44
41
|
),
|
|
45
|
-
component:
|
|
46
|
-
|
|
47
|
-
},
|
|
42
|
+
component: RoutineCompanion,
|
|
43
|
+
props: ({ data: { attendableId, companionTo } }) => ({ attendableId, subject: companionTo }),
|
|
48
44
|
}),
|
|
49
45
|
Surface.create({
|
|
50
46
|
id: 'routine.runs',
|
|
@@ -52,14 +48,14 @@ export default Capability.makeModule(() =>
|
|
|
52
48
|
AppSurface.literal(AppSurface.Article, 'runs'),
|
|
53
49
|
AppSurface.companion(AppSurface.Article, Routine.Routine),
|
|
54
50
|
),
|
|
55
|
-
component:
|
|
51
|
+
component: RoutineTraceCompanion,
|
|
52
|
+
props: ({ role, data: { companionTo } }) => ({ role, subject: companionTo }),
|
|
56
53
|
}),
|
|
57
54
|
Surface.create({
|
|
58
55
|
id: 'skill',
|
|
59
56
|
filter: AppSurface.object(AppSurface.Article, Skill.Skill),
|
|
60
|
-
component:
|
|
61
|
-
|
|
62
|
-
),
|
|
57
|
+
component: SkillArticle,
|
|
58
|
+
props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),
|
|
63
59
|
}),
|
|
64
60
|
]),
|
|
65
61
|
),
|