@dxos/plugin-assistant 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33

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 (719) 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 +31 -0
  4. package/dist/lib/browser/blueprints/index.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  6. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-RIJNPAYC.mjs +176 -0
  8. package/dist/lib/browser/chunk-RIJNPAYC.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/cli/index.mjs +73 -0
  12. package/dist/lib/browser/cli/index.mjs.map +7 -0
  13. package/dist/lib/browser/create-chat-FZJASOQS.mjs +74 -0
  14. package/dist/lib/browser/create-chat-FZJASOQS.mjs.map +7 -0
  15. package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs +65 -0
  16. package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +3347 -242
  18. package/dist/lib/browser/index.mjs.map +4 -4
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/on-create-space-OQNCM7NC.mjs +22 -0
  21. package/dist/lib/browser/on-create-space-OQNCM7NC.mjs.map +7 -0
  22. package/dist/lib/browser/operations/index.mjs +13 -0
  23. package/dist/lib/browser/operations/index.mjs.map +7 -0
  24. package/dist/lib/browser/resolve-navigation-targets-PMNR7D3P.mjs +22 -0
  25. package/dist/lib/browser/resolve-navigation-targets-PMNR7D3P.mjs.map +7 -0
  26. package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs +107 -0
  27. package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs.map +7 -0
  28. package/dist/lib/browser/set-current-chat-7V4DA66I.mjs +54 -0
  29. package/dist/lib/browser/set-current-chat-7V4DA66I.mjs.map +7 -0
  30. package/dist/lib/browser/translations.mjs +171 -0
  31. package/dist/lib/browser/translations.mjs.map +7 -0
  32. package/dist/lib/browser/types/index.mjs +8 -16
  33. package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs +56 -0
  34. package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs.map +7 -0
  35. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
  36. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
  37. package/dist/lib/node-esm/blueprints/index.mjs +32 -0
  38. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  39. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  40. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  41. package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs +177 -0
  42. package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs.map +7 -0
  43. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs +196 -0
  44. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
  45. package/dist/lib/node-esm/cli/index.mjs +74 -0
  46. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  47. package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs +75 -0
  48. package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs.map +7 -0
  49. package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs +66 -0
  50. package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs.map +7 -0
  51. package/dist/lib/node-esm/index.mjs +3347 -242
  52. package/dist/lib/node-esm/index.mjs.map +4 -4
  53. package/dist/lib/node-esm/meta.json +1 -1
  54. package/dist/lib/node-esm/on-create-space-4LWCYT3H.mjs +23 -0
  55. package/dist/lib/node-esm/on-create-space-4LWCYT3H.mjs.map +7 -0
  56. package/dist/lib/node-esm/operations/index.mjs +14 -0
  57. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  58. package/dist/lib/node-esm/resolve-navigation-targets-GHS3XPVP.mjs +23 -0
  59. package/dist/lib/node-esm/resolve-navigation-targets-GHS3XPVP.mjs.map +7 -0
  60. package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs +108 -0
  61. package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs.map +7 -0
  62. package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs +55 -0
  63. package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs.map +7 -0
  64. package/dist/lib/node-esm/translations.mjs +172 -0
  65. package/dist/lib/node-esm/translations.mjs.map +7 -0
  66. package/dist/lib/node-esm/types/index.mjs +8 -16
  67. package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs +57 -0
  68. package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs.map +7 -0
  69. package/dist/types/src/AssistantPlugin.d.ts +2 -1
  70. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  71. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  72. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  73. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  74. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  75. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  76. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  77. package/dist/types/src/blueprints/index.d.ts +2 -0
  78. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/ai-service.d.ts +6 -0
  80. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  82. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
  84. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
  86. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/edge-model-resolver.d.ts +7 -0
  88. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/index.d.ts +29 -6
  90. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  91. package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
  92. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  94. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  96. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  98. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  100. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/settings.d.ts +4 -2
  102. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/state.d.ts +21 -0
  104. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/toolkit.d.ts +6 -0
  106. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  107. package/dist/types/src/cli/index.d.ts +2 -0
  108. package/dist/types/src/cli/index.d.ts.map +1 -0
  109. package/dist/types/src/cli/plugin.d.ts +10 -0
  110. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  111. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -4
  112. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  113. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
  114. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
  115. package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
  116. package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
  117. package/dist/types/src/components/Chat/Chat.d.ts +41 -29
  118. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  119. package/dist/types/src/components/Chat/context.d.ts +29 -0
  120. package/dist/types/src/components/Chat/context.d.ts.map +1 -0
  121. package/dist/types/src/components/Chat/events.d.ts +39 -0
  122. package/dist/types/src/components/Chat/events.d.ts.map +1 -0
  123. package/dist/types/src/components/Chat/index.d.ts +1 -0
  124. package/dist/types/src/components/Chat/index.d.ts.map +1 -1
  125. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +7 -5
  126. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  127. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +24 -0
  128. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  129. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
  130. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
  131. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +11 -0
  132. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
  133. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
  134. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
  135. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -6
  136. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  137. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
  138. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
  139. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +7 -4
  140. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  141. package/dist/types/src/components/ChatPrompt/index.d.ts +4 -2
  142. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  143. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts +14 -0
  144. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
  145. package/dist/types/src/components/ChatThread/ChatThread.d.ts +16 -17
  146. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  147. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +25 -221
  148. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  149. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  150. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  151. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
  152. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
  153. package/dist/types/src/components/ChatThread/registry.d.ts +29 -0
  154. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  155. package/dist/types/src/components/ChatThread/sync.d.ts +69 -0
  156. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  157. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  158. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  159. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
  160. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
  161. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
  162. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
  163. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
  164. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
  165. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
  166. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
  167. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
  168. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
  169. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
  170. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
  171. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
  172. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
  173. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
  174. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
  175. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +25 -0
  176. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
  177. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
  178. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
  179. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
  180. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
  181. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
  182. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
  183. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
  184. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
  185. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
  186. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
  187. package/dist/types/src/components/ChatThread/widgets/index.d.ts +10 -0
  188. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
  189. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
  190. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  191. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
  192. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  193. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  194. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  195. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +9 -11
  196. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  197. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +13 -7
  198. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  199. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +16 -5
  200. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  201. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +10 -2
  202. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  203. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
  204. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
  205. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
  206. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
  207. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
  208. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
  209. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +12 -0
  210. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  211. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  212. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  213. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  214. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  215. package/dist/types/src/components/Toolbox/Toolbox.d.ts +17 -21
  216. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  217. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +14 -5
  218. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  219. package/dist/types/src/components/index.d.ts +3 -8
  220. package/dist/types/src/components/index.d.ts.map +1 -1
  221. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
  222. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
  223. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
  224. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
  225. package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
  226. package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
  227. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
  228. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
  229. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +16 -0
  230. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
  231. package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
  232. package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
  233. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  234. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  235. package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
  236. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  237. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +18 -0
  238. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  239. package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
  240. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  241. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +12 -0
  242. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  243. package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
  244. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  245. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  246. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  247. package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
  248. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  249. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
  250. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
  251. package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
  252. package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
  253. package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
  254. package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
  255. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +21 -0
  256. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
  257. package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
  258. package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
  259. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
  260. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
  261. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +13 -0
  262. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
  263. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
  264. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
  265. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
  266. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  267. package/dist/types/src/containers/TracePanel/execution-graph.d.ts +97 -0
  268. package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
  269. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
  270. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
  271. package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
  272. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
  273. package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
  274. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
  275. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
  276. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
  277. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
  278. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
  279. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +5 -0
  280. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  281. package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
  282. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  283. package/dist/types/src/containers/index.d.ts +12 -0
  284. package/dist/types/src/containers/index.d.ts.map +1 -0
  285. package/dist/types/src/extensions/index.d.ts +2 -0
  286. package/dist/types/src/extensions/index.d.ts.map +1 -0
  287. package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
  288. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
  289. package/dist/types/src/hooks/index.d.ts +12 -5
  290. package/dist/types/src/hooks/index.d.ts.map +1 -1
  291. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
  292. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  293. package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
  294. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
  295. package/dist/types/src/hooks/useChatProcessor.d.ts +12 -24
  296. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  297. package/dist/types/src/hooks/useChatServices.d.ts +10 -0
  298. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
  299. package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
  300. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
  301. package/dist/types/src/hooks/useContextBinder.d.ts +5 -0
  302. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  303. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  304. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  305. package/dist/types/src/hooks/useDebug.d.ts +10 -0
  306. package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
  307. package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
  308. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
  309. package/dist/types/src/hooks/useFlush.d.ts +6 -0
  310. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  311. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  312. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  313. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  314. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  315. package/dist/types/src/hooks/useReferencesProvider.d.ts +7 -0
  316. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
  317. package/dist/types/src/index.d.ts +1 -3
  318. package/dist/types/src/index.d.ts.map +1 -1
  319. package/dist/types/src/meta.d.ts +5 -4
  320. package/dist/types/src/meta.d.ts.map +1 -1
  321. package/dist/types/src/operations/create-chat.d.ts +5 -0
  322. package/dist/types/src/operations/create-chat.d.ts.map +1 -0
  323. package/dist/types/src/operations/definitions.d.ts +140 -0
  324. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  325. package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
  326. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
  327. package/dist/types/src/operations/index.d.ts +4 -0
  328. package/dist/types/src/operations/index.d.ts.map +1 -0
  329. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  330. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  331. package/dist/types/src/operations/prompt.test.d.ts +2 -0
  332. package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
  333. package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
  334. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  335. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
  336. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
  337. package/dist/types/src/operations/set-current-chat.d.ts +5 -0
  338. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
  339. package/dist/types/src/operations/update-chat-name.d.ts +5 -0
  340. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
  341. package/dist/types/src/processor/index.d.ts +3 -0
  342. package/dist/types/src/processor/index.d.ts.map +1 -0
  343. package/dist/types/src/processor/presets.d.ts +13 -0
  344. package/dist/types/src/processor/presets.d.ts.map +1 -0
  345. package/dist/types/src/processor/processor.d.ts +80 -0
  346. package/dist/types/src/processor/processor.d.ts.map +1 -0
  347. package/dist/types/src/processor/processor.test.d.ts +2 -0
  348. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  349. package/dist/types/src/queue-logger.d.ts.map +1 -1
  350. package/dist/types/src/testing/index.d.ts +2 -1
  351. package/dist/types/src/testing/index.d.ts.map +1 -1
  352. package/dist/types/src/testing/test-generator.d.ts +8 -0
  353. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  354. package/dist/types/src/testing/test-generator.test.d.ts +2 -0
  355. package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
  356. package/dist/types/src/testing/test-sequence.d.ts +0 -4
  357. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  358. package/dist/types/src/testing/test-services.d.ts +2 -2
  359. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  360. package/dist/types/src/testing/test-trace.d.ts +5 -0
  361. package/dist/types/src/testing/test-trace.d.ts.map +1 -0
  362. package/dist/types/src/testing/trace-timeline.test.d.ts +2 -0
  363. package/dist/types/src/testing/trace-timeline.test.d.ts.map +1 -0
  364. package/dist/types/src/translations.d.ts +2 -64
  365. package/dist/types/src/translations.d.ts.map +1 -1
  366. package/dist/types/src/types/Assistant.d.ts +36 -0
  367. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  368. package/dist/types/src/types/Settings.d.ts +26 -0
  369. package/dist/types/src/types/Settings.d.ts.map +1 -0
  370. package/dist/types/src/types/capabilities.d.ts +32 -0
  371. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  372. package/dist/types/src/types/events.d.ts +5 -0
  373. package/dist/types/src/types/events.d.ts.map +1 -0
  374. package/dist/types/src/types/index.d.ts +4 -2
  375. package/dist/types/src/types/index.d.ts.map +1 -1
  376. package/dist/types/src/types/service.d.ts +14 -213
  377. package/dist/types/src/types/service.d.ts.map +1 -1
  378. package/dist/types/tsconfig.tsbuildinfo +1 -1
  379. package/package.json +154 -100
  380. package/src/AssistantPlugin.tsx +226 -115
  381. package/src/blueprints/assistant/blueprint.test.ts +46 -0
  382. package/src/blueprints/assistant/blueprint.ts +31 -0
  383. package/src/blueprints/assistant/index.ts +5 -0
  384. package/src/{components/SequenceEditor → blueprints}/index.ts +1 -1
  385. package/src/capabilities/ai-service.ts +30 -0
  386. package/src/capabilities/app-graph-builder.ts +148 -238
  387. package/src/capabilities/blueprint-definition.ts +54 -0
  388. package/src/capabilities/companion-chat-provisioner.ts +164 -0
  389. package/src/capabilities/edge-model-resolver.ts +33 -0
  390. package/src/capabilities/index.ts +21 -8
  391. package/src/capabilities/local-model-resolver.ts +48 -0
  392. package/src/capabilities/markdown.ts +40 -0
  393. package/src/capabilities/migrations.ts +28 -0
  394. package/src/capabilities/operation-handler.ts +16 -0
  395. package/src/capabilities/react-surface.tsx +151 -121
  396. package/src/capabilities/settings.ts +24 -12
  397. package/src/capabilities/state.ts +35 -0
  398. package/src/capabilities/toolkit.ts +13 -0
  399. package/src/cli/index.ts +5 -0
  400. package/src/cli/plugin.ts +83 -0
  401. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
  402. package/src/components/AssistantSettings/AssistantSettings.tsx +29 -91
  403. package/src/components/AssistantSettings/index.ts +2 -2
  404. package/src/components/Chat/Chat.tsx +175 -253
  405. package/src/components/Chat/context.ts +39 -0
  406. package/src/components/Chat/events.ts +63 -0
  407. package/src/components/Chat/index.ts +2 -0
  408. package/src/components/ChatPrompt/ChatActions.tsx +47 -48
  409. package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
  410. package/src/components/ChatPrompt/ChatOptions.tsx +433 -0
  411. package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
  412. package/src/components/ChatPrompt/ChatPrompt.tsx +179 -0
  413. package/src/components/ChatPrompt/ChatReferences.tsx +42 -37
  414. package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
  415. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +33 -17
  416. package/src/components/ChatPrompt/index.ts +4 -3
  417. package/src/components/ChatThread/Anchor.stories.tsx +95 -0
  418. package/src/components/ChatThread/ChatThread.stories.tsx +125 -130
  419. package/src/components/ChatThread/ChatThread.tsx +95 -50
  420. package/src/components/ChatThread/DEBUG.md +41 -0
  421. package/src/components/ChatThread/Link.tsx +26 -0
  422. package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
  423. package/src/components/ChatThread/registry.tsx +286 -0
  424. package/src/components/ChatThread/sync.test.ts +259 -0
  425. package/src/components/ChatThread/sync.ts +150 -0
  426. package/src/components/ChatThread/testing/reasoning.md +25 -0
  427. package/src/components/ChatThread/testing/thinking.md +21 -0
  428. package/src/components/ChatThread/testing/thread-1.md +30 -0
  429. package/src/components/ChatThread/testing/thread-2.md +56 -0
  430. package/src/components/ChatThread/testing/thread-widgets.md +79 -0
  431. package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
  432. package/src/components/ChatThread/tool-widget-state.ts +48 -0
  433. package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
  434. package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
  435. package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
  436. package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
  437. package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
  438. package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
  439. package/src/components/ChatThread/widgets/StatusWidget.ts +133 -0
  440. package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
  441. package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -0
  442. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
  443. package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
  444. package/src/components/ChatThread/widgets/defaults.ts +8 -0
  445. package/src/components/ChatThread/widgets/index.ts +13 -0
  446. package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
  447. package/src/components/ProcessTree/ProcessTree.tsx +118 -0
  448. package/src/components/ProcessTree/index.ts +5 -0
  449. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +55 -43
  450. package/src/components/TemplateEditor/TemplateEditor.tsx +62 -60
  451. package/src/components/TemplateEditor/TemplateForm.stories.tsx +41 -26
  452. package/src/components/TemplateEditor/TemplateForm.tsx +123 -81
  453. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
  454. package/src/components/TemplateEditor/extensions/index.ts +6 -0
  455. package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
  456. package/src/components/ToolBlock/ToolBlock.tsx +144 -0
  457. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  458. package/src/components/ToolBlock/index.ts +6 -0
  459. package/src/components/Toolbox/Toolbox.stories.tsx +18 -29
  460. package/src/components/Toolbox/Toolbox.tsx +88 -110
  461. package/src/components/index.ts +3 -11
  462. package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
  463. package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
  464. package/src/containers/AgentArticle/index.ts +5 -0
  465. package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
  466. package/src/containers/AgentProperties/AgentProperties.tsx +127 -0
  467. package/src/containers/AgentProperties/index.ts +5 -0
  468. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  469. package/src/containers/BlueprintArticle/index.ts +5 -0
  470. package/src/containers/ChatCompanion/ChatCompanion.tsx +142 -0
  471. package/src/containers/ChatCompanion/index.ts +5 -0
  472. package/src/containers/ChatContainer/ChatContainer.tsx +105 -0
  473. package/src/containers/ChatContainer/index.ts +5 -0
  474. package/src/containers/ChatDialog/ChatDialog.tsx +66 -0
  475. package/src/containers/ChatDialog/index.ts +5 -0
  476. package/src/containers/RoutineArticle/RoutineArticle.tsx +59 -0
  477. package/src/containers/RoutineArticle/index.ts +5 -0
  478. package/src/containers/RoutineList/RoutineList.stories.tsx +130 -0
  479. package/src/containers/RoutineList/RoutineList.tsx +50 -0
  480. package/src/containers/RoutineList/index.ts +5 -0
  481. package/src/containers/TracePanel/TracePanel.stories.tsx +278 -0
  482. package/src/containers/TracePanel/TracePanel.tsx +138 -0
  483. package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
  484. package/src/containers/TracePanel/dxn-extractor.ts +178 -0
  485. package/src/containers/TracePanel/execution-graph.test.ts +382 -0
  486. package/src/containers/TracePanel/execution-graph.ts +579 -0
  487. package/src/containers/TracePanel/index.ts +9 -0
  488. package/src/containers/TracePanel/testing/index.ts +6 -0
  489. package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
  490. package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
  491. package/src/containers/TriggerStatus/TriggerStatus.tsx +129 -0
  492. package/src/containers/TriggerStatus/index.ts +5 -0
  493. package/src/containers/index.ts +16 -0
  494. package/src/extensions/index.ts +5 -0
  495. package/src/extensions/prompt-extension.ts +111 -0
  496. package/src/hooks/index.ts +12 -6
  497. package/src/hooks/useBlueprintRegistry.ts +109 -0
  498. package/src/hooks/useChatKeymap.ts +52 -0
  499. package/src/hooks/useChatProcessor.ts +90 -0
  500. package/src/hooks/useChatServices.ts +26 -0
  501. package/src/hooks/useChatToolbarActions.ts +122 -0
  502. package/src/hooks/useContextBinder.ts +43 -0
  503. package/src/hooks/useContextObjects.ts +50 -0
  504. package/src/hooks/useDebug.ts +38 -0
  505. package/src/hooks/useFilteredTypes.ts +37 -0
  506. package/src/hooks/useFlush.ts +35 -0
  507. package/src/hooks/useOnline.ts +10 -0
  508. package/src/hooks/usePresets.ts +45 -0
  509. package/src/hooks/useReferencesProvider.ts +54 -0
  510. package/src/index.ts +1 -3
  511. package/src/meta.ts +15 -9
  512. package/src/operations/create-chat.ts +80 -0
  513. package/src/operations/definitions.ts +127 -0
  514. package/src/operations/ensure-companion-chat.ts +61 -0
  515. package/src/operations/index.ts +17 -0
  516. package/src/operations/on-create-space.ts +24 -0
  517. package/src/operations/prompt.test.ts +78 -0
  518. package/src/operations/resolve-navigation-targets.ts +26 -0
  519. package/src/operations/run-prompt-in-new-chat.ts +113 -0
  520. package/src/operations/set-current-chat.ts +50 -0
  521. package/src/operations/update-chat-name.ts +61 -0
  522. package/src/processor/index.ts +6 -0
  523. package/src/processor/presets.ts +68 -0
  524. package/src/processor/processor.test.ts +40 -0
  525. package/src/processor/processor.ts +321 -0
  526. package/src/queue-logger.ts +33 -23
  527. package/src/testing/data/trace-timeline.dx.json +4657 -0
  528. package/src/testing/index.ts +2 -1
  529. package/src/testing/test-generator.test.ts +81 -0
  530. package/src/testing/test-generator.ts +299 -0
  531. package/src/testing/test-sequence.ts +5 -32
  532. package/src/testing/test-services.ts +10 -14
  533. package/src/testing/test-trace.ts +20 -0
  534. package/src/testing/trace-timeline.conversations.json +1 -0
  535. package/src/testing/trace-timeline.test.ts +250 -0
  536. package/src/translations.ts +160 -55
  537. package/src/types/Assistant.ts +25 -0
  538. package/src/types/Settings.ts +76 -0
  539. package/src/types/capabilities.ts +35 -0
  540. package/src/types/events.ts +11 -0
  541. package/src/types/index.ts +7 -2
  542. package/src/types/service.ts +27 -16
  543. package/src/vite-env.d.ts +30 -0
  544. package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs +0 -57
  545. package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +0 -7
  546. package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs +0 -74
  547. package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +0 -7
  548. package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs +0 -322
  549. package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +0 -7
  550. package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs +0 -28
  551. package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +0 -7
  552. package/dist/lib/browser/ai-client-ML7OQWAO.mjs +0 -39
  553. package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +0 -7
  554. package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs +0 -223
  555. package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +0 -7
  556. package/dist/lib/browser/chunk-44HZKIAW.mjs +0 -87
  557. package/dist/lib/browser/chunk-44HZKIAW.mjs.map +0 -7
  558. package/dist/lib/browser/chunk-LKP65RPA.mjs +0 -20
  559. package/dist/lib/browser/chunk-LKP65RPA.mjs.map +0 -7
  560. package/dist/lib/browser/chunk-NTBGTFTV.mjs +0 -15
  561. package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +0 -7
  562. package/dist/lib/browser/chunk-OZL4OHTU.mjs +0 -157
  563. package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +0 -7
  564. package/dist/lib/browser/chunk-TQ3QW3HJ.mjs +0 -2072
  565. package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +0 -7
  566. package/dist/lib/browser/chunk-TU7UUGWQ.mjs +0 -203
  567. package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +0 -7
  568. package/dist/lib/browser/chunk-WPZ4UANI.mjs +0 -16
  569. package/dist/lib/browser/chunk-WPZ4UANI.mjs.map +0 -7
  570. package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs +0 -42
  571. package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +0 -7
  572. package/dist/lib/browser/react-surface-TMF7JJA4.mjs +0 -156
  573. package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +0 -7
  574. package/dist/lib/browser/settings-N4HEXADL.mjs +0 -22
  575. package/dist/lib/browser/settings-N4HEXADL.mjs.map +0 -7
  576. package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs +0 -58
  577. package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +0 -7
  578. package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs +0 -75
  579. package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +0 -7
  580. package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs +0 -323
  581. package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +0 -7
  582. package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs +0 -29
  583. package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +0 -7
  584. package/dist/lib/node-esm/ai-client-2FQ434CT.mjs +0 -40
  585. package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +0 -7
  586. package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs +0 -224
  587. package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +0 -7
  588. package/dist/lib/node-esm/chunk-D3HTVK5D.mjs +0 -2073
  589. package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +0 -7
  590. package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs +0 -16
  591. package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +0 -7
  592. package/dist/lib/node-esm/chunk-HVMVHP4R.mjs +0 -158
  593. package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +0 -7
  594. package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +0 -18
  595. package/dist/lib/node-esm/chunk-HXKRKIN2.mjs.map +0 -7
  596. package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +0 -22
  597. package/dist/lib/node-esm/chunk-KOC6ESG7.mjs.map +0 -7
  598. package/dist/lib/node-esm/chunk-VESVUAOS.mjs +0 -88
  599. package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +0 -7
  600. package/dist/lib/node-esm/chunk-YYUVTTVK.mjs +0 -204
  601. package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +0 -7
  602. package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs +0 -43
  603. package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +0 -7
  604. package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs +0 -157
  605. package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +0 -7
  606. package/dist/lib/node-esm/settings-WQ76EG6O.mjs +0 -23
  607. package/dist/lib/node-esm/settings-WQ76EG6O.mjs.map +0 -7
  608. package/dist/types/src/capabilities/ai-client.d.ts +0 -5
  609. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  610. package/dist/types/src/capabilities/capabilities.d.ts +0 -6
  611. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  612. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  613. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  614. package/dist/types/src/components/ChatContainer.d.ts +0 -11
  615. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  616. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  617. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
  618. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
  619. package/dist/types/src/components/ChatPrompt/events.d.ts +0 -17
  620. package/dist/types/src/components/ChatPrompt/events.d.ts.map +0 -1
  621. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -18
  622. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
  623. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -18
  624. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
  625. package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
  626. package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
  627. package/dist/types/src/components/PromptSettings.d.ts +0 -6
  628. package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
  629. package/dist/types/src/components/SequenceContainer.d.ts +0 -9
  630. package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
  631. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
  632. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
  633. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
  634. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
  635. package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
  636. package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
  637. package/dist/types/src/components/TemplateContainer.d.ts +0 -9
  638. package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
  639. package/dist/types/src/events.d.ts +0 -4
  640. package/dist/types/src/events.d.ts.map +0 -1
  641. package/dist/types/src/hooks/chat-processor.d.ts +0 -82
  642. package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
  643. package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
  644. package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
  645. package/dist/types/src/hooks/useBlueprints.d.ts +0 -4
  646. package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
  647. package/dist/types/src/hooks/useContextProvider.d.ts +0 -23
  648. package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
  649. package/dist/types/src/hooks/useServiceContainer.d.ts +0 -8
  650. package/dist/types/src/hooks/useServiceContainer.d.ts.map +0 -1
  651. package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
  652. package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
  653. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  654. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  655. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  656. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  657. package/dist/types/src/parser/index.d.ts +0 -4
  658. package/dist/types/src/parser/index.d.ts.map +0 -1
  659. package/dist/types/src/parser/query-parser.d.ts +0 -15
  660. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  661. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  662. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  663. package/dist/types/src/parser/types.d.ts +0 -24
  664. package/dist/types/src/parser/types.d.ts.map +0 -1
  665. package/dist/types/src/stories/Chat.stories.d.ts +0 -199
  666. package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
  667. package/dist/types/src/testing/test-functions.d.ts +0 -3
  668. package/dist/types/src/testing/test-functions.d.ts.map +0 -1
  669. package/dist/types/src/tools/function.d.ts +0 -5
  670. package/dist/types/src/tools/function.d.ts.map +0 -1
  671. package/dist/types/src/tools/index.d.ts +0 -3
  672. package/dist/types/src/tools/index.d.ts.map +0 -1
  673. package/dist/types/src/tools/openapi.d.ts +0 -10
  674. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  675. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  676. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  677. package/dist/types/src/types/schema.d.ts +0 -71
  678. package/dist/types/src/types/schema.d.ts.map +0 -1
  679. package/dist/types/src/types/template.d.ts +0 -56
  680. package/dist/types/src/types/template.d.ts.map +0 -1
  681. package/src/capabilities/ai-client.ts +0 -39
  682. package/src/capabilities/capabilities.ts +0 -14
  683. package/src/capabilities/intent-resolver.ts +0 -45
  684. package/src/components/ChatContainer.tsx +0 -45
  685. package/src/components/ChatDialog.tsx +0 -65
  686. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
  687. package/src/components/ChatPrompt/events.ts +0 -12
  688. package/src/components/ChatThread/ChatMessage.tsx +0 -238
  689. package/src/components/ChatThread/ToolBlock.tsx +0 -111
  690. package/src/components/ChatThread/reducer.ts +0 -52
  691. package/src/components/PromptSettings.tsx +0 -91
  692. package/src/components/SequenceContainer.tsx +0 -139
  693. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
  694. package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
  695. package/src/components/TemplateContainer.tsx +0 -25
  696. package/src/events.ts +0 -11
  697. package/src/hooks/chat-processor.test.ts +0 -15
  698. package/src/hooks/chat-processor.ts +0 -281
  699. package/src/hooks/useBlueprints.ts +0 -31
  700. package/src/hooks/useChatProcessor.tsx +0 -142
  701. package/src/hooks/useContextProvider.ts +0 -61
  702. package/src/hooks/useServiceContainer.ts +0 -42
  703. package/src/hooks/useTextInputEvents.ts +0 -49
  704. package/src/parser/filter-generator.test.ts +0 -32
  705. package/src/parser/filter-generator.ts +0 -81
  706. package/src/parser/index.ts +0 -7
  707. package/src/parser/query-parser.test.ts +0 -139
  708. package/src/parser/query-parser.ts +0 -199
  709. package/src/parser/types.ts +0 -34
  710. package/src/shims.d.ts +0 -8
  711. package/src/stories/Chat.stories.tsx +0 -269
  712. package/src/testing/test-functions.ts +0 -11
  713. package/src/tools/function.ts +0 -46
  714. package/src/tools/index.ts +0 -6
  715. package/src/tools/openapi.test.ts +0 -217
  716. package/src/tools/openapi.ts +0 -338
  717. package/src/types/schema.ts +0 -86
  718. package/src/types/template.ts +0 -66
  719. package/src/typings.d.ts +0 -9
@@ -0,0 +1,200 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { Atom, useAtomValue } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Function from 'effect/Function';
8
+ import * as Option from 'effect/Option';
9
+ import React, { forwardRef, useCallback, useMemo, useState } from 'react';
10
+
11
+ import { Surface, useCapabilities } from '@dxos/app-framework/ui';
12
+ import { AppSurface, useObjectMenuItems } from '@dxos/app-toolkit/ui';
13
+ import { Agent } from '@dxos/assistant-toolkit';
14
+ import { QueueService } from '@dxos/compute';
15
+ import { Annotation, Filter, Obj, Query, Ref } from '@dxos/echo';
16
+ import { AtomObj, AtomRef } from '@dxos/echo-atom';
17
+ import { AutomationCapabilities } from '@dxos/plugin-automation/types';
18
+ import { useQuery } from '@dxos/react-client/echo';
19
+ import { Card, Message, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
20
+ import { Masonry } from '@dxos/react-ui-masonry';
21
+ import { Menu } from '@dxos/react-ui-menu';
22
+ import { Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
23
+ import { composable } from '@dxos/ui-theme';
24
+ import { isNonNullable } from '@dxos/util';
25
+
26
+ import { meta } from '#meta';
27
+
28
+ type Tab = 'artifacts' | 'inputs';
29
+
30
+ export type AgentArticleProps = AppSurface.ObjectArticleProps<Agent.Agent>;
31
+
32
+ export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
33
+ const { t } = useTranslation(meta.id);
34
+ const [tab, setTab] = useState<Tab>('artifacts');
35
+ const [viewport, setViewport] = useState<HTMLElement | null>(null);
36
+
37
+ const [computeRuntime] = useCapabilities(AutomationCapabilities.ComputeRuntime);
38
+ // TODO(burdon): Clear input queue also.
39
+ const handleResetHistory = useCallback(async () => {
40
+ if (!computeRuntime) {
41
+ return;
42
+ }
43
+
44
+ const space = Obj.getDatabase(agent);
45
+ if (!space) {
46
+ return;
47
+ }
48
+
49
+ const runtime = computeRuntime.getRuntime(space.spaceId);
50
+ await runtime.runPromise(Agent.resetChatHistory(agent));
51
+ if (!agent.queue) {
52
+ await runtime.runPromise(
53
+ Effect.gen(function* () {
54
+ const queue = yield* QueueService.createQueue();
55
+ Obj.update(agent, (agent) => {
56
+ agent.queue = Ref.fromDXN(queue.dxn);
57
+ });
58
+ }),
59
+ );
60
+ }
61
+ }, [agent, computeRuntime]);
62
+
63
+ const artifacts = useAtomValue(
64
+ useMemo(
65
+ () =>
66
+ AtomObj.make(agent).pipe((agent) =>
67
+ Atom.make((get) => {
68
+ return get(agent)
69
+ .artifacts.map((artifact) => get(AtomRef.make(artifact.data)))
70
+ .filter(isNonNullable);
71
+ }),
72
+ ),
73
+ [agent],
74
+ ),
75
+ );
76
+
77
+ const inputQueue = useAtomValue(
78
+ AtomObj.make(agent).pipe((_) =>
79
+ Atom.make((get) =>
80
+ Option.fromNullable(get(_).queue).pipe(Option.map(AtomRef.make), Option.map(get), Option.getOrUndefined),
81
+ ),
82
+ ),
83
+ );
84
+
85
+ const inputObjects = useQuery(inputQueue, Query.select(Filter.everything()));
86
+
87
+ return (
88
+ <Panel.Root role={role}>
89
+ <Panel.Toolbar asChild>
90
+ <Toolbar.Root>
91
+ <Toolbar.ToggleGroup type='single' value={tab} onValueChange={(value) => value && setTab(value as Tab)}>
92
+ <Toolbar.ToggleGroupIconItem value='artifacts' label={t('artifacts.label')} icon='ph--cube--regular' />
93
+ <Toolbar.ToggleGroupIconItem value='inputs' label={t('input-queue.label')} icon='ph--queue--regular' />
94
+ </Toolbar.ToggleGroup>
95
+ <Toolbar.Separator />
96
+ <Toolbar.IconButton
97
+ icon='ph--trash--regular'
98
+ label={t('reset-history.button')}
99
+ onCanPlay={handleResetHistory}
100
+ />
101
+ </Toolbar.Root>
102
+ </Panel.Toolbar>
103
+ <Panel.Content className='dx-container flex flex-col'>
104
+ {tab === 'artifacts' && (
105
+ <>
106
+ {artifacts.length === 0 && (
107
+ <Message.Root classNames='m-2' valence='info'>
108
+ <Message.Title>{t('project-empty-spec.message')}</Message.Title>
109
+ <Message.Content>{t('project-empty-spec.description')}</Message.Content>
110
+ </Message.Root>
111
+ )}
112
+
113
+ <Masonry.Root Tile={MasonryArtifactTile}>
114
+ <Masonry.Content padding thin centered>
115
+ <Masonry.Viewport items={artifacts} getId={(item: Obj.Unknown) => item.id} />
116
+ </Masonry.Content>
117
+ </Masonry.Root>
118
+ </>
119
+ )}
120
+
121
+ {tab === 'inputs' && (
122
+ <Mosaic.Container asChild withFocus autoScroll={viewport} classNames='dx-document'>
123
+ <ScrollArea.Root orientation='vertical' padding thin centered>
124
+ <ScrollArea.Viewport ref={setViewport}>
125
+ <Mosaic.VirtualStack
126
+ Tile={StackTile}
127
+ classNames='gap-2'
128
+ draggable={false}
129
+ estimateSize={() => 160}
130
+ gap={8}
131
+ getId={(item: Obj.Unknown) => item.id}
132
+ getScrollElement={() => viewport}
133
+ items={inputObjects}
134
+ />
135
+ </ScrollArea.Viewport>
136
+ </ScrollArea.Root>
137
+ </Mosaic.Container>
138
+ )}
139
+ </Panel.Content>
140
+ </Panel.Root>
141
+ );
142
+ };
143
+
144
+ const ArtifactTileCard = composable<HTMLDivElement, { data: Obj.Unknown }>(({ data, ...props }, forwardedRef) => {
145
+ const objectMenuItems = useObjectMenuItems(data);
146
+ const icon = Function.pipe(
147
+ Obj.getSchema(data),
148
+ Option.fromNullable,
149
+ Option.flatMap(Annotation.IconAnnotation.get),
150
+ Option.map(({ icon }) => icon),
151
+ Option.getOrElse(() => 'ph--placeholder--regular'),
152
+ );
153
+
154
+ return (
155
+ <Card.Root {...props} ref={forwardedRef} data-testid='board-item' fullWidth>
156
+ <Card.Toolbar>
157
+ <Card.IconBlock padding>
158
+ <Card.Icon icon={icon} />
159
+ </Card.IconBlock>
160
+ <Card.Title>{Obj.getLabel(data)}</Card.Title>
161
+ {/* TODO(wittjosiah): Reconcile with Card.Menu. */}
162
+ <Card.IconBlock padding>
163
+ <Menu.Trigger asChild disabled={!objectMenuItems?.length}>
164
+ <Toolbar.IconButton iconOnly variant='ghost' icon='ph--dots-three-vertical--regular' label='Actions' />
165
+ </Menu.Trigger>
166
+ <Menu.Content items={objectMenuItems} />
167
+ </Card.IconBlock>
168
+ </Card.Toolbar>
169
+ <Card.Content>
170
+ <Surface.Surface
171
+ type={AppSurface.Card}
172
+ limit={1}
173
+ data={{ subject: data } satisfies AppSurface.ObjectCardData}
174
+ />
175
+ </Card.Content>
176
+ </Card.Root>
177
+ );
178
+ });
179
+
180
+ ArtifactTileCard.displayName = 'ArtifactTileCard';
181
+
182
+ const MasonryArtifactTile = ({ data }: { data: Obj.Unknown; index: number }) => (
183
+ <Menu.Root>
184
+ <ArtifactTileCard data={data} />
185
+ </Menu.Root>
186
+ );
187
+
188
+ const StackTile = forwardRef<HTMLDivElement, MosaicTileProps<Obj.Unknown>>(
189
+ ({ data, location, debug, current }, forwardedRef) => (
190
+ <Menu.Root>
191
+ <Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
192
+ <Focus.Item asChild current={current}>
193
+ <ArtifactTileCard ref={forwardedRef} data={data} />
194
+ </Focus.Item>
195
+ </Mosaic.Tile>
196
+ </Menu.Root>
197
+ ),
198
+ );
199
+
200
+ StackTile.displayName = 'StackTile';
@@ -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';
@@ -0,0 +1,142 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Array from 'effect/Array';
6
+ import * as Function from 'effect/Function';
7
+ import * as Option from 'effect/Option';
8
+ import React, { forwardRef, useCallback, useMemo } from 'react';
9
+
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';
14
+ import { getSpace } from '@dxos/client/echo';
15
+ import { Blueprint } from '@dxos/compute';
16
+ import { Filter, Obj, Ref } from '@dxos/echo';
17
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
18
+ import { useQuery } from '@dxos/react-client/echo';
19
+ import { useAsyncEffect } from '@dxos/react-ui';
20
+
21
+ import { type ChatEvent } from '#components';
22
+ import { useBlueprintRegistry, useContextBinder } from '#hooks';
23
+ import { AssistantOperation } from '#operations';
24
+
25
+ import ChatContainer from '../ChatContainer';
26
+
27
+ export type ChatCompanionProps = AppSurface.ArticleProps<Chat.Chat, {}, Obj.Unknown>;
28
+
29
+ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
30
+ ({ role, subject: chat, companionTo, attendableId }, forwardedRef) => {
31
+ const { invokePromise } = useOperationInvoker();
32
+ const blueprintRegistry = useBlueprintRegistry();
33
+ const space = getSpace(companionTo);
34
+ const feedTarget = chat?.feed.target;
35
+ const binder = useContextBinder(space, feedTarget);
36
+
37
+ // Persist chat on first submit.
38
+ const handleEvent = useCallback(
39
+ async (event: ChatEvent) => {
40
+ if (!space || !chat) {
41
+ return;
42
+ }
43
+
44
+ if (event.type === 'submit' && !getSpace(chat)) {
45
+ await invokePromise(SpaceOperation.AddObject, {
46
+ object: chat,
47
+ target: space.db,
48
+ hidden: true,
49
+ });
50
+ await invokePromise(SpaceOperation.AddRelation, {
51
+ db: space.db,
52
+ schema: Chat.CompanionTo,
53
+ source: chat,
54
+ target: companionTo,
55
+ });
56
+ await invokePromise(AssistantOperation.SetCurrentChat, {
57
+ companionTo,
58
+ chat,
59
+ });
60
+ }
61
+ },
62
+ [chat, space, companionTo, invokePromise],
63
+ );
64
+
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
+ );
83
+ const existingBlueprints = useQuery(space?.db, Filter.type(Blueprint.Blueprint));
84
+ const pluginBlueprints = useMemo(
85
+ () => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
86
+ [existingBlueprints, blueprintKeys],
87
+ );
88
+
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
+ useAsyncEffect(async () => {
113
+ if (!binder?.isOpen) {
114
+ return;
115
+ }
116
+
117
+ if (pluginBlueprints.length > 0) {
118
+ await binder.bind({
119
+ blueprints: pluginBlueprints.map((blueprint) => Ref.make(blueprint)),
120
+ });
121
+ }
122
+
123
+ if (Obj.instanceOf(Blueprint.Blueprint, companionTo)) {
124
+ await binder.bind({ blueprints: [Ref.make(companionTo)] });
125
+ } else {
126
+ await binder.bind({ objects: [Ref.make(companionTo)] });
127
+ }
128
+ }, [binder, companionTo, blueprintKeys]);
129
+
130
+ return (
131
+ <ChatContainer
132
+ role={role ?? 'article'}
133
+ space={space}
134
+ subject={chat}
135
+ attendableId={attendableId}
136
+ companionTo={companionTo}
137
+ onEvent={handleEvent}
138
+ ref={forwardedRef}
139
+ />
140
+ );
141
+ },
142
+ );
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { ChatCompanion as default } from './ChatCompanion';