@dxos/plugin-routine 0.10.0 → 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.
Files changed (320) hide show
  1. package/PLUGIN.mdl +18 -13
  2. package/dist/lib/RoutinePlugin.mjs +2 -0
  3. package/dist/lib/RoutinePlugin.node.mjs +894 -0
  4. package/dist/lib/RoutinePlugin.node.mjs.map +1 -0
  5. package/dist/lib/RoutinePlugin.workerd.mjs +20 -0
  6. package/dist/lib/RoutinePlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities/node.mjs +12 -0
  8. package/dist/lib/capabilities/node.mjs.map +1 -0
  9. package/dist/lib/capabilities.mjs +14 -0
  10. package/dist/lib/capabilities.mjs.map +1 -0
  11. package/dist/lib/chunk-RoutineArticle.mjs +79 -0
  12. package/dist/lib/chunk-RoutineArticle.mjs.map +1 -0
  13. package/dist/lib/chunk-RoutineCompanion.mjs +192 -0
  14. package/dist/lib/chunk-RoutineCompanion.mjs.map +1 -0
  15. package/dist/lib/chunk-RoutinePlugin.mjs +38 -0
  16. package/dist/lib/chunk-RoutinePlugin.mjs.map +1 -0
  17. package/dist/lib/chunk-RoutineSettings.mjs +50 -0
  18. package/dist/lib/chunk-RoutineSettings.mjs.map +1 -0
  19. package/dist/lib/chunk-RoutineTraceCompanion.mjs +208 -0
  20. package/dist/lib/chunk-RoutineTraceCompanion.mjs.map +1 -0
  21. package/dist/lib/chunk-SkillArticle.mjs +28 -0
  22. package/dist/lib/chunk-SkillArticle.mjs.map +1 -0
  23. package/dist/lib/chunk-app-graph-builder.mjs +71 -0
  24. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  25. package/dist/lib/chunk-create-object.mjs +23 -0
  26. package/dist/lib/chunk-create-object.mjs.map +1 -0
  27. package/dist/lib/chunk-create-routine.mjs +34 -0
  28. package/dist/lib/chunk-create-routine.mjs.map +1 -0
  29. package/dist/lib/chunk-create-trigger-from-template.mjs +48 -0
  30. package/dist/lib/chunk-create-trigger-from-template.mjs.map +1 -0
  31. package/dist/lib/chunk-layer-specs.mjs +179 -0
  32. package/dist/lib/chunk-layer-specs.mjs.map +1 -0
  33. package/dist/lib/{neutral/chunk-HLO4LYXT.mjs → chunk-meta.mjs} +19 -27
  34. package/dist/lib/chunk-meta.mjs.map +1 -0
  35. package/dist/lib/chunk-operation-handler.mjs +11 -0
  36. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  37. package/dist/lib/chunk-paths.mjs +11 -0
  38. package/dist/lib/chunk-paths.mjs.map +1 -0
  39. package/dist/lib/chunk-react-surface.mjs +64 -0
  40. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  41. package/dist/lib/chunk-registry-sync.mjs +104 -0
  42. package/dist/lib/chunk-registry-sync.mjs.map +1 -0
  43. package/dist/lib/chunk-run-routine.mjs +57 -0
  44. package/dist/lib/chunk-run-routine.mjs.map +1 -0
  45. package/dist/lib/chunk-templates.mjs +37 -0
  46. package/dist/lib/chunk-templates.mjs.map +1 -0
  47. package/dist/lib/chunk-trigger-runtime-controller.mjs +73 -0
  48. package/dist/lib/chunk-trigger-runtime-controller.mjs.map +1 -0
  49. package/dist/lib/chunk-types.mjs +149 -0
  50. package/dist/lib/chunk-types.mjs.map +1 -0
  51. package/dist/lib/chunk-util.mjs +142 -0
  52. package/dist/lib/chunk-util.mjs.map +1 -0
  53. package/dist/lib/components.mjs +1645 -0
  54. package/dist/lib/components.mjs.map +1 -0
  55. package/dist/lib/containers.mjs +11 -0
  56. package/dist/lib/containers.mjs.map +1 -0
  57. package/dist/lib/hooks.mjs +37 -0
  58. package/dist/lib/hooks.mjs.map +1 -0
  59. package/dist/lib/index.mjs +5 -0
  60. package/dist/lib/meta.mjs +2 -0
  61. package/dist/lib/operations.mjs +7 -0
  62. package/dist/lib/operations.mjs.map +1 -0
  63. package/dist/lib/plugin.mjs +9 -0
  64. package/dist/lib/plugin.mjs.map +1 -0
  65. package/dist/lib/testing.mjs +2 -0
  66. package/dist/lib/translations.mjs +110 -0
  67. package/dist/lib/translations.mjs.map +1 -0
  68. package/dist/lib/types.mjs +2 -0
  69. package/dist/types/src/RoutinePlugin.d.ts.map +1 -1
  70. package/dist/types/src/RoutinePlugin.node.d.ts.map +1 -1
  71. package/dist/types/src/RoutinePlugin.workerd.d.ts.map +1 -1
  72. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  73. package/dist/types/src/capabilities/create-object.d.ts +1 -1
  74. package/dist/types/src/capabilities/index.d.ts +0 -1
  75. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  76. package/dist/types/src/capabilities/layer-specs.d.ts +1 -1
  77. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  78. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  79. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  80. package/dist/types/src/capabilities/registry-sync.d.ts +1 -1
  81. package/dist/types/src/capabilities/templates.d.ts +1 -1
  82. package/dist/types/src/capabilities/trigger-runtime-controller.d.ts +1 -1
  83. package/dist/types/src/commands/trigger/create/{queue.d.ts → feed.d.ts} +2 -2
  84. package/dist/types/src/commands/trigger/create/feed.d.ts.map +1 -0
  85. package/dist/types/src/commands/trigger/update/{queue.d.ts → feed.d.ts} +2 -2
  86. package/dist/types/src/commands/trigger/update/feed.d.ts.map +1 -0
  87. package/dist/types/src/commands/trigger/util.d.ts +1 -1
  88. package/dist/types/src/commands/trigger/util.d.ts.map +1 -1
  89. package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts +7 -5
  90. package/dist/types/src/components/InstructionsEditor/InstructionsEditor.d.ts.map +1 -1
  91. package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts +3 -3
  92. package/dist/types/src/components/InstructionsEditor/InstructionsEditor.stories.d.ts.map +1 -1
  93. package/dist/types/src/components/RoutineCard/RoutineCard.d.ts +9 -0
  94. package/dist/types/src/components/RoutineCard/RoutineCard.d.ts.map +1 -0
  95. package/dist/types/src/components/RoutineCard/RoutineCard.stories.d.ts +21 -0
  96. package/dist/types/src/components/RoutineCard/RoutineCard.stories.d.ts.map +1 -0
  97. package/dist/types/src/components/RoutineCard/index.d.ts +2 -0
  98. package/dist/types/src/components/RoutineCard/index.d.ts.map +1 -0
  99. package/dist/types/src/components/RoutineForm/RoutineForm.d.ts +7 -2
  100. package/dist/types/src/components/RoutineForm/RoutineForm.d.ts.map +1 -1
  101. package/dist/types/src/components/Schedule/Schedule.d.ts +2 -26
  102. package/dist/types/src/components/Schedule/Schedule.d.ts.map +1 -1
  103. package/dist/types/src/components/Schedule/days.d.ts +24 -0
  104. package/dist/types/src/components/Schedule/days.d.ts.map +1 -0
  105. package/dist/types/src/components/Schedule/describe-schedule.d.ts +3 -0
  106. package/dist/types/src/components/Schedule/describe-schedule.d.ts.map +1 -0
  107. package/dist/types/src/components/Schedule/index.d.ts +2 -0
  108. package/dist/types/src/components/Schedule/index.d.ts.map +1 -1
  109. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +1 -1
  110. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  111. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  112. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  113. package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts +5 -2
  114. package/dist/types/src/components/TriggerEditor/TriggerKindSelector.d.ts.map +1 -1
  115. package/dist/types/src/components/TriggerEditor/trigger-kind-icon.d.ts +5 -0
  116. package/dist/types/src/components/TriggerEditor/trigger-kind-icon.d.ts.map +1 -0
  117. package/dist/types/src/components/index.d.ts +1 -1
  118. package/dist/types/src/components/index.d.ts.map +1 -1
  119. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +5 -10
  120. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -1
  121. package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +6 -2
  122. package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -1
  123. package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts +4 -12
  124. package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.d.ts.map +1 -1
  125. package/dist/types/src/containers/RoutineCompanion/RoutineCompanion.stories.d.ts.map +1 -1
  126. package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts +4 -8
  127. package/dist/types/src/containers/RoutineSettings/RoutineSettings.d.ts.map +1 -1
  128. package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts +5 -3
  129. package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.d.ts.map +1 -1
  130. package/dist/types/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.d.ts.map +1 -1
  131. package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts +1 -1
  132. package/dist/types/src/containers/RoutineTraceCompanion/useRoutineRuns.d.ts.map +1 -1
  133. package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts +4 -1
  134. package/dist/types/src/containers/SkillArticle/SkillArticle.d.ts.map +1 -1
  135. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
  136. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
  137. package/dist/types/src/index.d.ts +1 -0
  138. package/dist/types/src/index.d.ts.map +1 -1
  139. package/dist/types/src/operations/run-routine.d.ts.map +1 -1
  140. package/dist/types/src/operations/run-routine.test.d.ts +2 -0
  141. package/dist/types/src/operations/run-routine.test.d.ts.map +1 -0
  142. package/dist/types/src/paths.d.ts.map +1 -1
  143. package/dist/types/src/templates/index.d.ts +1 -1
  144. package/dist/types/src/templates/index.d.ts.map +1 -1
  145. package/dist/types/src/testing/test-functions.d.ts +30 -6
  146. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  147. package/dist/types/src/translations.d.ts.map +1 -1
  148. package/dist/types/src/types/RoutineCapabilities.d.ts +9 -3
  149. package/dist/types/src/types/RoutineCapabilities.d.ts.map +1 -1
  150. package/dist/types/src/types/RoutineOperation.d.ts +2 -3
  151. package/dist/types/src/types/RoutineOperation.d.ts.map +1 -1
  152. package/dist/types/src/types/index.d.ts +0 -1
  153. package/dist/types/src/types/index.d.ts.map +1 -1
  154. package/dist/types/src/util/index.d.ts +1 -0
  155. package/dist/types/src/util/index.d.ts.map +1 -1
  156. package/dist/types/src/util/routines-for-object.d.ts +6 -3
  157. package/dist/types/src/util/routines-for-object.d.ts.map +1 -1
  158. package/dist/types/src/util/wire.d.ts +21 -0
  159. package/dist/types/src/util/wire.d.ts.map +1 -0
  160. package/dist/types/src/util/wire.test.d.ts +2 -0
  161. package/dist/types/src/util/wire.test.d.ts.map +1 -0
  162. package/dist/types/tsconfig.tsbuildinfo +1 -1
  163. package/dx.config.ts +3 -2
  164. package/package.json +73 -71
  165. package/src/RoutinePlugin.node.ts +1 -2
  166. package/src/RoutinePlugin.tsx +2 -4
  167. package/src/RoutinePlugin.workerd.ts +1 -2
  168. package/src/capabilities/app-graph-builder.ts +9 -7
  169. package/src/capabilities/create-object.ts +2 -2
  170. package/src/capabilities/index.ts +0 -1
  171. package/src/capabilities/layer-specs.ts +78 -12
  172. package/src/capabilities/{react-surface.tsx → react-surface.ts} +18 -22
  173. package/src/capabilities/trigger-runtime-controller.test.ts +12 -18
  174. package/src/capabilities/trigger-runtime-controller.ts +22 -25
  175. package/src/commands/trigger/create/{queue.ts → feed.ts} +1 -1
  176. package/src/commands/trigger/create/index.ts +2 -2
  177. package/src/commands/trigger/update/{queue.ts → feed.ts} +1 -1
  178. package/src/commands/trigger/update/index.ts +2 -2
  179. package/src/commands/trigger/util.ts +1 -2
  180. package/src/components/InstructionsEditor/InstructionsEditor.stories.tsx +7 -6
  181. package/src/components/InstructionsEditor/InstructionsEditor.tsx +31 -19
  182. package/src/components/RoutineCard/RoutineCard.stories.tsx +95 -0
  183. package/src/components/RoutineCard/RoutineCard.tsx +60 -0
  184. package/src/components/{MasterDetail → RoutineCard}/index.ts +1 -1
  185. package/src/components/RoutineForm/RoutineForm.tsx +60 -52
  186. package/src/components/Schedule/Schedule.stories.tsx +1 -1
  187. package/src/components/Schedule/Schedule.tsx +4 -73
  188. package/src/components/Schedule/days.ts +18 -0
  189. package/src/components/Schedule/describe-schedule.ts +64 -0
  190. package/src/components/Schedule/index.ts +2 -0
  191. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +1 -1
  192. package/src/components/TemplateEditor/TemplateForm.tsx +1 -1
  193. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +3 -3
  194. package/src/components/TriggerEditor/TriggerEditor.tsx +79 -66
  195. package/src/components/TriggerEditor/TriggerKindSelector.tsx +4 -30
  196. package/src/components/TriggerEditor/trigger-kind-icon.ts +38 -0
  197. package/src/components/index.ts +1 -1
  198. package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +78 -19
  199. package/src/containers/RoutineArticle/RoutineArticle.tsx +8 -4
  200. package/src/containers/RoutineCompanion/RoutineCompanion.stories.tsx +5 -4
  201. package/src/containers/RoutineCompanion/RoutineCompanion.tsx +11 -7
  202. package/src/containers/RoutineSettings/RoutineSettings.tsx +22 -33
  203. package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.stories.tsx +6 -5
  204. package/src/containers/RoutineTraceCompanion/RoutineTraceCompanion.tsx +3 -1
  205. package/src/containers/RoutineTraceCompanion/useRoutineRuns.ts +3 -5
  206. package/src/containers/SkillArticle/SkillArticle.tsx +2 -0
  207. package/src/hooks/useTriggerRuntimeControls.ts +2 -2
  208. package/src/index.ts +1 -0
  209. package/src/operations/create-routine.ts +1 -1
  210. package/src/operations/create-trigger-from-template.ts +2 -2
  211. package/src/operations/run-routine.test.ts +150 -0
  212. package/src/operations/run-routine.ts +18 -2
  213. package/src/paths.ts +5 -5
  214. package/src/templates/index.ts +5 -3
  215. package/src/translations.ts +5 -6
  216. package/src/types/RoutineCapabilities.ts +10 -4
  217. package/src/types/RoutineOperation.ts +7 -6
  218. package/src/types/index.ts +0 -1
  219. package/src/util/index.ts +1 -0
  220. package/src/util/routines-for-object.test.ts +37 -5
  221. package/src/util/routines-for-object.ts +33 -8
  222. package/src/util/wire.test.ts +77 -0
  223. package/src/util/wire.ts +76 -0
  224. package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs +0 -95
  225. package/dist/lib/neutral/RoutineArticle-UNTMV4CC.mjs.map +0 -7
  226. package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs +0 -249
  227. package/dist/lib/neutral/RoutineCompanion-ZZ6WMY7I.mjs.map +0 -7
  228. package/dist/lib/neutral/RoutinePlugin.mjs +0 -10
  229. package/dist/lib/neutral/RoutinePlugin.mjs.map +0 -7
  230. package/dist/lib/neutral/RoutinePlugin.node.mjs +0 -1133
  231. package/dist/lib/neutral/RoutinePlugin.node.mjs.map +0 -7
  232. package/dist/lib/neutral/RoutinePlugin.workerd.mjs +0 -36
  233. package/dist/lib/neutral/RoutinePlugin.workerd.mjs.map +0 -7
  234. package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs +0 -48
  235. package/dist/lib/neutral/RoutineSettings-ZJOM4F3S.mjs.map +0 -7
  236. package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs +0 -236
  237. package/dist/lib/neutral/RoutineTraceCompanion-5U6R7LJE.mjs.map +0 -7
  238. package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs +0 -27
  239. package/dist/lib/neutral/SkillArticle-WWDNKW2Z.mjs.map +0 -7
  240. package/dist/lib/neutral/app-graph-builder-FALWLZTI.mjs +0 -90
  241. package/dist/lib/neutral/app-graph-builder-FALWLZTI.mjs.map +0 -7
  242. package/dist/lib/neutral/capabilities/index.mjs +0 -25
  243. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  244. package/dist/lib/neutral/capabilities/node.mjs +0 -19
  245. package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
  246. package/dist/lib/neutral/chunk-674LDIUJ.mjs +0 -9
  247. package/dist/lib/neutral/chunk-674LDIUJ.mjs.map +0 -7
  248. package/dist/lib/neutral/chunk-HLO4LYXT.mjs.map +0 -7
  249. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  250. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  251. package/dist/lib/neutral/chunk-P3TDQKOO.mjs +0 -8
  252. package/dist/lib/neutral/chunk-P3TDQKOO.mjs.map +0 -7
  253. package/dist/lib/neutral/chunk-R7J2MU2M.mjs +0 -263
  254. package/dist/lib/neutral/chunk-R7J2MU2M.mjs.map +0 -7
  255. package/dist/lib/neutral/chunk-WLNL77C7.mjs +0 -14
  256. package/dist/lib/neutral/chunk-WLNL77C7.mjs.map +0 -7
  257. package/dist/lib/neutral/chunk-YGWSAKLD.mjs +0 -65
  258. package/dist/lib/neutral/chunk-YGWSAKLD.mjs.map +0 -7
  259. package/dist/lib/neutral/components/index.mjs +0 -1921
  260. package/dist/lib/neutral/components/index.mjs.map +0 -7
  261. package/dist/lib/neutral/containers/index.mjs +0 -17
  262. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  263. package/dist/lib/neutral/create-object-V23KVDMJ.mjs +0 -25
  264. package/dist/lib/neutral/create-object-V23KVDMJ.mjs.map +0 -7
  265. package/dist/lib/neutral/create-routine-6QBY6TWF.mjs +0 -38
  266. package/dist/lib/neutral/create-routine-6QBY6TWF.mjs.map +0 -7
  267. package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.mjs +0 -70
  268. package/dist/lib/neutral/create-trigger-from-template-U3KNS77V.mjs.map +0 -7
  269. package/dist/lib/neutral/hooks/index.mjs +0 -47
  270. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  271. package/dist/lib/neutral/index.mjs +0 -27
  272. package/dist/lib/neutral/index.mjs.map +0 -7
  273. package/dist/lib/neutral/layer-specs-2TWJU5HI.mjs +0 -135
  274. package/dist/lib/neutral/layer-specs-2TWJU5HI.mjs.map +0 -7
  275. package/dist/lib/neutral/meta.json +0 -1
  276. package/dist/lib/neutral/meta.mjs +0 -8
  277. package/dist/lib/neutral/meta.mjs.map +0 -7
  278. package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs +0 -18
  279. package/dist/lib/neutral/navigation-resolver-KQIWUH6F.mjs.map +0 -7
  280. package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs +0 -13
  281. package/dist/lib/neutral/operation-handler-QKLJSDCQ.mjs.map +0 -7
  282. package/dist/lib/neutral/operations/index.mjs +0 -8
  283. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  284. package/dist/lib/neutral/plugin.mjs +0 -16
  285. package/dist/lib/neutral/plugin.mjs.map +0 -7
  286. package/dist/lib/neutral/react-surface-GMO7I7YE.mjs +0 -67
  287. package/dist/lib/neutral/react-surface-GMO7I7YE.mjs.map +0 -7
  288. package/dist/lib/neutral/registry-sync-DYPOC7ZG.mjs +0 -86
  289. package/dist/lib/neutral/registry-sync-DYPOC7ZG.mjs.map +0 -7
  290. package/dist/lib/neutral/run-routine-AEWO6SYD.mjs +0 -37
  291. package/dist/lib/neutral/run-routine-AEWO6SYD.mjs.map +0 -7
  292. package/dist/lib/neutral/templates-IIUCEBAX.mjs +0 -49
  293. package/dist/lib/neutral/templates-IIUCEBAX.mjs.map +0 -7
  294. package/dist/lib/neutral/testing.mjs +0 -8
  295. package/dist/lib/neutral/testing.mjs.map +0 -7
  296. package/dist/lib/neutral/translations.mjs +0 -115
  297. package/dist/lib/neutral/translations.mjs.map +0 -7
  298. package/dist/lib/neutral/trigger-runtime-controller-WIDDFGQT.mjs +0 -77
  299. package/dist/lib/neutral/trigger-runtime-controller-WIDDFGQT.mjs.map +0 -7
  300. package/dist/lib/neutral/types/index.mjs +0 -17
  301. package/dist/lib/neutral/types/index.mjs.map +0 -7
  302. package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
  303. package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
  304. package/dist/types/src/commands/trigger/create/queue.d.ts.map +0 -1
  305. package/dist/types/src/commands/trigger/update/queue.d.ts.map +0 -1
  306. package/dist/types/src/components/MasterDetail/MasterDetail.d.ts +0 -51
  307. package/dist/types/src/components/MasterDetail/MasterDetail.d.ts.map +0 -1
  308. package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts +0 -16
  309. package/dist/types/src/components/MasterDetail/MasterDetail.stories.d.ts.map +0 -1
  310. package/dist/types/src/components/MasterDetail/index.d.ts +0 -2
  311. package/dist/types/src/components/MasterDetail/index.d.ts.map +0 -1
  312. package/dist/types/src/types/Routine.d.ts +0 -55
  313. package/dist/types/src/types/Routine.d.ts.map +0 -1
  314. package/dist/types/src/types/Routine.test.d.ts +0 -2
  315. package/dist/types/src/types/Routine.test.d.ts.map +0 -1
  316. package/src/capabilities/navigation-resolver.ts +0 -21
  317. package/src/components/MasterDetail/MasterDetail.stories.tsx +0 -100
  318. package/src/components/MasterDetail/MasterDetail.tsx +0 -175
  319. package/src/types/Routine.test.ts +0 -51
  320. package/src/types/Routine.ts +0 -144
@@ -9,44 +9,18 @@ import { Listbox } from '@dxos/react-ui-list';
9
9
 
10
10
  import { meta } from '#meta';
11
11
 
12
+ import { OPTIONS } from './trigger-kind-icon';
13
+
12
14
  /** Trigger spec kinds surfaced as selectable variants. Matches the discriminants of `Trigger.Spec`. */
13
15
  export type TriggerKind = 'timer' | 'feed' | 'subscription' | 'webhook' | 'email';
14
16
 
15
- type TriggerKindOption = {
17
+ export type TriggerKindOption = {
16
18
  kind: TriggerKind;
17
19
  icon: string;
18
20
  disabled?: boolean;
19
21
  };
20
22
 
21
23
  // Ordered as presented; labels and descriptions are resolved from translations keyed by `kind`.
22
- const OPTIONS: readonly TriggerKindOption[] = [
23
- {
24
- kind: 'timer',
25
- icon: 'ph--clock-countdown--regular',
26
- },
27
- {
28
- kind: 'feed',
29
- icon: 'ph--cards-three--regular',
30
- },
31
- {
32
- kind: 'subscription',
33
- icon: 'ph--funnel--regular',
34
- },
35
- {
36
- kind: 'webhook',
37
- icon: 'ph--webhooks-logo--regular',
38
- disabled: true,
39
- },
40
- {
41
- kind: 'email',
42
- icon: 'ph--envelope--regular',
43
- disabled: true,
44
- },
45
- ];
46
-
47
- /** Icon for a trigger kind, shared by the picker rows and the selected-variant editor header. */
48
- export const getTriggerKindIcon = (kind: TriggerKind): string =>
49
- OPTIONS.find((option) => option.kind === kind)?.icon ?? 'ph--lightning--regular';
50
24
 
51
25
  export type TriggerKindSelectorProps = {
52
26
  onChange: (kind: TriggerKind) => void;
@@ -73,7 +47,7 @@ export const TriggerKindSelector = ({ onChange }: TriggerKindSelectorProps) => {
73
47
  <Listbox.Root onValueChange={handleValueChange}>
74
48
  <Listbox.Content classNames='gap-1' aria-label={t('trigger-kind.placeholder')}>
75
49
  {OPTIONS.map(({ kind, icon, disabled }) => (
76
- <Listbox.Item key={kind} id={kind} disabled={disabled} classNames='bg-input-surface rounded-sm'>
50
+ <Listbox.Item key={kind} id={kind} disabled={disabled} classNames='dx-input-surface rounded-sm'>
77
51
  <Listbox.ItemContent
78
52
  icon={<Icon icon={icon} size={5} classNames='text-description' />}
79
53
  title={<span className='font-medium'>{t(`trigger-kind.${kind}.label`)}</span>}
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type TriggerKind, type TriggerKindOption } from './TriggerKindSelector';
6
+
7
+ // Kept out of `TriggerKindSelector.tsx`: react-refresh only fast-refreshes a module whose
8
+ // exports are all components, so values exported beside them force a full page reload on
9
+ // every edit.
10
+
11
+ /** Icon for a trigger kind, shared by the picker rows and the selected-variant editor header. */
12
+ export const OPTIONS: readonly TriggerKindOption[] = [
13
+ {
14
+ kind: 'timer',
15
+ icon: 'ph--clock-countdown--regular',
16
+ },
17
+ {
18
+ kind: 'feed',
19
+ icon: 'ph--cards-three--regular',
20
+ },
21
+ {
22
+ kind: 'subscription',
23
+ icon: 'ph--funnel--regular',
24
+ },
25
+ {
26
+ kind: 'webhook',
27
+ icon: 'ph--webhooks-logo--regular',
28
+ disabled: true,
29
+ },
30
+ {
31
+ kind: 'email',
32
+ icon: 'ph--envelope--regular',
33
+ disabled: true,
34
+ },
35
+ ];
36
+
37
+ export const getTriggerKindIcon = (kind: TriggerKind): string =>
38
+ OPTIONS.find((option) => option.kind === kind)?.icon ?? 'ph--lightning--regular';
@@ -4,8 +4,8 @@
4
4
 
5
5
  export * from './RoutineForm';
6
6
  export * from './CreateRoutinePanel';
7
- export * from './MasterDetail';
8
7
  export * from './InstructionsEditor';
8
+ export * from './RoutineCard';
9
9
  export * from './Schedule';
10
10
  export * from './TemplateEditor';
11
11
  export * from './TriggerEditor';
@@ -7,17 +7,19 @@ import * as Effect from 'effect/Effect';
7
7
  import React from 'react';
8
8
 
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { Instructions, Skill, Trigger } from '@dxos/compute';
11
- import { Feed, Filter, Obj, Ref } from '@dxos/echo';
10
+ import { Instructions, Routine, Skill, Trigger } from '@dxos/compute';
11
+ import { Feed, Filter, Json, Obj, Ref } from '@dxos/echo';
12
+ import { useObject, useQuery } from '@dxos/echo-react';
12
13
  import { ClientPlugin } from '@dxos/plugin-client/testing';
13
14
  import { RoutinePlugin } from '@dxos/plugin-routine/testing';
14
15
  import { corePlugins } from '@dxos/plugin-testing';
15
- import { type Space, useQuery, useSpaces } from '@dxos/react-client/echo';
16
+ import { type Space, useSpaces } from '@dxos/react-client/echo';
17
+ import { Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
16
18
  import { ObjectProperties } from '@dxos/react-ui-form';
19
+ import { Syntax } from '@dxos/react-ui-syntax-highlighter';
17
20
  import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
18
21
 
19
22
  import { translations } from '#translations';
20
- import { Routine } from '#types';
21
23
 
22
24
  import { RoutineArticle } from './RoutineArticle';
23
25
 
@@ -27,21 +29,21 @@ const types = [Routine.Routine, Trigger.Trigger, Instructions.Instructions, Feed
27
29
  const seedSkills = (space: Space) => {
28
30
  space.db.add(
29
31
  Skill.make({
30
- key: 'example.com/skill/research',
32
+ key: 'com.example.skill.research',
31
33
  name: 'Research',
32
34
  description: 'Research an organization.',
33
35
  }),
34
36
  );
35
37
  space.db.add(
36
38
  Skill.make({
37
- key: 'example.com/skill/summarize',
39
+ key: 'com.example.skill.summarize',
38
40
  name: 'Summarize',
39
41
  description: 'Summarize the selected content.',
40
42
  }),
41
43
  );
42
44
  space.db.add(
43
45
  Skill.make({
44
- key: 'example.com/skill/translate',
46
+ key: 'com.example.skill.translate',
45
47
  name: 'Translate',
46
48
  description: 'Translate text to another language.',
47
49
  }),
@@ -94,23 +96,76 @@ const DefaultStory = () => {
94
96
  if (!automation) {
95
97
  return <Loading />;
96
98
  }
99
+
97
100
  return <RoutineArticle role='article' subject={automation} attendableId='story' />;
98
101
  };
99
102
 
100
- /** Two-column layout: the composite RoutineArticle on the left, raw object properties on the right. */
101
- const TwoColumnStory = () => {
103
+ /** Editable object form. `ObjectProperties` is uncontrolled, so the caller keys it by the object's
104
+ * snapshot to remount (re-read `defaultValues`) when the object changes externally; `object` stays
105
+ * the live object so its own edits persist. */
106
+ const EditableObject = ({ title, object }: { title: string; object: Obj.Unknown }) => (
107
+ <Panel.Root>
108
+ <Panel.Content asChild>
109
+ <ScrollArea.Root orientation='vertical'>
110
+ <ScrollArea.Viewport>
111
+ <h2 className='mbe-1 px-2 pt-2 text-sm font-medium text-description'>{title}</h2>
112
+ <ObjectProperties object={object} />
113
+ </ScrollArea.Viewport>
114
+ </ScrollArea.Root>
115
+ </Panel.Content>
116
+ </Panel.Root>
117
+ );
118
+
119
+ /**
120
+ * Reactive syntax-highlighted JSON with a ref-resolution depth control (mirrors `DebugObjectPanel`):
121
+ * `Syntax.Depth` drives `getReplacer`, which builds `Json.createRefReplacer({ db, depth })` to inline
122
+ * referenced objects (e.g. the trigger) up to the chosen depth. `JsonHighlighter` re-stringifies on
123
+ * every render, so the view stays live as the objects change.
124
+ */
125
+ const JsonView = ({ data, db }: { data: unknown; db?: ReturnType<typeof Obj.getDatabase> }) => (
126
+ <Syntax.Root
127
+ data={data}
128
+ defaultDepth={1}
129
+ getReplacer={(depth) => (db ? Json.createRefReplacer({ db, depth }) : undefined)}
130
+ >
131
+ <Panel.Root>
132
+ <Panel.Toolbar asChild>
133
+ <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>
134
+ <Syntax.Filter />
135
+ <Syntax.Depth />
136
+ </Toolbar.Root>
137
+ </Panel.Toolbar>
138
+ <Panel.Content asChild>
139
+ <Syntax.Viewport>
140
+ <Syntax.Code />
141
+ </Syntax.Viewport>
142
+ </Panel.Content>
143
+ </Panel.Root>
144
+ </Syntax.Root>
145
+ );
146
+
147
+ const ThreeColumnStory = () => {
102
148
  const spaces = useSpaces();
103
149
  const space = spaces[spaces.length - 1];
104
- const [automation] = useQuery(space?.db, Filter.type(Routine.Routine));
105
- if (!automation) {
150
+ const [routine] = useQuery(space?.db, Filter.type(Routine.Routine));
151
+ const triggerRef = routine?.triggers.find((ref) => Obj.instanceOf(Trigger.Trigger, ref.target));
152
+ // Subscribe to both objects so left-side edits re-render (and re-key) the other columns; the trigger
153
+ // subscription keeps the ref-expanded JSON view live when the trigger (a separate entity) changes.
154
+ const [routineSnapshot] = useObject(routine);
155
+ const [triggerSnapshot] = useObject(triggerRef);
156
+ const trigger = triggerRef?.target;
157
+ if (!routine) {
106
158
  return <Loading />;
107
159
  }
160
+
108
161
  return (
109
- <div role='none' className='w-full grid grid-cols-2 gap-px'>
110
- <RoutineArticle role='article' subject={automation} attendableId='story' />
111
- <div role='none' className='overflow-y-auto p-2 bg-baseSurface'>
112
- <ObjectProperties object={automation} />
162
+ <div className='w-full grid grid-cols-3 gap-2'>
163
+ <RoutineArticle role='article' subject={routine} attendableId='story' />
164
+ <div className='grid grid-rows-2 gap-2 min-h-0'>
165
+ <EditableObject key={JSON.stringify(routineSnapshot)} title='Routine' object={routine} />
166
+ {trigger && <EditableObject key={JSON.stringify(triggerSnapshot)} title='Trigger' object={trigger} />}
113
167
  </div>
168
+ <JsonView data={routineSnapshot} db={Obj.getDatabase(routine)} />
114
169
  </div>
115
170
  );
116
171
  };
@@ -134,10 +189,14 @@ export const Empty: Story = {
134
189
  decorators: [withAutomation(seedDefault)],
135
190
  };
136
191
 
137
- /** Side-by-side: the composite editor alongside the underlying object's raw properties. */
138
- export const TwoColumn: Story = {
139
- render: TwoColumnStory,
140
- decorators: [withAutomation(seedDefault)],
192
+ /**
193
+ * Side-by-side: the composite editor, an editable properties form, and a live raw view of the
194
+ * underlying objects (routine + primary trigger). Seeded with a trigger so trigger-spec edits are
195
+ * immediately observable across all three columns.
196
+ */
197
+ export const ThreeColumn: Story = {
198
+ render: ThreeColumnStory,
199
+ decorators: [withAutomation(seedWithTimerTrigger)],
141
200
  };
142
201
 
143
202
  /** Automation with a timer trigger pre-configured for a daily 9 AM schedule. */
@@ -7,14 +7,15 @@ import React, { useCallback, useContext, useMemo } from 'react';
7
7
 
8
8
  import { useOperationInvoker } from '@dxos/app-framework/ui';
9
9
  import { type AppSurface } from '@dxos/app-toolkit/ui';
10
+ import { Routine } from '@dxos/compute';
10
11
  import { Obj, Ref } from '@dxos/echo';
11
- import { useObject } from '@dxos/react-client/echo';
12
+ import { useObject } from '@dxos/echo-react';
12
13
  import { Panel } from '@dxos/react-ui';
13
14
  import { Menu, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';
14
15
 
15
16
  import { RoutineForm } from '#components';
16
17
  import { meta } from '#meta';
17
- import { Routine, RoutineOperation } from '#types';
18
+ import { RoutineOperation } from '#types';
18
19
 
19
20
  export type RoutineArticleProps = AppSurface.ObjectArticleProps<Routine.Routine>;
20
21
 
@@ -43,6 +44,7 @@ export const RoutineArticle = ({ role, attendableId, subject }: RoutineArticlePr
43
44
  if (!invokePromise || !db) {
44
45
  return;
45
46
  }
47
+
46
48
  // Thread the routine's first trigger as trace attribution so the run appears in history.
47
49
  // Manual runs bypass the trigger dispatcher (which normally stamps meta.trigger), so we
48
50
  // do it here — history filters on trigger entity id, and without this the run is invisible.
@@ -69,9 +71,9 @@ export const RoutineArticle = ({ role, attendableId, subject }: RoutineArticlePr
69
71
  <Menu.Root {...menuActions} attendableId={attendableId}>
70
72
  <Panel.Root role={role}>
71
73
  <Panel.Toolbar>
72
- <Menu.Toolbar className='dx-document' />
74
+ <Menu.Toolbar classNames='dx-document' />
73
75
  </Panel.Toolbar>
74
- <Panel.Content>
76
+ <Panel.Content asChild>
75
77
  <RoutineForm db={db} routine={subject} />
76
78
  </Panel.Content>
77
79
  </Panel.Root>
@@ -107,3 +109,5 @@ const useArticleMenuActions = ({ canRun, runningAtom, handleRun }: ArticleMenuAc
107
109
  .build(),
108
110
  [canRun, handleRun, runningAtom],
109
111
  );
112
+
113
+ RoutineArticle.displayName = 'RoutineArticle';
@@ -7,18 +7,19 @@ import * as Effect from 'effect/Effect';
7
7
  import React from 'react';
8
8
 
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { Instructions, Skill } from '@dxos/compute';
10
+ import { Instructions, Routine, Skill } from '@dxos/compute';
11
11
  import { Filter, Ref } from '@dxos/echo';
12
+ import { useQuery } from '@dxos/echo-react';
12
13
  import { ClientPlugin } from '@dxos/plugin-client/testing';
13
14
  import { RoutinePlugin } from '@dxos/plugin-routine/testing';
14
15
  import { corePlugins } from '@dxos/plugin-testing';
15
- import { type Space, useQuery, useSpaces } from '@dxos/react-client/echo';
16
+ import { type Space, useSpaces } from '@dxos/react-client/echo';
16
17
  import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
17
18
  import { Text } from '@dxos/schema';
18
19
 
19
20
  import { translations } from '#translations';
20
- import { Routine } from '#types';
21
21
 
22
+ import { makeRoutine } from '../../util';
22
23
  import { RoutineCompanion } from './RoutineCompanion';
23
24
 
24
25
  const types = [Routine.Routine, Instructions.Instructions, Skill.Skill, Text.Text];
@@ -28,7 +29,7 @@ const seed = (space: Space) => {
28
29
  const subject = space.db.add(Text.make({ content: 'Meeting notes' }));
29
30
 
30
31
  space.db.add(
31
- Routine.make({
32
+ makeRoutine({
32
33
  name: 'Summarize Notes',
33
34
  instructions: Instructions.make({ name: 'Summarize notes', objects: [Ref.make(subject)] }),
34
35
  }),
@@ -2,22 +2,24 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom-react';
5
+ import { Atom } from '@effect-atom/atom';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import React, { useCallback, useMemo, useRef, useState } from 'react';
8
8
 
9
9
  import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
10
10
  import { type AppSurface } from '@dxos/app-toolkit/ui';
11
+ import { Routine } from '@dxos/compute';
11
12
  import { Database, Filter, Obj, Type } from '@dxos/echo';
13
+ import { useQuery } from '@dxos/echo-react';
12
14
  import { EffectEx } from '@dxos/effect';
13
15
  import { SpaceOperation } from '@dxos/plugin-space';
14
- import { useQuery } from '@dxos/react-client/echo';
15
16
  import { Panel, ScrollArea, useTranslation } from '@dxos/react-ui';
17
+ import { MasterDetail, type MasterDetailAdornment, type MasterDetailIcon } from '@dxos/react-ui-list';
16
18
  import { type ActionGraphProps, Menu, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';
17
19
 
18
- import { MasterDetail, type MasterDetailAdornment, type MasterDetailIcon, RoutineForm } from '#components';
20
+ import { RoutineForm } from '#components';
19
21
  import { meta } from '#meta';
20
- import { Routine, RoutineCapabilities } from '#types';
22
+ import { RoutineCapabilities } from '#types';
21
23
 
22
24
  import { connectedRoutinesQuery } from '../../util';
23
25
 
@@ -108,7 +110,7 @@ export const RoutineCompanion = ({ subject: object, attendableId }: RoutineCompa
108
110
  return;
109
111
  }
110
112
 
111
- // The draft is a fully-wired graph (see `Routine.make`); a single add cascades the owned trigger and
113
+ // The draft is a fully-wired graph (see `makeRoutine`); a single add cascades the owned trigger and
112
114
  // instructions, and the subject carried in the instructions' `objects` is the structural connection the
113
115
  // query finds.
114
116
  const persistedRoutine = db.add(draft);
@@ -189,9 +191,9 @@ export const RoutineCompanion = ({ subject: object, attendableId }: RoutineCompa
189
191
  <Menu.Root {...menuActions} attendableId={attendableId}>
190
192
  <Panel.Root>
191
193
  <Panel.Toolbar>
192
- <Menu.Toolbar className='dx-document' />
194
+ <Menu.Toolbar classNames='dx-document' />
193
195
  </Panel.Toolbar>
194
- <Panel.Content asChild className='pt-trim-md'>
196
+ <Panel.Content asChild classNames='pt-trim-md'>
195
197
  <ScrollArea.Root>
196
198
  <ScrollArea.Viewport>
197
199
  <MasterDetail<Routine.Routine>
@@ -340,3 +342,5 @@ const useCompanionMenuActions = ({ t, templates, draft, handleCreateFromTemplate
340
342
  .build(),
341
343
  [t, templates, draft, handleCreateFromTemplate],
342
344
  );
345
+
346
+ RoutineCompanion.displayName = 'RoutineCompanion';
@@ -4,58 +4,45 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { AppSurface } from '@dxos/app-toolkit/ui';
8
- import { type ComputeEnvironment } from '@dxos/client-protocol';
7
+ import { useActiveSpace } from '@dxos/app-toolkit/ui';
9
8
  import { useObject } from '@dxos/echo-react';
10
- import { DropdownMenu, IconButton, useTranslation } from '@dxos/react-ui';
9
+ import { Input, useTranslation } from '@dxos/react-ui';
11
10
  import { Form } from '@dxos/react-ui-form';
12
11
 
13
12
  import { meta } from '#meta';
14
13
 
15
- export type RoutineSettingsProps = AppSurface.SpaceArticleProps;
16
-
17
14
  /**
18
15
  * Space-level routine settings. Individual routines are now first-class objects (configured in their
19
- * article + per-object companion), so this page is focused on runtime management — where the space's
20
- * routines execute.
16
+ * article + per-object companion), so this page exposes the space-wide kill-switch for trigger
17
+ * execution. Per-trigger local/edge routing is set on each trigger via its `remote` flag.
18
+ *
19
+ * The page is reached from space settings, so the space comes from context rather than surface data.
21
20
  */
22
- export const RoutineSettings = ({ space }: RoutineSettingsProps) => {
21
+ export const RoutineSettings = () => {
23
22
  const { t } = useTranslation(meta.profile.key);
24
- const [properties, changeProperties] = useObject(space.properties);
25
- const selected = properties.computeEnvironment ?? 'local';
23
+ const space = useActiveSpace();
24
+ const [properties, changeProperties] = useObject(space?.properties);
25
+ const enabled = !(properties?.triggersDisabled ?? false);
26
26
 
27
- const handleUpdate = (option: ComputeEnvironment) => {
28
- changeProperties((draft) => {
29
- draft.computeEnvironment = option;
27
+ const handleToggle = (value: boolean) => {
28
+ changeProperties((current) => {
29
+ current.triggersDisabled = !value;
30
30
  });
31
31
  };
32
32
 
33
+ if (!space) {
34
+ return null;
35
+ }
36
+
33
37
  return (
34
38
  <Form.Root variant='settings'>
35
39
  <Form.Viewport scroll>
36
40
  <Form.Content>
37
41
  <Form.Section title={t('routine-verbose.label')} description={t('routine.description')}>
38
42
  <Form.Row label={t('runtime.label')} description={t('runtime.description')}>
39
- <DropdownMenu.Root>
40
- <DropdownMenu.Trigger asChild>
41
- <IconButton iconEnd icon='ph--caret-down--regular' size={4} label={t(`runtime.${selected}.label`)} />
42
- </DropdownMenu.Trigger>
43
- <DropdownMenu.Portal>
44
- <DropdownMenu.Content side='bottom'>
45
- <DropdownMenu.Viewport>
46
- <DropdownMenu.Item onClick={() => handleUpdate('disabled')}>
47
- {t('runtime.disabled.label')}
48
- </DropdownMenu.Item>
49
- <DropdownMenu.Item onClick={() => handleUpdate('local')}>
50
- {t('runtime.local.label')}
51
- </DropdownMenu.Item>
52
- <DropdownMenu.Item onClick={() => handleUpdate('edge')}>
53
- {t('runtime.edge.label')}
54
- </DropdownMenu.Item>
55
- </DropdownMenu.Viewport>
56
- </DropdownMenu.Content>
57
- </DropdownMenu.Portal>
58
- </DropdownMenu.Root>
43
+ <Input.Root>
44
+ <Input.Switch checked={enabled} onCheckedChange={handleToggle} />
45
+ </Input.Root>
59
46
  </Form.Row>
60
47
  </Form.Section>
61
48
  </Form.Content>
@@ -63,3 +50,5 @@ export const RoutineSettings = ({ space }: RoutineSettingsProps) => {
63
50
  </Form.Root>
64
51
  );
65
52
  };
53
+
54
+ RoutineSettings.displayName = 'RoutineSettings';
@@ -7,18 +7,19 @@ import * as Effect from 'effect/Effect';
7
7
  import React from 'react';
8
8
 
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { Trace, Trigger } from '@dxos/compute';
10
+ import { Routine, Trace, Trigger } from '@dxos/compute';
11
+ import { FeedTraceSink } from '@dxos/compute-runtime';
11
12
  import { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';
12
- import { FeedTraceSink } from '@dxos/functions-runtime';
13
+ import { useQuery } from '@dxos/echo-react';
13
14
  import { ClientPlugin } from '@dxos/plugin-client/testing';
14
15
  import { RoutinePlugin } from '@dxos/plugin-routine/testing';
15
16
  import { corePlugins } from '@dxos/plugin-testing';
16
- import { type Space, useQuery, useSpaces } from '@dxos/react-client/echo';
17
+ import { type Space, useSpaces } from '@dxos/react-client/echo';
17
18
  import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
18
19
 
19
20
  import { translations } from '#translations';
20
- import { Routine } from '#types';
21
21
 
22
+ import { makeRoutine } from '../../util';
22
23
  import { RoutineTraceCompanion } from './RoutineTraceCompanion';
23
24
 
24
25
  const types = [Routine.Routine, Trigger.Trigger, Feed.Feed, Trace.Message];
@@ -49,7 +50,7 @@ const runMessage = (opts: {
49
50
  const seed = (space: Space) =>
50
51
  Effect.gen(function* () {
51
52
  const trigger = Trigger.make({ enabled: true });
52
- space.db.add(Routine.make({ name: 'Summarize Notes', trigger }));
53
+ space.db.add(makeRoutine({ name: 'Summarize Notes', trigger }));
53
54
  const feed = space.db.add(
54
55
  Feed.make({ kind: FeedTraceSink.TRACE_FEED_KIND, name: 'Execution Trace', namespace: 'trace' }),
55
56
  );
@@ -4,13 +4,13 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
+ import { Routine } from '@dxos/compute';
7
8
  import { Obj } from '@dxos/echo';
8
9
  import { Icon, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
9
10
  import { Accordion, Empty, Listbox } from '@dxos/react-ui-list';
10
11
  import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
11
12
 
12
13
  import { meta } from '#meta';
13
- import { Routine } from '#types';
14
14
 
15
15
  import { type RoutineRun, type RunStatus } from './runs';
16
16
  import { useRoutineRuns } from './useRoutineRuns';
@@ -123,3 +123,5 @@ const toJsonData = (run: RoutineRun) => ({
123
123
  });
124
124
 
125
125
  const getRunId = (run: RoutineRun) => run.pid;
126
+
127
+ RoutineTraceCompanion.displayName = 'RoutineTraceCompanion';
@@ -4,13 +4,11 @@
4
4
 
5
5
  import { useMemo } from 'react';
6
6
 
7
- import { Trace } from '@dxos/compute';
7
+ import { type Routine, Trace } from '@dxos/compute';
8
+ import { FeedTraceSink } from '@dxos/compute-runtime';
8
9
  import { type Database, Filter, Query } from '@dxos/echo';
9
- import { FeedTraceSink } from '@dxos/functions-runtime';
10
+ import { useQuery } from '@dxos/echo-react';
10
11
  import { EID } from '@dxos/keys';
11
- import { useQuery } from '@dxos/react-client/echo';
12
-
13
- import { type Routine } from '#types';
14
12
 
15
13
  import { type RoutineRun, groupIntoRuns } from './runs';
16
14
 
@@ -27,3 +27,5 @@ export const SkillArticle = ({ role, attendableId, subject }: SkillArticleProps)
27
27
  </Panel.Root>
28
28
  );
29
29
  };
30
+
31
+ SkillArticle.displayName = 'SkillArticle';
@@ -9,9 +9,9 @@ import { useEffect, useState } from 'react';
9
9
 
10
10
  import { useSpaceCallback } from '@dxos/app-framework/ui';
11
11
  import { Trigger } from '@dxos/compute';
12
+ import { TriggerDispatcher, type TriggerDispatcherState } from '@dxos/compute-runtime';
12
13
  import { type Database, Filter, Query } from '@dxos/echo';
13
- import { TriggerDispatcher, type TriggerDispatcherState } from '@dxos/functions-runtime';
14
- import { useQuery } from '@dxos/react-client/echo';
14
+ import { useQuery } from '@dxos/echo-react';
15
15
 
16
16
  interface TriggerRuntimeControls {
17
17
  triggers: Trigger.Trigger[];
package/src/index.ts CHANGED
@@ -5,3 +5,4 @@
5
5
  export * from './meta';
6
6
  export * from './paths';
7
7
  export * from './types';
8
+ export * from './util';
@@ -21,7 +21,7 @@ const handler: Operation.WithHandler<typeof RoutineOperation.CreateRoutine> = Ro
21
21
  invariant(template, `Unknown routine template: ${templateId}`);
22
22
 
23
23
  // The scaffold returns a fully-wired in-memory routine graph (runnable, owned instructions, and trigger
24
- // all parented and bound by `Routine.make`); AddObject's `Database.add` cascades the whole graph.
24
+ // all parented and bound by `makeRoutine`); AddObject's `Database.add` cascades the whole graph.
25
25
  const draft = yield* template
26
26
  .scaffold({ name, subject })
27
27
  .pipe(Effect.provideService(Database.Service, Database.makeService(db)));
@@ -4,7 +4,7 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { LayoutOperation, Paths } from '@dxos/app-toolkit';
7
+ import { GraphPath, LayoutOperation } from '@dxos/app-toolkit';
8
8
  import { Operation, Script, Trigger } from '@dxos/compute';
9
9
  import { type Feed, Filter, Obj, Ref } from '@dxos/echo';
10
10
  import { SpaceOperation } from '@dxos/plugin-space';
@@ -59,7 +59,7 @@ const handler: Operation.WithHandler<typeof RoutineOperation.CreateTriggerFromTe
59
59
  });
60
60
  yield* Operation.invoke(LayoutOperation.Open, {
61
61
  subject: [getRoutinesSettingsPath(db.spaceId)],
62
- workspace: Paths.getSpacePath(db.spaceId),
62
+ workspace: GraphPath.getSpacePath(db.spaceId),
63
63
  });
64
64
  }),
65
65
  ),