@dxos/plugin-assistant 0.8.3-staging.0fa589b → 0.8.4-main.f9ba587

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 (391) hide show
  1. package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs +57 -0
  2. package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +7 -0
  3. package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs +74 -0
  4. package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +7 -0
  5. package/dist/lib/browser/{BlueprintContainer-AT5Y7EXG.mjs → SequenceContainer-6XOYB2RN.mjs} +38 -37
  6. package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +7 -0
  7. package/dist/lib/browser/{TemplateContainer-QQHVOTSI.mjs → TemplateContainer-6ZGGH5T4.mjs} +4 -4
  8. package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +7 -0
  9. package/dist/lib/browser/{ai-client-MK2ZZII2.mjs → ai-client-ML7OQWAO.mjs} +6 -6
  10. package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +7 -0
  11. package/dist/lib/browser/{app-graph-builder-E4H5DCOJ.mjs → app-graph-builder-UJ5NHRGK.mjs} +31 -33
  12. package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-JQFUME3B.mjs → chunk-44HZKIAW.mjs} +5 -5
  14. package/dist/lib/browser/chunk-44HZKIAW.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-XOZ7YMO3.mjs → chunk-LKP65RPA.mjs} +2 -2
  16. package/dist/lib/browser/chunk-NTBGTFTV.mjs +15 -0
  17. package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +7 -0
  18. package/dist/lib/browser/{chunk-BI6AHRNJ.mjs → chunk-OZL4OHTU.mjs} +15 -15
  19. package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-TQ3QW3HJ.mjs +2072 -0
  21. package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +7 -0
  22. package/dist/lib/browser/{chunk-AAOKC2JN.mjs → chunk-TU7UUGWQ.mjs} +68 -73
  23. package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +7 -0
  24. package/dist/lib/browser/chunk-WPZ4UANI.mjs +16 -0
  25. package/dist/lib/browser/index.mjs +53 -68
  26. package/dist/lib/browser/index.mjs.map +3 -3
  27. package/dist/lib/browser/{intent-resolver-3UICTGPM.mjs → intent-resolver-LEAPB55Q.mjs} +10 -11
  28. package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +7 -0
  29. package/dist/lib/browser/meta.json +1 -1
  30. package/dist/lib/browser/{react-surface-LXCNUSZN.mjs → react-surface-TMF7JJA4.mjs} +34 -37
  31. package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +7 -0
  32. package/dist/lib/browser/{settings-XRHXVWGB.mjs → settings-N4HEXADL.mjs} +6 -6
  33. package/dist/lib/browser/settings-N4HEXADL.mjs.map +7 -0
  34. package/dist/lib/browser/types/index.mjs +4 -10
  35. package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs +58 -0
  36. package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +7 -0
  37. package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs +75 -0
  38. package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +7 -0
  39. package/dist/lib/node-esm/{BlueprintContainer-STOJAVML.mjs → SequenceContainer-WWG6IMN3.mjs} +38 -37
  40. package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +7 -0
  41. package/dist/lib/node-esm/{TemplateContainer-SOEWY2ZN.mjs → TemplateContainer-6KRNEMVE.mjs} +4 -4
  42. package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +7 -0
  43. package/dist/lib/node-esm/{ai-client-XGZBJ6BE.mjs → ai-client-2FQ434CT.mjs} +6 -6
  44. package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +7 -0
  45. package/dist/lib/node-esm/{app-graph-builder-3SY5MBIK.mjs → app-graph-builder-MEQ5CYNI.mjs} +31 -33
  46. package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-D3HTVK5D.mjs +2073 -0
  48. package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +7 -0
  49. package/dist/lib/node-esm/{chunk-3UEZLJ2V.mjs → chunk-E6V2RUQ2.mjs} +5 -5
  50. package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +7 -0
  51. package/dist/lib/node-esm/{chunk-UCOFKNKN.mjs → chunk-HVMVHP4R.mjs} +15 -15
  52. package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +7 -0
  53. package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +18 -0
  54. package/dist/lib/node-esm/{chunk-BB2TAT4P.mjs → chunk-KOC6ESG7.mjs} +2 -2
  55. package/dist/lib/node-esm/{chunk-OYN6HLXZ.mjs → chunk-VESVUAOS.mjs} +5 -5
  56. package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-J6UXXZGJ.mjs → chunk-YYUVTTVK.mjs} +68 -73
  58. package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +7 -0
  59. package/dist/lib/node-esm/index.mjs +53 -68
  60. package/dist/lib/node-esm/index.mjs.map +3 -3
  61. package/dist/lib/node-esm/{intent-resolver-E6MXTYAU.mjs → intent-resolver-4ULF3F7U.mjs} +10 -11
  62. package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +7 -0
  63. package/dist/lib/node-esm/meta.json +1 -1
  64. package/dist/lib/node-esm/{react-surface-7HA5EDWY.mjs → react-surface-6XL6SWL2.mjs} +34 -37
  65. package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +7 -0
  66. package/dist/lib/node-esm/{settings-5IAY6BT4.mjs → settings-WQ76EG6O.mjs} +6 -6
  67. package/dist/lib/node-esm/settings-WQ76EG6O.mjs.map +7 -0
  68. package/dist/lib/node-esm/types/index.mjs +4 -10
  69. package/dist/types/src/capabilities/ai-client.d.ts.map +1 -1
  70. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  72. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +2 -2
  73. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  74. package/dist/types/src/components/Chat/Chat.d.ts +42 -0
  75. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
  76. package/dist/types/src/components/Chat/index.d.ts +2 -0
  77. package/dist/types/src/components/Chat/index.d.ts.map +1 -0
  78. package/dist/types/src/components/ChatContainer.d.ts +5 -5
  79. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  80. package/dist/types/src/components/ChatDialog.d.ts +8 -0
  81. package/dist/types/src/components/ChatDialog.d.ts.map +1 -0
  82. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +10 -0
  83. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -0
  84. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +9 -0
  85. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +1 -0
  86. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +11 -0
  87. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -0
  88. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +7 -0
  89. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -0
  90. package/dist/types/src/components/ChatPrompt/events.d.ts +17 -0
  91. package/dist/types/src/components/ChatPrompt/events.d.ts.map +1 -0
  92. package/dist/types/src/components/ChatPrompt/index.d.ts +6 -0
  93. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -0
  94. package/dist/types/src/components/{Thread/ThreadMessage.d.ts → ChatThread/ChatMessage.d.ts} +6 -4
  95. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -0
  96. package/dist/types/src/components/ChatThread/ChatThread.d.ts +25 -0
  97. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
  98. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +232 -0
  99. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
  100. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +18 -0
  101. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -0
  102. package/dist/types/src/components/ChatThread/index.d.ts +2 -0
  103. package/dist/types/src/components/ChatThread/index.d.ts.map +1 -0
  104. package/dist/types/src/components/ChatThread/reducer.d.ts.map +1 -0
  105. package/dist/types/src/components/SequenceContainer.d.ts +9 -0
  106. package/dist/types/src/components/SequenceContainer.d.ts.map +1 -0
  107. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +13 -0
  108. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -0
  109. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +8 -0
  110. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -0
  111. package/dist/types/src/components/SequenceEditor/index.d.ts +2 -0
  112. package/dist/types/src/components/SequenceEditor/index.d.ts.map +1 -0
  113. package/dist/types/src/components/TemplateContainer.d.ts +4 -3
  114. package/dist/types/src/components/TemplateContainer.d.ts.map +1 -1
  115. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +1 -1
  116. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  117. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  118. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
  119. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/Toolbox/Toolbox.d.ts +10 -3
  121. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  122. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -1
  123. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/index.d.ts +6 -12
  125. package/dist/types/src/components/index.d.ts.map +1 -1
  126. package/dist/types/src/events.d.ts.map +1 -1
  127. package/dist/types/src/hooks/{processor.d.ts → chat-processor.d.ts} +27 -17
  128. package/dist/types/src/hooks/chat-processor.d.ts.map +1 -0
  129. package/dist/types/src/hooks/chat-processor.test.d.ts +2 -0
  130. package/dist/types/src/hooks/chat-processor.test.d.ts.map +1 -0
  131. package/dist/types/src/hooks/index.d.ts +4 -4
  132. package/dist/types/src/hooks/index.d.ts.map +1 -1
  133. package/dist/types/src/hooks/useBlueprints.d.ts +4 -0
  134. package/dist/types/src/hooks/useBlueprints.d.ts.map +1 -0
  135. package/dist/types/src/hooks/useChatProcessor.d.ts +20 -6
  136. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  137. package/dist/types/src/hooks/useContextProvider.d.ts +6 -0
  138. package/dist/types/src/hooks/useContextProvider.d.ts.map +1 -1
  139. package/dist/types/src/hooks/useServiceContainer.d.ts +8 -0
  140. package/dist/types/src/hooks/useServiceContainer.d.ts.map +1 -0
  141. package/dist/types/src/queue-logger.d.ts +5 -5
  142. package/dist/types/src/queue-logger.d.ts.map +1 -1
  143. package/dist/types/src/stories/Chat.stories.d.ts +199 -0
  144. package/dist/types/src/stories/Chat.stories.d.ts.map +1 -0
  145. package/dist/types/src/testing/index.d.ts +1 -1
  146. package/dist/types/src/testing/index.d.ts.map +1 -1
  147. package/dist/types/src/testing/test-sequence.d.ts +8 -0
  148. package/dist/types/src/testing/test-sequence.d.ts.map +1 -0
  149. package/dist/types/src/translations.d.ts +61 -113
  150. package/dist/types/src/translations.d.ts.map +1 -1
  151. package/dist/types/src/types/index.d.ts +1 -2
  152. package/dist/types/src/types/index.d.ts.map +1 -1
  153. package/dist/types/src/types/schema.d.ts +71 -0
  154. package/dist/types/src/types/schema.d.ts.map +1 -0
  155. package/dist/types/src/types/service.d.ts +6 -6
  156. package/dist/types/src/types/service.d.ts.map +1 -1
  157. package/dist/types/tsconfig.tsbuildinfo +1 -1
  158. package/package.json +76 -74
  159. package/src/AssistantPlugin.tsx +13 -13
  160. package/src/capabilities/ai-client.ts +3 -6
  161. package/src/capabilities/app-graph-builder.ts +30 -26
  162. package/src/capabilities/capabilities.ts +2 -3
  163. package/src/capabilities/intent-resolver.ts +6 -6
  164. package/src/capabilities/react-surface.tsx +29 -29
  165. package/src/capabilities/settings.ts +3 -3
  166. package/src/components/AssistantSettings/AssistantSettings.tsx +4 -4
  167. package/src/components/Chat/Chat.tsx +348 -0
  168. package/src/{experimental/transcription → components/Chat}/index.ts +2 -0
  169. package/src/components/ChatContainer.tsx +24 -18
  170. package/src/components/ChatDialog.tsx +65 -0
  171. package/src/components/ChatPrompt/ChatActions.tsx +76 -0
  172. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +52 -0
  173. package/src/components/ChatPrompt/ChatReferences.tsx +52 -0
  174. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +26 -0
  175. package/src/components/ChatPrompt/events.ts +12 -0
  176. package/src/components/ChatPrompt/index.ts +10 -0
  177. package/src/components/{Thread/ThreadMessage.tsx → ChatThread/ChatMessage.tsx} +35 -31
  178. package/src/components/ChatThread/ChatThread.stories.tsx +148 -0
  179. package/src/components/ChatThread/ChatThread.tsx +68 -0
  180. package/src/components/{Thread/ToolInvocations.tsx → ChatThread/ToolBlock.tsx} +13 -8
  181. package/src/components/{AmbientDialog → ChatThread}/index.ts +1 -1
  182. package/src/components/PromptSettings.tsx +2 -2
  183. package/src/components/{BlueprintContainer.tsx → SequenceContainer.tsx} +23 -32
  184. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +32 -0
  185. package/src/components/{BlueprintEditor/BlueprintEditor.tsx → SequenceEditor/SequenceEditor.tsx} +7 -7
  186. package/src/components/SequenceEditor/index.ts +5 -0
  187. package/src/components/TemplateContainer.tsx +7 -5
  188. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +2 -2
  189. package/src/components/TemplateEditor/TemplateEditor.tsx +2 -2
  190. package/src/components/TemplateEditor/TemplateForm.stories.tsx +2 -2
  191. package/src/components/TemplateEditor/TemplateForm.tsx +2 -3
  192. package/src/components/Toolbox/Toolbox.stories.tsx +4 -5
  193. package/src/components/Toolbox/Toolbox.tsx +56 -3
  194. package/src/components/index.ts +4 -5
  195. package/src/events.ts +2 -2
  196. package/src/hooks/{processor.test.ts → chat-processor.test.ts} +1 -1
  197. package/src/hooks/{processor.ts → chat-processor.ts} +115 -72
  198. package/src/hooks/index.ts +4 -4
  199. package/src/hooks/useBlueprints.ts +31 -0
  200. package/src/hooks/useChatProcessor.tsx +69 -24
  201. package/src/hooks/useContextProvider.ts +8 -2
  202. package/src/hooks/useServiceContainer.ts +42 -0
  203. package/src/queue-logger.ts +6 -6
  204. package/src/stories/Chat.stories.tsx +269 -0
  205. package/src/testing/index.ts +1 -1
  206. package/src/testing/{test-blueprint.ts → test-sequence.ts} +4 -9
  207. package/src/tools/openapi.test.ts +11 -11
  208. package/src/translations.ts +24 -22
  209. package/src/types/index.ts +1 -2
  210. package/src/types/schema.ts +86 -0
  211. package/dist/lib/browser/AssistantDialog-MQOOR364.mjs +0 -47
  212. package/dist/lib/browser/AssistantDialog-MQOOR364.mjs.map +0 -7
  213. package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs.map +0 -7
  214. package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs +0 -40
  215. package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs.map +0 -7
  216. package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs.map +0 -7
  217. package/dist/lib/browser/ai-client-MK2ZZII2.mjs.map +0 -7
  218. package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs.map +0 -7
  219. package/dist/lib/browser/chunk-AAOKC2JN.mjs.map +0 -7
  220. package/dist/lib/browser/chunk-BI6AHRNJ.mjs.map +0 -7
  221. package/dist/lib/browser/chunk-JO4W3MF7.mjs +0 -2101
  222. package/dist/lib/browser/chunk-JO4W3MF7.mjs.map +0 -7
  223. package/dist/lib/browser/chunk-JQFUME3B.mjs.map +0 -7
  224. package/dist/lib/browser/chunk-MEGMOFJB.mjs +0 -16
  225. package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +0 -96
  226. package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +0 -7
  227. package/dist/lib/browser/chunk-UE3IZ4PN.mjs +0 -15
  228. package/dist/lib/browser/chunk-UE3IZ4PN.mjs.map +0 -7
  229. package/dist/lib/browser/intent-resolver-3UICTGPM.mjs.map +0 -7
  230. package/dist/lib/browser/react-surface-LXCNUSZN.mjs.map +0 -7
  231. package/dist/lib/browser/settings-XRHXVWGB.mjs.map +0 -7
  232. package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs +0 -73
  233. package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs.map +0 -7
  234. package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs +0 -344
  235. package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs.map +0 -7
  236. package/dist/lib/node/ChatContainer-VKYBQHUB.cjs +0 -68
  237. package/dist/lib/node/ChatContainer-VKYBQHUB.cjs.map +0 -7
  238. package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs +0 -58
  239. package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs.map +0 -7
  240. package/dist/lib/node/ai-client-7HNSMUMT.cjs +0 -53
  241. package/dist/lib/node/ai-client-7HNSMUMT.cjs.map +0 -7
  242. package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs +0 -235
  243. package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs.map +0 -7
  244. package/dist/lib/node/chunk-4EEWTDQK.cjs +0 -117
  245. package/dist/lib/node/chunk-4EEWTDQK.cjs.map +0 -7
  246. package/dist/lib/node/chunk-FUAGEO7Q.cjs +0 -52
  247. package/dist/lib/node/chunk-FUAGEO7Q.cjs.map +0 -7
  248. package/dist/lib/node/chunk-HRNIUYVQ.cjs +0 -128
  249. package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +0 -7
  250. package/dist/lib/node/chunk-IKZBMHSW.cjs +0 -184
  251. package/dist/lib/node/chunk-IKZBMHSW.cjs.map +0 -7
  252. package/dist/lib/node/chunk-LMDJEGZ2.cjs +0 -233
  253. package/dist/lib/node/chunk-LMDJEGZ2.cjs.map +0 -7
  254. package/dist/lib/node/chunk-NIDICM57.cjs +0 -2080
  255. package/dist/lib/node/chunk-NIDICM57.cjs.map +0 -7
  256. package/dist/lib/node/chunk-P74TWGMG.cjs +0 -44
  257. package/dist/lib/node/chunk-P74TWGMG.cjs.map +0 -7
  258. package/dist/lib/node/chunk-QGPWY6GW.cjs +0 -34
  259. package/dist/lib/node/chunk-QGPWY6GW.cjs.map +0 -7
  260. package/dist/lib/node/index.cjs +0 -289
  261. package/dist/lib/node/index.cjs.map +0 -7
  262. package/dist/lib/node/intent-resolver-QSWGTKON.cjs +0 -58
  263. package/dist/lib/node/intent-resolver-QSWGTKON.cjs.map +0 -7
  264. package/dist/lib/node/meta.json +0 -1
  265. package/dist/lib/node/react-surface-D3NBYRZ6.cjs +0 -172
  266. package/dist/lib/node/react-surface-D3NBYRZ6.cjs.map +0 -7
  267. package/dist/lib/node/settings-2JXLKYGE.cjs +0 -36
  268. package/dist/lib/node/settings-2JXLKYGE.cjs.map +0 -7
  269. package/dist/lib/node/types/index.cjs +0 -54
  270. package/dist/lib/node/types/index.cjs.map +0 -7
  271. package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs +0 -48
  272. package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs.map +0 -7
  273. package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs.map +0 -7
  274. package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs +0 -41
  275. package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs.map +0 -7
  276. package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs.map +0 -7
  277. package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs.map +0 -7
  278. package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs.map +0 -7
  279. package/dist/lib/node-esm/chunk-34EX6E5Q.mjs +0 -18
  280. package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs.map +0 -7
  281. package/dist/lib/node-esm/chunk-CDAILLCU.mjs +0 -98
  282. package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +0 -7
  283. package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs.map +0 -7
  284. package/dist/lib/node-esm/chunk-OD574YIU.mjs +0 -2102
  285. package/dist/lib/node-esm/chunk-OD574YIU.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs.map +0 -7
  287. package/dist/lib/node-esm/chunk-UCOFKNKN.mjs.map +0 -7
  288. package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs.map +0 -7
  289. package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs.map +0 -7
  290. package/dist/lib/node-esm/settings-5IAY6BT4.mjs.map +0 -7
  291. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +0 -10
  292. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +0 -1
  293. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +0 -8
  294. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +0 -1
  295. package/dist/types/src/components/AmbientDialog/index.d.ts +0 -2
  296. package/dist/types/src/components/AmbientDialog/index.d.ts.map +0 -1
  297. package/dist/types/src/components/AssistantDialog.d.ts +0 -7
  298. package/dist/types/src/components/AssistantDialog.d.ts.map +0 -1
  299. package/dist/types/src/components/BlueprintContainer.d.ts +0 -9
  300. package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
  301. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +0 -13
  302. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +0 -1
  303. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +0 -8
  304. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +0 -1
  305. package/dist/types/src/components/BlueprintEditor/index.d.ts +0 -2
  306. package/dist/types/src/components/BlueprintEditor/index.d.ts.map +0 -1
  307. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -23
  308. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  309. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -13
  310. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  311. package/dist/types/src/components/Prompt/PromptBar.d.ts +0 -16
  312. package/dist/types/src/components/Prompt/PromptBar.d.ts.map +0 -1
  313. package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +0 -9
  314. package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +0 -1
  315. package/dist/types/src/components/Prompt/autocomplete.d.ts +0 -25
  316. package/dist/types/src/components/Prompt/autocomplete.d.ts.map +0 -1
  317. package/dist/types/src/components/Prompt/index.d.ts +0 -3
  318. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  319. package/dist/types/src/components/Prompt/references.d.ts +0 -30
  320. package/dist/types/src/components/Prompt/references.d.ts.map +0 -1
  321. package/dist/types/src/components/Thread/Thread.d.ts +0 -28
  322. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  323. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  324. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  325. package/dist/types/src/components/Thread/ThreadContainer.d.ts +0 -13
  326. package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +0 -1
  327. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +0 -16
  328. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +0 -1
  329. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  330. package/dist/types/src/components/Thread/ToolInvocations.d.ts +0 -13
  331. package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +0 -1
  332. package/dist/types/src/components/Thread/index.d.ts +0 -3
  333. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  334. package/dist/types/src/components/Thread/reducer.d.ts.map +0 -1
  335. package/dist/types/src/experimental/transcription/index.d.ts +0 -1
  336. package/dist/types/src/experimental/transcription/index.d.ts.map +0 -1
  337. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  338. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  339. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  340. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -42
  341. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  342. package/dist/types/src/hooks/useServices.d.ts +0 -7
  343. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  344. package/dist/types/src/stories/Prompt.stories.d.ts +0 -8
  345. package/dist/types/src/stories/Prompt.stories.d.ts.map +0 -1
  346. package/dist/types/src/stories/Query.stories.d.ts +0 -19
  347. package/dist/types/src/stories/Query.stories.d.ts.map +0 -1
  348. package/dist/types/src/stories/Research.stories.d.ts +0 -15
  349. package/dist/types/src/stories/Research.stories.d.ts.map +0 -1
  350. package/dist/types/src/stories/test-data.d.ts +0 -3
  351. package/dist/types/src/stories/test-data.d.ts.map +0 -1
  352. package/dist/types/src/stories/testing.d.ts +0 -12
  353. package/dist/types/src/stories/testing.d.ts.map +0 -1
  354. package/dist/types/src/testing/test-blueprint.d.ts +0 -8
  355. package/dist/types/src/testing/test-blueprint.d.ts.map +0 -1
  356. package/dist/types/src/types/chat.d.ts +0 -23
  357. package/dist/types/src/types/chat.d.ts.map +0 -1
  358. package/dist/types/src/types/types.d.ts +0 -50
  359. package/dist/types/src/types/types.d.ts.map +0 -1
  360. package/src/components/AmbientDialog/AmbientDialog.stories.tsx +0 -84
  361. package/src/components/AmbientDialog/AmbientDialog.tsx +0 -117
  362. package/src/components/AssistantDialog.tsx +0 -37
  363. package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +0 -32
  364. package/src/components/BlueprintEditor/index.ts +0 -5
  365. package/src/components/Prompt/Prompt.stories.tsx +0 -121
  366. package/src/components/Prompt/Prompt.tsx +0 -124
  367. package/src/components/Prompt/PromptBar.stories.tsx +0 -69
  368. package/src/components/Prompt/PromptBar.tsx +0 -105
  369. package/src/components/Prompt/autocomplete.ts +0 -218
  370. package/src/components/Prompt/index.ts +0 -6
  371. package/src/components/Prompt/references.ts +0 -180
  372. package/src/components/Thread/Thread.stories.tsx +0 -201
  373. package/src/components/Thread/Thread.tsx +0 -118
  374. package/src/components/Thread/ThreadContainer.stories.tsx +0 -283
  375. package/src/components/Thread/ThreadContainer.tsx +0 -105
  376. package/src/components/Thread/index.ts +0 -6
  377. package/src/hooks/useMessageQueue.ts +0 -22
  378. package/src/hooks/useServices.ts +0 -28
  379. package/src/stories/Prompt.stories.tsx +0 -60
  380. package/src/stories/Query.stories.tsx +0 -514
  381. package/src/stories/Research.stories.tsx +0 -482
  382. package/src/stories/test-data.ts +0 -128
  383. package/src/stories/testing.ts +0 -60
  384. package/src/types/chat.ts +0 -32
  385. package/src/types/types.ts +0 -48
  386. /package/dist/lib/browser/{chunk-XOZ7YMO3.mjs.map → chunk-LKP65RPA.mjs.map} +0 -0
  387. /package/dist/lib/browser/{chunk-MEGMOFJB.mjs.map → chunk-WPZ4UANI.mjs.map} +0 -0
  388. /package/dist/lib/node-esm/{chunk-34EX6E5Q.mjs.map → chunk-HXKRKIN2.mjs.map} +0 -0
  389. /package/dist/lib/node-esm/{chunk-BB2TAT4P.mjs.map → chunk-KOC6ESG7.mjs.map} +0 -0
  390. /package/dist/types/src/components/{Thread → ChatThread}/reducer.d.ts +0 -0
  391. /package/src/components/{Thread → ChatThread}/reducer.ts +0 -0
@@ -8,21 +8,15 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
8
8
 
9
9
  import { ToolRegistry } from '@dxos/ai';
10
10
  import { useCapability } from '@dxos/app-framework';
11
- import {
12
- type Blueprint,
13
- type BlueprintDefinition,
14
- BlueprintMachine,
15
- createLocalSearchTool,
16
- createExaTool,
17
- createGraphWriterTool,
18
- } from '@dxos/assistant';
11
+ import { createLocalSearchTool, createExaTool, createGraphWriterTool } from '@dxos/assistant';
19
12
  import { getSpace } from '@dxos/client/echo';
13
+ import { type Sequence, type SequenceDefinition, SequenceMachine } from '@dxos/conductor';
20
14
  import { DXN, Key } from '@dxos/echo';
21
15
  import { Toolbar, useTranslation } from '@dxos/react-ui';
22
16
  import { getSelectionSet, useSelectionManager } from '@dxos/react-ui-attention';
23
17
  import { StackItem, type StackItemContentProps } from '@dxos/react-ui-stack';
24
18
 
25
- import { BlueprintEditor } from './BlueprintEditor';
19
+ import { SequenceEditor } from './SequenceEditor';
26
20
  import { AssistantCapabilities } from '../capabilities';
27
21
  import { meta } from '../meta';
28
22
  import { QueueLogger } from '../queue-logger';
@@ -31,7 +25,7 @@ import { QueueLogger } from '../queue-logger';
31
25
  export const EXA_API_KEY = '9c7e17ff-0c85-4cd5-827a-8b489f139e03';
32
26
 
33
27
  // TODO(burdon): Validate.
34
- const parseBlueprint = (text: string): BlueprintDefinition | undefined => {
28
+ const parseSequence = (text: string): SequenceDefinition | undefined => {
35
29
  try {
36
30
  const json = JSON5.parse(text);
37
31
  const { steps } = json;
@@ -41,25 +35,22 @@ const parseBlueprint = (text: string): BlueprintDefinition | undefined => {
41
35
  }
42
36
  };
43
37
 
44
- export const BlueprintContainer = ({
45
- role,
46
- blueprint,
47
- }: Pick<StackItemContentProps, 'role'> & { blueprint: Blueprint }) => {
38
+ export const SequenceContainer = ({ role, sequence }: Pick<StackItemContentProps, 'role'> & { sequence: Sequence }) => {
48
39
  const { t } = useTranslation(meta.id);
49
40
  const aiClient = useCapability(AssistantCapabilities.AiClient);
50
41
  const selectionManager = useSelectionManager();
51
- const [definition, setDefinition] = useState<BlueprintDefinition>();
42
+ const [definition, setDefinition] = useState<SequenceDefinition>();
52
43
  useEffect(() => {
53
44
  setDefinition({
54
- steps: blueprint.steps.map(({ instructions, tools }) => ({ instructions, tools })),
45
+ steps: sequence.steps.map(({ instructions, tools }) => ({ instructions, tools })),
55
46
  });
56
- }, [blueprint]);
47
+ }, [sequence]);
57
48
 
58
49
  const editorRef = useRef<EditorView | undefined>(undefined);
59
50
 
60
51
  // TODO(burdon): Factor out.
61
52
  const toolRegistry = useMemo(() => {
62
- const space = getSpace(blueprint);
53
+ const space = getSpace(sequence);
63
54
  if (!space) {
64
55
  return;
65
56
  }
@@ -73,16 +64,16 @@ export const BlueprintContainer = ({
73
64
  createGraphWriterTool({
74
65
  db: space.db,
75
66
  queue,
76
- schema: [], // TODO(burdon): Get schema from client/blueprint?
67
+ schema: [], // TODO(burdon): Get schema from client/sequence?
77
68
  onDone: async (objects) => {
78
69
  await queue.append(objects);
79
70
  },
80
71
  }),
81
72
  ]);
82
- }, [blueprint]);
73
+ }, [sequence]);
83
74
 
84
- const formatAndSave = useCallback((): BlueprintDefinition | undefined => {
85
- if (!blueprint) {
75
+ const formatAndSave = useCallback((): SequenceDefinition | undefined => {
76
+ if (!sequence) {
86
77
  return;
87
78
  }
88
79
 
@@ -91,7 +82,7 @@ export const BlueprintContainer = ({
91
82
  return;
92
83
  }
93
84
 
94
- const definition = parseBlueprint(text);
85
+ const definition = parseSequence(text);
95
86
  if (!definition) {
96
87
  return;
97
88
  }
@@ -102,19 +93,19 @@ export const BlueprintContainer = ({
102
93
  changes: { from: 0, to: text.length, insert: formatted },
103
94
  });
104
95
 
105
- blueprint.steps.length = 0;
96
+ sequence.steps.length = 0;
106
97
  for (const step of definition.steps) {
107
- blueprint.steps.push({
98
+ sequence.steps.push({
108
99
  id: Key.ObjectId.random(),
109
100
  instructions: step.instructions,
110
101
  tools: step.tools,
111
102
  });
112
103
  }
113
104
 
114
- return blueprint;
115
- }, [blueprint]);
105
+ return sequence;
106
+ }, [sequence]);
116
107
 
117
- // TODO(burdon): Save raw blueprint separately from parsed blueprint? (like Script).
108
+ // TODO(burdon): Save raw sequence separately from parsed sequence? (like Script).
118
109
  const handleSave = useCallback(() => formatAndSave(), [formatAndSave]);
119
110
 
120
111
  const handleRun = useCallback(async () => {
@@ -130,9 +121,9 @@ export const BlueprintContainer = ({
130
121
  return;
131
122
  }
132
123
 
133
- const machine = new BlueprintMachine(toolRegistry, blueprint).setLogger(new QueueLogger(blueprint));
124
+ const machine = new SequenceMachine(toolRegistry, sequence).setLogger(new QueueLogger(sequence));
134
125
  await machine.runToCompletion({ aiClient: aiClient.value, input });
135
- }, [aiClient.value, blueprint, formatAndSave, selectionManager, toolRegistry]);
126
+ }, [aiClient.value, sequence, formatAndSave, selectionManager, toolRegistry]);
136
127
 
137
128
  return (
138
129
  <StackItem.Content role={role} toolbar>
@@ -140,9 +131,9 @@ export const BlueprintContainer = ({
140
131
  <Toolbar.Button onClick={handleSave}>{t('button save')}</Toolbar.Button>
141
132
  <Toolbar.Button onClick={handleRun}>{t('button run')}</Toolbar.Button>
142
133
  </Toolbar.Root>
143
- {definition && <BlueprintEditor ref={editorRef} blueprint={definition} />}
134
+ {definition && <SequenceEditor ref={editorRef} sequence={definition} />}
144
135
  </StackItem.Content>
145
136
  );
146
137
  };
147
138
 
148
- export default BlueprintContainer;
139
+ export default SequenceContainer;
@@ -0,0 +1,32 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import '@dxos-theme';
6
+
7
+ import { type StoryObj, type Meta } from '@storybook/react-vite';
8
+
9
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
10
+
11
+ import { SequenceEditor } from './SequenceEditor';
12
+ import { RESEARCH_SEQUENCE_DEFINITION } from '../../testing';
13
+ import { translations } from '../../translations';
14
+
15
+ const meta: Meta<typeof SequenceEditor> = {
16
+ title: 'plugins/plugin-assistant/SequenceEditor',
17
+ component: SequenceEditor,
18
+ decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'mli-auto max-is-[50rem] justify-center' })],
19
+ parameters: {
20
+ translations,
21
+ },
22
+ };
23
+
24
+ export default meta;
25
+
26
+ type Story = StoryObj<typeof SequenceEditor>;
27
+
28
+ export const Default: Story = {
29
+ args: {
30
+ sequence: RESEARCH_SEQUENCE_DEFINITION,
31
+ },
32
+ };
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { forwardRef, useImperativeHandle } from 'react';
6
6
 
7
- import { BlueprintDefinition } from '@dxos/assistant';
7
+ import { SequenceDefinition } from '@dxos/conductor';
8
8
  import { Type } from '@dxos/echo';
9
9
  import { useThemeContext, type ThemedClassName } from '@dxos/react-ui';
10
10
  import {
@@ -16,16 +16,16 @@ import {
16
16
  } from '@dxos/react-ui-editor';
17
17
  import { mx } from '@dxos/react-ui-theme';
18
18
 
19
- export type BlueprintEditorProps = ThemedClassName<{
20
- blueprint: BlueprintDefinition;
19
+ export type SequenceEditorProps = ThemedClassName<{
20
+ sequence: SequenceDefinition;
21
21
  }>;
22
22
 
23
23
  // TODO(burdon): Factor out JsonEditor.
24
- export const BlueprintEditor = forwardRef<EditorView | undefined, BlueprintEditorProps>(
25
- ({ classNames, blueprint }, forwardedRef) => {
24
+ export const SequenceEditor = forwardRef<EditorView | undefined, SequenceEditorProps>(
25
+ ({ classNames, sequence }, forwardedRef) => {
26
26
  const { themeMode } = useThemeContext();
27
27
  const { parentRef, view } = useTextEditor({
28
- initialValue: JSON.stringify(blueprint, null, 2),
28
+ initialValue: JSON.stringify(sequence, null, 2),
29
29
  extensions: [
30
30
  createBasicExtensions({
31
31
  lineNumbers: true,
@@ -38,7 +38,7 @@ export const BlueprintEditor = forwardRef<EditorView | undefined, BlueprintEdito
38
38
  syntaxHighlighting: true,
39
39
  }),
40
40
  createJsonExtensions({
41
- schema: Type.toJsonSchema(BlueprintDefinition, { strict: true }),
41
+ schema: Type.toJsonSchema(SequenceDefinition, { strict: true }),
42
42
  }),
43
43
  ],
44
44
  });
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './SequenceEditor';
@@ -4,15 +4,17 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { StackItem, type StackItemContentProps } from '@dxos/react-ui-stack';
7
+ import { StackItem } from '@dxos/react-ui-stack';
8
8
 
9
9
  import { TemplateEditor } from './TemplateEditor';
10
10
  import { type TemplateType } from '../types';
11
11
 
12
- export const TemplateContainer = ({
13
- role,
14
- template,
15
- }: Pick<StackItemContentProps, 'role'> & { template: TemplateType }) => {
12
+ export type TemplateContainerProps = {
13
+ role: string;
14
+ template: TemplateType;
15
+ };
16
+
17
+ export const TemplateContainer = ({ role, template }: TemplateContainerProps) => {
16
18
  return (
17
19
  <StackItem.Content role={role} classNames='container-max-width'>
18
20
  <TemplateEditor template={template} />
@@ -4,7 +4,7 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type Meta } from '@storybook/react';
7
+ import { type Meta } from '@storybook/react-vite';
8
8
  import React, { useState } from 'react';
9
9
 
10
10
  import { createSystemPrompt } from '@dxos/artifact';
@@ -14,7 +14,7 @@ import { withClientProvider } from '@dxos/react-client/testing';
14
14
  import { withLayout, withTheme } from '@dxos/storybook-utils';
15
15
 
16
16
  import { TemplateEditor, type TemplateEditorProps } from './TemplateEditor';
17
- import translations from '../../translations';
17
+ import { translations } from '../../translations';
18
18
  import { TemplateType } from '../../types';
19
19
 
20
20
  const TEMPLATE = [
@@ -17,7 +17,7 @@ import {
17
17
  } from '@dxos/react-ui-editor';
18
18
  import { mx } from '@dxos/react-ui-theme';
19
19
 
20
- import { ASSISTANT_PLUGIN } from '../../meta';
20
+ import { meta } from '../../meta';
21
21
  import { type TemplateType } from '../../types';
22
22
 
23
23
  handlebarsLanguage.configure({
@@ -33,7 +33,7 @@ export type TemplateEditorProps = ThemedClassName<{
33
33
  }>;
34
34
 
35
35
  export const TemplateEditor = ({ classNames, template }: TemplateEditorProps) => {
36
- const { t } = useTranslation(ASSISTANT_PLUGIN);
36
+ const { t } = useTranslation(meta.id);
37
37
  const { themeMode } = useThemeContext();
38
38
  const { parentRef } = useTextEditor(
39
39
  () => ({
@@ -4,7 +4,7 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type Meta } from '@storybook/react';
7
+ import { type Meta } from '@storybook/react-vite';
8
8
  import React, { useState } from 'react';
9
9
 
10
10
  import { Obj } from '@dxos/echo';
@@ -13,7 +13,7 @@ import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { withLayout, withTheme } from '@dxos/storybook-utils';
14
14
 
15
15
  import { TemplateForm } from './TemplateForm';
16
- import translations from '../../translations';
16
+ import { translations } from '../../translations';
17
17
  import { TemplateType } from '../../types';
18
18
 
19
19
  const TEMPLATE = [
@@ -10,7 +10,7 @@ import { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';
10
10
  import { isNonNullable } from '@dxos/util';
11
11
 
12
12
  import { TemplateEditor } from './TemplateEditor';
13
- import { ASSISTANT_PLUGIN } from '../../meta';
13
+ import { meta } from '../../meta';
14
14
  import { type TemplateInput, TemplateInputType, type TemplateType } from '../../types';
15
15
 
16
16
  export type TemplateFormProps = {
@@ -20,8 +20,7 @@ export type TemplateFormProps = {
20
20
  };
21
21
 
22
22
  export const TemplateForm = ({ template, commandEditable = true }: TemplateFormProps) => {
23
- const { t } = useTranslation(ASSISTANT_PLUGIN);
24
-
23
+ const { t } = useTranslation(meta.id);
25
24
  usePromptInputs(template);
26
25
 
27
26
  return (
@@ -4,7 +4,7 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type Meta } from '@storybook/react';
7
+ import { type Meta } from '@storybook/react-vite';
8
8
  import React from 'react';
9
9
 
10
10
  import { IntentPlugin, Capabilities, useCapabilities, SettingsPlugin } from '@dxos/app-framework';
@@ -15,10 +15,10 @@ import { ClientPlugin } from '@dxos/plugin-client';
15
15
  import { MapPlugin } from '@dxos/plugin-map';
16
16
  import { SpacePlugin } from '@dxos/plugin-space';
17
17
  import { TablePlugin } from '@dxos/plugin-table';
18
- import { withLayout, withSignals, withTheme } from '@dxos/storybook-utils';
18
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
19
19
 
20
20
  import { Toolbox, type ToolboxProps } from './Toolbox';
21
- import translations from '../../translations';
21
+ import { translations } from '../../translations';
22
22
 
23
23
  const DefaultStory = (props: ToolboxProps) => {
24
24
  const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
@@ -26,7 +26,7 @@ const DefaultStory = (props: ToolboxProps) => {
26
26
  <Toolbox
27
27
  {...props}
28
28
  artifacts={artifactDefinitions}
29
- classNames='w-[30rem] h-[15rem] rounded-md border border-separator py-1'
29
+ classNames='w-[30rem] h-[15rem] rounded-sm border border-separator py-1'
30
30
  />
31
31
  );
32
32
  };
@@ -36,7 +36,6 @@ const meta: Meta<typeof Toolbox> = {
36
36
  component: Toolbox,
37
37
  render: DefaultStory,
38
38
  decorators: [
39
- withSignals,
40
39
  withPluginManager({
41
40
  plugins: [
42
41
  ClientPlugin({
@@ -7,25 +7,64 @@ import React, { useState, useEffect, Fragment, type FC } from 'react';
7
7
  import { parseToolName, type Tool } from '@dxos/ai';
8
8
  import { Capabilities, useCapabilities } from '@dxos/app-framework';
9
9
  import { type ArtifactDefinition } from '@dxos/artifact';
10
+ import { type Blueprint } from '@dxos/assistant';
11
+ import { type Ref } from '@dxos/echo';
10
12
  import { FunctionType } from '@dxos/functions';
11
13
  import { log } from '@dxos/log';
12
14
  import { Filter, type Space, useQuery } from '@dxos/react-client/echo';
13
15
  import { type ThemedClassName } from '@dxos/react-ui';
16
+ import { useTranslation } from '@dxos/react-ui';
14
17
  import { mx } from '@dxos/react-ui-theme';
15
18
 
19
+ import { type ChatProcessor } from '../../hooks';
20
+ import { meta } from '../../meta';
16
21
  import { createToolsFromService } from '../../tools';
17
22
  import { ServiceType } from '../../types';
18
23
 
19
24
  export type ToolboxProps = ThemedClassName<{
25
+ blueprints?: readonly Ref.Ref<Blueprint>[];
20
26
  artifacts?: ArtifactDefinition[];
21
27
  services?: { service: ServiceType; tools: Tool[] }[];
22
28
  functions?: FunctionType[];
29
+ activeBlueprints?: readonly Ref.Ref<Blueprint>[];
23
30
  striped?: boolean;
24
31
  }>;
25
32
 
26
- export const Toolbox = ({ classNames, artifacts, functions, services, striped }: ToolboxProps) => {
33
+ export const Toolbox = ({
34
+ classNames,
35
+ artifacts,
36
+ functions,
37
+ services,
38
+ blueprints,
39
+ activeBlueprints,
40
+ striped,
41
+ }: ToolboxProps) => {
42
+ const { t } = useTranslation(meta.id);
43
+
27
44
  return (
28
45
  <div className={mx('flex flex-col overflow-y-auto box-content', classNames)}>
46
+ {blueprints && blueprints.length > 0 && (
47
+ <Section
48
+ title='Blueprints'
49
+ items={blueprints.map(({ target }) => ({
50
+ name: target?.name ?? '',
51
+ description: target?.description ?? '',
52
+ subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
53
+ }))}
54
+ />
55
+ )}
56
+
57
+ {activeBlueprints && activeBlueprints.length > 0 && (
58
+ <Section
59
+ title='Blueprints'
60
+ items={activeBlueprints.map(({ target }) => ({
61
+ name: target?.name ?? '',
62
+ description: target?.description ?? '',
63
+ subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
64
+ }))}
65
+ />
66
+ )}
67
+
29
68
  {artifacts && artifacts.length > 0 && (
30
69
  <Section
31
70
  title='Artifacts'
@@ -51,6 +90,12 @@ export const Toolbox = ({ classNames, artifacts, functions, services, striped }:
51
90
  {functions && functions.length > 0 && (
52
91
  <Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
53
92
  )}
93
+
94
+ {!blueprints?.length &&
95
+ !activeBlueprints?.length &&
96
+ !artifacts?.length &&
97
+ !services?.length &&
98
+ !functions?.length && <div>{t('no tools')}</div>}
54
99
  </div>
55
100
  );
56
101
  };
@@ -89,7 +134,9 @@ const Section: FC<{
89
134
  );
90
135
  };
91
136
 
92
- export const ToolboxContainer = ({ classNames, space }: ThemedClassName<{ space?: Space }>) => {
137
+ export type ToolboxContainerProps = ThemedClassName<{ space?: Space; processor?: ChatProcessor }>;
138
+
139
+ export const ToolboxContainer = ({ classNames, space, processor }: ToolboxContainerProps) => {
93
140
  // Plugin artifacts.
94
141
  const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
95
142
 
@@ -111,6 +158,12 @@ export const ToolboxContainer = ({ classNames, space }: ThemedClassName<{ space?
111
158
  const functions = useQuery(space, Filter.type(FunctionType));
112
159
 
113
160
  return (
114
- <Toolbox classNames={classNames} artifacts={artifactDefinitions} services={serviceTools} functions={functions} />
161
+ <Toolbox
162
+ classNames={classNames}
163
+ blueprints={processor?.context.blueprints.value}
164
+ artifacts={artifactDefinitions}
165
+ services={serviceTools}
166
+ functions={functions}
167
+ />
115
168
  );
116
169
  };
@@ -4,18 +4,17 @@
4
4
 
5
5
  import { lazy } from 'react';
6
6
 
7
- export * from './AmbientDialog';
8
7
  export * from './AssistantSettings';
9
- export * from './Prompt';
8
+ export * from './Chat';
10
9
  export * from './PromptSettings';
11
10
  export * from './TemplateEditor';
12
- export * from './Thread';
13
11
  export * from './Toolbox';
14
12
 
15
13
  // TODO(burdon): Lazy loading causes issues with Tabster.
16
14
  // Repro: open assistant dialog then close.
17
15
  // https://github.com/microsoft/fluentui/issues/34020
18
- export const AssistantDialog = lazy(() => import('./AssistantDialog'));
19
- export const BlueprintContainer = lazy(() => import('./BlueprintContainer'));
16
+
20
17
  export const ChatContainer = lazy(() => import('./ChatContainer'));
18
+ export const ChatDialog = lazy(() => import('./ChatDialog'));
19
+ export const SequenceContainer = lazy(() => import('./SequenceContainer'));
21
20
  export const TemplateContainer = lazy(() => import('./TemplateContainer'));
package/src/events.ts CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  import { Events } from '@dxos/app-framework';
6
6
 
7
- import { ASSISTANT_PLUGIN } from './meta';
7
+ import { meta } from './meta';
8
8
 
9
9
  export namespace AssistantEvents {
10
- export const AiClientReady = Events.createStateEvent(`${ASSISTANT_PLUGIN}/ai-client-ready`);
10
+ export const AiClientReady = Events.createStateEvent(`${meta.id}/ai-client-ready`);
11
11
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { describe, it } from 'vitest';
6
6
 
7
- import { ChatProcessor } from './processor';
7
+ import { ChatProcessor } from './chat-processor';
8
8
 
9
9
  describe('ChatProcessor', () => {
10
10
  it('should be instantiable', ({ expect }) => {