@dxos/plugin-assistant 0.8.4-main.f5c0578 → 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 (766) 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-RIJNPAYC.mjs +176 -0
  6. package/dist/lib/browser/chunk-RIJNPAYC.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-SEMCG4ZK.mjs +195 -0
  8. package/dist/lib/browser/chunk-SEMCG4ZK.mjs.map +7 -0
  9. package/dist/lib/browser/cli/index.mjs +73 -0
  10. package/dist/lib/browser/cli/index.mjs.map +7 -0
  11. package/dist/lib/browser/create-chat-FZJASOQS.mjs +74 -0
  12. package/dist/lib/browser/create-chat-FZJASOQS.mjs.map +7 -0
  13. package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs +65 -0
  14. package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +3347 -272
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/on-create-space-OQNCM7NC.mjs +22 -0
  19. package/dist/lib/browser/on-create-space-OQNCM7NC.mjs.map +7 -0
  20. package/dist/lib/browser/operations/index.mjs +13 -0
  21. package/dist/lib/browser/operations/index.mjs.map +7 -0
  22. package/dist/lib/browser/resolve-navigation-targets-PMNR7D3P.mjs +22 -0
  23. package/dist/lib/browser/resolve-navigation-targets-PMNR7D3P.mjs.map +7 -0
  24. package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs +107 -0
  25. package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs.map +7 -0
  26. package/dist/lib/browser/set-current-chat-7V4DA66I.mjs +54 -0
  27. package/dist/lib/browser/set-current-chat-7V4DA66I.mjs.map +7 -0
  28. package/dist/lib/browser/translations.mjs +171 -0
  29. package/dist/lib/browser/translations.mjs.map +7 -0
  30. package/dist/lib/browser/types/index.mjs +5 -6
  31. package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs +56 -0
  32. package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs.map +7 -0
  33. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
  34. package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
  35. package/dist/lib/node-esm/blueprints/index.mjs +32 -0
  36. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs +177 -0
  38. package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs.map +7 -0
  39. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs +196 -0
  40. package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
  41. package/dist/lib/node-esm/cli/index.mjs +74 -0
  42. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  43. package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs +75 -0
  44. package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs.map +7 -0
  45. package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs +66 -0
  46. package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +3347 -272
  48. package/dist/lib/node-esm/index.mjs.map +4 -4
  49. package/dist/lib/node-esm/meta.json +1 -1
  50. package/dist/lib/node-esm/on-create-space-4LWCYT3H.mjs +23 -0
  51. package/dist/lib/node-esm/on-create-space-4LWCYT3H.mjs.map +7 -0
  52. package/dist/lib/node-esm/operations/index.mjs +14 -0
  53. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  54. package/dist/lib/node-esm/resolve-navigation-targets-GHS3XPVP.mjs +23 -0
  55. package/dist/lib/node-esm/resolve-navigation-targets-GHS3XPVP.mjs.map +7 -0
  56. package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs +108 -0
  57. package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs.map +7 -0
  58. package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs +55 -0
  59. package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs.map +7 -0
  60. package/dist/lib/node-esm/translations.mjs +172 -0
  61. package/dist/lib/node-esm/translations.mjs.map +7 -0
  62. package/dist/lib/node-esm/types/index.mjs +5 -6
  63. package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs +57 -0
  64. package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs.map +7 -0
  65. package/dist/types/src/AssistantPlugin.d.ts +2 -1
  66. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  67. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  68. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  69. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  70. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  71. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  72. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  73. package/dist/types/src/blueprints/index.d.ts +2 -0
  74. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/ai-service.d.ts +4 -3
  76. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  78. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -2
  80. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
  82. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/edge-model-resolver.d.ts +6 -4
  84. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/index.d.ts +29 -9
  86. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
  88. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  90. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  92. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  94. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  96. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/settings.d.ts +4 -2
  98. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/state.d.ts +21 -0
  100. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/toolkit.d.ts +4 -3
  102. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
  103. package/dist/types/src/cli/index.d.ts +2 -0
  104. package/dist/types/src/cli/index.d.ts.map +1 -0
  105. package/dist/types/src/cli/plugin.d.ts +10 -0
  106. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  107. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -4
  108. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  109. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
  110. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
  111. package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
  112. package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
  113. package/dist/types/src/components/Chat/Chat.d.ts +40 -31
  114. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  115. package/dist/types/src/components/Chat/context.d.ts +29 -0
  116. package/dist/types/src/components/Chat/context.d.ts.map +1 -0
  117. package/dist/types/src/components/Chat/events.d.ts +10 -1
  118. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  119. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -1
  120. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  121. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +16 -5
  122. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  123. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
  124. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
  125. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  126. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
  127. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
  128. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -4
  129. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  130. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
  131. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
  132. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
  133. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  134. package/dist/types/src/components/ChatPrompt/index.d.ts +2 -0
  135. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  136. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts +14 -0
  137. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
  138. package/dist/types/src/components/ChatThread/ChatThread.d.ts +16 -11
  139. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  140. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +25 -215
  141. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
  143. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
  144. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
  145. package/dist/types/src/components/ChatThread/registry.d.ts +29 -0
  146. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  147. package/dist/types/src/components/ChatThread/sync.d.ts +69 -0
  148. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  149. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  150. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  151. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
  152. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
  153. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
  154. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
  155. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
  156. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
  157. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
  158. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
  159. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
  160. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
  161. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
  162. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
  163. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
  164. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
  165. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
  166. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
  167. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +25 -0
  168. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
  169. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
  170. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
  171. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
  172. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
  173. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
  174. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
  175. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
  176. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
  177. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
  178. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
  179. package/dist/types/src/components/ChatThread/widgets/index.d.ts +10 -0
  180. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
  181. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
  182. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  183. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
  184. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  185. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  186. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  187. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +7 -10
  188. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  189. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +13 -7
  190. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  191. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +13 -3
  192. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  193. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +10 -2
  194. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  195. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
  196. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
  197. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
  198. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
  199. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
  200. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
  201. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +12 -0
  202. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  203. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  204. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  205. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  206. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  207. package/dist/types/src/components/Toolbox/Toolbox.d.ts +15 -16
  208. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  209. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +15 -5
  210. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  211. package/dist/types/src/components/index.d.ts +3 -9
  212. package/dist/types/src/components/index.d.ts.map +1 -1
  213. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
  214. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
  215. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
  216. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
  217. package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
  218. package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
  219. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
  220. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
  221. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +16 -0
  222. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
  223. package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
  224. package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
  225. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  226. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  227. package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
  228. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  229. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +18 -0
  230. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  231. package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
  232. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  233. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +12 -0
  234. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  235. package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
  236. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  237. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  238. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  239. package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
  240. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  241. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
  242. package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
  243. package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
  244. package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
  245. package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
  246. package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
  247. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +21 -0
  248. package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
  249. package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
  250. package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
  251. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
  252. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
  253. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +13 -0
  254. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
  255. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
  256. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
  257. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
  258. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  259. package/dist/types/src/containers/TracePanel/execution-graph.d.ts +97 -0
  260. package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
  261. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
  262. package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
  263. package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
  264. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
  265. package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
  266. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
  267. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
  268. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
  269. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
  270. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
  271. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +5 -0
  272. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  273. package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
  274. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  275. package/dist/types/src/containers/index.d.ts +12 -0
  276. package/dist/types/src/containers/index.d.ts.map +1 -0
  277. package/dist/types/src/extensions/index.d.ts +2 -0
  278. package/dist/types/src/extensions/index.d.ts.map +1 -0
  279. package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
  280. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
  281. package/dist/types/src/hooks/index.d.ts +7 -5
  282. package/dist/types/src/hooks/index.d.ts.map +1 -1
  283. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +9 -5
  284. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  285. package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
  286. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
  287. package/dist/types/src/hooks/useChatProcessor.d.ts +8 -11
  288. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  289. package/dist/types/src/hooks/useChatServices.d.ts +5 -10
  290. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  291. package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
  292. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
  293. package/dist/types/src/hooks/useContextBinder.d.ts +5 -0
  294. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  295. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  296. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  297. package/dist/types/src/hooks/useDebug.d.ts +10 -0
  298. package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
  299. package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
  300. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
  301. package/dist/types/src/{stories/hooks → hooks}/useFlush.d.ts +1 -1
  302. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  303. package/dist/types/src/hooks/usePresets.d.ts +3 -3
  304. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  305. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  306. package/dist/types/src/index.d.ts +1 -3
  307. package/dist/types/src/index.d.ts.map +1 -1
  308. package/dist/types/src/meta.d.ts +5 -4
  309. package/dist/types/src/meta.d.ts.map +1 -1
  310. package/dist/types/src/operations/create-chat.d.ts +5 -0
  311. package/dist/types/src/operations/create-chat.d.ts.map +1 -0
  312. package/dist/types/src/operations/definitions.d.ts +140 -0
  313. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  314. package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
  315. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
  316. package/dist/types/src/operations/index.d.ts +4 -0
  317. package/dist/types/src/operations/index.d.ts.map +1 -0
  318. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  319. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  320. package/dist/types/src/operations/prompt.test.d.ts +2 -0
  321. package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
  322. package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
  323. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  324. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
  325. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
  326. package/dist/types/src/operations/set-current-chat.d.ts +5 -0
  327. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
  328. package/dist/types/src/operations/update-chat-name.d.ts +5 -0
  329. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
  330. package/dist/types/src/processor/index.d.ts +3 -0
  331. package/dist/types/src/processor/index.d.ts.map +1 -0
  332. package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
  333. package/dist/types/src/processor/presets.d.ts.map +1 -0
  334. package/dist/types/src/processor/processor.d.ts +80 -0
  335. package/dist/types/src/processor/processor.d.ts.map +1 -0
  336. package/dist/types/src/processor/processor.test.d.ts +2 -0
  337. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  338. package/dist/types/src/queue-logger.d.ts.map +1 -1
  339. package/dist/types/src/testing/index.d.ts +2 -1
  340. package/dist/types/src/testing/index.d.ts.map +1 -1
  341. package/dist/types/src/testing/test-generator.d.ts +8 -0
  342. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  343. package/dist/types/src/testing/test-generator.test.d.ts +2 -0
  344. package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
  345. package/dist/types/src/testing/test-sequence.d.ts +0 -4
  346. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  347. package/dist/types/src/testing/test-services.d.ts +2 -2
  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 -76
  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 +32 -0
  360. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  361. package/dist/types/src/types/events.d.ts +5 -0
  362. package/dist/types/src/types/events.d.ts.map +1 -0
  363. package/dist/types/src/types/index.d.ts +3 -2
  364. package/dist/types/src/types/index.d.ts.map +1 -1
  365. package/dist/types/src/types/service.d.ts +14 -213
  366. package/dist/types/src/types/service.d.ts.map +1 -1
  367. package/dist/types/tsconfig.tsbuildinfo +1 -1
  368. package/package.json +151 -109
  369. package/src/AssistantPlugin.tsx +220 -129
  370. package/src/blueprints/assistant/blueprint.test.ts +46 -0
  371. package/src/blueprints/assistant/blueprint.ts +31 -0
  372. package/src/blueprints/assistant/index.ts +5 -0
  373. package/src/{components/Timeline → blueprints}/index.ts +1 -1
  374. package/src/capabilities/ai-service.ts +22 -20
  375. package/src/capabilities/app-graph-builder.ts +141 -148
  376. package/src/capabilities/blueprint-definition.ts +47 -25
  377. package/src/capabilities/companion-chat-provisioner.ts +164 -0
  378. package/src/capabilities/edge-model-resolver.ts +17 -13
  379. package/src/capabilities/index.ts +21 -11
  380. package/src/capabilities/local-model-resolver.ts +48 -0
  381. package/src/capabilities/markdown.ts +40 -0
  382. package/src/capabilities/migrations.ts +28 -0
  383. package/src/capabilities/operation-handler.ts +16 -0
  384. package/src/capabilities/react-surface.tsx +150 -128
  385. package/src/capabilities/settings.ts +24 -12
  386. package/src/capabilities/state.ts +35 -0
  387. package/src/capabilities/toolkit.ts +7 -100
  388. package/src/cli/index.ts +5 -0
  389. package/src/cli/plugin.ts +83 -0
  390. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
  391. package/src/components/AssistantSettings/AssistantSettings.tsx +29 -91
  392. package/src/components/AssistantSettings/index.ts +2 -2
  393. package/src/components/Chat/Chat.tsx +169 -300
  394. package/src/components/Chat/context.ts +39 -0
  395. package/src/components/Chat/events.ts +14 -1
  396. package/src/components/ChatPrompt/ChatActions.tsx +35 -31
  397. package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
  398. package/src/components/ChatPrompt/ChatOptions.tsx +410 -36
  399. package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
  400. package/src/components/ChatPrompt/ChatPrompt.tsx +179 -0
  401. package/src/components/ChatPrompt/ChatReferences.tsx +40 -38
  402. package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
  403. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
  404. package/src/components/ChatPrompt/index.ts +2 -0
  405. package/src/components/ChatThread/Anchor.stories.tsx +95 -0
  406. package/src/components/ChatThread/ChatThread.stories.tsx +88 -220
  407. package/src/components/ChatThread/ChatThread.tsx +92 -36
  408. package/src/components/ChatThread/DEBUG.md +41 -0
  409. package/src/components/ChatThread/Link.tsx +11 -8
  410. package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
  411. package/src/components/ChatThread/registry.tsx +286 -0
  412. package/src/components/ChatThread/sync.test.ts +259 -0
  413. package/src/components/ChatThread/sync.ts +150 -0
  414. package/src/components/ChatThread/testing/reasoning.md +25 -0
  415. package/src/components/ChatThread/testing/thinking.md +21 -0
  416. package/src/components/ChatThread/testing/thread-1.md +30 -0
  417. package/src/components/ChatThread/testing/thread-2.md +56 -0
  418. package/src/components/ChatThread/testing/thread-widgets.md +79 -0
  419. package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
  420. package/src/components/ChatThread/tool-widget-state.ts +48 -0
  421. package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
  422. package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
  423. package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
  424. package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
  425. package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
  426. package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
  427. package/src/components/ChatThread/widgets/StatusWidget.ts +133 -0
  428. package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
  429. package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -0
  430. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
  431. package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
  432. package/src/components/ChatThread/widgets/defaults.ts +8 -0
  433. package/src/components/ChatThread/widgets/index.ts +13 -0
  434. package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
  435. package/src/components/ProcessTree/ProcessTree.tsx +118 -0
  436. package/src/components/ProcessTree/index.ts +5 -0
  437. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +29 -19
  438. package/src/components/TemplateEditor/TemplateEditor.tsx +57 -71
  439. package/src/components/TemplateEditor/TemplateForm.stories.tsx +25 -17
  440. package/src/components/TemplateEditor/TemplateForm.tsx +86 -39
  441. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
  442. package/src/components/TemplateEditor/extensions/index.ts +6 -0
  443. package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
  444. package/src/components/ToolBlock/ToolBlock.tsx +144 -0
  445. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  446. package/src/components/ToolBlock/index.ts +6 -0
  447. package/src/components/Toolbox/Toolbox.stories.tsx +18 -23
  448. package/src/components/Toolbox/Toolbox.tsx +81 -82
  449. package/src/components/index.ts +3 -8
  450. package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
  451. package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
  452. package/src/containers/AgentArticle/index.ts +5 -0
  453. package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
  454. package/src/containers/AgentProperties/AgentProperties.tsx +127 -0
  455. package/src/containers/AgentProperties/index.ts +5 -0
  456. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  457. package/src/containers/BlueprintArticle/index.ts +5 -0
  458. package/src/containers/ChatCompanion/ChatCompanion.tsx +142 -0
  459. package/src/containers/ChatCompanion/index.ts +5 -0
  460. package/src/containers/ChatContainer/ChatContainer.tsx +105 -0
  461. package/src/containers/ChatContainer/index.ts +5 -0
  462. package/src/containers/ChatDialog/ChatDialog.tsx +66 -0
  463. package/src/containers/ChatDialog/index.ts +5 -0
  464. package/src/containers/RoutineArticle/RoutineArticle.tsx +59 -0
  465. package/src/containers/RoutineArticle/index.ts +5 -0
  466. package/src/containers/RoutineList/RoutineList.stories.tsx +130 -0
  467. package/src/containers/RoutineList/RoutineList.tsx +50 -0
  468. package/src/containers/RoutineList/index.ts +5 -0
  469. package/src/containers/TracePanel/TracePanel.stories.tsx +278 -0
  470. package/src/containers/TracePanel/TracePanel.tsx +138 -0
  471. package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
  472. package/src/containers/TracePanel/dxn-extractor.ts +178 -0
  473. package/src/containers/TracePanel/execution-graph.test.ts +382 -0
  474. package/src/containers/TracePanel/execution-graph.ts +579 -0
  475. package/src/containers/TracePanel/index.ts +9 -0
  476. package/src/containers/TracePanel/testing/index.ts +6 -0
  477. package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
  478. package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
  479. package/src/containers/TriggerStatus/TriggerStatus.tsx +129 -0
  480. package/src/containers/TriggerStatus/index.ts +5 -0
  481. package/src/containers/index.ts +16 -0
  482. package/src/extensions/index.ts +5 -0
  483. package/src/extensions/prompt-extension.ts +111 -0
  484. package/src/hooks/index.ts +7 -6
  485. package/src/hooks/useBlueprintRegistry.ts +53 -23
  486. package/src/hooks/useChatKeymap.ts +52 -0
  487. package/src/hooks/useChatProcessor.ts +48 -39
  488. package/src/hooks/useChatServices.ts +12 -60
  489. package/src/hooks/useChatToolbarActions.ts +122 -0
  490. package/src/hooks/useContextBinder.ts +43 -0
  491. package/src/hooks/useContextObjects.ts +50 -0
  492. package/src/hooks/useDebug.ts +38 -0
  493. package/src/hooks/useFilteredTypes.ts +37 -0
  494. package/src/hooks/usePresets.ts +5 -5
  495. package/src/hooks/useReferencesProvider.ts +5 -8
  496. package/src/index.ts +1 -3
  497. package/src/meta.ts +15 -9
  498. package/src/operations/create-chat.ts +80 -0
  499. package/src/operations/definitions.ts +127 -0
  500. package/src/operations/ensure-companion-chat.ts +61 -0
  501. package/src/operations/index.ts +17 -0
  502. package/src/operations/on-create-space.ts +24 -0
  503. package/src/operations/prompt.test.ts +78 -0
  504. package/src/operations/resolve-navigation-targets.ts +26 -0
  505. package/src/operations/run-prompt-in-new-chat.ts +113 -0
  506. package/src/operations/set-current-chat.ts +50 -0
  507. package/src/operations/update-chat-name.ts +61 -0
  508. package/src/processor/index.ts +6 -0
  509. package/src/{hooks → processor}/presets.ts +21 -6
  510. package/src/processor/processor.test.ts +40 -0
  511. package/src/processor/processor.ts +321 -0
  512. package/src/queue-logger.ts +29 -19
  513. package/src/testing/data/trace-timeline.dx.json +4657 -0
  514. package/src/testing/index.ts +2 -1
  515. package/src/testing/test-generator.test.ts +81 -0
  516. package/src/testing/test-generator.ts +299 -0
  517. package/src/testing/test-sequence.ts +4 -29
  518. package/src/testing/test-services.ts +10 -14
  519. package/src/testing/test-trace.ts +20 -0
  520. package/src/testing/trace-timeline.conversations.json +1 -0
  521. package/src/testing/trace-timeline.test.ts +250 -0
  522. package/src/translations.ts +157 -68
  523. package/src/types/Assistant.ts +16 -53
  524. package/src/types/Settings.ts +76 -0
  525. package/src/types/capabilities.ts +35 -0
  526. package/src/types/events.ts +11 -0
  527. package/src/types/index.ts +5 -2
  528. package/src/types/service.ts +27 -16
  529. package/src/vite-env.d.ts +30 -0
  530. package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs +0 -29
  531. package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +0 -7
  532. package/dist/lib/browser/ChatContainer-SB7YC2XP.mjs +0 -77
  533. package/dist/lib/browser/ChatContainer-SB7YC2XP.mjs.map +0 -7
  534. package/dist/lib/browser/ChatDialog-X6PFOQSQ.mjs +0 -87
  535. package/dist/lib/browser/ChatDialog-X6PFOQSQ.mjs.map +0 -7
  536. package/dist/lib/browser/SequenceContainer-627OQ557.mjs +0 -163
  537. package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +0 -7
  538. package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +0 -22
  539. package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +0 -7
  540. package/dist/lib/browser/app-graph-builder-ERU5XY2S.mjs +0 -166
  541. package/dist/lib/browser/app-graph-builder-ERU5XY2S.mjs.map +0 -7
  542. package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +0 -146
  543. package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +0 -7
  544. package/dist/lib/browser/chunk-BVH6VK6Q.mjs +0 -2254
  545. package/dist/lib/browser/chunk-BVH6VK6Q.mjs.map +0 -7
  546. package/dist/lib/browser/chunk-JBFDQMUJ.mjs +0 -193
  547. package/dist/lib/browser/chunk-JBFDQMUJ.mjs.map +0 -7
  548. package/dist/lib/browser/chunk-LKP65RPA.mjs +0 -20
  549. package/dist/lib/browser/chunk-LKP65RPA.mjs.map +0 -7
  550. package/dist/lib/browser/chunk-NZDCKQ6W.mjs +0 -89
  551. package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +0 -7
  552. package/dist/lib/browser/chunk-QB7OVS6Z.mjs +0 -16
  553. package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +0 -7
  554. package/dist/lib/browser/chunk-Y66UJUHV.mjs +0 -280
  555. package/dist/lib/browser/chunk-Y66UJUHV.mjs.map +0 -7
  556. package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +0 -24
  557. package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +0 -7
  558. package/dist/lib/browser/intent-resolver-DGRO2XSG.mjs +0 -81
  559. package/dist/lib/browser/intent-resolver-DGRO2XSG.mjs.map +0 -7
  560. package/dist/lib/browser/react-surface-LPSIBHEJ.mjs +0 -163
  561. package/dist/lib/browser/react-surface-LPSIBHEJ.mjs.map +0 -7
  562. package/dist/lib/browser/settings-ZFNQYSYP.mjs +0 -23
  563. package/dist/lib/browser/settings-ZFNQYSYP.mjs.map +0 -7
  564. package/dist/lib/browser/toolkit-IW4FBLLB.mjs +0 -105
  565. package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +0 -7
  566. package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs +0 -30
  567. package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +0 -7
  568. package/dist/lib/node-esm/ChatContainer-7JLMWHMX.mjs +0 -78
  569. package/dist/lib/node-esm/ChatContainer-7JLMWHMX.mjs.map +0 -7
  570. package/dist/lib/node-esm/ChatDialog-QDD722F2.mjs +0 -88
  571. package/dist/lib/node-esm/ChatDialog-QDD722F2.mjs.map +0 -7
  572. package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +0 -164
  573. package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +0 -7
  574. package/dist/lib/node-esm/ai-service-LDD32477.mjs +0 -23
  575. package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +0 -7
  576. package/dist/lib/node-esm/app-graph-builder-RCT4ANP2.mjs +0 -167
  577. package/dist/lib/node-esm/app-graph-builder-RCT4ANP2.mjs.map +0 -7
  578. package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +0 -147
  579. package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +0 -7
  580. package/dist/lib/node-esm/chunk-ETS2CIDF.mjs +0 -2255
  581. package/dist/lib/node-esm/chunk-ETS2CIDF.mjs.map +0 -7
  582. package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs +0 -90
  583. package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs.map +0 -7
  584. package/dist/lib/node-esm/chunk-GENVBE3B.mjs +0 -194
  585. package/dist/lib/node-esm/chunk-GENVBE3B.mjs.map +0 -7
  586. package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +0 -22
  587. package/dist/lib/node-esm/chunk-KOC6ESG7.mjs.map +0 -7
  588. package/dist/lib/node-esm/chunk-QS6GWTVA.mjs +0 -281
  589. package/dist/lib/node-esm/chunk-QS6GWTVA.mjs.map +0 -7
  590. package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +0 -17
  591. package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +0 -7
  592. package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +0 -25
  593. package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +0 -7
  594. package/dist/lib/node-esm/intent-resolver-7CKWG7TZ.mjs +0 -82
  595. package/dist/lib/node-esm/intent-resolver-7CKWG7TZ.mjs.map +0 -7
  596. package/dist/lib/node-esm/react-surface-3EPAE4I4.mjs +0 -164
  597. package/dist/lib/node-esm/react-surface-3EPAE4I4.mjs.map +0 -7
  598. package/dist/lib/node-esm/settings-UI4VQCWW.mjs +0 -24
  599. package/dist/lib/node-esm/settings-UI4VQCWW.mjs.map +0 -7
  600. package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +0 -106
  601. package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +0 -7
  602. package/dist/types/src/capabilities/capabilities.d.ts +0 -11
  603. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  604. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  605. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  606. package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
  607. package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
  608. package/dist/types/src/components/ChatContainer.d.ts +0 -12
  609. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  610. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  611. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -18
  612. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
  613. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
  614. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
  615. package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
  616. package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
  617. package/dist/types/src/components/PromptSettings.d.ts +0 -6
  618. package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
  619. package/dist/types/src/components/SequenceContainer.d.ts +0 -8
  620. package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
  621. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
  622. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
  623. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
  624. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
  625. package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
  626. package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
  627. package/dist/types/src/components/Timeline/Timeline.d.ts +0 -42
  628. package/dist/types/src/components/Timeline/Timeline.d.ts.map +0 -1
  629. package/dist/types/src/components/Timeline/Timeline.stories.d.ts +0 -11
  630. package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +0 -1
  631. package/dist/types/src/components/Timeline/index.d.ts +0 -2
  632. package/dist/types/src/components/Timeline/index.d.ts.map +0 -1
  633. package/dist/types/src/events.d.ts +0 -4
  634. package/dist/types/src/events.d.ts.map +0 -1
  635. package/dist/types/src/execution-graph/execution-graph.d.ts +0 -21
  636. package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
  637. package/dist/types/src/execution-graph/index.d.ts +0 -2
  638. package/dist/types/src/execution-graph/index.d.ts.map +0 -1
  639. package/dist/types/src/functions/analysis.d.ts +0 -5
  640. package/dist/types/src/functions/analysis.d.ts.map +0 -1
  641. package/dist/types/src/functions/index.d.ts +0 -4
  642. package/dist/types/src/functions/index.d.ts.map +0 -1
  643. package/dist/types/src/functions/list.d.ts +0 -10
  644. package/dist/types/src/functions/list.d.ts.map +0 -1
  645. package/dist/types/src/functions/load.d.ts +0 -8
  646. package/dist/types/src/functions/load.d.ts.map +0 -1
  647. package/dist/types/src/hooks/chat-processor.d.ts +0 -72
  648. package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
  649. package/dist/types/src/hooks/errors.d.ts +0 -4
  650. package/dist/types/src/hooks/errors.d.ts.map +0 -1
  651. package/dist/types/src/hooks/presets.d.ts.map +0 -1
  652. package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -7
  653. package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
  654. package/dist/types/src/hooks/useResolveRef.d.ts +0 -4
  655. package/dist/types/src/hooks/useResolveRef.d.ts.map +0 -1
  656. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  657. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  658. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  659. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  660. package/dist/types/src/parser/index.d.ts +0 -4
  661. package/dist/types/src/parser/index.d.ts.map +0 -1
  662. package/dist/types/src/parser/query-parser.d.ts +0 -15
  663. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  664. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  665. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  666. package/dist/types/src/parser/types.d.ts +0 -24
  667. package/dist/types/src/parser/types.d.ts.map +0 -1
  668. package/dist/types/src/stories/Chat.stories.d.ts +0 -268
  669. package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
  670. package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -5
  671. package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
  672. package/dist/types/src/stories/components/ChatContainer.d.ts +0 -5
  673. package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
  674. package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
  675. package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
  676. package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -5
  677. package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
  678. package/dist/types/src/stories/components/SurfaceContainer.d.ts +0 -8
  679. package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +0 -1
  680. package/dist/types/src/stories/components/TasksContainer.d.ts +0 -5
  681. package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
  682. package/dist/types/src/stories/components/index.d.ts +0 -8
  683. package/dist/types/src/stories/components/index.d.ts.map +0 -1
  684. package/dist/types/src/stories/components/types.d.ts +0 -7
  685. package/dist/types/src/stories/components/types.d.ts.map +0 -1
  686. package/dist/types/src/stories/hooks/index.d.ts +0 -3
  687. package/dist/types/src/stories/hooks/index.d.ts.map +0 -1
  688. package/dist/types/src/stories/hooks/useFlush.d.ts.map +0 -1
  689. package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +0 -3
  690. package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +0 -1
  691. package/dist/types/src/stories/testing/data.d.ts +0 -142
  692. package/dist/types/src/stories/testing/data.d.ts.map +0 -1
  693. package/dist/types/src/stories/testing/index.d.ts +0 -3
  694. package/dist/types/src/stories/testing/index.d.ts.map +0 -1
  695. package/dist/types/src/stories/testing/testing.d.ts +0 -26
  696. package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
  697. package/dist/types/src/testing/test-functions.d.ts +0 -6
  698. package/dist/types/src/testing/test-functions.d.ts.map +0 -1
  699. package/dist/types/src/tools/function.d.ts +0 -5
  700. package/dist/types/src/tools/function.d.ts.map +0 -1
  701. package/dist/types/src/tools/index.d.ts +0 -3
  702. package/dist/types/src/tools/index.d.ts.map +0 -1
  703. package/dist/types/src/tools/openapi.d.ts +0 -10
  704. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  705. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  706. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  707. package/dist/types/src/types/AssistantAction.d.ts +0 -91
  708. package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
  709. package/dist/types/src/types/defs.d.ts +0 -2
  710. package/dist/types/src/types/defs.d.ts.map +0 -1
  711. package/src/capabilities/capabilities.ts +0 -22
  712. package/src/capabilities/intent-resolver.ts +0 -73
  713. package/src/components/BlueprintContainer.tsx +0 -24
  714. package/src/components/ChatContainer.tsx +0 -69
  715. package/src/components/ChatDialog.tsx +0 -68
  716. package/src/components/ChatThread/ChatMessage.tsx +0 -291
  717. package/src/components/ChatThread/ToolBlock.tsx +0 -125
  718. package/src/components/ChatThread/reducer.ts +0 -52
  719. package/src/components/PromptSettings.tsx +0 -89
  720. package/src/components/SequenceContainer.tsx +0 -133
  721. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -33
  722. package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
  723. package/src/components/SequenceEditor/index.ts +0 -5
  724. package/src/components/Timeline/Timeline.stories.tsx +0 -144
  725. package/src/components/Timeline/Timeline.tsx +0 -202
  726. package/src/events.ts +0 -11
  727. package/src/execution-graph/execution-graph.ts +0 -184
  728. package/src/execution-graph/index.ts +0 -5
  729. package/src/functions/analysis.ts +0 -20
  730. package/src/functions/index.ts +0 -7
  731. package/src/functions/list.ts +0 -42
  732. package/src/functions/load.ts +0 -43
  733. package/src/hooks/chat-processor.ts +0 -260
  734. package/src/hooks/errors.ts +0 -8
  735. package/src/hooks/useExecutionGraph.ts +0 -16
  736. package/src/hooks/useResolveRef.ts +0 -33
  737. package/src/parser/filter-generator.test.ts +0 -32
  738. package/src/parser/filter-generator.ts +0 -74
  739. package/src/parser/index.ts +0 -7
  740. package/src/parser/query-parser.test.ts +0 -139
  741. package/src/parser/query-parser.ts +0 -199
  742. package/src/parser/types.ts +0 -34
  743. package/src/shims.d.ts +0 -8
  744. package/src/stories/Chat.stories.tsx +0 -317
  745. package/src/stories/components/BlueprintContainer.tsx +0 -34
  746. package/src/stories/components/ChatContainer.tsx +0 -80
  747. package/src/stories/components/GraphContainer.tsx +0 -118
  748. package/src/stories/components/LoggingContainer.tsx +0 -29
  749. package/src/stories/components/SurfaceContainer.tsx +0 -62
  750. package/src/stories/components/TasksContainer.tsx +0 -51
  751. package/src/stories/components/index.ts +0 -12
  752. package/src/stories/components/types.ts +0 -11
  753. package/src/stories/hooks/index.ts +0 -6
  754. package/src/stories/hooks/useMatcherExtension.ts +0 -45
  755. package/src/stories/testing/data.ts +0 -130
  756. package/src/stories/testing/index.ts +0 -6
  757. package/src/stories/testing/testing.tsx +0 -163
  758. package/src/testing/test-functions.ts +0 -16
  759. package/src/tools/function.ts +0 -49
  760. package/src/tools/index.ts +0 -6
  761. package/src/tools/openapi.test.ts +0 -219
  762. package/src/tools/openapi.ts +0 -341
  763. package/src/types/AssistantAction.ts +0 -54
  764. package/src/types/defs.ts +0 -5
  765. package/src/typings.d.ts +0 -9
  766. /package/src/{stories/hooks → hooks}/useFlush.ts +0 -0
@@ -2,168 +2,161 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import * as Effect from 'effect/Effect';
6
+ import { pipe } from 'effect/Function';
7
+ import * as Option from 'effect/Option';
7
8
 
8
- import {
9
- Capabilities,
10
- LayoutAction,
11
- type PluginContext,
12
- type PromiseIntentDispatcher,
13
- contributes,
14
- createIntent,
15
- } from '@dxos/app-framework';
9
+ import { Capability } from '@dxos/app-framework';
10
+ import { AppCapabilities, AppNode, getActiveSpace, getPersonalSpace } from '@dxos/app-toolkit';
11
+ import { Chat } from '@dxos/assistant-toolkit';
12
+ import { Blueprint, Routine } from '@dxos/compute';
13
+ import { Operation } from '@dxos/compute';
16
14
  import { Sequence } from '@dxos/conductor';
17
- import { Obj } from '@dxos/echo';
15
+ import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
16
+ import { AtomObj } from '@dxos/echo-atom';
18
17
  import { invariant } from '@dxos/invariant';
19
- import { ClientCapabilities } from '@dxos/plugin-client';
20
- import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
21
- import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
22
- import { getActiveSpace, rxFromQuery } from '@dxos/plugin-space';
23
- import { SpaceAction } from '@dxos/plugin-space/types';
24
- import { Filter, Query, type QueryResult, type Space, fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
18
+ import { AutomationCapabilities } from '@dxos/plugin-automation/types';
19
+ import { ClientCapabilities } from '@dxos/plugin-client/types';
20
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
21
+ import { linkedSegment } from '@dxos/react-ui-attention';
25
22
 
26
- import { ASSISTANT_DIALOG, meta } from '../meta';
27
- import { Assistant, AssistantAction } from '../types';
23
+ import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
24
+ import { AssistantOperation } from '#operations';
25
+ import { AssistantCapabilities } from '#types';
28
26
 
29
- export default (context: PluginContext) =>
30
- contributes(Capabilities.AppGraphBuilder, [
31
- createExtension({
32
- id: `${meta.id}/assistant`,
33
- actions: (node) =>
34
- Rx.make((get) =>
35
- pipe(
36
- get(node),
37
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
38
- Option.map(() => [
39
- {
40
- id: `${LayoutAction.UpdateDialog._tag}/assistant/open`,
41
- data: async () => {
42
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
43
- const client = context.getCapability(ClientCapabilities.Client);
44
- const space = getActiveSpace(context) ?? client.spaces.default;
45
- const chat = await getOrCreateChat(dispatch, space);
46
- if (!chat) {
47
- return;
48
- }
27
+ /** Match ECHO objects that are NOT chats. */
28
+ const whenNonChatObject = NodeMatcher.whenAll(
29
+ NodeMatcher.whenEchoObject,
30
+ NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Chat.Chat)),
31
+ );
49
32
 
50
- await dispatch(
51
- createIntent(LayoutAction.UpdateDialog, {
52
- part: 'dialog',
53
- subject: ASSISTANT_DIALOG,
54
- options: {
55
- state: true,
56
- blockAlign: 'end',
57
- props: {
58
- chat,
59
- },
60
- },
61
- }),
62
- );
63
- },
64
- properties: {
65
- label: ['open assistant label', { ns: meta.id }],
66
- icon: 'ph--sparkle--regular',
67
- disposition: 'pin-end',
68
- position: 'hoist',
69
- keyBinding: {
70
- macos: 'shift+meta+k',
71
- windows: 'shift+ctrl+k',
72
- },
73
- },
74
- },
75
- ]),
76
- Option.getOrElse(() => []),
77
- ),
78
- ),
79
- }),
33
+ export default Capability.makeModule(
34
+ Effect.fnUntraced(function* () {
35
+ const capabilities = yield* Capability.Service;
80
36
 
81
- createExtension({
82
- id: `${meta.id}/object-chat-companion`,
83
- connector: (node) => {
84
- let query: QueryResult<Assistant.Chat> | undefined;
85
- return Rx.make((get) => {
86
- const nodeOption = get(node);
87
- if (Option.isNone(nodeOption)) {
88
- return [];
89
- }
37
+ const extensions = yield* Effect.all([
38
+ GraphBuilder.createTypeExtension({
39
+ id: 'root',
40
+ type: Chat.Chat,
41
+ actions: (chat) => {
42
+ return Effect.succeed([
43
+ Node.makeAction({
44
+ id: AssistantOperation.UpdateChatName.meta.key,
45
+ data: () =>
46
+ Effect.gen(function* () {
47
+ // TODO(dmaretskyi): This goes away when composer will have unified operation invocations.
48
+ const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
49
+ const db = Obj.getDatabase(chat);
50
+ invariant(db);
51
+ const runtime = yield* computeRuntime.getRuntime(db.spaceId).runtimeEffect;
52
+ yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }).pipe(Effect.provide(runtime));
53
+ }),
54
+ properties: {
55
+ label: ['chat-update-name.label', { ns: meta.id }],
56
+ icon: 'ph--magic-wand--regular',
57
+ disposition: 'list-item',
58
+ },
59
+ }),
60
+ ]);
61
+ },
62
+ }),
90
63
 
91
- const object = nodeOption.value.data;
92
- if (!Obj.isObject(object)) {
93
- return [];
94
- }
64
+ GraphBuilder.createExtension({
65
+ id: 'assistant',
66
+ match: NodeMatcher.whenRoot,
67
+ actions: () =>
68
+ Effect.succeed([
69
+ Node.makeAction({
70
+ id: 'reset-blueprints',
71
+ data: Effect.fnUntraced(function* () {
72
+ const capabilities = yield* Capability.Service;
73
+ const client = yield* Capability.get(ClientCapabilities.Client);
74
+ const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
75
+ if (!space) {
76
+ return;
77
+ }
78
+ const blueprints = yield* Effect.promise(
79
+ (): Promise<Blueprint.Blueprint[]> => space.db.query(Filter.type(Blueprint.Blueprint)).run(),
80
+ );
81
+ for (const blueprint of blueprints) {
82
+ space.db.remove(blueprint);
83
+ }
84
+ yield* Database.flush();
85
+ }),
86
+ properties: {
87
+ label: ['reset-blueprints.label', { ns: meta.id }],
88
+ icon: 'ph--arrow-clockwise--regular',
89
+ },
90
+ }),
91
+ ]),
92
+ }),
95
93
 
96
- const space = getSpace(object);
97
- if (!space) {
98
- return [];
99
- }
94
+ // Don't show assistant companion when a chat is already the primary object.
95
+ GraphBuilder.createExtension({
96
+ id: 'companion-chat',
97
+ match: whenNonChatObject,
98
+ connector: (object, get) =>
99
+ Effect.gen(function* () {
100
+ const state = get(yield* Capability.get(AssistantCapabilities.State));
101
+ const cache = get(yield* Capability.get(AssistantCapabilities.CompanionChatCache));
102
+ const objectDxn = Obj.getDXN(object).toString();
100
103
 
101
- if (!query) {
102
- query = space.db.query(Query.select(Filter.ids(object.id)).targetOf(Assistant.CompanionTo).source());
103
- }
104
+ // Resolve chat from persisted state or transient cache.
105
+ const chat = pipe(
106
+ Option.fromNullable(state.currentChat[objectDxn]),
107
+ Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryParse(dxnStr))),
108
+ Option.flatMap((dxn) => Option.fromNullable(Obj.getDatabase(object)?.makeRef(dxn))),
109
+ Option.map((ref) => get(AtomObj.make(ref as Ref.Ref<Obj.Unknown>))),
110
+ Option.filter(Obj.isObject),
111
+ Option.orElse(() => pipe(Option.fromNullable(cache[objectDxn]), Option.filter(Obj.isObject))),
112
+ Option.getOrNull,
113
+ );
104
114
 
105
- const chat = get(rxFromQuery(query))[0];
106
- return [
107
- {
108
- id: [fullyQualifiedId(object), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
109
- type: PLANK_COMPANION_TYPE,
110
- data: chat ?? 'assistant-chat',
111
- properties: {
112
- label: ['assistant chat label', { ns: meta.id }],
115
+ return [
116
+ AppNode.makeCompanion({
117
+ id: linkedSegment(ASSISTANT_COMPANION_VARIANT),
118
+ label: ['assistant-chat.label', { ns: meta.id }],
113
119
  icon: 'ph--sparkle--regular',
120
+ data: chat,
114
121
  position: 'hoist',
115
- disposition: 'hidden',
116
- },
117
- },
118
- ];
119
- });
120
- },
121
- }),
122
+ }),
123
+ ];
124
+ }),
125
+ }),
122
126
 
123
- createExtension({
124
- id: `${meta.id}/sequence-logs`,
125
- connector: (node) =>
126
- Rx.make((get) =>
127
- pipe(
128
- get(node),
129
- Option.flatMap((node) => (Obj.instanceOf(Sequence, node.data) ? Option.some(node) : Option.none())),
130
- Option.map((node) => [
131
- {
132
- id: [node.id, 'logs'].join(ATTENDABLE_PATH_SEPARATOR),
133
- type: PLANK_COMPANION_TYPE,
134
- data: 'logs',
135
- properties: {
136
- label: ['sequence logs label', { ns: meta.id }],
137
- icon: 'ph--clock-countdown--regular',
138
- disposition: 'hidden',
139
- },
140
- },
141
- ]),
142
- Option.getOrElse(() => []),
143
- ),
127
+ GraphBuilder.createExtension({
128
+ id: 'invocations',
129
+ match: NodeMatcher.whenAny(
130
+ NodeMatcher.whenEchoTypeMatches(Sequence),
131
+ NodeMatcher.whenEchoTypeMatches(Routine.Routine),
144
132
  ),
145
- }),
146
- ]);
133
+ connector: () =>
134
+ Effect.succeed([
135
+ AppNode.makeCompanion({
136
+ id: 'invocations',
137
+ label: ['invocations.label', { ns: meta.id }],
138
+ icon: 'ph--clock-countdown--regular',
139
+ data: 'invocations',
140
+ }),
141
+ ]),
142
+ }),
147
143
 
148
- // TODO(burdon): Factor out.
149
- const getOrCreateChat = async (
150
- dispatch: PromiseIntentDispatcher,
151
- space: Space,
152
- ): Promise<Assistant.Chat | undefined> => {
153
- // TODO(wittjosiah): This should be possible with a single query.
154
- const { objects: allChats } = await space.db.query(Query.type(Assistant.Chat)).run();
155
- const { objects: relatedChats } = await space.db
156
- .query(Query.type(Assistant.Chat).sourceOf(Assistant.CompanionTo).source())
157
- .run();
158
- const chats = allChats.filter((chat) => !relatedChats.includes(chat));
159
- // console.log('objects', JSON.stringify(objects, null, 2));
160
- if (chats.length > 0) {
161
- // TODO(burdon): Is this the most recent?
162
- return chats[chats.length - 1];
163
- }
144
+ GraphBuilder.createExtension({
145
+ id: 'trace',
146
+ match: NodeMatcher.whenRoot,
147
+ connector: () =>
148
+ Effect.succeed([
149
+ AppNode.makeDeckCompanion({
150
+ id: linkedSegment('trace'),
151
+ label: ['trace.label', { ns: meta.id }],
152
+ icon: 'ph--line-segments--regular',
153
+ data: 'trace' as const,
154
+ position: 'fallback',
155
+ }),
156
+ ]),
157
+ }),
158
+ ]);
164
159
 
165
- const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
166
- invariant(Obj.instanceOf(Assistant.Chat, data?.object));
167
- await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
168
- return data.object;
169
- };
160
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
161
+ }),
162
+ );
@@ -2,31 +2,53 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { ToolId } from '@dxos/ai';
6
- import { Capabilities, contributes } from '@dxos/app-framework';
7
- import { templates } from '@dxos/assistant';
8
- import { Blueprint } from '@dxos/blueprints';
5
+ import * as Effect from 'effect/Effect';
9
6
 
10
- import { analysis, list, load } from '../functions';
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+ import {
10
+ AgentBlueprint,
11
+ AgentBlueprintHandlers,
12
+ AgentHandlers,
13
+ AgentWizardBlueprint,
14
+ AgentWizardHandlers,
15
+ BlueprintManagerBlueprint,
16
+ BlueprintManagerHandlers,
17
+ BrowserBlueprint,
18
+ DatabaseBlueprint,
19
+ DatabaseHandlers,
20
+ DiscordBlueprint,
21
+ LinearBlueprint,
22
+ PlanningBlueprint,
23
+ WebSearchBlueprint,
24
+ MemoryBlueprint,
25
+ AutomationBlueprint,
26
+ } from '@dxos/assistant-toolkit';
11
27
 
12
- const functions = [analysis, list, load];
13
- const tools: string[] = [
14
- 'get-schemas',
15
- 'create-record',
16
- // 'open-item'
17
- ];
28
+ import { AssistantBlueprint } from '#blueprints';
18
29
 
19
- export default () => {
20
- return [
21
- contributes(
22
- Capabilities.BlueprintDefinition,
23
- Blueprint.make({
24
- key: 'dxos.org/blueprint/assistant',
25
- name: 'Assistant',
26
- instructions: templates.system,
27
- tools: [...functions.map((tool) => ToolId.make(tool.name)), ...tools.map((tool) => ToolId.make(tool))],
28
- }),
29
- ),
30
- contributes(Capabilities.Functions, functions),
31
- ];
32
- };
30
+ // TODO(dmaretskyi): Force this type for all Capability.makeModule calls.
31
+ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]> = Capability.makeModule(() =>
32
+ Effect.succeed([
33
+ Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint),
34
+ Capability.contributes(AppCapabilities.BlueprintDefinition, BrowserBlueprint),
35
+ Capability.contributes(AppCapabilities.BlueprintDefinition, DatabaseBlueprint),
36
+ Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
37
+ Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
38
+ Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
39
+ Capability.contributes(AppCapabilities.BlueprintDefinition, AgentBlueprint),
40
+ Capability.contributes(AppCapabilities.BlueprintDefinition, PlanningBlueprint),
41
+ Capability.contributes(AppCapabilities.BlueprintDefinition, MemoryBlueprint),
42
+ Capability.contributes(AppCapabilities.BlueprintDefinition, AutomationBlueprint),
43
+ Capability.contributes(AppCapabilities.BlueprintDefinition, BlueprintManagerBlueprint),
44
+ Capability.contributes(AppCapabilities.BlueprintDefinition, AgentWizardBlueprint),
45
+
46
+ Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
47
+ Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
48
+ Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
49
+ Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
50
+ Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
51
+ ]),
52
+ );
53
+
54
+ export default blueprintDefinition;
@@ -0,0 +1,164 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Registry } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Option from 'effect/Option';
8
+
9
+ import { Capabilities, Capability } from '@dxos/app-framework';
10
+ import { Graph, type Node } from '@dxos/app-graph';
11
+ import { AppCapabilities } from '@dxos/app-toolkit';
12
+ import { Chat } from '@dxos/assistant-toolkit';
13
+ import { Obj } from '@dxos/echo';
14
+ import { log } from '@dxos/log';
15
+ import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck/types';
16
+ import { getLinkedVariant } from '@dxos/react-ui-attention';
17
+ import { byPosition } from '@dxos/util';
18
+
19
+ import { ASSISTANT_COMPANION_VARIANT } from '#meta';
20
+ import { AssistantOperation } from '#operations';
21
+ import { AssistantCapabilities } from '#types';
22
+
23
+ /**
24
+ * Non-React capability that watches deck companion state and provisions transient chats
25
+ * for active planks when the assistant companion is selected.
26
+ */
27
+ export default Capability.makeModule(
28
+ Effect.fnUntraced(function* () {
29
+ const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
30
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
31
+ const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
32
+ const deckStateAtom = yield* Capability.get(DeckCapabilities.State);
33
+ const cacheAtom = yield* Capability.get(AssistantCapabilities.CompanionChatCache);
34
+ const stateAtom = yield* Capability.get(AssistantCapabilities.State);
35
+
36
+ const plankSubs = new Map<string, () => void>();
37
+
38
+ /** Unsubscribe a single plank and remove it from the map. */
39
+ const unsubPlank = (plankId: string) => {
40
+ plankSubs.get(plankId)?.();
41
+ plankSubs.delete(plankId);
42
+ };
43
+
44
+ /** Unsubscribe all per-plank subscriptions. */
45
+ const unsubAllPlanks = () => {
46
+ for (const unsub of plankSubs.values()) {
47
+ unsub();
48
+ }
49
+ plankSubs.clear();
50
+ };
51
+
52
+ /**
53
+ * Attempt to provision for a single plank.
54
+ * Returns true when the plank is resolved (provisioned or already cached)
55
+ * so the caller can tear down the connection subscription.
56
+ */
57
+ const provisionForPlank = (plankId: string, companionVariant: string | undefined): boolean => {
58
+ const node: Node.Node | null = Graph.getNode(graph, plankId).pipe(Option.getOrNull);
59
+ if (!node || !Obj.isObject(node.data) || Obj.instanceOf(Chat.Chat, node.data)) {
60
+ return false;
61
+ }
62
+
63
+ if (resolveEffectiveVariant(graph, plankId, companionVariant) !== ASSISTANT_COMPANION_VARIANT) {
64
+ return false;
65
+ }
66
+
67
+ const object = node.data;
68
+ const companionDxn = Obj.getDXN(object).toString();
69
+ const cache = registry.get(cacheAtom);
70
+ if (cache[companionDxn]) {
71
+ return true;
72
+ }
73
+
74
+ const db = Obj.getDatabase(object);
75
+ if (!db) {
76
+ return false;
77
+ }
78
+
79
+ void operationInvoker
80
+ .invokePromise(AssistantOperation.EnsureCompanionChat, { db, companionTo: object })
81
+ .catch((error) => log.warn('Failed to provision companion chat', { plankId, error }));
82
+
83
+ return false;
84
+ };
85
+
86
+ const provision = () => {
87
+ const deckState: StoredDeckState = registry.get(deckStateAtom);
88
+ const deck = deckState.decks[deckState.activeDeck];
89
+ if (!deck?.companionOpen) {
90
+ unsubAllPlanks();
91
+ return;
92
+ }
93
+
94
+ const plankIds = new Set(deck.solo ? [deck.solo] : deck.active);
95
+
96
+ // Remove subscriptions for planks that are no longer active.
97
+ for (const trackedId of plankSubs.keys()) {
98
+ if (!plankIds.has(trackedId)) {
99
+ unsubPlank(trackedId);
100
+ }
101
+ }
102
+
103
+ for (const plankId of plankIds) {
104
+ const resolved = provisionForPlank(plankId, deck.companionVariant);
105
+
106
+ if (resolved) {
107
+ // Already provisioned — no need to watch connections.
108
+ unsubPlank(plankId);
109
+ } else if (!plankSubs.has(plankId)) {
110
+ // Not yet resolved — subscribe to child connections so we re-try
111
+ // when graph builder extensions add companion nodes (after expand).
112
+ plankSubs.set(
113
+ plankId,
114
+ registry.subscribe(graph.connections(plankId, 'child'), () => {
115
+ if (provisionForPlank(plankId, deck.companionVariant)) {
116
+ unsubPlank(plankId);
117
+ }
118
+ }),
119
+ );
120
+ }
121
+ }
122
+ };
123
+
124
+ provision();
125
+
126
+ const unsub1 = registry.subscribe(deckStateAtom, provision);
127
+ const unsub2 = registry.subscribe(stateAtom, provision);
128
+
129
+ return Capability.contributes(Capabilities.Null, null, () =>
130
+ Effect.sync(() => {
131
+ unsub1();
132
+ unsub2();
133
+ unsubAllPlanks();
134
+ }),
135
+ );
136
+ }),
137
+ );
138
+
139
+ /**
140
+ * Mirrors useSelectedCompanion fallback logic outside of React.
141
+ * Returns the variant that would actually be rendered for a given plank.
142
+ */
143
+ const resolveEffectiveVariant = (
144
+ graph: Graph.BaseGraph,
145
+ plankId: string,
146
+ preferredVariant: string | undefined,
147
+ ): string | undefined => {
148
+ const companions = Graph.getConnections(graph, plankId, 'child')
149
+ .filter((node) => node.type === PLANK_COMPANION_TYPE)
150
+ .toSorted((a, b) => byPosition(a.properties, b.properties));
151
+
152
+ if (companions.length === 0) {
153
+ return undefined;
154
+ }
155
+
156
+ if (preferredVariant) {
157
+ const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
158
+ if (preferred) {
159
+ return getLinkedVariant(preferred.id);
160
+ }
161
+ }
162
+
163
+ return getLinkedVariant(companions[0].id);
164
+ };
@@ -2,20 +2,22 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { AnthropicClient } from '@effect/ai-anthropic';
6
- import { FetchHttpClient } from '@effect/platform';
7
- import { Layer } from 'effect';
5
+ import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
6
+ import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
7
+ import * as Effect from 'effect/Effect';
8
+ import * as Layer from 'effect/Layer';
8
9
 
9
- import { AiServiceRouter } from '@dxos/ai';
10
- import { contributes } from '@dxos/app-framework';
10
+ import { AnthropicResolver } from '@dxos/ai/resolvers';
11
+ import { Capability } from '@dxos/app-framework';
12
+ import { AppCapabilities } from '@dxos/app-toolkit';
11
13
 
12
- import { AssistantCapabilities } from './capabilities';
14
+ export type EdgeModelResolverCapabilities = [Capability.Capability<typeof AppCapabilities.AiModelResolver>];
13
15
 
14
- export default () => {
15
- return [
16
- contributes(
17
- AssistantCapabilities.AiModelResolver,
18
- AiServiceRouter.AnthropicResolver.pipe(
16
+ const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(() =>
17
+ Effect.succeed([
18
+ Capability.contributes(
19
+ AppCapabilities.AiModelResolver,
20
+ AnthropicResolver.make().pipe(
19
21
  Layer.provide(
20
22
  AnthropicClient.layer({
21
23
  // TODO(dmaretskyi): Read endpoint from config/settings.
@@ -25,5 +27,7 @@ export default () => {
25
27
  Layer.provide(FetchHttpClient.layer),
26
28
  ),
27
29
  ),
28
- ];
29
- };
30
+ ]),
31
+ );
32
+
33
+ export default edgeModelResolver;
@@ -2,15 +2,25 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/compute';
6
7
 
7
- export * from './capabilities';
8
-
9
- export const AiService = lazy(() => import('./ai-service'));
10
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
11
- export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
12
- export const EdgeModelResolver = lazy(() => import('./edge-model-resolver'));
13
- export const IntentResolver = lazy(() => import('./intent-resolver'));
14
- export const ReactSurface = lazy(() => import('./react-surface'));
15
- export const Settings = lazy(() => import('./settings'));
16
- export const Toolkit = lazy(() => import('./toolkit'));
8
+ export const AiService = Capability.lazy('AiService', () => import('./ai-service'));
9
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
10
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
11
+ export const CompanionChatProvisioner = Capability.lazy(
12
+ 'CompanionChatProvisioner',
13
+ () => import('./companion-chat-provisioner'),
14
+ );
15
+ export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
16
+ export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
17
+ export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown'));
18
+ export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
19
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
20
+ 'OperationHandler',
21
+ () => import('./operation-handler'),
22
+ );
23
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
24
+ export const Settings = Capability.lazy('Settings', () => import('./settings'));
25
+ export const AssistantState = Capability.lazy('AssistantState', () => import('./state'));
26
+ export const Toolkit = Capability.lazy('Toolkit', () => import('./toolkit'));