@dxos/plugin-assistant 0.8.4-main.c1de068 → 0.8.4-main.f5c0578

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 (359) hide show
  1. package/dist/lib/browser/{TemplateContainer-RPJ2LBOB.mjs → BlueprintContainer-H7H4BQ2C.mjs} +11 -9
  2. package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +7 -0
  3. package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-SB7YC2XP.mjs} +37 -14
  4. package/dist/lib/browser/ChatContainer-SB7YC2XP.mjs.map +7 -0
  5. package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-X6PFOQSQ.mjs} +23 -8
  6. package/dist/lib/browser/ChatDialog-X6PFOQSQ.mjs.map +7 -0
  7. package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-627OQ557.mjs} +3 -2
  8. package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +7 -0
  9. package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +22 -0
  10. package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +7 -0
  11. package/dist/lib/browser/{app-graph-builder-JTXBKE7O.mjs → app-graph-builder-ERU5XY2S.mjs} +17 -74
  12. package/dist/lib/browser/app-graph-builder-ERU5XY2S.mjs.map +7 -0
  13. package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +146 -0
  14. package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-OWY4CUQY.mjs → chunk-BVH6VK6Q.mjs} +816 -807
  16. package/dist/lib/browser/chunk-BVH6VK6Q.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  18. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-JBFDQMUJ.mjs +193 -0
  20. package/dist/lib/browser/chunk-JBFDQMUJ.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-LKP65RPA.mjs +20 -0
  22. package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-LKP65RPA.mjs.map} +1 -1
  23. package/dist/lib/browser/{chunk-AEAEKWOC.mjs → chunk-NZDCKQ6W.mjs} +12 -21
  24. package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-QB7OVS6Z.mjs +16 -0
  26. package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-Y66UJUHV.mjs +280 -0
  28. package/dist/lib/browser/chunk-Y66UJUHV.mjs.map +7 -0
  29. package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +24 -0
  30. package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +7 -0
  31. package/dist/lib/browser/index.mjs +98 -51
  32. package/dist/lib/browser/index.mjs.map +4 -4
  33. package/dist/lib/browser/{intent-resolver-5RMMCMXG.mjs → intent-resolver-DGRO2XSG.mjs} +33 -12
  34. package/dist/lib/browser/intent-resolver-DGRO2XSG.mjs.map +7 -0
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/{react-surface-66VY37YQ.mjs → react-surface-LPSIBHEJ.mjs} +45 -32
  37. package/dist/lib/browser/react-surface-LPSIBHEJ.mjs.map +7 -0
  38. package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-ZFNQYSYP.mjs} +6 -5
  39. package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-ZFNQYSYP.mjs.map} +1 -1
  40. package/dist/lib/browser/toolkit-IW4FBLLB.mjs +105 -0
  41. package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +7 -0
  42. package/dist/lib/browser/types/index.mjs +7 -4
  43. package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-VH4EE4CM.mjs} +11 -9
  44. package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +7 -0
  45. package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-7JLMWHMX.mjs} +37 -14
  46. package/dist/lib/node-esm/ChatContainer-7JLMWHMX.mjs.map +7 -0
  47. package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-QDD722F2.mjs} +23 -8
  48. package/dist/lib/node-esm/ChatDialog-QDD722F2.mjs.map +7 -0
  49. package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-EQ5NP2PG.mjs} +3 -2
  50. package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +7 -0
  51. package/dist/lib/node-esm/ai-service-LDD32477.mjs +23 -0
  52. package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +7 -0
  53. package/dist/lib/node-esm/{app-graph-builder-OWSOXFTD.mjs → app-graph-builder-RCT4ANP2.mjs} +17 -74
  54. package/dist/lib/node-esm/app-graph-builder-RCT4ANP2.mjs.map +7 -0
  55. package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +147 -0
  56. package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-SENTQAEO.mjs → chunk-ETS2CIDF.mjs} +816 -807
  58. package/dist/lib/node-esm/chunk-ETS2CIDF.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-2XL6MNPE.mjs → chunk-GAWXJ7K5.mjs} +12 -21
  60. package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs.map +7 -0
  61. package/dist/lib/node-esm/chunk-GENVBE3B.mjs +194 -0
  62. package/dist/lib/node-esm/chunk-GENVBE3B.mjs.map +7 -0
  63. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  64. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  65. package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +22 -0
  66. package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-KOC6ESG7.mjs.map} +1 -1
  67. package/dist/lib/node-esm/chunk-QS6GWTVA.mjs +281 -0
  68. package/dist/lib/node-esm/chunk-QS6GWTVA.mjs.map +7 -0
  69. package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +17 -0
  70. package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +7 -0
  71. package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +25 -0
  72. package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +7 -0
  73. package/dist/lib/node-esm/index.mjs +98 -51
  74. package/dist/lib/node-esm/index.mjs.map +4 -4
  75. package/dist/lib/node-esm/{intent-resolver-YPPYELY3.mjs → intent-resolver-7CKWG7TZ.mjs} +33 -12
  76. package/dist/lib/node-esm/intent-resolver-7CKWG7TZ.mjs.map +7 -0
  77. package/dist/lib/node-esm/meta.json +1 -1
  78. package/dist/lib/node-esm/{react-surface-RJMRBR2M.mjs → react-surface-3EPAE4I4.mjs} +45 -32
  79. package/dist/lib/node-esm/react-surface-3EPAE4I4.mjs.map +7 -0
  80. package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-UI4VQCWW.mjs} +6 -5
  81. package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-UI4VQCWW.mjs.map} +1 -1
  82. package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +106 -0
  83. package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +7 -0
  84. package/dist/lib/node-esm/types/index.mjs +7 -4
  85. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  86. package/dist/types/src/capabilities/ai-service.d.ts +5 -0
  87. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  88. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/blueprint-definition.d.ts +3 -0
  90. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/capabilities.d.ts +11 -0
  92. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/edge-model-resolver.d.ts +5 -0
  94. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/index.d.ts +5 -0
  96. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  98. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/toolkit.d.ts +5 -0
  100. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  101. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  102. package/dist/types/src/components/BlueprintContainer.d.ts +8 -0
  103. package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -0
  104. package/dist/types/src/components/Chat/Chat.d.ts +6 -8
  105. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  106. package/dist/types/src/components/ChatContainer.d.ts +5 -4
  107. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  108. package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
  109. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +13 -0
  110. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  111. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
  112. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  113. package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
  114. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  115. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +4 -3
  116. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
  117. package/dist/types/src/components/ChatThread/ChatThread.d.ts +2 -2
  118. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  119. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +33 -48
  120. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  121. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  122. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  123. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
  124. package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
  125. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
  126. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +1 -1
  127. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
  128. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -1
  129. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  130. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  131. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +2 -1
  132. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  133. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  134. package/dist/types/src/components/Timeline/Timeline.d.ts +42 -0
  135. package/dist/types/src/components/Timeline/Timeline.d.ts.map +1 -0
  136. package/dist/types/src/components/Timeline/Timeline.stories.d.ts +11 -0
  137. package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +1 -0
  138. package/dist/types/src/components/Timeline/index.d.ts +2 -0
  139. package/dist/types/src/components/Timeline/index.d.ts.map +1 -0
  140. package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -7
  141. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  142. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -2
  143. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  144. package/dist/types/src/components/index.d.ts +3 -2
  145. package/dist/types/src/components/index.d.ts.map +1 -1
  146. package/dist/types/src/events.d.ts +1 -1
  147. package/dist/types/src/events.d.ts.map +1 -1
  148. package/dist/types/src/execution-graph/execution-graph.d.ts +21 -0
  149. package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
  150. package/dist/types/src/execution-graph/index.d.ts +2 -0
  151. package/dist/types/src/execution-graph/index.d.ts.map +1 -0
  152. package/dist/types/src/functions/analysis.d.ts +5 -0
  153. package/dist/types/src/functions/analysis.d.ts.map +1 -0
  154. package/dist/types/src/functions/index.d.ts +4 -0
  155. package/dist/types/src/functions/index.d.ts.map +1 -0
  156. package/dist/types/src/functions/list.d.ts +10 -0
  157. package/dist/types/src/functions/list.d.ts.map +1 -0
  158. package/dist/types/src/functions/load.d.ts +8 -0
  159. package/dist/types/src/functions/load.d.ts.map +1 -0
  160. package/dist/types/src/hooks/chat-processor.d.ts +28 -42
  161. package/dist/types/src/hooks/chat-processor.d.ts.map +1 -1
  162. package/dist/types/src/hooks/errors.d.ts +4 -0
  163. package/dist/types/src/hooks/errors.d.ts.map +1 -0
  164. package/dist/types/src/hooks/index.d.ts +6 -1
  165. package/dist/types/src/hooks/index.d.ts.map +1 -1
  166. package/dist/types/src/hooks/presets.d.ts +2 -2
  167. package/dist/types/src/hooks/presets.d.ts.map +1 -1
  168. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +21 -0
  169. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  170. package/dist/types/src/hooks/useChatProcessor.d.ts +7 -14
  171. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  172. package/dist/types/src/hooks/useChatServices.d.ts +5 -4
  173. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  174. package/dist/types/src/hooks/useExecutionGraph.d.ts +7 -0
  175. package/dist/types/src/hooks/useExecutionGraph.d.ts.map +1 -0
  176. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  177. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  178. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  179. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  180. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  181. package/dist/types/src/hooks/useResolveRef.d.ts +4 -0
  182. package/dist/types/src/hooks/useResolveRef.d.ts.map +1 -0
  183. package/dist/types/src/parser/filter-generator.d.ts.map +1 -1
  184. package/dist/types/src/parser/query-parser.d.ts.map +1 -1
  185. package/dist/types/src/stories/Chat.stories.d.ts +68 -49
  186. package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
  187. package/dist/types/src/stories/components/BlueprintContainer.d.ts +5 -0
  188. package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
  189. package/dist/types/src/stories/components/ChatContainer.d.ts +5 -0
  190. package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
  191. package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
  192. package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
  193. package/dist/types/src/stories/components/LoggingContainer.d.ts +5 -0
  194. package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
  195. package/dist/types/src/stories/components/SurfaceContainer.d.ts +8 -0
  196. package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +1 -0
  197. package/dist/types/src/stories/components/TasksContainer.d.ts +5 -0
  198. package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
  199. package/dist/types/src/stories/components/index.d.ts +8 -0
  200. package/dist/types/src/stories/components/index.d.ts.map +1 -0
  201. package/dist/types/src/stories/components/types.d.ts +7 -0
  202. package/dist/types/src/stories/components/types.d.ts.map +1 -0
  203. package/dist/types/src/stories/hooks/index.d.ts +3 -0
  204. package/dist/types/src/stories/hooks/index.d.ts.map +1 -0
  205. package/dist/types/src/stories/hooks/useFlush.d.ts +6 -0
  206. package/dist/types/src/stories/hooks/useFlush.d.ts.map +1 -0
  207. package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +3 -0
  208. package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +1 -0
  209. package/dist/types/src/stories/testing/data.d.ts +142 -0
  210. package/dist/types/src/stories/testing/data.d.ts.map +1 -0
  211. package/dist/types/src/stories/testing/index.d.ts +3 -0
  212. package/dist/types/src/stories/testing/index.d.ts.map +1 -0
  213. package/dist/types/src/stories/testing/testing.d.ts +26 -0
  214. package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
  215. package/dist/types/src/testing/test-functions.d.ts +5 -2
  216. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  217. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  218. package/dist/types/src/tools/function.d.ts.map +1 -1
  219. package/dist/types/src/tools/openapi.d.ts.map +1 -1
  220. package/dist/types/src/translations.d.ts +6 -10
  221. package/dist/types/src/translations.d.ts.map +1 -1
  222. package/dist/types/src/types/Assistant.d.ts +42 -0
  223. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  224. package/dist/types/src/types/AssistantAction.d.ts +91 -0
  225. package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
  226. package/dist/types/src/types/defs.d.ts +2 -0
  227. package/dist/types/src/types/defs.d.ts.map +1 -0
  228. package/dist/types/src/types/index.d.ts +3 -1
  229. package/dist/types/src/types/index.d.ts.map +1 -1
  230. package/dist/types/src/types/service.d.ts +6 -6
  231. package/dist/types/src/types/service.d.ts.map +1 -1
  232. package/dist/types/tsconfig.tsbuildinfo +1 -1
  233. package/package.json +83 -75
  234. package/src/AssistantPlugin.tsx +59 -12
  235. package/src/capabilities/ai-service.ts +28 -0
  236. package/src/capabilities/app-graph-builder.ts +9 -93
  237. package/src/capabilities/blueprint-definition.ts +32 -0
  238. package/src/capabilities/capabilities.ts +22 -0
  239. package/src/capabilities/edge-model-resolver.ts +29 -0
  240. package/src/capabilities/index.ts +6 -0
  241. package/src/capabilities/intent-resolver.ts +24 -9
  242. package/src/capabilities/react-surface.tsx +29 -22
  243. package/src/capabilities/toolkit.ts +106 -0
  244. package/src/components/AssistantSettings/AssistantSettings.tsx +1 -1
  245. package/src/components/BlueprintContainer.tsx +24 -0
  246. package/src/components/Chat/Chat.tsx +77 -64
  247. package/src/components/ChatContainer.tsx +38 -14
  248. package/src/components/ChatDialog.tsx +10 -6
  249. package/src/components/ChatPrompt/ChatOptions.tsx +59 -0
  250. package/src/components/ChatPrompt/ChatReferences.tsx +11 -9
  251. package/src/components/ChatPrompt/index.ts +1 -1
  252. package/src/components/ChatThread/ChatMessage.tsx +141 -118
  253. package/src/components/ChatThread/ChatThread.stories.tsx +236 -104
  254. package/src/components/ChatThread/ChatThread.tsx +2 -2
  255. package/src/components/ChatThread/Link.tsx +23 -0
  256. package/src/components/ChatThread/ToolBlock.tsx +20 -16
  257. package/src/components/SequenceContainer.tsx +2 -1
  258. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +3 -2
  259. package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
  260. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +12 -5
  261. package/src/components/TemplateEditor/TemplateEditor.tsx +15 -12
  262. package/src/components/TemplateEditor/TemplateForm.stories.tsx +12 -5
  263. package/src/components/TemplateEditor/TemplateForm.tsx +5 -3
  264. package/src/components/Timeline/Timeline.stories.tsx +144 -0
  265. package/src/components/Timeline/Timeline.tsx +202 -0
  266. package/src/components/Timeline/index.ts +5 -0
  267. package/src/components/Toolbox/Toolbox.stories.tsx +6 -12
  268. package/src/components/Toolbox/Toolbox.tsx +16 -40
  269. package/src/components/index.ts +2 -5
  270. package/src/events.ts +2 -2
  271. package/src/execution-graph/execution-graph.ts +184 -0
  272. package/src/execution-graph/index.ts +5 -0
  273. package/src/functions/analysis.ts +20 -0
  274. package/src/functions/index.ts +7 -0
  275. package/src/functions/list.ts +42 -0
  276. package/src/functions/load.ts +43 -0
  277. package/src/hooks/chat-processor.ts +123 -177
  278. package/src/hooks/errors.ts +8 -0
  279. package/src/hooks/index.ts +6 -1
  280. package/src/hooks/presets.ts +6 -5
  281. package/src/hooks/useBlueprintRegistry.ts +79 -0
  282. package/src/hooks/useChatProcessor.ts +21 -83
  283. package/src/hooks/useChatServices.ts +37 -54
  284. package/src/hooks/useExecutionGraph.ts +16 -0
  285. package/src/hooks/useOnline.ts +10 -0
  286. package/src/hooks/usePresets.ts +45 -0
  287. package/src/hooks/useReferencesProvider.ts +11 -9
  288. package/src/hooks/useResolveRef.ts +33 -0
  289. package/src/parser/filter-generator.ts +6 -13
  290. package/src/parser/query-parser.ts +1 -1
  291. package/src/queue-logger.ts +5 -5
  292. package/src/stories/Chat.stories.tsx +238 -299
  293. package/src/stories/components/BlueprintContainer.tsx +34 -0
  294. package/src/stories/components/ChatContainer.tsx +80 -0
  295. package/src/stories/components/GraphContainer.tsx +118 -0
  296. package/src/stories/components/LoggingContainer.tsx +29 -0
  297. package/src/stories/components/SurfaceContainer.tsx +62 -0
  298. package/src/stories/components/TasksContainer.tsx +51 -0
  299. package/src/stories/components/index.ts +12 -0
  300. package/src/stories/components/types.ts +11 -0
  301. package/src/stories/hooks/index.ts +6 -0
  302. package/src/stories/hooks/useFlush.ts +35 -0
  303. package/src/stories/hooks/useMatcherExtension.ts +45 -0
  304. package/src/stories/testing/data.ts +130 -0
  305. package/src/stories/testing/index.ts +6 -0
  306. package/src/stories/testing/testing.tsx +163 -0
  307. package/src/testing/test-functions.ts +8 -3
  308. package/src/testing/test-sequence.ts +1 -1
  309. package/src/tools/function.ts +4 -1
  310. package/src/tools/openapi.test.ts +7 -5
  311. package/src/tools/openapi.ts +4 -1
  312. package/src/translations.ts +8 -10
  313. package/src/types/Assistant.ts +62 -0
  314. package/src/types/AssistantAction.ts +54 -0
  315. package/src/types/defs.ts +5 -0
  316. package/src/types/index.ts +4 -1
  317. package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
  318. package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
  319. package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
  320. package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
  321. package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
  322. package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
  323. package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
  324. package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
  325. package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
  326. package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
  327. package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
  328. package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
  329. package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
  330. package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
  331. package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
  332. package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
  333. package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
  334. package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
  335. package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
  336. package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
  337. package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
  338. package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
  339. package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
  340. package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
  341. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
  342. package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
  343. package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
  344. package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
  345. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
  346. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
  347. package/dist/types/src/components/TemplateContainer.d.ts +0 -8
  348. package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
  349. package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
  350. package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
  351. package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
  352. package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
  353. package/dist/types/src/types/schema.d.ts +0 -88
  354. package/dist/types/src/types/schema.d.ts.map +0 -1
  355. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
  356. package/src/components/TemplateContainer.tsx +0 -24
  357. package/src/hooks/chat-processor.test.ts +0 -16
  358. package/src/hooks/useBlueprints.ts +0 -57
  359. package/src/types/schema.ts +0 -95
@@ -7,15 +7,16 @@ import '@dxos-theme';
7
7
  import { type Meta } from '@storybook/react-vite';
8
8
  import React, { useState } from 'react';
9
9
 
10
- import { Template } from '@dxos/blueprints';
10
+ import { Blueprint, Template } from '@dxos/blueprints';
11
11
  import { useClient } from '@dxos/react-client';
12
12
  import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { withLayout, withTheme } from '@dxos/storybook-utils';
14
14
  import { trim } from '@dxos/util';
15
15
 
16
- import { TemplateForm } from './TemplateForm';
17
16
  import { translations } from '../../translations';
18
17
 
18
+ import { TemplateForm } from './TemplateForm';
19
+
19
20
  const TEMPLATE = trim`
20
21
  You are a machine that is an expert chess player.
21
22
  The move history of the current game is: {{history}}
@@ -28,14 +29,20 @@ const TEMPLATE = trim`
28
29
 
29
30
  const DefaultStory = () => {
30
31
  const client = useClient();
31
- const [template] = useState(() => {
32
+ const [blueprint] = useState(() => {
32
33
  const space = client.spaces.default;
33
- return space.db.add(Template.make({ source: TEMPLATE }));
34
+ return space.db.add(
35
+ Blueprint.make({
36
+ key: 'example.com/blueprint/test',
37
+ name: 'Test',
38
+ instructions: Template.make({ source: TEMPLATE }),
39
+ }),
40
+ );
34
41
  });
35
42
 
36
43
  return (
37
44
  <div role='none' className='flex w-[40rem] border border-separator overflow-hidden'>
38
- <TemplateForm template={template} />
45
+ <TemplateForm id={blueprint.id} template={blueprint.instructions} />
39
46
  </div>
40
47
  );
41
48
  };
@@ -10,16 +10,18 @@ import { Input, Select, useTranslation } from '@dxos/react-ui';
10
10
  import { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';
11
11
  import { isNonNullable } from '@dxos/util';
12
12
 
13
- import { TemplateEditor } from './TemplateEditor';
14
13
  import { meta } from '../../meta';
15
14
 
15
+ import { TemplateEditor } from './TemplateEditor';
16
+
16
17
  export type TemplateFormProps = {
18
+ id: string;
17
19
  template: Template.Template;
18
20
  schema?: Schema.Schema<any, any, any>;
19
21
  commandEditable?: boolean;
20
22
  };
21
23
 
22
- export const TemplateForm = ({ template, commandEditable = true }: TemplateFormProps) => {
24
+ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateFormProps) => {
23
25
  const { t } = useTranslation(meta.id);
24
26
  usePromptInputs(template);
25
27
 
@@ -41,7 +43,7 @@ export const TemplateForm = ({ template, commandEditable = true }: TemplateFormP
41
43
  </div>
42
44
  )} */}
43
45
 
44
- <TemplateEditor template={template} classNames={[attentionSurface, 'min-h-[120px]']} />
46
+ <TemplateEditor id={id} template={template} classNames={[attentionSurface, 'min-h-[120px]']} />
45
47
 
46
48
  {(template.inputs?.length ?? 0) > 0 && (
47
49
  <div className='grid grid-cols-[10rem_10rem_1fr] gap-1 items-center'>
@@ -0,0 +1,144 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import '@dxos-theme';
6
+
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
+ import React, { useRef, useState } from 'react';
9
+
10
+ import { LogLevel } from '@dxos/log';
11
+ import { faker } from '@dxos/random';
12
+ import { Button, Toolbar, useInterval } from '@dxos/react-ui';
13
+ import { ScrollContainer, type ScrollController } from '@dxos/react-ui-components';
14
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
15
+
16
+ import { type Branch, type Commit, IconType, Timeline } from './Timeline';
17
+
18
+ faker.seed(1);
19
+
20
+ const meta: Meta<typeof Timeline> = {
21
+ title: 'plugins/plugin-assistant/Timeline',
22
+ component: Timeline,
23
+ decorators: [withTheme, withLayout({ fullscreen: true })],
24
+ };
25
+
26
+ export default meta;
27
+
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ export const Default: Story = {
31
+ args: {
32
+ branches: [{ name: 'main' }, { name: 'feature-a' }, { name: 'feature-b' }, { name: 'feature-c' }],
33
+ commits: [
34
+ { id: 'c1', message: faker.lorem.paragraph(), branch: 'main' },
35
+ { id: 'c2', message: faker.lorem.paragraph(), branch: 'main', parent: 'c1' },
36
+ { id: 'c3', message: faker.lorem.paragraph(), branch: 'feature-a', parent: 'c2' },
37
+ { id: 'c4', message: faker.lorem.paragraph(), branch: 'main', parent: 'c2' },
38
+ { id: 'c5', message: faker.lorem.paragraph(), branch: 'feature-b', parent: 'c2' },
39
+ { id: 'c6', message: faker.lorem.paragraph(), branch: 'feature-a', parent: 'c3' },
40
+ { id: 'c7', message: faker.lorem.paragraph(), branch: 'feature-a', parent: 'c6' },
41
+ { id: 'c8', message: faker.lorem.paragraph(), branch: 'feature-c', parent: 'c6' },
42
+ { id: 'c9', message: faker.lorem.paragraph(), branch: 'main', parent: 'c4' },
43
+ ],
44
+ },
45
+ };
46
+
47
+ export const Linear: Story = {
48
+ args: {
49
+ branches: [{ name: 'main' }],
50
+ commits: [
51
+ { id: 'c1', message: faker.lorem.paragraph(), branch: 'main' },
52
+ { id: 'c2', message: faker.lorem.paragraph(), branch: 'main', parent: 'c1' },
53
+ { id: 'c3', message: faker.lorem.paragraph(), branch: 'main', parent: 'c2' },
54
+ { id: 'c4', message: faker.lorem.paragraph(), branch: 'main', parent: 'c3' },
55
+ ],
56
+ },
57
+ };
58
+
59
+ export const Empty: Story = {
60
+ args: {
61
+ branches: [],
62
+ commits: [],
63
+ },
64
+ };
65
+
66
+ export const Random: Story = {
67
+ render: () => {
68
+ const [branches, setBranches] = useState<Branch[]>([{ name: 'main' }]);
69
+ const [commits, setCommits] = useState<Commit[]>([
70
+ {
71
+ id: faker.string.uuid(),
72
+ branch: branches[0].name,
73
+ message: faker.lorem.paragraph(),
74
+ },
75
+ ]);
76
+ const lastCommit = useRef<string | undefined>(commits[0].id);
77
+ const lastBranch = useRef<string>(branches[0].name);
78
+
79
+ const [running, setRunning] = useState(true);
80
+ useInterval(
81
+ () => {
82
+ if (!running) {
83
+ return;
84
+ }
85
+
86
+ const p = Math.random();
87
+ if (p < 0.15 && branches.length < 6) {
88
+ const branch = { name: faker.lorem.word() } satisfies Branch;
89
+ setBranches((branches) => [...branches, branch]);
90
+ lastBranch.current = branch.name;
91
+ } else if (p < 0.4) {
92
+ const branch = branches[Math.floor(Math.random() * branches.length)];
93
+ lastBranch.current = branch.name;
94
+ }
95
+
96
+ const commit = {
97
+ id: faker.string.uuid(),
98
+ branch: lastBranch.current,
99
+ icon: faker.helpers.arrayElement([
100
+ IconType.WARN,
101
+ IconType.CHECK,
102
+ IconType.ROCKET,
103
+ IconType.X,
104
+ IconType.FLAG,
105
+ IconType.TIMER,
106
+ IconType.USER,
107
+ IconType.USER_INTERACTION,
108
+ IconType.AGENT,
109
+ ]),
110
+ level: faker.helpers.arrayElement([
111
+ LogLevel.TRACE,
112
+ LogLevel.DEBUG,
113
+ LogLevel.VERBOSE,
114
+ LogLevel.INFO,
115
+ LogLevel.WARN,
116
+ LogLevel.ERROR,
117
+ ]),
118
+ message: faker.lorem.paragraph(),
119
+ parent: lastCommit.current,
120
+ } satisfies Commit;
121
+ lastCommit.current = commit.id;
122
+ setCommits((commits) => [...commits, commit]);
123
+ },
124
+ 500,
125
+ [running],
126
+ );
127
+
128
+ const scrollerRef = useRef<ScrollController>(null);
129
+
130
+ return (
131
+ <div className='flex flex-col is-full bs-full overflow-hidden'>
132
+ <Toolbar.Root>
133
+ <Button onClick={() => setRunning(true)}>Start</Button>
134
+ <Button onClick={() => setRunning(false)}>Stop</Button>
135
+ <Button onClick={() => scrollerRef.current?.scrollToTop()}>Top</Button>
136
+ <Button onClick={() => scrollerRef.current?.scrollToBottom()}>Bottom</Button>
137
+ </Toolbar.Root>
138
+ <ScrollContainer ref={scrollerRef} classNames='border border-separator'>
139
+ <Timeline branches={branches} commits={commits} />
140
+ </ScrollContainer>
141
+ </div>
142
+ );
143
+ },
144
+ };
@@ -0,0 +1,202 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { Fragment, useMemo } from 'react';
6
+
7
+ import { LogLevel } from '@dxos/log';
8
+ import { Icon, type ThemedClassName } from '@dxos/react-ui';
9
+ import { mx } from '@dxos/react-ui-theme';
10
+ import { trim } from '@dxos/util';
11
+
12
+ const lineHeight = 24;
13
+ const columnWidth = 24;
14
+ const nodeRadius = 5;
15
+ const lineStyle = 'stroke-1';
16
+
17
+ const colors = [
18
+ { stroke: 'stroke-orange-500', hover: 'group-hover:fill-orange-500' },
19
+ { stroke: 'stroke-sky-500', hover: 'group-hover:fill-sky-500' },
20
+ { stroke: 'stroke-green-500', hover: 'group-hover:fill-green-500' },
21
+ { stroke: 'stroke-fuchsia-500', hover: 'group-hover:fill-fuchsia-500' },
22
+ { stroke: 'stroke-cyan-500', hover: 'group-hover:fill-cyan-500' },
23
+ { stroke: 'stroke-emerald-500', hover: 'group-hover:fill-emerald-500' },
24
+ { stroke: 'stroke-violet-500', hover: 'group-hover:fill-violet-500' },
25
+ { stroke: 'stroke-teal-500', hover: 'group-hover:fill-teal-500' },
26
+ ];
27
+
28
+ export enum IconType {
29
+ // General status.
30
+ WARN = 'ph--warning-circle--regular',
31
+ CHECK = 'ph--check-circle--regular',
32
+ ROCKET = 'ph--rocket--regular',
33
+ X = 'ph--x-circle--regular',
34
+ FLAG = 'ph--flag--regular',
35
+ TIMER = 'ph--timer--regular',
36
+
37
+ // Interactions.
38
+ USER = 'ph--user--regular',
39
+ USER_INTERACTION = 'ph--user-sound--regular',
40
+ AGENT = 'ph--robot--regular',
41
+ THINK = 'ph--brain--regular',
42
+ LINK = 'ph--link--regular',
43
+ TOOL = 'ph--wrench--regular',
44
+ }
45
+
46
+ const levelColors: Record<LogLevel, string> = {
47
+ [LogLevel.TRACE]: 'text-gray-500',
48
+ [LogLevel.DEBUG]: 'text-gray-500',
49
+ [LogLevel.VERBOSE]: 'text-gray-500',
50
+ [LogLevel.INFO]: 'text-green-500',
51
+ [LogLevel.WARN]: 'text-orange-500',
52
+ [LogLevel.ERROR]: 'text-red-500',
53
+ };
54
+
55
+ export type Commit = {
56
+ id: string;
57
+ parent?: string;
58
+ branch: string;
59
+ icon?: string;
60
+ level?: LogLevel;
61
+ message: string;
62
+ timestamp?: Date;
63
+ tags?: string[];
64
+ };
65
+
66
+ export type Branch = {
67
+ name: string;
68
+ };
69
+
70
+ export type Span = {
71
+ start: number;
72
+ end: number;
73
+ parent?: number;
74
+ };
75
+
76
+ export type TimelineProps = ThemedClassName<{
77
+ branches: Branch[];
78
+ commits: Commit[];
79
+ showIcon?: boolean;
80
+ }>;
81
+
82
+ // TODO(burdon): Reuse in toolCall messages.
83
+ // TODO(burdon): Key up/down; selected.
84
+ export const Timeline = ({ classNames, branches, commits, showIcon = true }: TimelineProps) => {
85
+ const spans = useMemo(() => {
86
+ const spans = new Map<string, Span>();
87
+ branches.forEach((branch) => {
88
+ spans.set(branch.name, { start: -1, end: -1 });
89
+ });
90
+
91
+ commits.forEach((commit, index) => {
92
+ const span = spans.get(commit.branch);
93
+ if (span) {
94
+ if (span.start === -1) {
95
+ const parentIndex = commit.parent ? commits.findIndex((c) => c.id === commit.parent) : 0;
96
+ span.start = parentIndex;
97
+ span.parent = commit.parent
98
+ ? branches.findIndex((branch) => branch.name === commits[parentIndex].branch)
99
+ : undefined;
100
+ }
101
+ span.end = index;
102
+ }
103
+ });
104
+
105
+ return spans;
106
+ }, [commits, branches]);
107
+
108
+ return (
109
+ <div className={mx('flex flex-col is-full', classNames)}>
110
+ {commits.map((commit, index) => {
111
+ return (
112
+ <div
113
+ key={commit.id}
114
+ className='group flex shrink-0 items-center gap-2 overflow-hidden hover:bg-hoverSurface'
115
+ style={{ height: `${lineHeight}px` }}
116
+ >
117
+ <svg width={branches.length * columnWidth} height={lineHeight} className='shrink-0'>
118
+ {[...branches].reverse().map((branch, _j) => {
119
+ const j = branches.length - 1 - _j;
120
+ const span = spans.get(branch.name);
121
+ const color = colors[j % colors.length];
122
+ if (!span) {
123
+ return null;
124
+ }
125
+
126
+ return (
127
+ <Fragment key={j}>
128
+ {/* Upper */}
129
+ {index !== 0 && span.start !== -1 && span.start < index && span.end >= index && (
130
+ <line
131
+ x1={j * columnWidth + columnWidth / 2}
132
+ y1={0}
133
+ x2={j * columnWidth + columnWidth / 2}
134
+ y2={lineHeight / 2}
135
+ className={mx(lineStyle, color.stroke)}
136
+ />
137
+ )}
138
+ {/* Lower */}
139
+ {span.end !== -1 && (span.start < index || span.start === 0) && index < span.end && (
140
+ <line
141
+ x1={j * columnWidth + columnWidth / 2}
142
+ y1={lineHeight / 2}
143
+ x2={j * columnWidth + columnWidth / 2}
144
+ y2={lineHeight}
145
+ className={mx(lineStyle, color.stroke)}
146
+ />
147
+ )}
148
+ {/* Arc to parent */}
149
+ {span.start === index && span.parent !== undefined && span.parent !== -1 && (
150
+ <path
151
+ d={trim`
152
+ M ${0.5 + span.parent * columnWidth + columnWidth / 2} ${lineHeight / 2}
153
+ L ${j * columnWidth + columnWidth / 4} ${lineHeight / 2}
154
+ A ${lineHeight / 4} ${lineHeight / 4} 0 0 1 ${j * columnWidth + columnWidth / 2} ${(lineHeight * 3) / 4}
155
+ L ${j * columnWidth + columnWidth / 2} ${lineHeight}
156
+ `}
157
+ className={mx(lineStyle, color.stroke)}
158
+ fill='none'
159
+ />
160
+ )}
161
+ {branch.name === commit.branch && (
162
+ <circle
163
+ cx={j * columnWidth + columnWidth / 2}
164
+ cy={lineHeight / 2}
165
+ r={nodeRadius}
166
+ className={mx(lineStyle, color.stroke, color.hover)}
167
+ />
168
+ )}
169
+ </Fragment>
170
+ );
171
+ })}
172
+ {branches.map((branch, j) => {
173
+ const color = colors[j % colors.length];
174
+ return (
175
+ branch.name === commit.branch && (
176
+ <circle
177
+ key={j}
178
+ cx={j * columnWidth + columnWidth / 2}
179
+ cy={lineHeight / 2}
180
+ r={nodeRadius}
181
+ className={mx(lineStyle, color.stroke, color.hover)}
182
+ />
183
+ )
184
+ );
185
+ })}
186
+ </svg>
187
+ {showIcon && (
188
+ <div className='flex shrink-0 w-6 justify-center'>
189
+ {commit.icon && (
190
+ <Icon icon={commit.icon} classNames={mx(commit.level && levelColors[commit.level])} size={4} />
191
+ )}
192
+ </div>
193
+ )}
194
+ <div className='text-sm truncate cursor-pointer text-subdued group-hover:text-baseText'>
195
+ {commit.message}
196
+ </div>
197
+ </div>
198
+ );
199
+ })}
200
+ </div>
201
+ );
202
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './Timeline';
@@ -7,7 +7,7 @@ import '@dxos-theme';
7
7
  import { type Meta } from '@storybook/react-vite';
8
8
  import React from 'react';
9
9
 
10
- import { IntentPlugin, Capabilities, useCapabilities, SettingsPlugin } from '@dxos/app-framework';
10
+ import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
11
11
  import { withPluginManager } from '@dxos/app-framework/testing';
12
12
  import { capabilities } from '@dxos/assistant-testing';
13
13
  import { ChessPlugin } from '@dxos/plugin-chess';
@@ -17,18 +17,12 @@ import { SpacePlugin } from '@dxos/plugin-space';
17
17
  import { TablePlugin } from '@dxos/plugin-table';
18
18
  import { withLayout, withTheme } from '@dxos/storybook-utils';
19
19
 
20
- import { Toolbox, type ToolboxProps } from './Toolbox';
21
20
  import { translations } from '../../translations';
22
21
 
22
+ import { Toolbox, type ToolboxProps } from './Toolbox';
23
+
23
24
  const DefaultStory = (props: ToolboxProps) => {
24
- const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
25
- return (
26
- <Toolbox
27
- {...props}
28
- artifacts={artifactDefinitions}
29
- classNames='w-[30rem] h-[15rem] rounded-sm border border-separator py-1'
30
- />
31
- );
25
+ return <Toolbox {...props} classNames='w-[30rem] h-[15rem] rounded-sm border border-separator py-1' />;
32
26
  };
33
27
 
34
28
  const meta: Meta<typeof Toolbox> = {
@@ -39,7 +33,7 @@ const meta: Meta<typeof Toolbox> = {
39
33
  withPluginManager({
40
34
  plugins: [
41
35
  ClientPlugin({
42
- onClientInitialized: async (_, client) => {
36
+ onClientInitialized: async ({ client }) => {
43
37
  await client.halo.createIdentity();
44
38
  },
45
39
  }),
@@ -65,4 +59,4 @@ export default meta;
65
59
 
66
60
  type Story = Meta<typeof Toolbox>;
67
61
 
68
- export const Default: Story = {};
62
+ export const Default = {} satisfies Story;
@@ -2,11 +2,9 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { useState, useEffect, Fragment, type FC } from 'react';
5
+ import React, { type FC, Fragment, useEffect, useState } from 'react';
6
6
 
7
- import { parseToolName, type Tool } from '@dxos/ai';
8
- import { Capabilities, useCapabilities } from '@dxos/app-framework';
9
- import { type ArtifactDefinition } from '@dxos/blueprints';
7
+ import { type Tool } from '@dxos/ai';
10
8
  import { type Blueprint } from '@dxos/blueprints';
11
9
  import { type Ref } from '@dxos/echo';
12
10
  import { FunctionType } from '@dxos/functions';
@@ -16,29 +14,20 @@ import { type ThemedClassName } from '@dxos/react-ui';
16
14
  import { useTranslation } from '@dxos/react-ui';
17
15
  import { mx } from '@dxos/react-ui-theme';
18
16
 
19
- import { type ChatProcessor } from '../../hooks';
17
+ import { type AiChatProcessor } from '../../hooks';
20
18
  import { meta } from '../../meta';
21
19
  import { createToolsFromService } from '../../tools';
22
20
  import { ServiceType } from '../../types';
23
21
 
24
22
  export type ToolboxProps = ThemedClassName<{
25
- blueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
26
- artifacts?: ArtifactDefinition[];
27
23
  services?: { service: ServiceType; tools: Tool[] }[];
28
24
  functions?: FunctionType[];
25
+ // TODO(burdon): Combine into single array.
26
+ blueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
29
27
  activeBlueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
30
- striped?: boolean;
31
28
  }>;
32
29
 
33
- export const Toolbox = ({
34
- classNames,
35
- artifacts,
36
- functions,
37
- services,
38
- blueprints,
39
- activeBlueprints,
40
- striped,
41
- }: ToolboxProps) => {
30
+ export const Toolbox = ({ classNames, functions, services, blueprints, activeBlueprints }: ToolboxProps) => {
42
31
  const { t } = useTranslation(meta.id);
43
32
 
44
33
  return (
@@ -49,7 +38,7 @@ export const Toolbox = ({
49
38
  items={blueprints.map(({ target }) => ({
50
39
  name: target?.name ?? '',
51
40
  description: target?.description ?? '',
52
- subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
41
+ subitems: target?.tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
53
42
  }))}
54
43
  />
55
44
  )}
@@ -60,18 +49,7 @@ export const Toolbox = ({
60
49
  items={activeBlueprints.map(({ target }) => ({
61
50
  name: target?.name ?? '',
62
51
  description: target?.description ?? '',
63
- subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
64
- }))}
65
- />
66
- )}
67
-
68
- {artifacts && artifacts.length > 0 && (
69
- <Section
70
- title='Artifacts'
71
- items={artifacts.map(({ name, description, tools }) => ({
72
- name,
73
- description,
74
- subitems: tools.map(({ name, description }) => ({ name: `∙ ${parseToolName(name)}`, description })),
52
+ subitems: target?.tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
75
53
  }))}
76
54
  />
77
55
  )}
@@ -91,11 +69,9 @@ export const Toolbox = ({
91
69
  <Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
92
70
  )}
93
71
 
94
- {!blueprints?.length &&
95
- !activeBlueprints?.length &&
96
- !artifacts?.length &&
97
- !services?.length &&
98
- !functions?.length && <div>{t('no tools')}</div>}
72
+ {!blueprints?.length && !activeBlueprints?.length && !services?.length && !functions?.length && (
73
+ <div>{t('no tools')}</div>
74
+ )}
99
75
  </div>
100
76
  );
101
77
  };
@@ -136,13 +112,10 @@ const Section: FC<{
136
112
 
137
113
  export type ToolboxContainerProps = ThemedClassName<{
138
114
  space?: Space;
139
- processor?: ChatProcessor;
115
+ processor?: AiChatProcessor;
140
116
  }>;
141
117
 
142
118
  export const ToolboxContainer = ({ classNames, space, processor }: ToolboxContainerProps) => {
143
- // Plugin artifacts.
144
- const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
145
-
146
119
  // Registered services.
147
120
  const services = useQuery(space, Filter.type(ServiceType));
148
121
  const [serviceTools, setServiceTools] = useState<{ service: ServiceType; tools: Tool[] }[]>([]);
@@ -164,9 +137,12 @@ export const ToolboxContainer = ({ classNames, space, processor }: ToolboxContai
164
137
  <Toolbox
165
138
  classNames={classNames}
166
139
  blueprints={processor?.context.blueprints.value}
167
- artifacts={artifactDefinitions}
168
140
  services={serviceTools}
169
141
  functions={functions}
170
142
  />
171
143
  );
172
144
  };
145
+
146
+ const safeToolId = (name: string) => {
147
+ return name.split('_').pop();
148
+ };
@@ -8,13 +8,10 @@ export * from './AssistantSettings';
8
8
  export * from './Chat';
9
9
  export * from './PromptSettings';
10
10
  export * from './TemplateEditor';
11
+ export * from './Timeline';
11
12
  export * from './Toolbox';
12
13
 
13
- // TODO(burdon): Lazy loading causes issues with Tabster.
14
- // Repro: open assistant dialog then close.
15
- // https://github.com/microsoft/fluentui/issues/34020
16
-
14
+ export const BlueprintContainer = lazy(() => import('./BlueprintContainer'));
17
15
  export const ChatContainer = lazy(() => import('./ChatContainer'));
18
16
  export const ChatDialog = lazy(() => import('./ChatDialog'));
19
17
  export const SequenceContainer = lazy(() => import('./SequenceContainer'));
20
- export const TemplateContainer = lazy(() => import('./TemplateContainer'));
package/src/events.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Events } from '@dxos/app-framework';
5
+ import { defineEvent } from '@dxos/app-framework';
6
6
 
7
7
  import { meta } from './meta';
8
8
 
9
9
  export namespace AssistantEvents {
10
- export const AiClientReady = Events.createStateEvent(`${meta.id}/ai-client-ready`);
10
+ export const SetupAiServiceProviders = defineEvent(`${meta.id}/event/setup-ai-service-providers`);
11
11
  }