@dxos/plugin-assistant 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef

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 (732) 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 +27 -8
  4. package/dist/lib/browser/blueprints/index.mjs.map +4 -4
  5. package/dist/lib/browser/chunk-DVOOFAWU.mjs +175 -0
  6. package/dist/lib/browser/chunk-DVOOFAWU.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-M55MBYG7.mjs +932 -0
  8. package/dist/lib/browser/chunk-M55MBYG7.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-SEMCG4ZK.mjs +195 -0
  10. package/dist/lib/browser/chunk-SEMCG4ZK.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-VK53MITK.mjs +2300 -0
  12. package/dist/lib/browser/chunk-VK53MITK.mjs.map +7 -0
  13. package/dist/lib/browser/cli/index.mjs +73 -0
  14. package/dist/lib/browser/cli/index.mjs.map +7 -0
  15. package/dist/lib/browser/components/index.mjs +20 -0
  16. package/dist/lib/browser/create-chat-E2ZLVTLP.mjs +73 -0
  17. package/dist/lib/browser/create-chat-E2ZLVTLP.mjs.map +7 -0
  18. package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs +65 -0
  19. package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs.map +7 -0
  20. package/dist/lib/browser/hooks/index.mjs +39 -0
  21. package/dist/lib/browser/index.mjs +37 -309
  22. package/dist/lib/browser/index.mjs.map +4 -4
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs +22 -0
  25. package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs.map +7 -0
  26. package/dist/lib/browser/operations/index.mjs +13 -0
  27. package/dist/lib/browser/operations/index.mjs.map +7 -0
  28. package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs +22 -0
  29. package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs.map +7 -0
  30. package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs +106 -0
  31. package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs.map +7 -0
  32. package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs +54 -0
  33. package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs.map +7 -0
  34. package/dist/lib/browser/translations.mjs +172 -0
  35. package/dist/lib/browser/translations.mjs.map +7 -0
  36. package/dist/lib/browser/types/index.mjs +1 -6
  37. package/dist/lib/browser/update-chat-name-VWKNUON7.mjs +56 -0
  38. package/dist/lib/browser/update-chat-name-VWKNUON7.mjs.map +7 -0
  39. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
  40. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
  41. package/dist/lib/node-esm/blueprints/index.mjs +27 -8
  42. package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
  43. package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs +933 -0
  44. package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs +2302 -0
  46. package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-MBDVPB4V.mjs +176 -0
  48. package/dist/lib/node-esm/chunk-MBDVPB4V.mjs.map +7 -0
  49. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs +196 -0
  50. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
  51. package/dist/lib/node-esm/cli/index.mjs +74 -0
  52. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  53. package/dist/lib/node-esm/components/index.mjs +21 -0
  54. package/dist/lib/node-esm/components/index.mjs.map +7 -0
  55. package/dist/lib/node-esm/create-chat-UQQ3542N.mjs +74 -0
  56. package/dist/lib/node-esm/create-chat-UQQ3542N.mjs.map +7 -0
  57. package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs +66 -0
  58. package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs.map +7 -0
  59. package/dist/lib/node-esm/hooks/index.mjs +40 -0
  60. package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
  61. package/dist/lib/node-esm/index.mjs +37 -309
  62. package/dist/lib/node-esm/index.mjs.map +4 -4
  63. package/dist/lib/node-esm/meta.json +1 -1
  64. package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs +23 -0
  65. package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs.map +7 -0
  66. package/dist/lib/node-esm/operations/index.mjs +14 -0
  67. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  68. package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs +23 -0
  69. package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs.map +7 -0
  70. package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs +107 -0
  71. package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs.map +7 -0
  72. package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs +55 -0
  73. package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs.map +7 -0
  74. package/dist/lib/node-esm/translations.mjs +173 -0
  75. package/dist/lib/node-esm/translations.mjs.map +7 -0
  76. package/dist/lib/node-esm/types/index.mjs +1 -6
  77. package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs +57 -0
  78. package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs.map +7 -0
  79. package/dist/types/src/AssistantPlugin.d.ts +1 -0
  80. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  81. package/dist/types/src/AssistantPlugin.node.d.ts +4 -0
  82. package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
  83. package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
  84. package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
  85. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  86. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  87. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  88. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  89. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  90. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  91. package/dist/types/src/blueprints/index.d.ts +1 -6
  92. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/ai-service.d.ts +6 -0
  94. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  96. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
  98. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
  100. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/edge-model-resolver.d.ts +7 -0
  102. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/index.d.ts +29 -11
  104. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
  106. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  108. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  110. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  112. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  114. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/settings.d.ts +6 -0
  116. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/state.d.ts +21 -0
  118. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/toolkit.d.ts +6 -0
  120. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  121. package/dist/types/src/cli/index.d.ts +2 -0
  122. package/dist/types/src/cli/index.d.ts.map +1 -0
  123. package/dist/types/src/cli/plugin.d.ts +10 -0
  124. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  125. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -6
  126. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  127. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
  128. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
  129. package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
  130. package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
  131. package/dist/types/src/components/Chat/Chat.d.ts +36 -42
  132. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  133. package/dist/types/src/components/Chat/context.d.ts +29 -0
  134. package/dist/types/src/components/Chat/context.d.ts.map +1 -0
  135. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -1
  136. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  137. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
  138. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
  139. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +6 -2
  140. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  141. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
  142. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
  143. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  144. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
  145. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
  146. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  147. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
  148. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
  149. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  150. package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
  151. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  152. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts +14 -0
  153. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
  154. package/dist/types/src/components/ChatThread/ChatThread.d.ts +7 -4
  155. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  156. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +8 -313
  157. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  158. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
  159. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
  160. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
  161. package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
  162. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  163. package/dist/types/src/components/ChatThread/sync.d.ts +44 -17
  164. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
  165. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
  166. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
  167. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
  168. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
  169. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
  170. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
  171. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
  172. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
  173. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
  174. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
  175. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
  176. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
  177. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
  178. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
  179. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
  180. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
  181. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +25 -0
  182. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
  183. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
  184. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
  185. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
  186. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
  187. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
  188. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
  189. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
  190. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
  191. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
  192. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
  193. package/dist/types/src/components/ChatThread/widgets/index.d.ts +10 -0
  194. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
  195. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
  196. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  197. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
  198. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  199. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  200. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  201. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +6 -5
  202. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  203. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +1 -305
  204. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  205. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -3
  206. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  207. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -305
  208. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  209. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
  210. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
  211. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -13
  212. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  213. package/dist/types/src/components/Toolbox/Toolbox.d.ts +11 -9
  214. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  215. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -305
  216. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  217. package/dist/types/src/components/index.d.ts +3 -12
  218. package/dist/types/src/components/index.d.ts.map +1 -1
  219. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
  220. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
  221. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
  222. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
  223. package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
  224. package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
  225. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
  226. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
  227. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +16 -0
  228. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
  229. package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
  230. package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
  231. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  232. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  233. package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
  234. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  235. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +18 -0
  236. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  237. package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
  238. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  239. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +12 -0
  240. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  241. package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
  242. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  243. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  244. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  245. package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
  246. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  247. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
  248. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
  249. package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
  250. package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
  251. package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
  252. package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
  253. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +21 -0
  254. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
  255. package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
  256. package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
  257. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
  258. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
  259. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +13 -0
  260. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
  261. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
  262. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
  263. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
  264. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  265. package/dist/types/src/containers/TracePanel/execution-graph.d.ts +97 -0
  266. package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
  267. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
  268. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
  269. package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
  270. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
  271. package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
  272. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
  273. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
  274. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
  275. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
  276. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
  277. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +5 -0
  278. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  279. package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
  280. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  281. package/dist/types/src/containers/index.d.ts +12 -0
  282. package/dist/types/src/containers/index.d.ts.map +1 -0
  283. package/dist/types/src/extensions/index.d.ts +2 -0
  284. package/dist/types/src/extensions/index.d.ts.map +1 -0
  285. package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
  286. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
  287. package/dist/types/src/hooks/index.d.ts +2 -0
  288. package/dist/types/src/hooks/index.d.ts.map +1 -1
  289. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +1 -1
  290. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  291. package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
  292. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
  293. package/dist/types/src/hooks/useChatProcessor.d.ts +8 -7
  294. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  295. package/dist/types/src/hooks/useChatServices.d.ts +3 -6
  296. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  297. package/dist/types/src/hooks/useChatToolbarActions.d.ts +2 -2
  298. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  299. package/dist/types/src/hooks/useContextBinder.d.ts +3 -2
  300. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
  301. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  302. package/dist/types/src/hooks/useDebug.d.ts +10 -0
  303. package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
  304. package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
  305. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
  306. package/dist/types/src/hooks/useFlush.d.ts +1 -1
  307. package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
  308. package/dist/types/src/hooks/usePresets.d.ts +1 -1
  309. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  310. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  311. package/dist/types/src/index.d.ts +3 -5
  312. package/dist/types/src/index.d.ts.map +1 -1
  313. package/dist/types/src/meta.d.ts +2 -0
  314. package/dist/types/src/meta.d.ts.map +1 -1
  315. package/dist/types/src/operations/create-chat.d.ts +5 -0
  316. package/dist/types/src/operations/create-chat.d.ts.map +1 -0
  317. package/dist/types/src/operations/definitions.d.ts +140 -0
  318. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  319. package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
  320. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
  321. package/dist/types/src/operations/index.d.ts +4 -0
  322. package/dist/types/src/operations/index.d.ts.map +1 -0
  323. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  324. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  325. package/dist/types/src/operations/prompt.test.d.ts +2 -0
  326. package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
  327. package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
  328. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  329. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
  330. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
  331. package/dist/types/src/operations/set-current-chat.d.ts +5 -0
  332. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
  333. package/dist/types/src/operations/update-chat-name.d.ts +5 -0
  334. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
  335. package/dist/types/src/processor/index.d.ts +0 -1
  336. package/dist/types/src/processor/index.d.ts.map +1 -1
  337. package/dist/types/src/processor/presets.d.ts +1 -1
  338. package/dist/types/src/processor/presets.d.ts.map +1 -1
  339. package/dist/types/src/processor/processor.d.ts +53 -30
  340. package/dist/types/src/processor/processor.d.ts.map +1 -1
  341. package/dist/types/src/queue-logger.d.ts.map +1 -1
  342. package/dist/types/src/testing/index.d.ts +1 -0
  343. package/dist/types/src/testing/index.d.ts.map +1 -1
  344. package/dist/types/src/testing/test-generator.d.ts.map +1 -1
  345. package/dist/types/src/testing/test-generator.test.d.ts +2 -0
  346. package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
  347. package/dist/types/src/testing/test-services.d.ts +1 -1
  348. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  349. package/dist/types/src/testing/test-trace.d.ts +5 -0
  350. package/dist/types/src/testing/test-trace.d.ts.map +1 -0
  351. package/dist/types/src/testing/trace-timeline.test.d.ts +2 -0
  352. package/dist/types/src/testing/trace-timeline.test.d.ts.map +1 -0
  353. package/dist/types/src/translations.d.ts +2 -305
  354. package/dist/types/src/translations.d.ts.map +1 -1
  355. package/dist/types/src/types/Assistant.d.ts +33 -39
  356. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  357. package/dist/types/src/types/Settings.d.ts +26 -0
  358. package/dist/types/src/types/Settings.d.ts.map +1 -0
  359. package/dist/types/src/types/capabilities.d.ts +12 -13
  360. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  361. package/dist/types/src/types/events.d.ts.map +1 -1
  362. package/dist/types/src/types/index.d.ts +1 -2
  363. package/dist/types/src/types/index.d.ts.map +1 -1
  364. package/dist/types/src/types/service.d.ts +1 -1
  365. package/dist/types/src/types/service.d.ts.map +1 -1
  366. package/dist/types/tsconfig.tsbuildinfo +1 -1
  367. package/package.json +144 -102
  368. package/src/AssistantPlugin.node.ts +125 -0
  369. package/src/AssistantPlugin.test.ts +35 -0
  370. package/src/AssistantPlugin.tsx +161 -59
  371. package/src/blueprints/assistant/blueprint.test.ts +46 -0
  372. package/src/blueprints/assistant/blueprint.ts +31 -0
  373. package/src/blueprints/assistant/index.ts +5 -0
  374. package/src/blueprints/index.ts +1 -8
  375. package/src/capabilities/{ai-service/ai-service.ts → ai-service.ts} +4 -3
  376. package/src/capabilities/app-graph-builder.ts +161 -0
  377. package/src/capabilities/blueprint-definition.ts +56 -0
  378. package/src/capabilities/companion-chat-provisioner.ts +164 -0
  379. package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts} +4 -3
  380. package/src/capabilities/index.ts +23 -11
  381. package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts} +17 -6
  382. package/src/capabilities/markdown.ts +40 -0
  383. package/src/capabilities/migrations.ts +28 -0
  384. package/src/capabilities/operation-handler.ts +16 -0
  385. package/src/capabilities/react-surface.tsx +167 -0
  386. package/src/capabilities/{settings/settings.ts → settings.ts} +5 -4
  387. package/src/capabilities/{state/state.ts → state.ts} +11 -3
  388. package/src/capabilities/toolkit.ts +13 -0
  389. package/src/{components/Typewriter → cli}/index.ts +1 -1
  390. package/src/cli/plugin.ts +83 -0
  391. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
  392. package/src/components/AssistantSettings/AssistantSettings.tsx +30 -107
  393. package/src/components/AssistantSettings/index.ts +2 -2
  394. package/src/components/Chat/Chat.tsx +103 -264
  395. package/src/components/Chat/context.ts +39 -0
  396. package/src/components/ChatPrompt/ChatActions.tsx +33 -13
  397. package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
  398. package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
  399. package/src/components/ChatPrompt/ChatOptions.tsx +248 -42
  400. package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
  401. package/src/components/ChatPrompt/ChatReferences.tsx +18 -8
  402. package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
  403. package/src/components/ChatPrompt/index.ts +3 -0
  404. package/src/components/ChatThread/Anchor.stories.tsx +95 -0
  405. package/src/components/ChatThread/ChatThread.stories.tsx +64 -71
  406. package/src/components/ChatThread/ChatThread.tsx +50 -24
  407. package/src/components/ChatThread/DEBUG.md +41 -0
  408. package/src/components/ChatThread/Link.tsx +1 -1
  409. package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
  410. package/src/components/ChatThread/registry.tsx +167 -55
  411. package/src/components/ChatThread/sync.test.ts +182 -20
  412. package/src/components/ChatThread/sync.ts +93 -97
  413. package/src/components/ChatThread/testing/reasoning.md +25 -0
  414. package/src/components/ChatThread/testing/thinking.md +21 -0
  415. package/src/components/ChatThread/testing/thread-1.md +30 -0
  416. package/src/components/ChatThread/testing/{thread.md → thread-2.md} +19 -0
  417. package/src/components/ChatThread/testing/thread-widgets.md +79 -0
  418. package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
  419. package/src/components/ChatThread/tool-widget-state.ts +48 -0
  420. package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
  421. package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
  422. package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
  423. package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
  424. package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
  425. package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
  426. package/src/components/ChatThread/widgets/StatusWidget.ts +133 -0
  427. package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
  428. package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -0
  429. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
  430. package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
  431. package/src/components/ChatThread/widgets/defaults.ts +8 -0
  432. package/src/components/ChatThread/widgets/index.ts +13 -0
  433. package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
  434. package/src/components/ProcessTree/ProcessTree.tsx +118 -0
  435. package/src/components/ProcessTree/index.ts +5 -0
  436. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +6 -10
  437. package/src/components/TemplateEditor/TemplateEditor.tsx +51 -43
  438. package/src/components/TemplateEditor/TemplateForm.stories.tsx +9 -7
  439. package/src/components/TemplateEditor/TemplateForm.tsx +12 -13
  440. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +5 -5
  441. package/src/components/ToolBlock/ToolBlock.tsx +22 -21
  442. package/src/components/Toolbox/Toolbox.stories.tsx +5 -6
  443. package/src/components/Toolbox/Toolbox.tsx +67 -61
  444. package/src/components/index.ts +3 -7
  445. package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
  446. package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
  447. package/src/containers/AgentArticle/index.ts +5 -0
  448. package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
  449. package/src/containers/AgentProperties/AgentProperties.tsx +127 -0
  450. package/src/containers/AgentProperties/index.ts +5 -0
  451. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  452. package/src/containers/BlueprintArticle/index.ts +5 -0
  453. package/src/{components → containers/ChatCompanion}/ChatCompanion.tsx +24 -45
  454. package/src/containers/ChatCompanion/index.ts +5 -0
  455. package/src/containers/ChatContainer/ChatContainer.tsx +105 -0
  456. package/src/containers/ChatContainer/index.ts +5 -0
  457. package/src/{components → containers/ChatDialog}/ChatDialog.tsx +11 -19
  458. package/src/containers/ChatDialog/index.ts +5 -0
  459. package/src/containers/RoutineArticle/RoutineArticle.tsx +59 -0
  460. package/src/containers/RoutineArticle/index.ts +5 -0
  461. package/src/containers/RoutineList/RoutineList.stories.tsx +130 -0
  462. package/src/containers/RoutineList/RoutineList.tsx +50 -0
  463. package/src/containers/RoutineList/index.ts +5 -0
  464. package/src/containers/TracePanel/TracePanel.stories.tsx +278 -0
  465. package/src/containers/TracePanel/TracePanel.tsx +138 -0
  466. package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
  467. package/src/containers/TracePanel/dxn-extractor.ts +178 -0
  468. package/src/containers/TracePanel/execution-graph.test.ts +382 -0
  469. package/src/containers/TracePanel/execution-graph.ts +579 -0
  470. package/src/containers/TracePanel/index.ts +9 -0
  471. package/src/containers/TracePanel/testing/index.ts +6 -0
  472. package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
  473. package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
  474. package/src/containers/TriggerStatus/TriggerStatus.tsx +129 -0
  475. package/src/containers/TriggerStatus/index.ts +5 -0
  476. package/src/containers/index.ts +16 -0
  477. package/src/extensions/index.ts +5 -0
  478. package/src/extensions/prompt-extension.ts +111 -0
  479. package/src/hooks/index.ts +2 -0
  480. package/src/hooks/useBlueprintRegistry.ts +9 -5
  481. package/src/hooks/useChatKeymap.ts +52 -0
  482. package/src/hooks/useChatProcessor.ts +38 -25
  483. package/src/hooks/useChatServices.ts +7 -28
  484. package/src/hooks/useChatToolbarActions.ts +13 -12
  485. package/src/hooks/useContextBinder.ts +17 -6
  486. package/src/hooks/useContextObjects.ts +8 -4
  487. package/src/hooks/useDebug.ts +38 -0
  488. package/src/hooks/useFilteredTypes.ts +3 -3
  489. package/src/hooks/usePresets.ts +2 -1
  490. package/src/hooks/useReferencesProvider.ts +1 -5
  491. package/src/index.ts +8 -6
  492. package/src/meta.ts +6 -3
  493. package/src/operations/create-chat.ts +79 -0
  494. package/src/operations/definitions.ts +126 -0
  495. package/src/operations/ensure-companion-chat.ts +61 -0
  496. package/src/operations/index.ts +17 -0
  497. package/src/operations/on-create-space.ts +24 -0
  498. package/src/operations/prompt.test.ts +77 -0
  499. package/src/operations/resolve-navigation-targets.ts +26 -0
  500. package/src/operations/run-prompt-in-new-chat.ts +112 -0
  501. package/src/operations/set-current-chat.ts +50 -0
  502. package/src/operations/update-chat-name.ts +61 -0
  503. package/src/processor/index.ts +0 -1
  504. package/src/processor/presets.ts +11 -3
  505. package/src/processor/processor.test.ts +18 -50
  506. package/src/processor/processor.ts +226 -149
  507. package/src/queue-logger.ts +19 -8
  508. package/src/testing/data/trace-timeline.dx.json +4657 -0
  509. package/src/testing/index.ts +1 -0
  510. package/src/testing/test-generator.test.ts +81 -0
  511. package/src/testing/test-generator.ts +79 -42
  512. package/src/testing/test-sequence.ts +3 -3
  513. package/src/testing/test-services.ts +2 -2
  514. package/src/testing/test-trace.ts +20 -0
  515. package/src/testing/trace-timeline.conversations.json +1 -0
  516. package/src/testing/trace-timeline.test.ts +249 -0
  517. package/src/translations.ts +155 -89
  518. package/src/types/Assistant.ts +16 -53
  519. package/src/types/Settings.ts +76 -0
  520. package/src/types/capabilities.ts +11 -3
  521. package/src/types/events.ts +2 -2
  522. package/src/types/index.ts +3 -2
  523. package/src/types/service.ts +5 -5
  524. package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs +0 -31
  525. package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +0 -7
  526. package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs +0 -153
  527. package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs.map +0 -7
  528. package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs +0 -73
  529. package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs.map +0 -7
  530. package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs +0 -85
  531. package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs.map +0 -7
  532. package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +0 -53
  533. package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +0 -7
  534. package/dist/lib/browser/ai-service-5GUDOEWF.mjs +0 -21
  535. package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +0 -7
  536. package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +0 -212
  537. package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +0 -7
  538. package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +0 -14
  539. package/dist/lib/browser/chunk-3JYPE2MM.mjs +0 -1832
  540. package/dist/lib/browser/chunk-3JYPE2MM.mjs.map +0 -7
  541. package/dist/lib/browser/chunk-DKQMSMBN.mjs +0 -326
  542. package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +0 -7
  543. package/dist/lib/browser/chunk-EXVT7D4B.mjs +0 -23
  544. package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +0 -7
  545. package/dist/lib/browser/chunk-ML3QCFKA.mjs +0 -265
  546. package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +0 -7
  547. package/dist/lib/browser/chunk-MRJVYGLU.mjs +0 -208
  548. package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +0 -7
  549. package/dist/lib/browser/chunk-V772AMZM.mjs +0 -250
  550. package/dist/lib/browser/chunk-V772AMZM.mjs.map +0 -7
  551. package/dist/lib/browser/chunk-WGQTU6UJ.mjs +0 -41
  552. package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +0 -7
  553. package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +0 -20
  554. package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +0 -7
  555. package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +0 -19
  556. package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +0 -7
  557. package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +0 -132
  558. package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +0 -7
  559. package/dist/lib/browser/react-surface-NCITRSJJ.mjs +0 -109
  560. package/dist/lib/browser/react-surface-NCITRSJJ.mjs.map +0 -7
  561. package/dist/lib/browser/repair-6QGAKOVM.mjs +0 -54
  562. package/dist/lib/browser/repair-6QGAKOVM.mjs.map +0 -7
  563. package/dist/lib/browser/settings-4ZDLUMYE.mjs +0 -32
  564. package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +0 -7
  565. package/dist/lib/browser/state-AN6336ZX.mjs +0 -26
  566. package/dist/lib/browser/state-AN6336ZX.mjs.map +0 -7
  567. package/dist/lib/browser/toolkit-7AVTEPMA.mjs +0 -18
  568. package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +0 -7
  569. package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +0 -32
  570. package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +0 -7
  571. package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs +0 -154
  572. package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs.map +0 -7
  573. package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs +0 -74
  574. package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs.map +0 -7
  575. package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs +0 -86
  576. package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs.map +0 -7
  577. package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +0 -54
  578. package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +0 -7
  579. package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +0 -22
  580. package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +0 -7
  581. package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +0 -213
  582. package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +0 -7
  583. package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs +0 -15
  584. package/dist/lib/node-esm/chunk-355W5B27.mjs +0 -251
  585. package/dist/lib/node-esm/chunk-355W5B27.mjs.map +0 -7
  586. package/dist/lib/node-esm/chunk-75PHXBN3.mjs +0 -327
  587. package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +0 -7
  588. package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +0 -209
  589. package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +0 -7
  590. package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +0 -42
  591. package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +0 -7
  592. package/dist/lib/node-esm/chunk-POWB2BPC.mjs +0 -25
  593. package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +0 -7
  594. package/dist/lib/node-esm/chunk-XI5T3MJC.mjs +0 -1833
  595. package/dist/lib/node-esm/chunk-XI5T3MJC.mjs.map +0 -7
  596. package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs +0 -267
  597. package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +0 -7
  598. package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs +0 -21
  599. package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +0 -7
  600. package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +0 -20
  601. package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +0 -7
  602. package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +0 -133
  603. package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +0 -7
  604. package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs +0 -110
  605. package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs.map +0 -7
  606. package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +0 -55
  607. package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +0 -7
  608. package/dist/lib/node-esm/settings-CQEOHR3R.mjs +0 -33
  609. package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +0 -7
  610. package/dist/lib/node-esm/state-HDON4REW.mjs +0 -27
  611. package/dist/lib/node-esm/state-HDON4REW.mjs.map +0 -7
  612. package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +0 -19
  613. package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +0 -7
  614. package/dist/types/src/blueprints/assistant-blueprint.d.ts +0 -209
  615. package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +0 -1
  616. package/dist/types/src/capabilities/ai-service/ai-service.d.ts +0 -5
  617. package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +0 -1
  618. package/dist/types/src/capabilities/ai-service/index.d.ts +0 -3
  619. package/dist/types/src/capabilities/ai-service/index.d.ts.map +0 -1
  620. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  621. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  622. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  623. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  624. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -21
  625. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  626. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -4
  627. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  628. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +0 -6
  629. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +0 -1
  630. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +0 -3
  631. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +0 -1
  632. package/dist/types/src/capabilities/local-model-resolver/index.d.ts +0 -3
  633. package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +0 -1
  634. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +0 -12
  635. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +0 -1
  636. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  637. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  638. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  639. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  640. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  641. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  642. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  643. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  644. package/dist/types/src/capabilities/repair/index.d.ts +0 -3
  645. package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
  646. package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
  647. package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
  648. package/dist/types/src/capabilities/settings/index.d.ts +0 -15
  649. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  650. package/dist/types/src/capabilities/settings/settings.d.ts +0 -17
  651. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  652. package/dist/types/src/capabilities/state/index.d.ts +0 -11
  653. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  654. package/dist/types/src/capabilities/state/state.d.ts +0 -13
  655. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  656. package/dist/types/src/capabilities/toolkit/index.d.ts +0 -3
  657. package/dist/types/src/capabilities/toolkit/index.d.ts.map +0 -1
  658. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +0 -5
  659. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +0 -1
  660. package/dist/types/src/components/BlueprintArticle.d.ts +0 -7
  661. package/dist/types/src/components/BlueprintArticle.d.ts.map +0 -1
  662. package/dist/types/src/components/ChatCompanion.d.ts +0 -13
  663. package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
  664. package/dist/types/src/components/ChatContainer.d.ts +0 -19
  665. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  666. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  667. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -7
  668. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
  669. package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
  670. package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
  671. package/dist/types/src/components/PromptArticle.d.ts +0 -7
  672. package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
  673. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +0 -12
  674. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +0 -1
  675. package/dist/types/src/components/Typewriter/Typewriter.d.ts +0 -11
  676. package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +0 -1
  677. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +0 -7
  678. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +0 -1
  679. package/dist/types/src/components/Typewriter/assistant-extension.d.ts +0 -5
  680. package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +0 -1
  681. package/dist/types/src/components/Typewriter/index.d.ts +0 -2
  682. package/dist/types/src/components/Typewriter/index.d.ts.map +0 -1
  683. package/dist/types/src/functions/index.d.ts +0 -4
  684. package/dist/types/src/functions/index.d.ts.map +0 -1
  685. package/dist/types/src/functions/object-list.d.ts +0 -10
  686. package/dist/types/src/functions/object-list.d.ts.map +0 -1
  687. package/dist/types/src/functions/object-load.d.ts +0 -8
  688. package/dist/types/src/functions/object-load.d.ts.map +0 -1
  689. package/dist/types/src/functions/object-search.d.ts +0 -10
  690. package/dist/types/src/functions/object-search.d.ts.map +0 -1
  691. package/dist/types/src/processor/update-name.d.ts +0 -10
  692. package/dist/types/src/processor/update-name.d.ts.map +0 -1
  693. package/dist/types/src/types/AssistantAction.d.ts +0 -95
  694. package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
  695. package/dist/types/src/types/defs.d.ts +0 -2
  696. package/dist/types/src/types/defs.d.ts.map +0 -1
  697. package/src/blueprints/assistant-blueprint.ts +0 -62
  698. package/src/capabilities/ai-service/index.ts +0 -7
  699. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -180
  700. package/src/capabilities/app-graph-builder/index.ts +0 -7
  701. package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -60
  702. package/src/capabilities/blueprint-definition/index.ts +0 -8
  703. package/src/capabilities/edge-model-resolver/index.ts +0 -7
  704. package/src/capabilities/local-model-resolver/index.ts +0 -7
  705. package/src/capabilities/operation-resolver/index.ts +0 -7
  706. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -110
  707. package/src/capabilities/react-surface/index.ts +0 -7
  708. package/src/capabilities/react-surface/react-surface.tsx +0 -95
  709. package/src/capabilities/repair/index.ts +0 -7
  710. package/src/capabilities/repair/repair.ts +0 -63
  711. package/src/capabilities/settings/index.ts +0 -7
  712. package/src/capabilities/state/index.ts +0 -7
  713. package/src/capabilities/toolkit/index.ts +0 -7
  714. package/src/capabilities/toolkit/toolkit.ts +0 -26
  715. package/src/components/BlueprintArticle.tsx +0 -29
  716. package/src/components/ChatContainer.tsx +0 -61
  717. package/src/components/ChatProgress/ChatProgress.tsx +0 -54
  718. package/src/components/ChatProgress/index.ts +0 -5
  719. package/src/components/PromptArticle.tsx +0 -50
  720. package/src/components/Typewriter/AssistantToolbar.tsx +0 -161
  721. package/src/components/Typewriter/Typewriter.stories.tsx +0 -83
  722. package/src/components/Typewriter/Typewriter.tsx +0 -54
  723. package/src/components/Typewriter/assistant-extension.tsx +0 -144
  724. package/src/functions/index.ts +0 -7
  725. package/src/functions/object-list.ts +0 -49
  726. package/src/functions/object-load.ts +0 -47
  727. package/src/functions/object-search.ts +0 -46
  728. package/src/processor/update-name.ts +0 -59
  729. package/src/types/AssistantAction.ts +0 -75
  730. package/src/types/defs.ts +0 -5
  731. /package/dist/lib/browser/{blueprint-definition-DGHH7MUU.mjs.map → components/index.mjs.map} +0 -0
  732. /package/dist/lib/{node-esm/blueprint-definition-SEMDEIYG.mjs.map → browser/hooks/index.mjs.map} +0 -0
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export { AgentArticle as default } from './AgentArticle';
@@ -0,0 +1,101 @@
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 { Plan, Agent } from '@dxos/assistant-toolkit';
11
+ import { Obj, Ref } from '@dxos/echo';
12
+ import { log } from '@dxos/log';
13
+ import { AutomationPlugin } from '@dxos/plugin-automation';
14
+ import { ClientPlugin } from '@dxos/plugin-client';
15
+ import { initializeIdentity } from '@dxos/plugin-client/testing';
16
+ import { corePlugins } from '@dxos/plugin-testing';
17
+ import { Filter, useQuery, useSpaces } from '@dxos/react-client/echo';
18
+ import { Button } from '@dxos/react-ui';
19
+ import { ObjectProperties } from '@dxos/react-ui-form';
20
+ import { Loading, withLayout } from '@dxos/react-ui/testing';
21
+ import { Text } from '@dxos/schema';
22
+ import { Organization } from '@dxos/types';
23
+
24
+ import { translations } from '#translations';
25
+
26
+ import { AssistantPlugin } from '../../AssistantPlugin';
27
+ import { AgentProperties } from './AgentProperties';
28
+
29
+ type DefaultStoryProps = {};
30
+
31
+ const DefaultStory = (_: DefaultStoryProps) => {
32
+ const [space] = useSpaces();
33
+ const [agent] = useQuery(space?.db, Filter.type(Agent.Agent));
34
+ if (!agent) {
35
+ return <Loading />;
36
+ }
37
+
38
+ return (
39
+ <ObjectProperties object={agent}>
40
+ <AgentProperties role='object-properties' subject={agent} />
41
+ <Button
42
+ classNames='mt-form-gap'
43
+ onClick={() => {
44
+ log.info('agent', { agent, instructions: agent.instructions.target });
45
+ }}
46
+ >
47
+ Debug
48
+ </Button>
49
+ </ObjectProperties>
50
+ );
51
+ };
52
+
53
+ const meta = {
54
+ title: 'plugins/plugin-assistant/containers/AgentProperties',
55
+ render: DefaultStory,
56
+ decorators: [
57
+ withLayout({ layout: 'column' }),
58
+ withPluginManager({
59
+ plugins: [
60
+ ...corePlugins(),
61
+ ClientPlugin({
62
+ types: [Agent.Agent, Plan.Plan, Text.Text, Organization.Organization],
63
+ onClientInitialized: ({ client }) =>
64
+ Effect.gen(function* () {
65
+ yield* initializeIdentity(client);
66
+ const [space] = client.spaces.get();
67
+ yield* Effect.promise(() => space.waitUntilReady());
68
+
69
+ const organization = space.db.add(
70
+ Obj.make(Organization.Organization, {
71
+ name: 'Acme Corp',
72
+ description: 'Sample organization for the story.',
73
+ }),
74
+ );
75
+
76
+ space.db.add(
77
+ Obj.make(Agent.Agent, {
78
+ instructions: Ref.make(Text.make()),
79
+ plan: Ref.make(Plan.makePlan({ tasks: [] })),
80
+ artifacts: [{ name: 'Organization', data: Ref.make(organization) }],
81
+ subscriptions: [],
82
+ }),
83
+ );
84
+ }),
85
+ }),
86
+ AutomationPlugin(),
87
+ AssistantPlugin(),
88
+ ],
89
+ }),
90
+ ],
91
+ parameters: {
92
+ layout: 'fullscreen',
93
+ translations,
94
+ },
95
+ } satisfies Meta<DefaultStoryProps>;
96
+
97
+ export default meta;
98
+
99
+ type Story = StoryObj<typeof meta>;
100
+
101
+ export const Default: Story = {};
@@ -0,0 +1,127 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
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';
9
+
10
+ import { useCapability } from '@dxos/app-framework/ui';
11
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
12
+ import { Agent, SyncTriggers } from '@dxos/assistant-toolkit';
13
+ import { Operation } from '@dxos/compute';
14
+ import { DXN, Obj, Ref } from '@dxos/echo';
15
+ import { AtomObj } from '@dxos/echo-atom';
16
+ import { log } from '@dxos/log';
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
+
22
+ import { meta } from '#meta';
23
+
24
+ export type AgentPropertiesProps = AppSurface.ObjectPropertiesProps<Agent.Agent>;
25
+
26
+ export const AgentProperties = ({ subject: agent }: AgentPropertiesProps) => {
27
+ const { t } = useTranslation(meta.id);
28
+ const db = Obj.getDatabase(agent);
29
+
30
+ // TODO(burdon): Factor out (separate component from container)?
31
+ const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
32
+ useEffect(() => {
33
+ if (!db) {
34
+ return;
35
+ }
36
+
37
+ return Obj.subscribe(agent, () => {
38
+ 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));
47
+ });
48
+ });
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
+ );
78
+
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.update(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
+ );
127
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export { AgentProperties as default } from './AgentProperties';
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
8
+ import { type Blueprint } from '@dxos/compute';
9
+ import { Panel, Toolbar } from '@dxos/react-ui';
10
+ import { useAttention } from '@dxos/react-ui-attention';
11
+
12
+ import { TemplateEditor } from '#components';
13
+
14
+ export type BlueprintArticleProps = AppSurface.ObjectArticleProps<Blueprint.Blueprint>;
15
+
16
+ export const BlueprintArticle = ({ role, attendableId, subject }: BlueprintArticleProps) => {
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
+ <TemplateEditor id={subject.id} template={subject.instructions} />
26
+ </Panel.Content>
27
+ </Panel.Root>
28
+ );
29
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { BlueprintArticle as default } from './BlueprintArticle';
@@ -5,63 +5,43 @@
5
5
  import * as Array from 'effect/Array';
6
6
  import * as Function from 'effect/Function';
7
7
  import * as Option from 'effect/Option';
8
- import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
8
+ import React, { forwardRef, useCallback, useMemo } from 'react';
9
9
 
10
- import { Common } from '@dxos/app-framework';
11
- import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/react';
12
- import { Blueprint } from '@dxos/blueprints';
10
+ import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
11
+ import { AppCapabilities } from '@dxos/app-toolkit';
12
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
13
+ import { Chat } from '@dxos/assistant-toolkit';
13
14
  import { getSpace } from '@dxos/client/echo';
15
+ import { Blueprint } from '@dxos/compute';
14
16
  import { Filter, Obj, Ref } from '@dxos/echo';
15
- import { SpaceOperation } from '@dxos/plugin-space/types';
17
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
16
18
  import { useQuery } from '@dxos/react-client/echo';
17
19
  import { useAsyncEffect } from '@dxos/react-ui';
18
20
 
19
- import { ChatContainer, type ChatEvent } from '../components';
20
- import { useBlueprintRegistry, useContextBinder } from '../hooks';
21
- import { Assistant, AssistantOperation } from '../types';
21
+ import { type ChatEvent } from '#components';
22
+ import { useBlueprintRegistry, useContextBinder } from '#hooks';
23
+ import { AssistantOperation } from '#operations';
22
24
 
23
- export type ChatCompanionProps = {
24
- role?: string;
25
- data: {
26
- subject: Assistant.Chat | 'assistant-chat';
27
- companionTo: Obj.Unknown;
28
- };
29
- };
25
+ import ChatContainer from '../ChatContainer';
26
+
27
+ export type ChatCompanionProps = AppSurface.ArticleProps<Chat.Chat, {}, Obj.Unknown>;
30
28
 
31
29
  export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
32
- ({ role, data }: ChatCompanionProps, forwardedRef) => {
30
+ ({ role, subject: chat, companionTo, attendableId }, forwardedRef) => {
33
31
  const { invokePromise } = useOperationInvoker();
34
32
  const blueprintRegistry = useBlueprintRegistry();
35
- const companionTo = data.companionTo;
36
-
37
33
  const space = getSpace(companionTo);
38
- const [chat, setChat] = useState(data.subject === 'assistant-chat' ? undefined : data.subject);
39
- useEffect(() => {
40
- setChat(data.subject === 'assistant-chat' ? undefined : data.subject);
41
- }, [data.subject]);
42
-
43
- const chatQueue = space && chat ? space.queues.get(chat.queue.dxn) : undefined;
44
- const binder = useContextBinder(chatQueue);
34
+ const feedTarget = chat?.feed.target;
35
+ const binder = useContextBinder(space, feedTarget);
45
36
 
46
- // Initialize companion chat if it doesn't exist, but don't add it to the space immediately.
47
- useAsyncEffect(async () => {
48
- if (!space || chat) {
49
- return;
50
- }
51
-
52
- const { data } = await invokePromise(AssistantOperation.CreateChat, { db: space.db });
53
- setChat(data?.object);
54
- }, [chat, space]);
55
-
56
- // Add chat to space when user submits the first message.
37
+ // Persist chat on first submit.
57
38
  const handleEvent = useCallback(
58
39
  async (event: ChatEvent) => {
59
- const chatInSpace = !!getSpace(chat);
60
- if (chatInSpace || !chat || !space) {
40
+ if (!space || !chat) {
61
41
  return;
62
42
  }
63
43
 
64
- if (event.type === 'submit') {
44
+ if (event.type === 'submit' && !getSpace(chat)) {
65
45
  await invokePromise(SpaceOperation.AddObject, {
66
46
  object: chat,
67
47
  target: space.db,
@@ -69,7 +49,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
69
49
  });
70
50
  await invokePromise(SpaceOperation.AddRelation, {
71
51
  db: space.db,
72
- schema: Assistant.CompanionTo,
52
+ schema: Chat.CompanionTo,
73
53
  source: chat,
74
54
  target: companionTo,
75
55
  });
@@ -82,7 +62,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
82
62
  [chat, space, companionTo, invokePromise],
83
63
  );
84
64
 
85
- const metadata = useCapabilities(Common.Capability.Metadata);
65
+ const metadata = useCapabilities(AppCapabilities.Metadata);
86
66
  const blueprintKeys = useMemo(
87
67
  () =>
88
68
  Function.pipe(
@@ -125,7 +105,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
125
105
  continue;
126
106
  }
127
107
 
128
- space.db.add(Obj.clone(blueprint));
108
+ space.db.add(Obj.clone(blueprint, { deep: true }));
129
109
  }
130
110
  }, [space, blueprintRegistry, blueprintKeys]);
131
111
 
@@ -149,9 +129,10 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
149
129
 
150
130
  return (
151
131
  <ChatContainer
152
- role={role}
132
+ role={role ?? 'article'}
153
133
  space={space}
154
134
  subject={chat}
135
+ attendableId={attendableId}
155
136
  companionTo={companionTo}
156
137
  onEvent={handleEvent}
157
138
  ref={forwardedRef}
@@ -159,5 +140,3 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
159
140
  );
160
141
  },
161
142
  );
162
-
163
- export default ChatCompanion;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { ChatCompanion as default } from './ChatCompanion';
@@ -0,0 +1,105 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { forwardRef, useEffect, useRef } from 'react';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { useAtomCapability, useCapability } from '@dxos/app-framework/ui';
9
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
10
+ import { type Space, getSpace } from '@dxos/client/echo';
11
+ import { Feed, type Obj } from '@dxos/echo';
12
+ import { Panel } from '@dxos/react-ui';
13
+ import { getParentId } from '@dxos/react-ui-attention';
14
+
15
+ import { Chat as ChatComponent, type ChatRootProps } from '#components';
16
+ import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
17
+ import { type Assistant, AssistantCapabilities, type ChatType } from '#types';
18
+
19
+ export type ChatContainerProps = (
20
+ | AppSurface.ObjectArticleProps<ChatType.Chat | undefined>
21
+ | AppSurface.ObjectSectionProps<ChatType.Chat | undefined>
22
+ ) & {
23
+ space?: Space;
24
+ companionTo?: Obj.Unknown;
25
+ } & Pick<ChatRootProps, 'onEvent'>;
26
+
27
+ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((props, forwardedRef) => {
28
+ const { role, attendableId, subject: chat, space: spaceProp, companionTo, onEvent } = props;
29
+ const parentId = attendableId ? getParentId(attendableId) : undefined;
30
+ const space = spaceProp ?? getSpace(chat);
31
+ const settings = useAtomCapability(AssistantCapabilities.Settings);
32
+ const runtime = useChatServices({ id: space?.id });
33
+ const [online, setOnline] = useOnline();
34
+ const { preset, ...chatProps } = usePresets(online);
35
+ const blueprintRegistry = useBlueprintRegistry();
36
+ const processor = useChatProcessor({
37
+ space,
38
+ chat,
39
+ preset,
40
+ runtime,
41
+ blueprintRegistry,
42
+ settings,
43
+ });
44
+
45
+ const registry = useCapability(Capabilities.AtomRegistry);
46
+ const stateAtom = useCapability(AssistantCapabilities.State);
47
+ const pendingSubmitted = useRef(false);
48
+ useEffect(() => {
49
+ if (!processor || !attendableId || pendingSubmitted.current) {
50
+ return;
51
+ }
52
+
53
+ const state = registry.get(stateAtom);
54
+ const pendingPrompt = state.pendingPrompts[attendableId];
55
+ if (pendingPrompt) {
56
+ pendingSubmitted.current = true;
57
+ registry.update(stateAtom, (current) => {
58
+ const { [attendableId]: _, ...rest } = current.pendingPrompts;
59
+ return { ...current, pendingPrompts: rest };
60
+ });
61
+ void processor.request({ message: pendingPrompt });
62
+ }
63
+ }, [processor, attendableId, registry, stateAtom]);
64
+
65
+ 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;
68
+
69
+ if (!processor) {
70
+ return null;
71
+ }
72
+
73
+ return (
74
+ <ChatComponent.Root db={space?.db} chat={chat} feed={queue} processor={processor} onEvent={onEvent}>
75
+ <Panel.Root role={role} ref={forwardedRef}>
76
+ <Panel.Toolbar className='bg-toolbar-surface'>
77
+ <ChatComponent.Toolbar classNames='dx-document' attendableId={attendableId} companionTo={companionTo} />
78
+ </Panel.Toolbar>
79
+ <Panel.Content>
80
+ <ChatComponent.Content>
81
+ <div role='none' className='dx-container relative'>
82
+ <ChatComponent.Thread viewType={view} />
83
+ {view !== 'summary' && (
84
+ <div role='none' className='absolute bottom-2 left-0 right-0'>
85
+ <div role='none' 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 role='none' className='dx-document px-4 pb-4'>
92
+ <ChatComponent.Prompt
93
+ {...chatProps}
94
+ outline
95
+ preset={preset?.id}
96
+ online={online}
97
+ onOnlineChange={setOnline}
98
+ />
99
+ </div>
100
+ </ChatComponent.Content>
101
+ </Panel.Content>
102
+ </Panel.Root>
103
+ </ChatComponent.Root>
104
+ );
105
+ });
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { ChatContainer as default } from './ChatContainer';
@@ -4,19 +4,19 @@
4
4
 
5
5
  import React, { useCallback, useState } from 'react';
6
6
 
7
- import { useAtomCapability } from '@dxos/app-framework/react';
7
+ import { useAtomCapability } from '@dxos/app-framework/ui';
8
+ import { type Chat as ChatTypes } from '@dxos/assistant-toolkit';
8
9
  import { Obj } from '@dxos/echo';
9
10
  import { useTranslation } from '@dxos/react-ui';
10
11
  import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
11
12
 
12
- import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
13
- import { meta } from '../meta';
14
- import { type Assistant, AssistantCapabilities } from '../types';
15
-
16
- import { Chat, type ChatRootProps } from './Chat';
13
+ import { Chat, type ChatRootProps } from '#components';
14
+ import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
15
+ import { meta } from '#meta';
16
+ import { type Assistant, AssistantCapabilities } from '#types';
17
17
 
18
18
  export type ChatDialogProps = {
19
- chat?: Assistant.Chat;
19
+ chat?: ChatTypes.Chat;
20
20
  };
21
21
 
22
22
  export const ChatDialog = ({ chat }: ChatDialogProps) => {
@@ -24,17 +24,11 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
24
24
 
25
25
  const db = chat && Obj.getDatabase(chat);
26
26
  const settings = useAtomCapability(AssistantCapabilities.Settings);
27
- const services = useChatServices({ id: db?.spaceId, chat });
27
+ const runtime = useChatServices({ id: db?.spaceId });
28
28
  const [online, setOnline] = useOnline();
29
29
  const { preset, ...chatProps } = usePresets(online);
30
30
  const blueprintRegistry = useBlueprintRegistry();
31
- const processor = useChatProcessor({
32
- chat,
33
- preset,
34
- services,
35
- blueprintRegistry,
36
- settings,
37
- });
31
+ const processor = useChatProcessor({ chat, preset, runtime, blueprintRegistry, settings });
38
32
 
39
33
  // TODO(burdon): Refocus when open.
40
34
  const [open, setOpen] = useState(true);
@@ -59,9 +53,9 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
59
53
  return (
60
54
  <Chat.Root chat={chat} processor={processor} onEvent={handleEvent}>
61
55
  <NaturalChatDialog.Root open={open} expanded={expanded} onOpenChange={setOpen}>
62
- <NaturalChatDialog.Header title={t('assistant dialog title')} />
56
+ <NaturalChatDialog.Header title={t('assistant-dialog.title')} />
63
57
  <NaturalChatDialog.Content>
64
- <Chat.Thread />
58
+ <Chat.Thread viewType={(chat.view as Assistant.ChatView | undefined) ?? settings.chatView} />
65
59
  </NaturalChatDialog.Content>
66
60
  <NaturalChatDialog.Footer classNames='p-1.5'>
67
61
  <Chat.Prompt {...chatProps} preset={preset?.id} online={online} onOnlineChange={setOnline} expandable />
@@ -70,5 +64,3 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
70
64
  </Chat.Root>
71
65
  );
72
66
  };
73
-
74
- export default ChatDialog;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { ChatDialog as default } from './ChatDialog';
@@ -0,0 +1,59 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { useMemo } from 'react';
6
+
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
8
+ import { AgentPrompt } from '@dxos/assistant-toolkit';
9
+ import { type Routine } from '@dxos/compute';
10
+ import { Operation } from '@dxos/compute';
11
+ import { Obj } from '@dxos/echo';
12
+ import { invariant } from '@dxos/invariant';
13
+ import { useComputeRuntimeCallback } from '@dxos/plugin-automation/hooks';
14
+ import { Panel, Toolbar, useTranslation } from '@dxos/react-ui';
15
+ import { useAttention } from '@dxos/react-ui-attention';
16
+
17
+ import { TemplateEditor } from '#components';
18
+ import { meta } from '#meta';
19
+
20
+ export type RoutineArticleProps = AppSurface.ObjectArticleProps<Routine.Routine>;
21
+
22
+ export const RoutineArticle = ({ role, attendableId, subject }: RoutineArticleProps) => {
23
+ const { t } = useTranslation(meta.id);
24
+ const { hasAttention } = useAttention(attendableId);
25
+ const db = Obj.getDatabase(subject);
26
+
27
+ const inputData = useMemo<Operation.Definition.Input<typeof AgentPrompt> | undefined>(
28
+ () =>
29
+ subject && db
30
+ ? {
31
+ prompt: db.makeRef(Obj.getDXN(subject)),
32
+ input: {},
33
+ }
34
+ : undefined,
35
+ [subject, db],
36
+ );
37
+
38
+ const handleRun = useComputeRuntimeCallback(
39
+ db?.spaceId,
40
+ () => {
41
+ invariant(inputData);
42
+ return Operation.invoke(AgentPrompt, inputData);
43
+ },
44
+ [inputData],
45
+ );
46
+
47
+ return (
48
+ <Panel.Root role={role} className='dx-document'>
49
+ <Panel.Toolbar asChild>
50
+ <Toolbar.Root disabled={!hasAttention} onClick={handleRun}>
51
+ <Toolbar.IconButton iconOnly icon='ph--play--regular' label={t('run-prompt.label')} onClick={handleRun} />
52
+ </Toolbar.Root>
53
+ </Panel.Toolbar>
54
+ <Panel.Content asChild>
55
+ <TemplateEditor id={subject.id} template={subject.instructions} />
56
+ </Panel.Content>
57
+ </Panel.Root>
58
+ );
59
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { RoutineArticle as default } from './RoutineArticle';