@dxos/plugin-assistant 0.8.4-main.422d1c7879 → 0.8.4-main.51f1e5ca51

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 (400) hide show
  1. package/dist/lib/browser/AssistantSettings-GG52BLKS.mjs +40 -0
  2. package/dist/lib/browser/AssistantSettings-GG52BLKS.mjs.map +7 -0
  3. package/dist/lib/browser/blueprints/index.mjs +26 -3
  4. package/dist/lib/browser/blueprints/index.mjs.map +4 -4
  5. package/dist/lib/browser/{chunk-ATHYBVGN.mjs → chunk-RIJNPAYC.mjs} +5 -5
  6. package/dist/lib/browser/chunk-RIJNPAYC.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-LMVTXH54.mjs → chunk-SEMCG4ZK.mjs} +58 -17
  8. package/dist/lib/browser/chunk-SEMCG4ZK.mjs.map +7 -0
  9. package/dist/lib/browser/cli/index.mjs +3 -4
  10. package/dist/lib/browser/cli/index.mjs.map +3 -3
  11. package/dist/lib/browser/{create-chat-LBZHGVSN.mjs → create-chat-FZJASOQS.mjs} +5 -13
  12. package/dist/lib/browser/create-chat-FZJASOQS.mjs.map +7 -0
  13. package/dist/lib/browser/{ensure-companion-chat-ZEZA34MZ.mjs → ensure-companion-chat-PHUWWFVY.mjs} +4 -4
  14. package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +804 -880
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/{on-create-space-54RNX5JI.mjs → on-create-space-OQNCM7NC.mjs} +3 -3
  19. package/dist/lib/browser/{on-create-space-54RNX5JI.mjs.map → on-create-space-OQNCM7NC.mjs.map} +1 -1
  20. package/dist/lib/browser/operations/index.mjs +3 -3
  21. package/dist/lib/browser/operations/index.mjs.map +3 -3
  22. package/dist/lib/browser/{resolve-navigation-targets-NZOD66NY.mjs → resolve-navigation-targets-PMNR7D3P.mjs} +3 -3
  23. package/dist/lib/browser/{resolve-navigation-targets-NZOD66NY.mjs.map → resolve-navigation-targets-PMNR7D3P.mjs.map} +1 -1
  24. package/dist/lib/browser/{run-prompt-in-new-chat-THLK5YQC.mjs → run-prompt-in-new-chat-4XDYFKCV.mjs} +10 -39
  25. package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs.map +7 -0
  26. package/dist/lib/browser/{set-current-chat-LRS3VFSH.mjs → set-current-chat-7V4DA66I.mjs} +4 -4
  27. package/dist/lib/browser/set-current-chat-7V4DA66I.mjs.map +7 -0
  28. package/dist/lib/browser/translations.mjs +171 -0
  29. package/dist/lib/browser/translations.mjs.map +7 -0
  30. package/dist/lib/browser/types/index.mjs +1 -3
  31. package/dist/lib/browser/{update-chat-name-3Y36KFAS.mjs → update-chat-name-ZGMU2UGN.mjs} +7 -22
  32. package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs.map +7 -0
  33. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
  34. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
  35. package/dist/lib/node-esm/blueprints/index.mjs +26 -3
  36. package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
  37. package/dist/lib/node-esm/{chunk-PXAJSTGZ.mjs → chunk-NCIZY5ZV.mjs} +5 -5
  38. package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs.map +7 -0
  39. package/dist/lib/node-esm/{chunk-W3JZ2F4T.mjs → chunk-XAFVSEUJ.mjs} +58 -17
  40. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
  41. package/dist/lib/node-esm/cli/index.mjs +3 -4
  42. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  43. package/dist/lib/node-esm/{create-chat-3BEG4R6J.mjs → create-chat-RY6A4WUV.mjs} +5 -13
  44. package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs.map +7 -0
  45. package/dist/lib/node-esm/{ensure-companion-chat-6K2WEWFP.mjs → ensure-companion-chat-BTDU5TS2.mjs} +4 -4
  46. package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +804 -880
  48. package/dist/lib/node-esm/index.mjs.map +4 -4
  49. package/dist/lib/node-esm/meta.json +1 -1
  50. package/dist/lib/node-esm/{on-create-space-YRPZ6HZY.mjs → on-create-space-4LWCYT3H.mjs} +3 -3
  51. package/dist/lib/node-esm/{on-create-space-YRPZ6HZY.mjs.map → on-create-space-4LWCYT3H.mjs.map} +1 -1
  52. package/dist/lib/node-esm/operations/index.mjs +3 -3
  53. package/dist/lib/node-esm/operations/index.mjs.map +3 -3
  54. package/dist/lib/node-esm/{resolve-navigation-targets-3PPK7XLH.mjs → resolve-navigation-targets-GHS3XPVP.mjs} +3 -3
  55. package/dist/lib/node-esm/{resolve-navigation-targets-3PPK7XLH.mjs.map → resolve-navigation-targets-GHS3XPVP.mjs.map} +1 -1
  56. package/dist/lib/node-esm/{run-prompt-in-new-chat-OUYKCMQ7.mjs → run-prompt-in-new-chat-UF54E34O.mjs} +10 -39
  57. package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs.map +7 -0
  58. package/dist/lib/node-esm/{set-current-chat-SMXZJD3F.mjs → set-current-chat-SWPAOLZL.mjs} +4 -4
  59. package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs.map +7 -0
  60. package/dist/lib/node-esm/translations.mjs +172 -0
  61. package/dist/lib/node-esm/translations.mjs.map +7 -0
  62. package/dist/lib/node-esm/types/index.mjs +1 -3
  63. package/dist/lib/node-esm/{update-chat-name-HM2P4NSI.mjs → update-chat-name-CW6K5M37.mjs} +7 -22
  64. package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs.map +7 -0
  65. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  66. package/dist/types/src/blueprints/assistant/blueprint.d.ts +2 -2
  67. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  70. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
  72. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/index.d.ts +2 -2
  74. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
  76. package/dist/types/src/capabilities/markdown.d.ts +1 -1
  77. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  80. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  84. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
  85. package/dist/types/src/cli/plugin.d.ts.map +1 -1
  86. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +1 -1
  87. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  88. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/Chat/Chat.d.ts +29 -39
  90. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  91. package/dist/types/src/components/Chat/context.d.ts +29 -0
  92. package/dist/types/src/components/Chat/context.d.ts.map +1 -0
  93. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  94. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +5 -3
  95. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  96. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +1 -1
  97. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  99. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
  100. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
  101. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  102. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
  103. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
  104. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  105. package/dist/types/src/components/ChatPrompt/index.d.ts +2 -0
  106. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  107. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
  108. package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
  109. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  110. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +4 -3
  111. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  112. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
  113. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +1 -1
  114. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
  115. package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
  116. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  117. package/dist/types/src/components/ChatThread/sync.d.ts +1 -1
  118. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
  119. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -1
  120. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +4 -4
  121. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -1
  122. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -1
  123. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
  125. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -1
  126. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -1
  127. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -1
  128. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
  129. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -1
  130. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
  131. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -1
  132. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
  133. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
  134. package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -2
  135. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
  136. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +2 -1
  137. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
  138. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -1
  139. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
  140. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -2
  141. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  142. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  143. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -3
  144. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  145. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  146. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
  147. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
  148. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -4
  149. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  150. package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
  151. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  152. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  153. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
  154. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
  155. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
  156. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
  157. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +1 -1
  158. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
  159. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +1 -1
  160. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -1
  161. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
  162. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
  163. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
  164. package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
  165. package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
  166. package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
  167. package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
  168. package/dist/types/src/containers/{PromptList/PromptList.stories.d.ts → RoutineList/RoutineList.stories.d.ts} +1 -1
  169. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
  170. package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
  171. package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
  172. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +3 -2
  173. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
  174. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +1 -4
  175. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
  176. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +1 -1
  177. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -1
  178. package/dist/types/src/containers/TracePanel/execution-graph.d.ts +81 -1
  179. package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -1
  180. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
  181. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
  182. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
  183. package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
  184. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
  185. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
  186. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
  187. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
  188. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
  189. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
  190. package/dist/types/src/containers/index.d.ts +2 -2
  191. package/dist/types/src/containers/index.d.ts.map +1 -1
  192. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
  193. package/dist/types/src/hooks/index.d.ts +2 -0
  194. package/dist/types/src/hooks/index.d.ts.map +1 -1
  195. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +1 -1
  196. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  197. package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
  198. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
  199. package/dist/types/src/hooks/useChatProcessor.d.ts +1 -1
  200. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  201. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  202. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  203. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
  204. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  205. package/dist/types/src/hooks/useDebug.d.ts +10 -0
  206. package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
  207. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
  208. package/dist/types/src/hooks/useFlush.d.ts +1 -1
  209. package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
  210. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  211. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  212. package/dist/types/src/index.d.ts +0 -3
  213. package/dist/types/src/index.d.ts.map +1 -1
  214. package/dist/types/src/operations/create-chat.d.ts +1 -1
  215. package/dist/types/src/operations/create-chat.d.ts.map +1 -1
  216. package/dist/types/src/operations/definitions.d.ts +24 -19
  217. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  218. package/dist/types/src/operations/ensure-companion-chat.d.ts +1 -1
  219. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
  220. package/dist/types/src/operations/index.d.ts +1 -1
  221. package/dist/types/src/operations/index.d.ts.map +1 -1
  222. package/dist/types/src/operations/on-create-space.d.ts +1 -1
  223. package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
  224. package/dist/types/src/operations/resolve-navigation-targets.d.ts +1 -1
  225. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
  226. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +1 -1
  227. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
  228. package/dist/types/src/operations/set-current-chat.d.ts +1 -1
  229. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -1
  230. package/dist/types/src/operations/update-chat-name.d.ts +1 -1
  231. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -1
  232. package/dist/types/src/processor/processor.d.ts +2 -2
  233. package/dist/types/src/processor/processor.d.ts.map +1 -1
  234. package/dist/types/src/queue-logger.d.ts.map +1 -1
  235. package/dist/types/src/testing/index.d.ts +1 -0
  236. package/dist/types/src/testing/index.d.ts.map +1 -1
  237. package/dist/types/src/testing/test-generator.d.ts +1 -1
  238. package/dist/types/src/testing/test-generator.d.ts.map +1 -1
  239. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  240. package/dist/types/src/testing/test-trace.d.ts +5 -0
  241. package/dist/types/src/testing/test-trace.d.ts.map +1 -0
  242. package/dist/types/src/translations.d.ts.map +1 -1
  243. package/dist/types/src/types/Assistant.d.ts +22 -6
  244. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  245. package/dist/types/src/types/Settings.d.ts +20 -5
  246. package/dist/types/src/types/Settings.d.ts.map +1 -1
  247. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  248. package/dist/types/src/types/events.d.ts.map +1 -1
  249. package/dist/types/src/types/index.d.ts +0 -1
  250. package/dist/types/src/types/index.d.ts.map +1 -1
  251. package/dist/types/src/types/service.d.ts +1 -1
  252. package/dist/types/src/types/service.d.ts.map +1 -1
  253. package/dist/types/tsconfig.tsbuildinfo +1 -1
  254. package/package.json +95 -91
  255. package/src/AssistantPlugin.tsx +10 -12
  256. package/src/blueprints/assistant/blueprint.test.ts +3 -3
  257. package/src/blueprints/assistant/blueprint.ts +3 -3
  258. package/src/capabilities/app-graph-builder.ts +3 -3
  259. package/src/capabilities/blueprint-definition.ts +0 -4
  260. package/src/capabilities/index.ts +1 -1
  261. package/src/capabilities/markdown.ts +1 -1
  262. package/src/capabilities/migrations.ts +1 -8
  263. package/src/capabilities/operation-handler.ts +1 -1
  264. package/src/capabilities/react-surface.tsx +16 -10
  265. package/src/cli/plugin.ts +3 -4
  266. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +3 -2
  267. package/src/components/AssistantSettings/AssistantSettings.tsx +22 -111
  268. package/src/components/Chat/Chat.tsx +56 -260
  269. package/src/components/Chat/context.ts +39 -0
  270. package/src/components/ChatPrompt/ChatActions.tsx +10 -10
  271. package/src/components/ChatPrompt/ChatOptions.stories.tsx +24 -10
  272. package/src/components/ChatPrompt/ChatOptions.tsx +60 -31
  273. package/src/components/ChatPrompt/ChatPrompt.tsx +179 -0
  274. package/src/components/ChatPrompt/ChatReferences.tsx +1 -1
  275. package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
  276. package/src/components/ChatPrompt/index.ts +2 -0
  277. package/src/components/ChatThread/ChatThread.stories.tsx +3 -3
  278. package/src/components/ChatThread/ChatThread.tsx +31 -18
  279. package/src/components/ChatThread/DEBUG.md +41 -0
  280. package/src/components/ChatThread/MarkdownStream.stories.tsx +5 -4
  281. package/src/components/ChatThread/registry.tsx +53 -14
  282. package/src/components/ChatThread/sync.test.ts +80 -12
  283. package/src/components/ChatThread/sync.ts +1 -1
  284. package/src/components/ChatThread/widgets/ReasoningWidget.ts +6 -6
  285. package/src/components/ChatThread/widgets/ReferenceWidget.ts +3 -1
  286. package/src/components/ChatThread/widgets/SelectWidget.ts +3 -1
  287. package/src/components/ChatThread/widgets/StatsWidget.ts +3 -1
  288. package/src/components/ChatThread/widgets/StatusWidget.ts +3 -1
  289. package/src/components/ChatThread/widgets/SuggestionWidget.ts +1 -1
  290. package/src/components/ChatThread/widgets/SummaryWidget.tsx +3 -2
  291. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
  292. package/src/components/ChatThread/widgets/defaults.ts +8 -0
  293. package/src/components/ChatThread/widgets/index.ts +1 -2
  294. package/src/components/ProcessTree/ProcessTree.stories.tsx +12 -38
  295. package/src/components/ProcessTree/ProcessTree.tsx +67 -35
  296. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +3 -2
  297. package/src/components/TemplateEditor/TemplateEditor.tsx +5 -5
  298. package/src/components/TemplateEditor/TemplateForm.stories.tsx +4 -3
  299. package/src/components/TemplateEditor/TemplateForm.tsx +3 -3
  300. package/src/components/Toolbox/Toolbox.stories.tsx +2 -1
  301. package/src/components/Toolbox/Toolbox.tsx +2 -2
  302. package/src/containers/AgentArticle/AgentArticle.stories.tsx +1 -1
  303. package/src/containers/AgentArticle/AgentArticle.tsx +2 -2
  304. package/src/containers/AgentProperties/AgentProperties.stories.tsx +2 -1
  305. package/src/containers/AgentProperties/AgentProperties.tsx +2 -2
  306. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +1 -1
  307. package/src/containers/ChatCompanion/ChatCompanion.tsx +1 -1
  308. package/src/containers/ChatContainer/ChatContainer.tsx +16 -6
  309. package/src/containers/ChatDialog/ChatDialog.tsx +3 -9
  310. package/src/containers/{PromptArticle/PromptArticle.tsx → RoutineArticle/RoutineArticle.tsx} +4 -4
  311. package/src/containers/RoutineArticle/index.ts +5 -0
  312. package/src/containers/{PromptList/PromptList.stories.tsx → RoutineList/RoutineList.stories.tsx} +10 -9
  313. package/src/containers/{PromptList/PromptList.tsx → RoutineList/RoutineList.tsx} +6 -5
  314. package/src/containers/RoutineList/index.ts +5 -0
  315. package/src/containers/TracePanel/TracePanel.stories.tsx +204 -198
  316. package/src/containers/TracePanel/TracePanel.tsx +69 -44
  317. package/src/containers/TracePanel/dxn-extractor.test.ts +7 -7
  318. package/src/containers/TracePanel/dxn-extractor.ts +4 -4
  319. package/src/containers/TracePanel/execution-graph.test.ts +382 -0
  320. package/src/containers/TracePanel/execution-graph.ts +340 -213
  321. package/src/containers/TracePanel/testing/index.ts +6 -0
  322. package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
  323. package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
  324. package/src/containers/index.ts +2 -2
  325. package/src/hooks/index.ts +2 -0
  326. package/src/hooks/useBlueprintRegistry.ts +1 -1
  327. package/src/hooks/useChatKeymap.ts +52 -0
  328. package/src/hooks/useChatProcessor.ts +1 -1
  329. package/src/hooks/useDebug.ts +38 -0
  330. package/src/index.ts +0 -3
  331. package/src/operations/create-chat.ts +2 -2
  332. package/src/operations/definitions.ts +4 -4
  333. package/src/operations/ensure-companion-chat.ts +1 -1
  334. package/src/operations/index.ts +1 -1
  335. package/src/operations/on-create-space.ts +1 -1
  336. package/src/operations/prompt.test.ts +5 -6
  337. package/src/operations/resolve-navigation-targets.ts +1 -1
  338. package/src/operations/run-prompt-in-new-chat.ts +3 -3
  339. package/src/operations/set-current-chat.ts +1 -1
  340. package/src/operations/update-chat-name.ts +2 -2
  341. package/src/processor/processor.test.ts +1 -1
  342. package/src/processor/processor.ts +4 -4
  343. package/src/queue-logger.ts +1 -1
  344. package/src/testing/data/trace-timeline.dx.json +3737 -1200
  345. package/src/testing/index.ts +1 -0
  346. package/src/testing/test-generator.test.ts +1 -1
  347. package/src/testing/test-generator.ts +4 -4
  348. package/src/testing/test-trace.ts +20 -0
  349. package/src/testing/trace-timeline.conversations.json +1 -1
  350. package/src/testing/trace-timeline.test.ts +53 -49
  351. package/src/translations.ts +24 -31
  352. package/src/types/Assistant.ts +11 -0
  353. package/src/types/Settings.ts +62 -7
  354. package/src/types/index.ts +0 -1
  355. package/src/types/service.ts +1 -1
  356. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +0 -97
  357. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +0 -7
  358. package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +0 -7
  359. package/dist/lib/browser/chunk-EZRS3J25.mjs +0 -30
  360. package/dist/lib/browser/chunk-EZRS3J25.mjs.map +0 -7
  361. package/dist/lib/browser/chunk-LMVTXH54.mjs.map +0 -7
  362. package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +0 -7
  363. package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +0 -7
  364. package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +0 -7
  365. package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +0 -7
  366. package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +0 -7
  367. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +0 -98
  368. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +0 -7
  369. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +0 -32
  370. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +0 -7
  371. package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +0 -7
  372. package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +0 -7
  373. package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +0 -7
  374. package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +0 -7
  375. package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +0 -7
  376. package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +0 -7
  377. package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +0 -7
  378. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -10
  379. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
  380. package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
  381. package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
  382. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +0 -15
  383. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +0 -1
  384. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +0 -6
  385. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +0 -1
  386. package/dist/types/src/containers/PromptArticle/index.d.ts +0 -2
  387. package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
  388. package/dist/types/src/containers/PromptList/PromptList.d.ts +0 -6
  389. package/dist/types/src/containers/PromptList/PromptList.d.ts.map +0 -1
  390. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +0 -1
  391. package/dist/types/src/containers/PromptList/index.d.ts +0 -2
  392. package/dist/types/src/containers/PromptList/index.d.ts.map +0 -1
  393. package/dist/types/src/types/defs.d.ts +0 -2
  394. package/dist/types/src/types/defs.d.ts.map +0 -1
  395. package/src/components/ChatProgress/ChatProgress.tsx +0 -56
  396. package/src/components/ChatProgress/index.ts +0 -5
  397. package/src/components/ChatThread/widgets/PromptWidget.ts +0 -30
  398. package/src/containers/PromptArticle/index.ts +0 -5
  399. package/src/containers/PromptList/index.ts +0 -5
  400. package/src/types/defs.ts +0 -5
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './simulated-agent';
6
+ export * from './snapshot-playback';
@@ -0,0 +1,114 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Schema from 'effect/Schema';
7
+
8
+ import { AgentRequestBegin, AgentRequestEnd, CompleteBlock } from '@dxos/assistant';
9
+ import { Process, Trace } from '@dxos/compute';
10
+ import { ObjectId } from '@dxos/keys';
11
+
12
+ export interface AgentScenario {
13
+ readonly prompt: string;
14
+ readonly tools: readonly string[];
15
+ }
16
+
17
+ /** Probability that any given run aborts with a simulated tool failure. */
18
+ const FAILURE_PROBABILITY = 0.1;
19
+
20
+ export const agentScenarios: readonly AgentScenario[] = [
21
+ {
22
+ prompt: 'Create an organization called "Cyberdyne Systems"',
23
+ tools: ['list-schemas', 'create-object'],
24
+ },
25
+ {
26
+ prompt: 'Search for all organizations and persons',
27
+ tools: ['list-schemas', 'query', 'query'],
28
+ },
29
+ {
30
+ prompt: 'Create a person named "John Connor"',
31
+ tools: ['create-object'],
32
+ },
33
+ ];
34
+
35
+ const delay = (ms: number) => Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, ms)));
36
+
37
+ /**
38
+ * Write a trace event and yield to the event loop so FeedTraceSink flushes it to ECHO before continuing.
39
+ */
40
+ const writeAndFlush = <T>(eventType: Trace.EventType<T>, payload: T) =>
41
+ Effect.gen(function* () {
42
+ yield* Trace.write(eventType, payload);
43
+ yield* Effect.promise(() => new Promise((resolve) => setTimeout(resolve, 100)));
44
+ });
45
+
46
+ /**
47
+ * Storybook fixture: a {@link Process} that emits a deterministic stream of agent trace events
48
+ * (request begin/end, user message, sequential tool calls with simulated latency).
49
+ *
50
+ * Input is a scenario index into {@link agentScenarios} (modulo the array length).
51
+ */
52
+ export const SimulatedAgent = Process.make(
53
+ {
54
+ key: 'org.dxos.testing.process.agent',
55
+ input: Schema.Number,
56
+ output: Schema.Void,
57
+ services: [Trace.TraceService],
58
+ },
59
+ (ctx) =>
60
+ Effect.succeed({
61
+ onInput: (index: number) =>
62
+ Effect.gen(function* () {
63
+ const messageId = ObjectId.random();
64
+ const scenario = agentScenarios[index % agentScenarios.length];
65
+
66
+ // Decide upfront whether this run will fail (and at which tool) so the trace shows a partial sequence.
67
+ const failAtToolIndex =
68
+ Math.random() < FAILURE_PROBABILITY ? Math.floor(Math.random() * scenario.tools.length) : -1;
69
+
70
+ // Agent begins processing.
71
+ yield* writeAndFlush(AgentRequestBegin, {});
72
+
73
+ // User message.
74
+ yield* writeAndFlush(CompleteBlock, {
75
+ messageId,
76
+ role: 'user',
77
+ block: { _tag: 'text', text: scenario.prompt },
78
+ });
79
+
80
+ // Simulate tool calls sequentially with delays.
81
+ for (const [index, toolName] of scenario.tools.entries()) {
82
+ const toolCallId = ObjectId.random();
83
+
84
+ // Tool call event.
85
+ yield* writeAndFlush(CompleteBlock, {
86
+ messageId,
87
+ role: 'assistant',
88
+ block: { _tag: 'toolCall', toolCallId, name: toolName, input: '{}', providerExecuted: false },
89
+ });
90
+
91
+ // Simulate tool execution time.
92
+ yield* delay(1_000 + Math.random() * 3_000);
93
+
94
+ if (index === failAtToolIndex) {
95
+ ctx.fail(new Error(`Simulated failure in tool '${toolName}'`));
96
+ return;
97
+ }
98
+
99
+ // Tool result event.
100
+ yield* writeAndFlush(CompleteBlock, {
101
+ messageId,
102
+ role: 'assistant',
103
+ block: { _tag: 'toolResult', toolCallId, name: toolName, providerExecuted: false },
104
+ });
105
+ }
106
+
107
+ // Agent completes.
108
+ yield* writeAndFlush(AgentRequestEnd, {});
109
+ ctx.succeed();
110
+ }).pipe(Effect.orDie),
111
+ onAlarm: () => Effect.void,
112
+ onChildEvent: () => Effect.void,
113
+ }),
114
+ );
@@ -0,0 +1,45 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type Dispatch, type SetStateAction, useEffect, useRef, useState } from 'react';
6
+
7
+ /**
8
+ * Interval (ms) between auto-played trace messages in the snapshot playback story.
9
+ */
10
+ export const PLAYBACK_INTERVAL_MS = 250;
11
+
12
+ export const STEP_STORAGE_KEY = 'plugin-assistant.trace-panel.snapshot.step';
13
+
14
+ /**
15
+ * `useState<number>` that hydrates from and persists to `localStorage`.
16
+ * The third tuple member is `true` iff a valid value was loaded on first render.
17
+ */
18
+ export const useLocalStorageNumber = (
19
+ key: string,
20
+ initial: number,
21
+ ): [number, Dispatch<SetStateAction<number>>, boolean] => {
22
+ const initRef = useRef<{ value: number; hydrated: boolean } | null>(null);
23
+ if (initRef.current === null) {
24
+ let value = initial;
25
+ let hydrated = false;
26
+ if (typeof window !== 'undefined') {
27
+ const stored = window.localStorage.getItem(key);
28
+ const parsed = stored === null ? Number.NaN : Number(stored);
29
+ if (Number.isInteger(parsed) && parsed >= 0) {
30
+ value = parsed;
31
+ hydrated = true;
32
+ }
33
+ }
34
+ initRef.current = { value, hydrated };
35
+ }
36
+
37
+ const [value, setValue] = useState(initRef.current.value);
38
+ useEffect(() => {
39
+ if (typeof window !== 'undefined') {
40
+ window.localStorage.setItem(key, String(value));
41
+ }
42
+ }, [key, value]);
43
+
44
+ return [value, setValue, initRef.current.hydrated];
45
+ };
@@ -10,7 +10,7 @@ export const ChatContainer: ComponentType<any> = lazy(() => import('./ChatContai
10
10
  export const ChatDialog: ComponentType<any> = lazy(() => import('./ChatDialog'));
11
11
  export const AgentArticle: ComponentType<any> = lazy(() => import('./AgentArticle'));
12
12
  export const AgentProperties: ComponentType<any> = lazy(() => import('./AgentProperties'));
13
- export const PromptArticle: ComponentType<any> = lazy(() => import('./PromptArticle'));
14
- export const PromptList: ComponentType<any> = lazy(() => import('./PromptList'));
13
+ export const RoutineArticle: ComponentType<any> = lazy(() => import('./RoutineArticle'));
14
+ export const RoutineList: ComponentType<any> = lazy(() => import('./RoutineList'));
15
15
  export const TracePanel: ComponentType<any> = lazy(() => import('./TracePanel'));
16
16
  export const TriggerStatus: ComponentType<any> = lazy(() => import('./TriggerStatus'));
@@ -3,11 +3,13 @@
3
3
  //
4
4
 
5
5
  export * from './useBlueprintRegistry';
6
+ export * from './useChatKeymap';
6
7
  export * from './useChatProcessor';
7
8
  export * from './useChatServices';
8
9
  export * from './useChatToolbarActions';
9
10
  export * from './useContextBinder';
10
11
  export * from './useContextObjects';
12
+ export { useDebug } from './useDebug';
11
13
  export * from './useFilteredTypes';
12
14
  export * from './useFlush';
13
15
  export * from './useOnline';
@@ -7,7 +7,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
7
7
  import { useCapabilities } from '@dxos/app-framework/ui';
8
8
  import { AppCapabilities } from '@dxos/app-toolkit';
9
9
  import { type AiContextBinder } from '@dxos/assistant';
10
- import { Blueprint } from '@dxos/blueprints';
10
+ import { Blueprint } from '@dxos/compute';
11
11
  import { type Database, Filter, Obj, Ref } from '@dxos/echo';
12
12
  import { useQuery } from '@dxos/react-client/echo';
13
13
  import { distinctBy } from '@dxos/util';
@@ -0,0 +1,52 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Extension, Prec } from '@codemirror/state';
6
+ import { keymap } from '@codemirror/view';
7
+ import { useMemo } from 'react';
8
+
9
+ import { type Event } from '@dxos/async';
10
+ import { isTruthy } from '@dxos/util';
11
+
12
+ import { type ChatEvent } from '../components/Chat/events';
13
+
14
+ /**
15
+ * CodeMirror keymap shared by the chat document (Thread) and the prompt editor — pressing
16
+ * Mod-Arrow keys when either editor is focused emits the corresponding `ChatEvent` on the
17
+ * shared event bus.
18
+ */
19
+ export const useChatKeymapExtensions = ({ event }: { event: Event<ChatEvent> }): Extension[] => {
20
+ return useMemo<Extension[]>(() => {
21
+ return [
22
+ Prec.highest(
23
+ keymap.of([
24
+ {
25
+ key: 'Mod-ArrowUp',
26
+ preventDefault: true,
27
+ run: () => {
28
+ event.emit({ type: 'nav-previous' });
29
+ return true;
30
+ },
31
+ shift: () => {
32
+ event.emit({ type: 'thread-open' });
33
+ return true;
34
+ },
35
+ },
36
+ {
37
+ key: 'Mod-ArrowDown',
38
+ preventDefault: true,
39
+ run: () => {
40
+ event.emit({ type: 'nav-next' });
41
+ return true;
42
+ },
43
+ shift: () => {
44
+ event.emit({ type: 'thread-close' });
45
+ return true;
46
+ },
47
+ },
48
+ ]),
49
+ ),
50
+ ].filter(isTruthy);
51
+ }, [event]);
52
+ };
@@ -8,7 +8,7 @@ import { useContext, useMemo, useState } from 'react';
8
8
 
9
9
  import { AiSession } from '@dxos/assistant';
10
10
  import { type Chat } from '@dxos/assistant-toolkit';
11
- import { type Blueprint } from '@dxos/blueprints';
11
+ import { type Blueprint } from '@dxos/compute';
12
12
  import { Feed, Ref } from '@dxos/echo';
13
13
  import { createFeedServiceLayer } from '@dxos/echo-db';
14
14
  import { runAndForwardErrors } from '@dxos/effect';
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { useCallback } from 'react';
6
+
7
+ import { trim } from '@dxos/util';
8
+
9
+ import { type AiChatProcessor } from '../processor';
10
+
11
+ /**
12
+ * Returns an async callback that logs the chat's current context, system prompt,
13
+ * and resolved tools to the browser console under a collapsible group.
14
+ * Used by the chat's debug-toggle event handler.
15
+ */
16
+ export const useDebug = ({ processor }: { processor: AiChatProcessor }) => {
17
+ return useCallback(async () => {
18
+ const objects = processor.context.getObjects();
19
+ const blueprints = processor.context.getBlueprints();
20
+ const system = await processor.getSystemPrompt();
21
+ const tools = (await processor.getTools()) ?? {};
22
+ console.group('Chat', { objects, blueprints });
23
+ try {
24
+ console.log(trim`
25
+ System Prompt:
26
+ ${system}
27
+ `);
28
+ console.log(trim`
29
+ Tools:
30
+ ${Object.values(tools)
31
+ .map((tool) => JSON.stringify(tool, null, 2))
32
+ .join('\n')}
33
+ `);
34
+ } finally {
35
+ console.groupEnd();
36
+ }
37
+ }, [processor]);
38
+ };
package/src/index.ts CHANGED
@@ -2,11 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export * from './blueprints';
6
5
  export * from './components';
7
6
  export * from './hooks';
8
7
  export * from './meta';
9
- export * from './translations';
10
- export * from './types';
11
8
 
12
9
  export * from './AssistantPlugin';
@@ -7,11 +7,11 @@ import * as Effect from 'effect/Effect';
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { AiContextBinder } from '@dxos/assistant';
9
9
  import { Chat, DatabaseBlueprint, AgentWizardBlueprint } from '@dxos/assistant-toolkit';
10
- import { Blueprint } from '@dxos/blueprints';
10
+ import { Blueprint } from '@dxos/compute';
11
+ import { Operation } from '@dxos/compute';
11
12
  import { Feed, Filter, Obj, Ref } from '@dxos/echo';
12
13
  import { createFeedServiceLayer } from '@dxos/echo-db';
13
14
  import { invariant } from '@dxos/invariant';
14
- import { Operation } from '@dxos/operation';
15
15
  import { ClientCapabilities } from '@dxos/plugin-client/types';
16
16
 
17
17
  import { AssistantBlueprint } from '#blueprints';
@@ -7,10 +7,10 @@ import * as Schema from 'effect/Schema';
7
7
  import { AiService } from '@dxos/ai';
8
8
  import { Capability } from '@dxos/app-framework';
9
9
  import { Chat } from '@dxos/assistant-toolkit';
10
- import { Prompt } from '@dxos/blueprints';
11
10
  import { SpaceSchema } from '@dxos/client/echo';
11
+ import { Routine } from '@dxos/compute';
12
+ import { Operation } from '@dxos/compute';
12
13
  import { Collection, Database, DXN, Feed, Obj, Ref } from '@dxos/echo';
13
- import { Operation } from '@dxos/operation';
14
14
 
15
15
  import { meta } from '#meta';
16
16
 
@@ -68,8 +68,8 @@ export const RunPromptInNewChat = Operation.make({
68
68
  objects: Schema.optional(Schema.Array(Obj.Unknown)),
69
69
  /** Blueprint keys to look up and bind to the new chat. */
70
70
  blueprints: Schema.optional(Schema.Array(Schema.String)),
71
- /** Raw instructions or an existing Prompt object reference (e.g. from the prompts surface). */
72
- prompt: Schema.Union(Schema.String, Ref.Ref(Prompt.Prompt)),
71
+ /** Raw instructions or an existing Routine object reference. */
72
+ prompt: Schema.Union(Schema.String, Ref.Ref(Routine.Routine)),
73
73
  /**
74
74
  * When true, skips opening the chat: runs the Agent prompt operation against the new chat via the compute runtime (traced).
75
75
  */
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { Chat } from '@dxos/assistant-toolkit';
9
+ import { Operation } from '@dxos/compute';
9
10
  import { Filter, Obj, Query } from '@dxos/echo';
10
- import { Operation } from '@dxos/operation';
11
11
 
12
12
  import { AssistantCapabilities } from '../types';
13
13
  import { CreateChat, EnsureCompanionChat, SetCurrentChat } from './definitions';
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { OperationHandlerSet } from '@dxos/operation';
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
6
 
7
7
  export * as AssistantOperation from './definitions';
8
8
 
@@ -5,7 +5,7 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { AgentPrompt } from '@dxos/assistant-toolkit';
8
- import { Operation } from '@dxos/operation';
8
+ import { Operation } from '@dxos/compute';
9
9
 
10
10
  import { CreateChat, OnCreateSpace } from './definitions';
11
11
 
@@ -7,12 +7,11 @@ import * as Effect from 'effect/Effect';
7
7
  import { describe, test } from 'vitest';
8
8
 
9
9
  import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
10
- import { Prompt } from '@dxos/blueprints';
10
+ import { Routine } from '@dxos/compute';
11
+ import { Operation } from '@dxos/compute';
11
12
  import { Database, Feed, Filter, Ref } from '@dxos/echo';
12
13
  import { runAndForwardErrors } from '@dxos/effect';
13
- import { TestHelpers } from '@dxos/effect/testing';
14
14
  import { ObjectId } from '@dxos/keys';
15
- import { Operation } from '@dxos/operation';
16
15
  import { AutomationPlugin } from '@dxos/plugin-automation/cli';
17
16
  import { AutomationCapabilities } from '@dxos/plugin-automation/types';
18
17
  import { ClientPlugin } from '@dxos/plugin-client/cli';
@@ -28,8 +27,9 @@ ObjectId.dangerouslyDisableRandomness();
28
27
  describe('Agent prompt (composer plugin harness)', () => {
29
28
  // Hits AutomationPlugin compute runtime (plugin handlers, AiServiceLayer, blueprints).
30
29
  // Requires reachable edge AI (see repo DX_EDGE_AI_SERVICE_URL); not memoized like AssistantTestLayer tests.
31
- test.runIf(TestHelpers.tagEnabled('llm'))(
30
+ test(
32
31
  'chat mode appends assistant messages to the chat queue',
32
+ { tags: ['llm'], timeout: 60_000 },
33
33
  async ({ expect }) => {
34
34
  await using harness = await createComposerTestApp({
35
35
  plugins: [ClientPlugin({}), AssistantPlugin(), AutomationPlugin()],
@@ -50,7 +50,7 @@ describe('Agent prompt (composer plugin harness)', () => {
50
50
 
51
51
  const chat = yield* Database.add(Chat.make({ feed: Ref.make(feed) }));
52
52
  const prompt = yield* Database.add(
53
- Prompt.make({
53
+ Routine.make({
54
54
  name: 'chat-mode-test',
55
55
  instructions: 'Reply with a single word: ack.',
56
56
  blueprints: [],
@@ -74,6 +74,5 @@ describe('Agent prompt (composer plugin harness)', () => {
74
74
  }),
75
75
  );
76
76
  },
77
- 60_000,
78
77
  );
79
78
  });
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capability } from '@dxos/app-framework';
8
8
  import { AppCapabilities } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { ResolveNavigationTargets } from './definitions';
12
12
 
@@ -8,12 +8,12 @@ import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { getObjectPathFromObject, LayoutOperation } from '@dxos/app-toolkit';
9
9
  import { AiContextBinder } from '@dxos/assistant';
10
10
  import { AgentPrompt } from '@dxos/assistant-toolkit';
11
- import { Blueprint, Prompt, Template } from '@dxos/blueprints';
11
+ import { Blueprint, Routine, Template } from '@dxos/compute';
12
+ import { Operation } from '@dxos/compute';
12
13
  import { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';
13
14
  import { createFeedServiceLayer } from '@dxos/echo-db';
14
15
  import { invariant } from '@dxos/invariant';
15
16
  import { log } from '@dxos/log';
16
- import { Operation } from '@dxos/operation';
17
17
  import { AutomationCapabilities } from '@dxos/plugin-automation/types';
18
18
  import { ClientCapabilities } from '@dxos/plugin-client/types';
19
19
  import { Text } from '@dxos/schema';
@@ -64,7 +64,7 @@ const handler: Operation.WithHandler<typeof RunPromptInNewChat> = RunPromptInNew
64
64
  const promptRef =
65
65
  typeof prompt === 'string'
66
66
  ? Ref.make(
67
- Prompt.make({
67
+ Routine.make({
68
68
  instructions: prompt,
69
69
  blueprints: [],
70
70
  context: [],
@@ -5,8 +5,8 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
8
9
  import { Obj } from '@dxos/echo';
9
- import { Operation } from '@dxos/operation';
10
10
 
11
11
  import { AssistantCapabilities } from '../types';
12
12
  import { CreateChat, SetCurrentChat } from './definitions';
@@ -7,9 +7,9 @@ import * as Prompt from '@effect/ai/Prompt';
7
7
  import * as Effect from 'effect/Effect';
8
8
 
9
9
  import { AiPreprocessor, AiService } from '@dxos/ai';
10
+ import { Operation } from '@dxos/compute';
10
11
  import { Database, Feed, Filter, Obj } from '@dxos/echo';
11
12
  import { log } from '@dxos/log';
12
- import { Operation } from '@dxos/operation';
13
13
  import { Message } from '@dxos/types';
14
14
  import { trim } from '@dxos/util';
15
15
 
@@ -48,7 +48,7 @@ const handler: Operation.WithHandler<typeof UpdateChatName> = UpdateChatName.pip
48
48
 
49
49
  const newName = response.text.replaceAll(/[^a-zA-Z0-9\s]/g, '').trim();
50
50
 
51
- Obj.change(chat, (chat) => {
51
+ Obj.update(chat, (chat) => {
52
52
  chat.name = newName;
53
53
  });
54
54
  log.info('chat name updated', { chat, newName: chat.name });
@@ -8,10 +8,10 @@ import * as ManagedRuntime from 'effect/ManagedRuntime';
8
8
 
9
9
  import { AiSession } from '@dxos/assistant';
10
10
  import { Chat } from '@dxos/assistant-toolkit';
11
- import { AssistantTestLayer } from '@dxos/assistant/testing';
12
11
  import { Database, Feed } from '@dxos/echo';
13
12
  import { acquireReleaseResource } from '@dxos/effect';
14
13
  import { TestHelpers } from '@dxos/effect/testing';
14
+ import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
15
15
 
16
16
  import { AiChatProcessor } from './processor';
17
17
 
@@ -14,17 +14,17 @@ import {
14
14
  type AiSession,
15
15
  createSystemPrompt,
16
16
  formatSystemPrompt,
17
- AgentService,
18
17
  PartialBlock,
19
18
  ToolExecutionServices,
20
19
  } from '@dxos/assistant';
21
20
  import { type Chat } from '@dxos/assistant-toolkit';
22
- import { type Blueprint } from '@dxos/blueprints';
21
+ import { type Blueprint } from '@dxos/compute';
22
+ import { Trace, type CredentialsService, type QueueService } from '@dxos/compute';
23
+ import { Operation } from '@dxos/compute';
23
24
  import { type Database, Feed, Obj, Ref } from '@dxos/echo';
24
25
  import { runAndForwardErrors, unwrapExit } from '@dxos/effect';
25
- import { Trace, type CredentialsService, type QueueService } from '@dxos/functions';
26
+ import { AgentService } from '@dxos/functions-runtime';
26
27
  import { log } from '@dxos/log';
27
- import { Operation } from '@dxos/operation';
28
28
  import type { AutomationCapabilities } from '@dxos/plugin-automation/types';
29
29
  import { Message } from '@dxos/types';
30
30
 
@@ -34,7 +34,7 @@ export class QueueLogger implements SequenceLogger {
34
34
  const feed = space.db.add(Feed.make({ namespace: 'trace' }));
35
35
  queueDxn = Feed.getQueueDxn(feed) ?? undefined;
36
36
  invariant(queueDxn, 'New invocationTraceFeed has no queue DXN');
37
- Obj.change(this._space.properties, (obj) => {
37
+ Obj.update(this._space.properties, (obj) => {
38
38
  obj.invocationTraceFeed = Ref.make(feed);
39
39
  });
40
40
  }