@dxos/plugin-assistant 0.8.4-main.422d1c7879 → 0.8.4-main.4668b7de9b

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 (675) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +439 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/AgentArticle-OYQPCK3Q.mjs +161 -0
  5. package/dist/lib/neutral/AgentArticle-OYQPCK3Q.mjs.map +7 -0
  6. package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs +40 -0
  7. package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs.map +7 -0
  8. package/dist/lib/neutral/AssistantPlugin.mjs +10 -0
  9. package/dist/lib/neutral/AssistantPlugin.node.mjs +66 -0
  10. package/dist/lib/neutral/AssistantPlugin.node.mjs.map +7 -0
  11. package/dist/lib/neutral/AssistantPlugin.workerd.mjs +40 -0
  12. package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +7 -0
  13. package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +40 -0
  14. package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +7 -0
  15. package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs +27 -0
  16. package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs.map +7 -0
  17. package/dist/lib/neutral/ChatArticle-PWD4OEFZ.mjs +8 -0
  18. package/dist/lib/neutral/ChatCompanion-TPY7HF3C.mjs +122 -0
  19. package/dist/lib/neutral/ChatCompanion-TPY7HF3C.mjs.map +7 -0
  20. package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs +73 -0
  21. package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs.map +7 -0
  22. package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs +28 -0
  23. package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +7 -0
  24. package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs +119 -0
  25. package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs.map +7 -0
  26. package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +48 -0
  27. package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +7 -0
  28. package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +17 -0
  29. package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +7 -0
  30. package/dist/lib/neutral/TracePanel-CHJHFTTQ.mjs +136 -0
  31. package/dist/lib/neutral/TracePanel-CHJHFTTQ.mjs.map +7 -0
  32. package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs +93 -0
  33. package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs.map +7 -0
  34. package/dist/lib/neutral/ai-context-IABBIEHG.mjs +42 -0
  35. package/dist/lib/neutral/ai-context-IABBIEHG.mjs.map +7 -0
  36. package/dist/lib/neutral/ai-service-3SH2UQIR.mjs +42 -0
  37. package/dist/lib/neutral/ai-service-3SH2UQIR.mjs.map +7 -0
  38. package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs +199 -0
  39. package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs.map +7 -0
  40. package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs +32 -0
  41. package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs.map +7 -0
  42. package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
  43. package/dist/lib/neutral/capabilities/index.mjs +37 -0
  44. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  45. package/dist/lib/neutral/chunk-47OH7ZF6.mjs +8 -0
  46. package/dist/lib/neutral/chunk-47OH7ZF6.mjs.map +7 -0
  47. package/dist/lib/{browser/chunk-EZRS3J25.mjs → neutral/chunk-5H6UJHLF.mjs} +3 -3
  48. package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +7 -0
  49. package/dist/lib/neutral/chunk-6BUTAYVO.mjs +123 -0
  50. package/dist/lib/neutral/chunk-6BUTAYVO.mjs.map +7 -0
  51. package/dist/lib/neutral/chunk-A2XIILMZ.mjs +107 -0
  52. package/dist/lib/neutral/chunk-A2XIILMZ.mjs.map +7 -0
  53. package/dist/lib/neutral/chunk-UWI53RCD.mjs +386 -0
  54. package/dist/lib/neutral/chunk-UWI53RCD.mjs.map +7 -0
  55. package/dist/lib/neutral/chunk-XYHPOGTK.mjs +43 -0
  56. package/dist/lib/neutral/chunk-XYHPOGTK.mjs.map +7 -0
  57. package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs +116 -0
  58. package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs.map +7 -0
  59. package/dist/lib/neutral/components/index.mjs +2384 -0
  60. package/dist/lib/neutral/components/index.mjs.map +7 -0
  61. package/dist/lib/neutral/containers/index.mjs +29 -0
  62. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  63. package/dist/lib/neutral/create-chat-67GZNG3T.mjs +54 -0
  64. package/dist/lib/neutral/create-chat-67GZNG3T.mjs.map +7 -0
  65. package/dist/lib/neutral/create-object-XPVVVEKF.mjs +89 -0
  66. package/dist/lib/neutral/create-object-XPVVVEKF.mjs.map +7 -0
  67. package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.mjs +50 -0
  68. package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.mjs.map +7 -0
  69. package/dist/lib/{browser/ensure-companion-chat-ZEZA34MZ.mjs → neutral/ensure-companion-chat-AMOF3C66.mjs} +14 -21
  70. package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +7 -0
  71. package/dist/lib/neutral/execution-graph/index.mjs +658 -0
  72. package/dist/lib/neutral/execution-graph/index.mjs.map +7 -0
  73. package/dist/lib/neutral/hooks/index.mjs +965 -0
  74. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  75. package/dist/lib/neutral/index.mjs +32 -0
  76. package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
  77. package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
  78. package/dist/lib/neutral/markdown-KTBFOMFM.mjs +110 -0
  79. package/dist/lib/neutral/markdown-KTBFOMFM.mjs.map +7 -0
  80. package/dist/lib/neutral/meta.json +1 -0
  81. package/dist/lib/neutral/meta.mjs +12 -0
  82. package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
  83. package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
  84. package/dist/lib/{browser/on-create-space-54RNX5JI.mjs → neutral/on-create-space-Q2R7OSP6.mjs} +5 -8
  85. package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs.map +7 -0
  86. package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
  87. package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
  88. package/dist/lib/neutral/operations/index.mjs +8 -0
  89. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  90. package/dist/lib/neutral/plugin.mjs +16 -0
  91. package/dist/lib/neutral/plugin.mjs.map +7 -0
  92. package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs +174 -0
  93. package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs.map +7 -0
  94. package/dist/lib/{browser/resolve-navigation-targets-NZOD66NY.mjs → neutral/resolve-navigation-targets-ZHIMMH7L.mjs} +6 -6
  95. package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +7 -0
  96. package/dist/lib/{browser/run-prompt-in-new-chat-THLK5YQC.mjs → neutral/run-prompt-in-new-chat-NRDYPCJK.mjs} +21 -55
  97. package/dist/lib/neutral/run-prompt-in-new-chat-NRDYPCJK.mjs.map +7 -0
  98. package/dist/lib/{browser/set-current-chat-LRS3VFSH.mjs → neutral/set-current-chat-VWBPSIMZ.mjs} +7 -13
  99. package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +7 -0
  100. package/dist/lib/neutral/settings-W4BLWQ53.mjs +28 -0
  101. package/dist/lib/neutral/settings-W4BLWQ53.mjs.map +7 -0
  102. package/dist/lib/neutral/state-H3G7QCU6.mjs +28 -0
  103. package/dist/lib/neutral/state-H3G7QCU6.mjs.map +7 -0
  104. package/dist/lib/neutral/testing.mjs +8 -0
  105. package/dist/lib/neutral/testing.mjs.map +7 -0
  106. package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +21 -0
  107. package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +7 -0
  108. package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs +14 -0
  109. package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
  110. package/dist/lib/neutral/translations.mjs +175 -0
  111. package/dist/lib/neutral/translations.mjs.map +7 -0
  112. package/dist/lib/neutral/types/index.mjs +20 -0
  113. package/dist/lib/neutral/types/index.mjs.map +7 -0
  114. package/dist/lib/{browser/update-chat-name-3Y36KFAS.mjs → neutral/update-chat-name-ENXRUMDJ.mjs} +8 -25
  115. package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
  116. package/dist/types/src/AssistantPlugin.d.ts +3 -1
  117. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  118. package/dist/types/src/AssistantPlugin.node.d.ts +5 -0
  119. package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
  120. package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
  121. package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
  122. package/dist/types/src/AssistantPlugin.workerd.d.ts +4 -0
  123. package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -0
  124. package/dist/types/src/blueprints/assistant/blueprint.d.ts +2 -2
  125. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
  126. package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +2 -0
  127. package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +1 -0
  128. package/dist/types/src/capabilities/ai-context.d.ts +6 -0
  129. package/dist/types/src/capabilities/ai-context.d.ts.map +1 -0
  130. package/dist/types/src/capabilities/ai-service.d.ts +2 -2
  131. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
  132. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  133. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  134. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
  135. package/dist/types/src/capabilities/create-object.d.ts +31 -0
  136. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
  138. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  139. package/dist/types/src/capabilities/index.d.ts +30 -2
  140. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  141. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
  142. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  143. package/dist/types/src/capabilities/migrations.d.ts +2 -1
  144. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  145. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  146. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  147. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  148. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  149. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  150. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
  151. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +7 -0
  152. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -0
  153. package/dist/types/src/{containers → components}/AgentProperties/AgentProperties.stories.d.ts +1 -2
  154. package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
  155. package/dist/types/src/components/AgentProperties/index.d.ts +2 -0
  156. package/dist/types/src/components/AgentProperties/index.d.ts.map +1 -0
  157. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +1 -1
  158. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  159. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
  160. package/dist/types/src/components/Chat/Chat.d.ts +36 -40
  161. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  162. package/dist/types/src/components/Chat/context.d.ts +29 -0
  163. package/dist/types/src/components/Chat/context.d.ts.map +1 -0
  164. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  165. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
  166. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
  167. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +8 -7
  168. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  169. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +1 -1
  170. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
  171. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  172. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
  173. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
  174. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +2 -2
  175. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  176. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
  177. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
  178. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  179. package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
  180. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  181. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
  182. package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
  183. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  184. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +5 -5
  185. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  186. package/dist/types/src/components/ChatThread/Link.d.ts +2 -2
  187. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
  188. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +1 -1
  189. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
  190. package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
  191. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  192. package/dist/types/src/components/ChatThread/sync.d.ts +3 -3
  193. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
  194. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -1
  195. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +4 -4
  196. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -1
  197. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -1
  198. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
  199. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
  200. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -1
  201. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -1
  202. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +2 -15
  203. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -1
  204. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
  205. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -1
  206. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
  207. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -1
  208. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
  209. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
  210. package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -2
  211. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
  212. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +4 -3
  213. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
  214. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -1
  215. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
  216. package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +7 -0
  217. package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +1 -0
  218. package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +15 -0
  219. package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +1 -0
  220. package/dist/types/src/components/RoutineProperties/index.d.ts +2 -0
  221. package/dist/types/src/components/RoutineProperties/index.d.ts.map +1 -0
  222. package/dist/types/src/components/TaskList/TaskList.d.ts +10 -0
  223. package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -0
  224. package/dist/types/src/components/TaskList/TaskList.stories.d.ts +16 -0
  225. package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -0
  226. package/dist/types/src/components/TaskList/index.d.ts +2 -0
  227. package/dist/types/src/components/TaskList/index.d.ts.map +1 -0
  228. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +5 -3
  229. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  230. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  231. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +4 -5
  232. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  233. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
  234. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  235. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
  236. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
  237. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -4
  238. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  239. package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
  240. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  241. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  242. package/dist/types/src/components/index.d.ts +3 -0
  243. package/dist/types/src/components/index.d.ts.map +1 -1
  244. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
  245. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +0 -2
  246. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
  247. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +1 -1
  248. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
  249. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +1 -1
  250. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
  251. package/dist/types/src/containers/{ChatContainer/ChatContainer.d.ts → ChatArticle/ChatArticle.d.ts} +3 -3
  252. package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -0
  253. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +15 -0
  254. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -0
  255. package/dist/types/src/containers/ChatArticle/index.d.ts +2 -0
  256. package/dist/types/src/containers/ChatArticle/index.d.ts.map +1 -0
  257. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +11 -3
  258. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
  259. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
  260. package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +6 -0
  261. package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -0
  262. package/dist/types/src/containers/PlanArticle/index.d.ts +2 -0
  263. package/dist/types/src/containers/PlanArticle/index.d.ts.map +1 -0
  264. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
  265. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
  266. package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +15 -0
  267. package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
  268. package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
  269. package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
  270. package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
  271. package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
  272. package/dist/types/src/containers/{PromptList/PromptList.stories.d.ts → RoutineList/RoutineList.stories.d.ts} +1 -1
  273. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
  274. package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
  275. package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
  276. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +3 -2
  277. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
  278. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +3 -4
  279. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
  280. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +5 -5
  281. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -1
  282. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
  283. package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
  284. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
  285. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
  286. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
  287. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
  288. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
  289. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
  290. package/dist/types/src/containers/index.d.ts +6 -5
  291. package/dist/types/src/containers/index.d.ts.map +1 -1
  292. package/dist/types/src/execution-graph/execution-graph.d.ts +108 -0
  293. package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
  294. package/dist/types/src/execution-graph/execution-graph.test.d.ts +2 -0
  295. package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +1 -0
  296. package/dist/types/src/execution-graph/index.d.ts +3 -0
  297. package/dist/types/src/execution-graph/index.d.ts.map +1 -0
  298. package/dist/types/src/execution-graph/remote-snapshot.test.d.ts +2 -0
  299. package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +1 -0
  300. package/dist/types/src/execution-graph/span-tree.d.ts +76 -0
  301. package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -0
  302. package/dist/types/src/execution-graph/span-tree.test.d.ts +2 -0
  303. package/dist/types/src/execution-graph/span-tree.test.d.ts.map +1 -0
  304. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +40 -0
  305. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +1 -0
  306. package/dist/types/src/execution-graph/testing/index.d.ts +2 -0
  307. package/dist/types/src/execution-graph/testing/index.d.ts.map +1 -0
  308. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
  309. package/dist/types/src/feed-logger.d.ts +13 -0
  310. package/dist/types/src/feed-logger.d.ts.map +1 -0
  311. package/dist/types/src/hooks/index.d.ts +2 -0
  312. package/dist/types/src/hooks/index.d.ts.map +1 -1
  313. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +56 -15
  314. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  315. package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
  316. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
  317. package/dist/types/src/hooks/useChatProcessor.d.ts +5 -5
  318. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  319. package/dist/types/src/hooks/useChatServices.d.ts +7 -3
  320. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  321. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  322. package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
  323. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
  324. package/dist/types/src/hooks/useContextObjects.d.ts +5 -4
  325. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  326. package/dist/types/src/hooks/useDebug.d.ts +10 -0
  327. package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
  328. package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
  329. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
  330. package/dist/types/src/hooks/useFlush.d.ts +1 -1
  331. package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
  332. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  333. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  334. package/dist/types/src/index.d.ts +0 -4
  335. package/dist/types/src/index.d.ts.map +1 -1
  336. package/dist/types/src/meta.d.ts +3 -2
  337. package/dist/types/src/meta.d.ts.map +1 -1
  338. package/dist/types/src/operations/create-chat.d.ts +3 -3
  339. package/dist/types/src/operations/create-chat.d.ts.map +1 -1
  340. package/dist/types/src/operations/ensure-companion-chat.d.ts +3 -3
  341. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
  342. package/dist/types/src/operations/index.d.ts +1 -2
  343. package/dist/types/src/operations/index.d.ts.map +1 -1
  344. package/dist/types/src/operations/on-create-space.d.ts +3 -3
  345. package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
  346. package/dist/types/src/operations/prompt.node.test.d.ts +2 -0
  347. package/dist/types/src/operations/prompt.node.test.d.ts.map +1 -0
  348. package/dist/types/src/operations/resolve-navigation-targets.d.ts +4 -2
  349. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
  350. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +3 -3
  351. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
  352. package/dist/types/src/operations/set-current-chat.d.ts +3 -3
  353. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -1
  354. package/dist/types/src/operations/toggle-trace-panel-debug.d.ts +5 -0
  355. package/dist/types/src/operations/toggle-trace-panel-debug.d.ts.map +1 -0
  356. package/dist/types/src/operations/update-chat-name.d.ts +3 -3
  357. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -1
  358. package/dist/types/src/plugin.d.ts +4 -0
  359. package/dist/types/src/plugin.d.ts.map +1 -0
  360. package/dist/types/src/processor/processor.d.ts +263 -20
  361. package/dist/types/src/processor/processor.d.ts.map +1 -1
  362. package/dist/types/src/processor/processor.node.test.d.ts +2 -0
  363. package/dist/types/src/processor/processor.node.test.d.ts.map +1 -0
  364. package/dist/types/src/testing/index.d.ts +2 -0
  365. package/dist/types/src/testing/index.d.ts.map +1 -1
  366. package/dist/types/src/testing/snapshot.d.ts +21 -0
  367. package/dist/types/src/testing/snapshot.d.ts.map +1 -0
  368. package/dist/types/src/testing/test-generator.d.ts +2 -3
  369. package/dist/types/src/testing/test-generator.d.ts.map +1 -1
  370. package/dist/types/src/testing/test-sequence.d.ts +10 -3
  371. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  372. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  373. package/dist/types/src/testing/test-trace.d.ts +5 -0
  374. package/dist/types/src/testing/test-trace.d.ts.map +1 -0
  375. package/dist/types/src/testing/trace-timeline.node.test.d.ts +2 -0
  376. package/dist/types/src/testing/trace-timeline.node.test.d.ts.map +1 -0
  377. package/dist/types/src/testing.d.ts +2 -0
  378. package/dist/types/src/testing.d.ts.map +1 -0
  379. package/dist/types/src/translations.d.ts.map +1 -1
  380. package/dist/types/src/types/Assistant.d.ts +25 -8
  381. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  382. package/dist/types/src/types/AssistantCapabilities.d.ts +30 -0
  383. package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -0
  384. package/dist/types/src/types/AssistantEvents.d.ts +3 -0
  385. package/dist/types/src/types/AssistantEvents.d.ts.map +1 -0
  386. package/dist/types/src/{operations/definitions.d.ts → types/AssistantOperation.d.ts} +61 -59
  387. package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
  388. package/dist/types/src/types/Settings.d.ts +21 -5
  389. package/dist/types/src/types/Settings.d.ts.map +1 -1
  390. package/dist/types/src/types/index.d.ts +7 -3
  391. package/dist/types/src/types/index.d.ts.map +1 -1
  392. package/dist/types/src/types/service.d.ts +2 -3
  393. package/dist/types/src/types/service.d.ts.map +1 -1
  394. package/dist/types/src/util/suggestions.d.ts +9 -0
  395. package/dist/types/src/util/suggestions.d.ts.map +1 -0
  396. package/dist/types/src/util/suggestions.test.d.ts +2 -0
  397. package/dist/types/src/util/suggestions.test.d.ts.map +1 -0
  398. package/dist/types/tsconfig.tsbuildinfo +1 -1
  399. package/package.json +168 -128
  400. package/src/AssistantPlugin.conversations.json +1 -0
  401. package/src/AssistantPlugin.node.ts +77 -0
  402. package/src/AssistantPlugin.test.ts +152 -0
  403. package/src/AssistantPlugin.ts +147 -0
  404. package/src/AssistantPlugin.workerd.ts +41 -0
  405. package/src/blueprints/assistant/{blueprint.test.ts → blueprint.node.test.ts} +5 -5
  406. package/src/blueprints/assistant/blueprint.ts +4 -4
  407. package/src/capabilities/ai-context.ts +85 -0
  408. package/src/capabilities/ai-service.ts +36 -9
  409. package/src/capabilities/app-graph-builder.ts +55 -20
  410. package/src/capabilities/blueprint-definition.ts +2 -4
  411. package/src/capabilities/companion-chat-provisioner.ts +4 -5
  412. package/src/capabilities/create-object.ts +98 -0
  413. package/src/capabilities/edge-model-resolver.ts +47 -11
  414. package/src/capabilities/index.ts +10 -2
  415. package/src/capabilities/markdown.ts +1 -1
  416. package/src/capabilities/migrations.ts +4 -11
  417. package/src/capabilities/operation-handler.ts +1 -1
  418. package/src/capabilities/react-surface.tsx +33 -20
  419. package/src/components/AgentProperties/AgentProperties.stories.tsx +74 -0
  420. package/src/components/AgentProperties/AgentProperties.tsx +104 -0
  421. package/src/components/AgentProperties/index.ts +5 -0
  422. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +3 -2
  423. package/src/components/AssistantSettings/AssistantSettings.tsx +22 -111
  424. package/src/components/Chat/Chat.tsx +85 -259
  425. package/src/components/Chat/context.ts +39 -0
  426. package/src/components/ChatPrompt/ChatActions.tsx +10 -10
  427. package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
  428. package/src/components/ChatPrompt/ChatOptions.stories.tsx +32 -18
  429. package/src/components/ChatPrompt/ChatOptions.tsx +103 -82
  430. package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
  431. package/src/components/ChatPrompt/ChatReferences.tsx +9 -13
  432. package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
  433. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
  434. package/src/components/ChatPrompt/index.ts +3 -0
  435. package/src/components/ChatThread/Anchor.stories.tsx +7 -7
  436. package/src/components/ChatThread/ChatThread.stories.tsx +27 -31
  437. package/src/components/ChatThread/ChatThread.tsx +43 -21
  438. package/src/components/ChatThread/DEBUG.md +41 -0
  439. package/src/components/ChatThread/Link.tsx +5 -5
  440. package/src/components/ChatThread/MarkdownStream.stories.tsx +5 -4
  441. package/src/components/ChatThread/registry.tsx +62 -19
  442. package/src/components/ChatThread/sync.test.ts +84 -18
  443. package/src/components/ChatThread/sync.ts +3 -3
  444. package/src/components/ChatThread/widgets/ReasoningWidget.ts +13 -7
  445. package/src/components/ChatThread/widgets/ReferenceWidget.ts +3 -1
  446. package/src/components/ChatThread/widgets/SelectWidget.ts +4 -2
  447. package/src/components/ChatThread/widgets/StatsWidget.ts +3 -1
  448. package/src/components/ChatThread/widgets/StatusWidget.ts +6 -84
  449. package/src/components/ChatThread/widgets/SuggestionWidget.ts +2 -2
  450. package/src/components/ChatThread/widgets/SummaryWidget.tsx +3 -4
  451. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
  452. package/src/components/ChatThread/widgets/ToolWidget.tsx +19 -4
  453. package/src/components/ChatThread/widgets/defaults.ts +8 -0
  454. package/src/components/ChatThread/widgets/index.ts +1 -2
  455. package/src/components/ProcessTree/ProcessTree.stories.tsx +13 -39
  456. package/src/components/ProcessTree/ProcessTree.tsx +101 -67
  457. package/src/components/RoutineProperties/RoutineProperties.stories.tsx +59 -0
  458. package/src/components/RoutineProperties/RoutineProperties.tsx +23 -0
  459. package/src/components/RoutineProperties/index.ts +5 -0
  460. package/src/components/TaskList/TaskList.stories.tsx +44 -0
  461. package/src/components/TaskList/TaskList.tsx +45 -0
  462. package/src/{cli → components/TaskList}/index.ts +1 -1
  463. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -4
  464. package/src/components/TemplateEditor/TemplateEditor.tsx +11 -9
  465. package/src/components/TemplateEditor/TemplateForm.stories.tsx +6 -9
  466. package/src/components/TemplateEditor/TemplateForm.tsx +52 -73
  467. package/src/components/ToolBlock/ToolBlock.tsx +1 -1
  468. package/src/components/Toolbox/Toolbox.stories.tsx +6 -5
  469. package/src/components/Toolbox/Toolbox.tsx +6 -5
  470. package/src/components/index.ts +3 -0
  471. package/src/containers/AgentArticle/AgentArticle.stories.tsx +19 -15
  472. package/src/containers/AgentArticle/AgentArticle.tsx +37 -48
  473. package/src/containers/AgentProperties/AgentProperties.tsx +19 -103
  474. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +2 -2
  475. package/src/containers/ChatArticle/ChatArticle.stories.tsx +76 -0
  476. package/src/containers/{ChatContainer/ChatContainer.tsx → ChatArticle/ChatArticle.tsx} +30 -17
  477. package/src/containers/ChatArticle/index.ts +5 -0
  478. package/src/containers/ChatCompanion/ChatCompanion.tsx +39 -60
  479. package/src/containers/ChatDialog/ChatDialog.tsx +6 -11
  480. package/src/containers/PlanArticle/PlanArticle.tsx +33 -0
  481. package/src/containers/PlanArticle/index.ts +5 -0
  482. package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +75 -0
  483. package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
  484. package/src/containers/RoutineArticle/index.ts +5 -0
  485. package/src/containers/{PromptList/PromptList.stories.tsx → RoutineList/RoutineList.stories.tsx} +13 -12
  486. package/src/containers/{PromptList/PromptList.tsx → RoutineList/RoutineList.tsx} +9 -8
  487. package/src/containers/RoutineList/index.ts +5 -0
  488. package/src/containers/TracePanel/TracePanel.stories.tsx +251 -204
  489. package/src/containers/TracePanel/TracePanel.tsx +172 -72
  490. package/src/containers/TracePanel/dxn-extractor.test.ts +7 -7
  491. package/src/containers/TracePanel/dxn-extractor.ts +25 -35
  492. package/src/containers/TracePanel/testing/index.ts +6 -0
  493. package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
  494. package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
  495. package/src/containers/TriggerStatus/TriggerStatus.tsx +2 -1
  496. package/src/containers/index.ts +6 -5
  497. package/src/execution-graph/SPEC.md +678 -0
  498. package/src/execution-graph/execution-graph.test.ts +799 -0
  499. package/src/execution-graph/execution-graph.ts +714 -0
  500. package/src/execution-graph/index.ts +24 -0
  501. package/src/execution-graph/remote-snapshot.test.ts +116 -0
  502. package/src/execution-graph/span-tree.test.ts +249 -0
  503. package/src/execution-graph/span-tree.ts +259 -0
  504. package/src/execution-graph/testing/collect-trace-events.ts +74 -0
  505. package/src/execution-graph/testing/index.ts +5 -0
  506. package/src/{queue-logger.ts → feed-logger.ts} +39 -25
  507. package/src/hooks/index.ts +2 -0
  508. package/src/hooks/useBlueprintRegistry.ts +62 -46
  509. package/src/hooks/useChatKeymap.ts +52 -0
  510. package/src/hooks/useChatProcessor.ts +30 -14
  511. package/src/hooks/useChatServices.ts +8 -6
  512. package/src/hooks/useChatToolbarActions.ts +87 -89
  513. package/src/hooks/useContextBinder.ts +4 -4
  514. package/src/hooks/useContextObjects.ts +6 -5
  515. package/src/hooks/useDebug.ts +38 -0
  516. package/src/hooks/useFilteredTypes.ts +17 -16
  517. package/src/hooks/useReferencesProvider.ts +7 -15
  518. package/src/index.ts +0 -5
  519. package/src/meta.ts +27 -8
  520. package/src/operations/create-chat.ts +14 -37
  521. package/src/operations/ensure-companion-chat.ts +49 -47
  522. package/src/operations/index.ts +2 -3
  523. package/src/operations/on-create-space.ts +4 -4
  524. package/src/operations/{prompt.test.ts → prompt.node.test.ts} +24 -23
  525. package/src/operations/resolve-navigation-targets.ts +8 -3
  526. package/src/operations/run-prompt-in-new-chat.ts +86 -86
  527. package/src/operations/set-current-chat.ts +6 -7
  528. package/src/operations/toggle-trace-panel-debug.ts +27 -0
  529. package/src/operations/update-chat-name.ts +4 -4
  530. package/src/plugin.ts +11 -0
  531. package/src/processor/{processor.test.ts → processor.node.test.ts} +6 -6
  532. package/src/processor/processor.ts +112 -33
  533. package/src/testing/data/trace-timeline-multiple.dx.json +1 -0
  534. package/src/testing/data/trace-timeline-remote.dx.json +1 -0
  535. package/src/testing/data/trace-timeline.dx.json +3737 -1200
  536. package/src/testing/index.ts +2 -0
  537. package/src/testing/snapshot.ts +35 -0
  538. package/src/testing/test-generator.test.ts +42 -52
  539. package/src/testing/test-generator.ts +177 -192
  540. package/src/testing/test-sequence.ts +3 -3
  541. package/src/testing/test-services.ts +1 -1
  542. package/src/testing/test-trace.ts +20 -0
  543. package/src/testing/trace-timeline.node.conversations.json +1 -0
  544. package/src/testing/{trace-timeline.test.ts → trace-timeline.node.test.ts} +44 -49
  545. package/src/testing.ts +9 -0
  546. package/src/translations.ts +34 -37
  547. package/src/types/Assistant.ts +13 -1
  548. package/src/types/AssistantCapabilities.ts +35 -0
  549. package/src/types/AssistantEvents.ts +11 -0
  550. package/src/{operations/definitions.ts → types/AssistantOperation.ts} +57 -20
  551. package/src/types/Settings.ts +68 -7
  552. package/src/types/index.ts +11 -3
  553. package/src/types/service.ts +5 -10
  554. package/src/util/suggestions.test.ts +52 -0
  555. package/src/util/suggestions.ts +42 -0
  556. package/src/vite-env.d.ts +5 -0
  557. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +0 -97
  558. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +0 -7
  559. package/dist/lib/browser/chunk-ATHYBVGN.mjs +0 -176
  560. package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +0 -7
  561. package/dist/lib/browser/chunk-EZRS3J25.mjs.map +0 -7
  562. package/dist/lib/browser/chunk-LMVTXH54.mjs +0 -154
  563. package/dist/lib/browser/chunk-LMVTXH54.mjs.map +0 -7
  564. package/dist/lib/browser/cli/index.mjs +0 -74
  565. package/dist/lib/browser/cli/index.mjs.map +0 -7
  566. package/dist/lib/browser/create-chat-LBZHGVSN.mjs +0 -82
  567. package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +0 -7
  568. package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +0 -7
  569. package/dist/lib/browser/index.mjs +0 -3446
  570. package/dist/lib/browser/index.mjs.map +0 -7
  571. package/dist/lib/browser/meta.json +0 -1
  572. package/dist/lib/browser/on-create-space-54RNX5JI.mjs.map +0 -7
  573. package/dist/lib/browser/operations/index.mjs +0 -13
  574. package/dist/lib/browser/operations/index.mjs.map +0 -7
  575. package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +0 -7
  576. package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +0 -7
  577. package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +0 -7
  578. package/dist/lib/browser/types/index.mjs +0 -20
  579. package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +0 -7
  580. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +0 -98
  581. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +0 -7
  582. package/dist/lib/node-esm/blueprints/index.mjs +0 -9
  583. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  584. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +0 -32
  585. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +0 -7
  586. package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +0 -177
  587. package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +0 -7
  588. package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +0 -155
  589. package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +0 -7
  590. package/dist/lib/node-esm/cli/index.mjs +0 -75
  591. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  592. package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +0 -83
  593. package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +0 -7
  594. package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +0 -66
  595. package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +0 -7
  596. package/dist/lib/node-esm/index.mjs +0 -3447
  597. package/dist/lib/node-esm/index.mjs.map +0 -7
  598. package/dist/lib/node-esm/meta.json +0 -1
  599. package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs +0 -23
  600. package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs.map +0 -7
  601. package/dist/lib/node-esm/operations/index.mjs +0 -14
  602. package/dist/lib/node-esm/operations/index.mjs.map +0 -7
  603. package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs +0 -23
  604. package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +0 -7
  605. package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +0 -137
  606. package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +0 -7
  607. package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +0 -55
  608. package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +0 -7
  609. package/dist/lib/node-esm/types/index.mjs +0 -21
  610. package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +0 -72
  611. package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +0 -7
  612. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +0 -2
  613. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +0 -1
  614. package/dist/types/src/cli/index.d.ts +0 -2
  615. package/dist/types/src/cli/index.d.ts.map +0 -1
  616. package/dist/types/src/cli/plugin.d.ts +0 -10
  617. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  618. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -10
  619. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
  620. package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
  621. package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
  622. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +0 -15
  623. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +0 -1
  624. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +0 -1
  625. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
  626. package/dist/types/src/containers/ChatContainer/index.d.ts +0 -2
  627. package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
  628. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +0 -6
  629. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +0 -1
  630. package/dist/types/src/containers/PromptArticle/index.d.ts +0 -2
  631. package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
  632. package/dist/types/src/containers/PromptList/PromptList.d.ts +0 -6
  633. package/dist/types/src/containers/PromptList/PromptList.d.ts.map +0 -1
  634. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +0 -1
  635. package/dist/types/src/containers/PromptList/index.d.ts +0 -2
  636. package/dist/types/src/containers/PromptList/index.d.ts.map +0 -1
  637. package/dist/types/src/containers/TracePanel/execution-graph.d.ts +0 -17
  638. package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +0 -1
  639. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  640. package/dist/types/src/operations/prompt.test.d.ts +0 -2
  641. package/dist/types/src/operations/prompt.test.d.ts.map +0 -1
  642. package/dist/types/src/processor/processor.test.d.ts +0 -2
  643. package/dist/types/src/processor/processor.test.d.ts.map +0 -1
  644. package/dist/types/src/queue-logger.d.ts +0 -11
  645. package/dist/types/src/queue-logger.d.ts.map +0 -1
  646. package/dist/types/src/testing/trace-timeline.test.d.ts +0 -2
  647. package/dist/types/src/testing/trace-timeline.test.d.ts.map +0 -1
  648. package/dist/types/src/types/capabilities.d.ts +0 -32
  649. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  650. package/dist/types/src/types/defs.d.ts +0 -2
  651. package/dist/types/src/types/defs.d.ts.map +0 -1
  652. package/dist/types/src/types/events.d.ts +0 -5
  653. package/dist/types/src/types/events.d.ts.map +0 -1
  654. package/src/AssistantPlugin.tsx +0 -238
  655. package/src/cli/plugin.ts +0 -84
  656. package/src/components/ChatProgress/ChatProgress.tsx +0 -56
  657. package/src/components/ChatProgress/index.ts +0 -5
  658. package/src/components/ChatThread/widgets/PromptWidget.ts +0 -30
  659. package/src/containers/AgentProperties/AgentProperties.stories.tsx +0 -100
  660. package/src/containers/ChatContainer/index.ts +0 -5
  661. package/src/containers/PromptArticle/PromptArticle.tsx +0 -59
  662. package/src/containers/PromptArticle/index.ts +0 -5
  663. package/src/containers/PromptList/index.ts +0 -5
  664. package/src/containers/TracePanel/execution-graph.ts +0 -452
  665. package/src/testing/trace-timeline.conversations.json +0 -1
  666. package/src/types/capabilities.ts +0 -35
  667. package/src/types/defs.ts +0 -5
  668. package/src/types/events.ts +0 -11
  669. /package/dist/lib/{browser/blueprints/index.mjs.map → neutral/AssistantPlugin.mjs.map} +0 -0
  670. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChatArticle-PWD4OEFZ.mjs.map} +0 -0
  671. /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
  672. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  673. /package/dist/lib/{node-esm/blueprints/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  674. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
  675. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
@@ -2,126 +2,42 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom';
6
- import { useAtomValue } from '@effect-atom/atom-react';
7
- import * as Option from 'effect/Option';
8
- import React, { useCallback, useEffect, useMemo } from 'react';
5
+ import React, { useEffect } from 'react';
9
6
 
10
- import { useCapability } from '@dxos/app-framework/ui';
7
+ import { useSpaceCallback } from '@dxos/app-framework/ui';
11
8
  import { type AppSurface } from '@dxos/app-toolkit/ui';
12
9
  import { Agent, SyncTriggers } from '@dxos/assistant-toolkit';
13
- import { DXN, Obj, Ref } from '@dxos/echo';
14
- import { AtomObj } from '@dxos/echo-atom';
10
+ import { Operation } from '@dxos/compute';
11
+ import { Obj, Ref } from '@dxos/echo';
15
12
  import { log } from '@dxos/log';
16
- import { Operation } from '@dxos/operation';
17
- import { AutomationCapabilities } from '@dxos/plugin-automation/types';
18
- import { Filter, useQuery } from '@dxos/react-client/echo';
19
- import { Input, useTranslation } from '@dxos/react-ui';
20
- import { FeedAnnotation } from '@dxos/schema';
21
13
 
22
- import { meta } from '#meta';
14
+ import { AgentProperties as AgentPropertiesComponent } from '#components';
23
15
 
24
16
  export type AgentPropertiesProps = AppSurface.ObjectPropertiesProps<Agent.Agent>;
25
17
 
26
18
  export const AgentProperties = ({ subject: agent }: AgentPropertiesProps) => {
27
- const { t } = useTranslation(meta.id);
28
- const db = Obj.getDatabase(agent);
19
+ const spaceId = Obj.getDatabase(agent)?.spaceId;
29
20
 
30
- // TODO(burdon): Factor out (separate component from container)?
31
- const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
21
+ // TODO(burdon): Factor this out?
22
+ const syncTriggers = useSpaceCallback(
23
+ spaceId,
24
+ [] as const,
25
+ () => Operation.invoke(SyncTriggers, { agent: Ref.make(agent) }),
26
+ [agent],
27
+ );
28
+
29
+ // Sync triggers whenever the agent mutates (e.g., subscriptions change).
32
30
  useEffect(() => {
33
- if (!db) {
31
+ if (!spaceId) {
34
32
  return;
35
33
  }
36
34
 
37
35
  return Obj.subscribe(agent, () => {
38
36
  queueMicrotask(() => {
39
- const runtime = computeRuntime.getRuntime(db.spaceId);
40
- runtime
41
- .runPromise(
42
- Operation.invoke(SyncTriggers, {
43
- agent: Ref.make(agent),
44
- }),
45
- )
46
- .catch((err) => log.catch(err));
37
+ syncTriggers().catch((err) => log.catch(err));
47
38
  });
48
39
  });
49
- }, [db, agent, computeRuntime]);
50
-
51
- // Build a filter matching objects of any schema annotated as a feed.
52
- const feedFilter = useMemo(() => {
53
- if (!db) {
54
- return Filter.nothing();
55
- }
56
-
57
- const schemas = db.schemaRegistry.query({ location: ['database', 'runtime'] }).runSync();
58
- const feedSchemas = schemas.filter((schema) => {
59
- const annotation = FeedAnnotation.get(schema);
60
- return Option.isSome(annotation) && annotation.value === true;
61
- });
62
-
63
- return feedSchemas.length === 0 ? Filter.nothing() : Filter.or(...feedSchemas.map((schema) => Filter.type(schema)));
64
- }, [db]);
65
-
66
- const subscribedObjects = useQuery(db, feedFilter);
67
-
68
- // Query all existing subscriptions (e.g., mail, calendar, etc.)
69
- const existingSubscriptions = useAtomValue(
70
- useMemo(
71
- () =>
72
- AtomObj.make(agent).pipe((_) =>
73
- Atom.make((get) => {
74
- const agentObj = get(_);
75
- const selectedSubscriptions: Obj.Unknown[] = subscribedObjects.filter((object) =>
76
- agentObj.subscriptions.some((subscription) => DXN.equals(subscription.dxn, Obj.getDXN(object))),
77
- );
40
+ }, [spaceId, agent, syncTriggers]);
78
41
 
79
- return selectedSubscriptions;
80
- }),
81
- ),
82
- [agent, subscribedObjects],
83
- ),
84
- );
85
-
86
- // Create/remove agent subscription.
87
- const handleSubscriptionChange = useCallback(
88
- (object: Obj.Unknown, checked: boolean) => {
89
- Obj.change(agent, (agent) => {
90
- if (checked) {
91
- agent.subscriptions.push(Ref.fromDXN(Obj.getDXN(object)));
92
- } else {
93
- agent.subscriptions = agent.subscriptions.filter(
94
- (subscription) => !DXN.equals(subscription.dxn, Obj.getDXN(object)),
95
- );
96
- }
97
- });
98
- },
99
- [agent],
100
- );
101
-
102
- if (subscribedObjects.length === 0) {
103
- return null;
104
- }
105
-
106
- return (
107
- <div role='none' className='dx-expander flex flex-col'>
108
- <Input.Root>
109
- <Input.Label classNames='mt-form-gap'>{t('subscriptions.label')}</Input.Label>
110
- </Input.Root>
111
-
112
- {subscribedObjects.map((object) => (
113
- <Input.Root key={object.id}>
114
- <div className='flex items-center gap-2'>
115
- <Input.Checkbox
116
- checked={existingSubscriptions.includes(object)}
117
- onCheckedChange={(checked) => {
118
- handleSubscriptionChange(object, checked === true);
119
- }}
120
- />
121
- <Input.Label>{Obj.getLabel(object) ?? object.id}</Input.Label>
122
- </div>
123
- </Input.Root>
124
- ))}
125
- </div>
126
- );
42
+ return <AgentPropertiesComponent agent={agent} />;
127
43
  };
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { type AppSurface } from '@dxos/app-toolkit/ui';
8
- import { type Blueprint } from '@dxos/blueprints';
8
+ import { type Blueprint } from '@dxos/compute';
9
9
  import { Panel, Toolbar } from '@dxos/react-ui';
10
10
  import { useAttention } from '@dxos/react-ui-attention';
11
11
 
@@ -22,7 +22,7 @@ export const BlueprintArticle = ({ role, attendableId, subject }: BlueprintArtic
22
22
  <Toolbar.Root disabled={!hasAttention} />
23
23
  </Panel.Toolbar>
24
24
  <Panel.Content asChild>
25
- <TemplateEditor id={subject.id} template={subject.instructions} />
25
+ <TemplateEditor id={subject.id} source={subject.instructions.source} />
26
26
  </Panel.Content>
27
27
  </Panel.Root>
28
28
  );
@@ -0,0 +1,76 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
7
+ import React from 'react';
8
+
9
+ import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import { AppActivationEvents } from '@dxos/app-toolkit';
11
+ import { Chat } from '@dxos/assistant-toolkit';
12
+ import { capabilities } from '@dxos/assistant-toolkit/testing';
13
+ import { Feed, Filter, Ref } from '@dxos/echo';
14
+ import { AutomationPlugin } from '@dxos/plugin-automation/testing';
15
+ import { initializeIdentity, ClientPlugin } from '@dxos/plugin-client/testing';
16
+ import { PreviewPlugin } from '@dxos/plugin-preview/testing';
17
+ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
18
+ import { useQuery, useSpaces } from '@dxos/react-client/echo';
19
+ import { Loading, withTheme } from '@dxos/react-ui/testing';
20
+
21
+ import { translations } from '#translations';
22
+
23
+ import { AssistantPlugin } from '../../AssistantPlugin';
24
+ import { ChatArticle } from './ChatArticle';
25
+
26
+ const DefaultStory = () => {
27
+ const [space] = useSpaces();
28
+ const [chat] = useQuery(space?.db, Filter.type(Chat.Chat));
29
+ if (!chat) {
30
+ return <Loading />;
31
+ }
32
+
33
+ return <ChatArticle role='article' subject={chat} attendableId='story' />;
34
+ };
35
+
36
+ const meta = {
37
+ title: 'plugins/plugin-assistant/containers/ChatArticle',
38
+ render: DefaultStory,
39
+ decorators: [
40
+ withTheme(),
41
+ withPluginManager({
42
+ setupEvents: [AppActivationEvents.SetupSettings],
43
+ plugins: [
44
+ ...corePlugins(),
45
+ ClientPlugin({
46
+ types: [Chat.Chat, Feed.Feed],
47
+ onClientInitialized: ({ client }) =>
48
+ Effect.gen(function* () {
49
+ yield* initializeIdentity(client);
50
+ const [space] = client.spaces.get();
51
+ yield* Effect.promise(() => space.waitUntilReady());
52
+
53
+ const feed = space.db.add(Feed.make());
54
+ space.db.add(Chat.make({ name: 'Test chat', feed: Ref.make(feed) }));
55
+ yield* Effect.promise(() => space.db.flush({ indexes: true }));
56
+ }),
57
+ }),
58
+ AutomationPlugin(),
59
+ AssistantPlugin(),
60
+ PreviewPlugin(),
61
+ StorybookPlugin({}),
62
+ ],
63
+ capabilities,
64
+ }),
65
+ ],
66
+ parameters: {
67
+ layout: 'fullscreen',
68
+ translations,
69
+ },
70
+ } satisfies Meta<typeof DefaultStory>;
71
+
72
+ export default meta;
73
+
74
+ type Story = StoryObj<typeof meta>;
75
+
76
+ export const Default: Story = {};
@@ -8,15 +8,16 @@ import { Capabilities } from '@dxos/app-framework';
8
8
  import { useAtomCapability, useCapability } from '@dxos/app-framework/ui';
9
9
  import { type AppSurface } from '@dxos/app-toolkit/ui';
10
10
  import { type Space, getSpace } from '@dxos/client/echo';
11
- import { Feed, type Obj } from '@dxos/echo';
11
+ import { type Obj } from '@dxos/echo';
12
+ import { useRegistry } from '@dxos/react-client/echo';
12
13
  import { Panel } from '@dxos/react-ui';
13
14
  import { getParentId } from '@dxos/react-ui-attention';
14
15
 
15
16
  import { Chat as ChatComponent, type ChatRootProps } from '#components';
16
- import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
17
- import { AssistantCapabilities, type ChatType } from '#types';
17
+ import { useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
18
+ import { type Assistant, AssistantCapabilities, type ChatType } from '#types';
18
19
 
19
- export type ChatContainerProps = (
20
+ export type ChatArticleProps = (
20
21
  | AppSurface.ObjectArticleProps<ChatType.Chat | undefined>
21
22
  | AppSurface.ObjectSectionProps<ChatType.Chat | undefined>
22
23
  ) & {
@@ -24,7 +25,7 @@ export type ChatContainerProps = (
24
25
  companionTo?: Obj.Unknown;
25
26
  } & Pick<ChatRootProps, 'onEvent'>;
26
27
 
27
- export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((props, forwardedRef) => {
28
+ export const ChatArticle = forwardRef<HTMLDivElement, ChatArticleProps>((props, forwardedRef) => {
28
29
  const { role, attendableId, subject: chat, space: spaceProp, companionTo, onEvent } = props;
29
30
  const parentId = attendableId ? getParentId(attendableId) : undefined;
30
31
  const space = spaceProp ?? getSpace(chat);
@@ -32,17 +33,17 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
32
33
  const runtime = useChatServices({ id: space?.id });
33
34
  const [online, setOnline] = useOnline();
34
35
  const { preset, ...chatProps } = usePresets(online);
35
- const blueprintRegistry = useBlueprintRegistry();
36
+ const registry = useRegistry();
36
37
  const processor = useChatProcessor({
37
38
  space,
38
39
  chat,
39
40
  preset,
40
41
  runtime,
41
- blueprintRegistry,
42
+ registry,
42
43
  settings,
43
44
  });
44
45
 
45
- const registry = useCapability(Capabilities.AtomRegistry);
46
+ const atomRegistry = useCapability(Capabilities.AtomRegistry);
46
47
  const stateAtom = useCapability(AssistantCapabilities.State);
47
48
  const pendingSubmitted = useRef(false);
48
49
  useEffect(() => {
@@ -50,35 +51,47 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
50
51
  return;
51
52
  }
52
53
 
53
- const state = registry.get(stateAtom);
54
+ const state = atomRegistry.get(stateAtom);
54
55
  const pendingPrompt = state.pendingPrompts[attendableId];
55
56
  if (pendingPrompt) {
56
57
  pendingSubmitted.current = true;
57
- registry.update(stateAtom, (current) => {
58
+ atomRegistry.update(stateAtom, (current) => {
58
59
  const { [attendableId]: _, ...rest } = current.pendingPrompts;
59
60
  return { ...current, pendingPrompts: rest };
60
61
  });
61
62
  void processor.request({ message: pendingPrompt });
62
63
  }
63
- }, [processor, attendableId, registry, stateAtom]);
64
+ }, [processor, attendableId, atomRegistry, stateAtom]);
64
65
 
65
66
  const feedTarget = chat?.feed.target;
66
- const queue = space && feedTarget ? space.queues.get(Feed.getQueueDxn(feedTarget)!) : undefined;
67
+ const view = (chat?.view as Assistant.ChatView | undefined) ?? settings.chatView;
67
68
 
68
69
  if (!processor) {
69
70
  return null;
70
71
  }
71
72
 
72
73
  return (
73
- <ChatComponent.Root db={space?.db} chat={chat} queue={queue} processor={processor} onEvent={onEvent}>
74
+ <ChatComponent.Root db={space?.db} chat={chat} feed={feedTarget} processor={processor} onEvent={onEvent}>
74
75
  <Panel.Root role={role} ref={forwardedRef}>
75
76
  <Panel.Toolbar className='bg-toolbar-surface'>
76
77
  <ChatComponent.Toolbar classNames='dx-document' attendableId={attendableId} companionTo={companionTo} />
77
78
  </Panel.Toolbar>
78
79
  <Panel.Content>
79
- <ChatComponent.Viewport>
80
- <ChatComponent.Thread />
81
- <div role='none' className='dx-document p-4'>
80
+ <ChatComponent.Content>
81
+ <div className='dx-container relative'>
82
+ <ChatComponent.Thread viewType={view} />
83
+ {view !== 'summary' && (
84
+ <div className='absolute bottom-2 left-0 right-0'>
85
+ <div className='dx-document px-4'>
86
+ <ChatComponent.Status classNames='px-3 rounded-sm bg-group-surface' />
87
+ </div>
88
+ </div>
89
+ )}
90
+ </div>
91
+ <div className='dx-document px-4 pb-4'>
92
+ <div className='flex flex-col items-center py-2 overflow-hidden'>
93
+ <ChatComponent.TaskList classNames='max-h-[120px] border border-separator rounded-sm text-description' />
94
+ </div>
82
95
  <ChatComponent.Prompt
83
96
  {...chatProps}
84
97
  outline
@@ -87,7 +100,7 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
87
100
  onOnlineChange={setOnline}
88
101
  />
89
102
  </div>
90
- </ChatComponent.Viewport>
103
+ </ChatComponent.Content>
91
104
  </Panel.Content>
92
105
  </Panel.Root>
93
106
  </ChatComponent.Root>
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { ChatArticle as default } from './ChatArticle';
@@ -2,34 +2,32 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import * as Array from 'effect/Array';
6
- import * as Function from 'effect/Function';
7
5
  import * as Option from 'effect/Option';
8
6
  import React, { forwardRef, useCallback, useMemo } from 'react';
9
7
 
10
- import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
11
- import { AppCapabilities } from '@dxos/app-toolkit';
8
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
9
+ import { BlueprintsAnnotation } from '@dxos/app-toolkit';
12
10
  import { type AppSurface } from '@dxos/app-toolkit/ui';
13
11
  import { Chat } from '@dxos/assistant-toolkit';
14
- import { Blueprint } from '@dxos/blueprints';
15
12
  import { getSpace } from '@dxos/client/echo';
16
- import { Filter, Obj, Ref } from '@dxos/echo';
17
- import { SpaceOperation } from '@dxos/plugin-space/operations';
18
- import { useQuery } from '@dxos/react-client/echo';
13
+ import { Blueprint } from '@dxos/compute';
14
+ import { Entity, Filter, Obj, Ref, Type } from '@dxos/echo';
15
+ import { SpaceOperation } from '@dxos/plugin-space';
16
+ import { useQuery, useRegistry } from '@dxos/react-client/echo';
19
17
  import { useAsyncEffect } from '@dxos/react-ui';
20
18
 
21
19
  import { type ChatEvent } from '#components';
22
- import { useBlueprintRegistry, useContextBinder } from '#hooks';
23
- import { AssistantOperation } from '#operations';
20
+ import { useContextBinder } from '#hooks';
21
+ import { AssistantOperation } from '#types';
24
22
 
25
- import ChatContainer from '../ChatContainer';
23
+ import ChatArticle from '../ChatArticle';
26
24
 
27
25
  export type ChatCompanionProps = AppSurface.ArticleProps<Chat.Chat, {}, Obj.Unknown>;
28
26
 
29
27
  export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
30
28
  ({ role, subject: chat, companionTo, attendableId }, forwardedRef) => {
31
29
  const { invokePromise } = useOperationInvoker();
32
- const blueprintRegistry = useBlueprintRegistry();
30
+ const registry = useRegistry();
33
31
  const space = getSpace(companionTo);
34
32
  const feedTarget = chat?.feed.target;
35
33
  const binder = useContextBinder(space, feedTarget);
@@ -41,7 +39,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
41
39
  return;
42
40
  }
43
41
 
44
- if (event.type === 'submit' && !getSpace(chat)) {
42
+ if (event.type === 'submit' && !Obj.getDatabase(chat)) {
45
43
  await invokePromise(SpaceOperation.AddObject, {
46
44
  object: chat,
47
45
  target: space.db,
@@ -62,62 +60,43 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
62
60
  [chat, space, companionTo, invokePromise],
63
61
  );
64
62
 
65
- const metadata = useCapabilities(AppCapabilities.Metadata);
66
- const blueprintKeys = useMemo(
67
- () =>
68
- Function.pipe(
69
- metadata,
70
- Array.findFirst(
71
- (
72
- capability,
73
- ): capability is {
74
- id: string;
75
- metadata: { blueprints?: string[] };
76
- } => capability.id === Obj.getTypename(companionTo),
77
- ),
78
- Option.flatMap((c) => Option.fromNullable(c.metadata.blueprints)),
79
- Option.getOrElse(() => [] as string[]),
80
- ),
81
- [metadata, companionTo],
82
- );
63
+ const blueprintKeys = useMemo(() => {
64
+ const schema = companionTo ? Obj.getType(companionTo) : undefined;
65
+ if (!schema) {
66
+ return [] as string[];
67
+ }
68
+ return Option.getOrElse(() => [] as string[])(BlueprintsAnnotation.get(Type.getSchema(schema)));
69
+ }, [companionTo]);
83
70
  const existingBlueprints = useQuery(space?.db, Filter.type(Blueprint.Blueprint));
84
71
  const pluginBlueprints = useMemo(
85
- () => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
72
+ () =>
73
+ existingBlueprints.filter((blueprint) => {
74
+ const key = Obj.getMeta(blueprint).key;
75
+ return key !== undefined && blueprintKeys.includes(key);
76
+ }),
86
77
  [existingBlueprints, blueprintKeys],
87
78
  );
88
79
 
89
- // Initialize related blueprints that are not already in the space.
90
- useAsyncEffect(async () => {
91
- if (!space) {
92
- return;
93
- }
94
-
95
- // NOTE: This must be run instead of using the useQuery result to avoid duplicates.
96
- const existingBlueprints = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
97
- for (const key of blueprintKeys) {
98
- const existingBlueprint = existingBlueprints.find((blueprint) => blueprint.key === key);
99
- if (existingBlueprint) {
100
- continue;
101
- }
102
-
103
- const blueprint = blueprintRegistry.getByKey(key);
104
- if (!blueprint) {
105
- continue;
106
- }
107
-
108
- space.db.add(Obj.clone(blueprint, { deep: true }));
109
- }
110
- }, [space, blueprintRegistry, blueprintKeys]);
111
-
112
80
  useAsyncEffect(async () => {
113
81
  if (!binder?.isOpen) {
114
82
  return;
115
83
  }
116
84
 
117
- if (pluginBlueprints.length > 0) {
118
- await binder.bind({
119
- blueprints: pluginBlueprints.map((blueprint) => Ref.make(blueprint)),
85
+ // Bind annotated blueprints: use key URI for registry blueprints (no DB clone needed).
86
+ if (blueprintKeys.length > 0) {
87
+ const registryKeys = blueprintKeys.filter((key) => {
88
+ const candidate = registry.list().find((e) => Entity.getMeta(e)?.key === key);
89
+ return candidate != null && Obj.instanceOf(Blueprint.Blueprint, candidate);
120
90
  });
91
+ // DB-forked blueprints (in space but not in registry).
92
+ const dbForks = pluginBlueprints.filter((bp) => !registryKeys.includes(Obj.getMeta(bp).key ?? ''));
93
+
94
+ if (registryKeys.length > 0) {
95
+ await binder.bind({ blueprints: registryKeys.map((key) => Ref.fromURI(Blueprint.registryURI(key))) });
96
+ }
97
+ if (dbForks.length > 0) {
98
+ await binder.bind({ blueprints: dbForks.map((blueprint) => Ref.make(blueprint)) });
99
+ }
121
100
  }
122
101
 
123
102
  if (Obj.instanceOf(Blueprint.Blueprint, companionTo)) {
@@ -125,10 +104,10 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
125
104
  } else {
126
105
  await binder.bind({ objects: [Ref.make(companionTo)] });
127
106
  }
128
- }, [binder, companionTo, blueprintKeys]);
107
+ }, [binder, companionTo, pluginBlueprints]);
129
108
 
130
109
  return (
131
- <ChatContainer
110
+ <ChatArticle
132
111
  role={role ?? 'article'}
133
112
  space={space}
134
113
  subject={chat}
@@ -7,13 +7,14 @@ import React, { useCallback, useState } from 'react';
7
7
  import { useAtomCapability } from '@dxos/app-framework/ui';
8
8
  import { type Chat as ChatTypes } from '@dxos/assistant-toolkit';
9
9
  import { Obj } from '@dxos/echo';
10
+ import { useRegistry } from '@dxos/react-client/echo';
10
11
  import { useTranslation } from '@dxos/react-ui';
11
12
  import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
12
13
 
13
14
  import { Chat, type ChatRootProps } from '#components';
14
- import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
15
+ import { useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
15
16
  import { meta } from '#meta';
16
- import { AssistantCapabilities } from '#types';
17
+ import { type Assistant, AssistantCapabilities } from '#types';
17
18
 
18
19
  export type ChatDialogProps = {
19
20
  chat?: ChatTypes.Chat;
@@ -27,14 +28,8 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
27
28
  const runtime = useChatServices({ id: db?.spaceId });
28
29
  const [online, setOnline] = useOnline();
29
30
  const { preset, ...chatProps } = usePresets(online);
30
- const blueprintRegistry = useBlueprintRegistry();
31
- const processor = useChatProcessor({
32
- chat,
33
- preset,
34
- runtime,
35
- blueprintRegistry,
36
- settings,
37
- });
31
+ const registry = useRegistry();
32
+ const processor = useChatProcessor({ chat, preset, runtime, registry, settings });
38
33
 
39
34
  // TODO(burdon): Refocus when open.
40
35
  const [open, setOpen] = useState(true);
@@ -61,7 +56,7 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
61
56
  <NaturalChatDialog.Root open={open} expanded={expanded} onOpenChange={setOpen}>
62
57
  <NaturalChatDialog.Header title={t('assistant-dialog.title')} />
63
58
  <NaturalChatDialog.Content>
64
- <Chat.Thread />
59
+ <Chat.Thread viewType={(chat.view as Assistant.ChatView | undefined) ?? settings.chatView} />
65
60
  </NaturalChatDialog.Content>
66
61
  <NaturalChatDialog.Footer classNames='p-1.5'>
67
62
  <Chat.Prompt {...chatProps} preset={preset?.id} online={online} onOnlineChange={setOnline} expandable />
@@ -0,0 +1,33 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
8
+ import { type Plan } from '@dxos/assistant-toolkit';
9
+ import { Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
10
+ import { useAttention } from '@dxos/react-ui-attention';
11
+
12
+ import { TaskList } from '#components';
13
+
14
+ export type PlanArticleProps = AppSurface.ObjectArticleProps<Plan.Plan>;
15
+
16
+ export const PlanArticle = ({ role, attendableId, subject }: PlanArticleProps) => {
17
+ const { hasAttention } = useAttention(attendableId);
18
+
19
+ return (
20
+ <Panel.Root role={role} classNames='dx-document'>
21
+ <Panel.Toolbar asChild>
22
+ <Toolbar.Root disabled={!hasAttention} />
23
+ </Panel.Toolbar>
24
+ <Panel.Content asChild>
25
+ <ScrollArea.Root orientation='vertical'>
26
+ <ScrollArea.Viewport>
27
+ <TaskList plan={subject} />
28
+ </ScrollArea.Viewport>
29
+ </ScrollArea.Root>
30
+ </Panel.Content>
31
+ </Panel.Root>
32
+ );
33
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export { PlanArticle as default } from './PlanArticle';