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

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 (529) hide show
  1. package/dist/lib/browser/{TemplateContainer-RPJ2LBOB.mjs → BlueprintContainer-TO35YXHT.mjs} +11 -9
  2. package/dist/lib/browser/BlueprintContainer-TO35YXHT.mjs.map +7 -0
  3. package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs +127 -0
  4. package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs.map +7 -0
  5. package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-MA5BVDGH.mjs} +33 -14
  6. package/dist/lib/browser/ChatContainer-MA5BVDGH.mjs.map +7 -0
  7. package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-7OXLIWZI.mjs} +26 -12
  8. package/dist/lib/browser/ChatDialog-7OXLIWZI.mjs.map +7 -0
  9. package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-2FEWMQGW.mjs} +7 -19
  10. package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
  11. package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
  12. package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
  13. package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs +154 -0
  14. package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs.map +7 -0
  15. package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs +12 -0
  16. package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-2CE2KPKZ.mjs +175 -0
  18. package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-43I2LR6O.mjs +216 -0
  20. package/dist/lib/browser/chunk-43I2LR6O.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-5EGXHCAZ.mjs +16 -0
  22. package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-5RICKAMN.mjs +18 -0
  24. package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-B2RCJXEO.mjs +202 -0
  26. package/dist/lib/browser/chunk-B2RCJXEO.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-BRJMNZOS.mjs +169 -0
  28. package/dist/lib/browser/chunk-BRJMNZOS.mjs.map +7 -0
  29. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  30. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-P5P7QXBS.mjs +296 -0
  32. package/dist/lib/browser/chunk-P5P7QXBS.mjs.map +7 -0
  33. package/dist/lib/browser/chunk-UDH4MR7H.mjs +1744 -0
  34. package/dist/lib/browser/chunk-UDH4MR7H.mjs.map +7 -0
  35. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
  36. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
  37. package/dist/lib/browser/index.mjs +161 -68
  38. package/dist/lib/browser/index.mjs.map +3 -3
  39. package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs +112 -0
  40. package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs.map +7 -0
  41. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
  42. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
  43. package/dist/lib/browser/meta.json +1 -1
  44. package/dist/lib/browser/react-surface-WQZXU624.mjs +107 -0
  45. package/dist/lib/browser/react-surface-WQZXU624.mjs.map +7 -0
  46. package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-4B2NA4CE.mjs} +8 -7
  47. package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-4B2NA4CE.mjs.map} +1 -1
  48. package/dist/lib/browser/state-LXTS54DI.mjs +21 -0
  49. package/dist/lib/browser/state-LXTS54DI.mjs.map +7 -0
  50. package/dist/lib/browser/toolkit-NQ2GXCF5.mjs +199 -0
  51. package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
  52. package/dist/lib/browser/types/index.mjs +7 -4
  53. package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-J664LTU3.mjs} +11 -9
  54. package/dist/lib/node-esm/BlueprintContainer-J664LTU3.mjs.map +7 -0
  55. package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs +128 -0
  56. package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs.map +7 -0
  57. package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-WLTOQLHH.mjs} +33 -14
  58. package/dist/lib/node-esm/ChatContainer-WLTOQLHH.mjs.map +7 -0
  59. package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-ADKF62SY.mjs} +26 -12
  60. package/dist/lib/node-esm/ChatDialog-ADKF62SY.mjs.map +7 -0
  61. package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-PGGJUQ46.mjs} +7 -19
  62. package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
  63. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
  64. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
  65. package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs +155 -0
  66. package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs.map +7 -0
  67. package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs +13 -0
  68. package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs.map +7 -0
  69. package/dist/lib/node-esm/chunk-73ABYRYX.mjs +20 -0
  70. package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-DBDKOC3I.mjs +203 -0
  72. package/dist/lib/node-esm/chunk-DBDKOC3I.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-DSE2IILK.mjs +217 -0
  74. package/dist/lib/node-esm/chunk-DSE2IILK.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  76. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  77. package/dist/lib/node-esm/chunk-I7BZMIAG.mjs +170 -0
  78. package/dist/lib/node-esm/chunk-I7BZMIAG.mjs.map +7 -0
  79. package/dist/lib/node-esm/chunk-TBQOICXZ.mjs +297 -0
  80. package/dist/lib/node-esm/chunk-TBQOICXZ.mjs.map +7 -0
  81. package/dist/lib/node-esm/chunk-U2NYUS2N.mjs +177 -0
  82. package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
  83. package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs +1745 -0
  84. package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs.map +7 -0
  85. package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs +17 -0
  86. package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
  87. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
  88. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
  89. package/dist/lib/node-esm/index.mjs +161 -68
  90. package/dist/lib/node-esm/index.mjs.map +3 -3
  91. package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs +113 -0
  92. package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs.map +7 -0
  93. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
  94. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
  95. package/dist/lib/node-esm/meta.json +1 -1
  96. package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs +108 -0
  97. package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs.map +7 -0
  98. package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-7Y3CRASE.mjs} +8 -7
  99. package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-7Y3CRASE.mjs.map} +1 -1
  100. package/dist/lib/node-esm/state-BO6GUFLB.mjs +22 -0
  101. package/dist/lib/node-esm/state-BO6GUFLB.mjs.map +7 -0
  102. package/dist/lib/node-esm/toolkit-V57PRJNG.mjs +200 -0
  103. package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
  104. package/dist/lib/node-esm/types/index.mjs +7 -4
  105. package/dist/types/src/AssistantPlugin.d.ts +1 -1
  106. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/ai-service.d.ts +4 -0
  108. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  110. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  111. package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
  112. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/capabilities.d.ts +11 -0
  114. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
  116. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/index.d.ts +11 -3
  118. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  119. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  120. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  121. package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
  122. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  124. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  125. package/dist/types/src/capabilities/settings.d.ts +1 -1
  126. package/dist/types/src/capabilities/state.d.ts +4 -0
  127. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  128. package/dist/types/src/capabilities/toolkit.d.ts +4 -0
  129. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  130. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  131. package/dist/types/src/components/BlueprintContainer.d.ts +8 -0
  132. package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -0
  133. package/dist/types/src/components/Chat/Chat.d.ts +20 -17
  134. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  135. package/dist/types/src/components/Chat/events.d.ts +5 -0
  136. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  137. package/dist/types/src/components/ChatCompanion.d.ts +13 -0
  138. package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
  139. package/dist/types/src/components/ChatContainer.d.ts +4 -4
  140. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  141. package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
  142. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
  143. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
  144. package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
  145. package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
  146. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  147. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
  148. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  149. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  150. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
  151. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  152. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
  153. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  154. package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
  155. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  156. package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
  157. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  158. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -75
  159. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  160. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  161. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  162. package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
  163. package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
  164. package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
  165. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  166. package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
  167. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  168. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  169. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  170. package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
  171. package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
  172. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +1 -1
  173. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
  174. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +264 -3
  175. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
  176. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -6
  177. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  178. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +262 -7
  179. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  180. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -2
  181. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  182. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +259 -2
  183. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  184. package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
  185. package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
  186. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
  187. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  188. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  189. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  190. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  191. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  192. package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
  193. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
  194. package/dist/types/src/components/Toolbar/index.d.ts +2 -0
  195. package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
  196. package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
  197. package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
  198. package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
  199. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  200. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -5
  201. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  202. package/dist/types/src/components/index.d.ts +5 -2
  203. package/dist/types/src/components/index.d.ts.map +1 -1
  204. package/dist/types/src/events.d.ts +1 -1
  205. package/dist/types/src/events.d.ts.map +1 -1
  206. package/dist/types/src/functions/analysis.d.ts +5 -0
  207. package/dist/types/src/functions/analysis.d.ts.map +1 -0
  208. package/dist/types/src/functions/index.d.ts +4 -0
  209. package/dist/types/src/functions/index.d.ts.map +1 -0
  210. package/dist/types/src/functions/list.d.ts +10 -0
  211. package/dist/types/src/functions/list.d.ts.map +1 -0
  212. package/dist/types/src/functions/load.d.ts +8 -0
  213. package/dist/types/src/functions/load.d.ts.map +1 -0
  214. package/dist/types/src/hooks/index.d.ts +7 -3
  215. package/dist/types/src/hooks/index.d.ts.map +1 -1
  216. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
  217. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  218. package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
  219. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  220. package/dist/types/src/hooks/useChatServices.d.ts +5 -6
  221. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  222. package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
  223. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  224. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  225. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  226. package/dist/types/src/hooks/useFlush.d.ts +6 -0
  227. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  228. package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
  229. package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
  230. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  231. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  232. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  233. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  234. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  235. package/dist/types/src/meta.d.ts +1 -2
  236. package/dist/types/src/meta.d.ts.map +1 -1
  237. package/dist/types/src/processor/index.d.ts +3 -0
  238. package/dist/types/src/processor/index.d.ts.map +1 -0
  239. package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
  240. package/dist/types/src/processor/presets.d.ts.map +1 -0
  241. package/dist/types/src/processor/processor.d.ts +74 -0
  242. package/dist/types/src/processor/processor.d.ts.map +1 -0
  243. package/dist/types/src/processor/processor.test.d.ts +2 -0
  244. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  245. package/dist/types/src/stories/Chat.stories.d.ts +29 -246
  246. package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
  247. package/dist/types/src/stories/QueryEditor.stories.d.ts +7 -0
  248. package/dist/types/src/stories/QueryEditor.stories.d.ts.map +1 -0
  249. package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
  250. package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
  251. package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
  252. package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
  253. package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
  254. package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
  255. package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
  256. package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
  257. package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
  258. package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
  259. package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts +7 -0
  260. package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts.map +1 -0
  261. package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
  262. package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
  263. package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
  264. package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
  265. package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
  266. package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
  267. package/dist/types/src/stories/components/ProjectContainer.d.ts +4 -0
  268. package/dist/types/src/stories/components/ProjectContainer.d.ts.map +1 -0
  269. package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
  270. package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
  271. package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
  272. package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
  273. package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
  274. package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
  275. package/dist/types/src/stories/components/ScriptContainer.d.ts +4 -0
  276. package/dist/types/src/stories/components/ScriptContainer.d.ts.map +1 -0
  277. package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
  278. package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
  279. package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
  280. package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
  281. package/dist/types/src/stories/components/TriggersContainer.d.ts +3 -0
  282. package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
  283. package/dist/types/src/stories/components/index.d.ts +18 -0
  284. package/dist/types/src/stories/components/index.d.ts.map +1 -0
  285. package/dist/types/src/stories/components/types.d.ts +7 -0
  286. package/dist/types/src/stories/components/types.d.ts.map +1 -0
  287. package/dist/types/src/stories/testing/data.d.ts +9 -0
  288. package/dist/types/src/stories/testing/data.d.ts.map +1 -0
  289. package/dist/types/src/stories/testing/index.d.ts +3 -0
  290. package/dist/types/src/stories/testing/index.d.ts.map +1 -0
  291. package/dist/types/src/stories/testing/schema.d.ts +7 -0
  292. package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
  293. package/dist/types/src/stories/testing/testing.d.ts +51 -0
  294. package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
  295. package/dist/types/src/testing/index.d.ts +3 -1
  296. package/dist/types/src/testing/index.d.ts.map +1 -1
  297. package/dist/types/src/testing/test-data.d.ts +14 -0
  298. package/dist/types/src/testing/test-data.d.ts.map +1 -0
  299. package/dist/types/src/testing/test-functions.d.ts +5 -2
  300. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  301. package/dist/types/src/testing/test-generator.d.ts +7 -0
  302. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  303. package/dist/types/src/testing/test-sequence.d.ts +0 -4
  304. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  305. package/dist/types/src/translations.d.ts +29 -22
  306. package/dist/types/src/translations.d.ts.map +1 -1
  307. package/dist/types/src/types/Assistant.d.ts +42 -0
  308. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  309. package/dist/types/src/types/AssistantAction.d.ts +107 -0
  310. package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
  311. package/dist/types/src/types/defs.d.ts +2 -0
  312. package/dist/types/src/types/defs.d.ts.map +1 -0
  313. package/dist/types/src/types/index.d.ts +3 -1
  314. package/dist/types/src/types/index.d.ts.map +1 -1
  315. package/dist/types/src/types/service.d.ts +15 -12
  316. package/dist/types/src/types/service.d.ts.map +1 -1
  317. package/dist/types/tsconfig.tsbuildinfo +1 -1
  318. package/package.json +113 -92
  319. package/src/AssistantPlugin.tsx +151 -82
  320. package/src/capabilities/ai-service.ts +27 -0
  321. package/src/capabilities/app-graph-builder.ts +47 -137
  322. package/src/capabilities/blueprint-definition.ts +64 -0
  323. package/src/capabilities/capabilities.ts +18 -0
  324. package/src/capabilities/edge-model-resolver.ts +25 -0
  325. package/src/capabilities/index.ts +9 -0
  326. package/src/capabilities/intent-resolver.ts +51 -15
  327. package/src/capabilities/local-model-resolver.ts +30 -0
  328. package/src/capabilities/react-surface.tsx +17 -64
  329. package/src/capabilities/state.ts +20 -0
  330. package/src/capabilities/toolkit.ts +168 -0
  331. package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
  332. package/src/components/BlueprintContainer.tsx +24 -0
  333. package/src/components/Chat/Chat.tsx +180 -176
  334. package/src/components/Chat/events.ts +7 -0
  335. package/src/components/ChatCompanion.tsx +114 -0
  336. package/src/components/ChatContainer.tsx +19 -13
  337. package/src/components/ChatDialog.tsx +18 -14
  338. package/src/components/ChatProgress/ChatProgress.tsx +67 -0
  339. package/src/components/ChatProgress/index.ts +5 -0
  340. package/src/components/ChatPrompt/ChatActions.tsx +10 -24
  341. package/src/components/ChatPrompt/ChatOptions.tsx +225 -0
  342. package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
  343. package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
  344. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
  345. package/src/components/ChatPrompt/index.ts +1 -1
  346. package/src/components/ChatThread/ChatThread.stories.tsx +98 -112
  347. package/src/components/ChatThread/ChatThread.tsx +65 -29
  348. package/src/components/ChatThread/Link.tsx +26 -0
  349. package/src/components/ChatThread/reducers.ts +151 -0
  350. package/src/components/ChatThread/registry.tsx +184 -0
  351. package/src/components/ChatThread/sync.test.ts +81 -0
  352. package/src/components/ChatThread/sync.ts +113 -0
  353. package/src/components/PromptSettings.tsx +1 -0
  354. package/src/components/SequenceContainer.tsx +29 -30
  355. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +11 -8
  356. package/src/components/SequenceEditor/SequenceEditor.tsx +3 -3
  357. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +28 -17
  358. package/src/components/TemplateEditor/TemplateEditor.tsx +21 -52
  359. package/src/components/TemplateEditor/TemplateForm.stories.tsx +18 -13
  360. package/src/components/TemplateEditor/TemplateForm.tsx +7 -4
  361. package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
  362. package/src/components/ToolBlock/ToolBlock.tsx +152 -0
  363. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  364. package/src/components/ToolBlock/index.ts +6 -0
  365. package/src/components/Toolbar/Toolbar.tsx +21 -0
  366. package/src/components/Toolbar/index.ts +5 -0
  367. package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
  368. package/src/components/Toolbox/Toolbox.stories.tsx +13 -22
  369. package/src/components/Toolbox/Toolbox.tsx +21 -51
  370. package/src/components/index.ts +4 -5
  371. package/src/events.ts +2 -2
  372. package/src/functions/analysis.ts +22 -0
  373. package/src/functions/index.ts +7 -0
  374. package/src/functions/list.ts +48 -0
  375. package/src/functions/load.ts +46 -0
  376. package/src/hooks/index.ts +7 -4
  377. package/src/hooks/useBlueprintRegistry.ts +94 -0
  378. package/src/hooks/useChatProcessor.ts +21 -98
  379. package/src/hooks/useChatServices.ts +29 -71
  380. package/src/hooks/useContextBinder.ts +18 -0
  381. package/src/hooks/useContextObjects.ts +58 -0
  382. package/src/hooks/useFlush.ts +35 -0
  383. package/src/hooks/useItemTypes.ts +37 -0
  384. package/src/hooks/useOnline.ts +10 -0
  385. package/src/hooks/usePresets.ts +44 -0
  386. package/src/hooks/useReferencesProvider.ts +11 -9
  387. package/src/meta.ts +4 -6
  388. package/src/processor/index.ts +6 -0
  389. package/src/{hooks → processor}/presets.ts +15 -7
  390. package/src/processor/processor.test.ts +81 -0
  391. package/src/processor/processor.ts +303 -0
  392. package/src/queue-logger.ts +10 -10
  393. package/src/stories/Chat.stories.tsx +818 -314
  394. package/src/stories/QueryEditor.stories.tsx +114 -0
  395. package/src/stories/components/BlueprintContainer.tsx +34 -0
  396. package/src/stories/components/ChatContainer.tsx +74 -0
  397. package/src/stories/components/ChessContainer.tsx +17 -0
  398. package/src/stories/components/CommentsContainer.tsx +25 -0
  399. package/src/stories/components/DebugCard.tsx +61 -0
  400. package/src/stories/components/ExecutionGraphContainer.tsx +30 -0
  401. package/src/stories/components/GraphContainer.tsx +106 -0
  402. package/src/stories/components/InvocationsContainer.tsx +17 -0
  403. package/src/stories/components/MessageContainer.tsx +22 -0
  404. package/src/stories/components/ProjectContainer.tsx +17 -0
  405. package/src/stories/components/PromptContainer.tsx +52 -0
  406. package/src/stories/components/ResearchInputStack.tsx +30 -0
  407. package/src/stories/components/ResearchOutputStack.tsx +29 -0
  408. package/src/stories/components/ScriptContainer.tsx +28 -0
  409. package/src/stories/components/TasksContainer.tsx +47 -0
  410. package/src/stories/components/TokenManagerContainer.tsx +14 -0
  411. package/src/stories/components/TriggersContainer.tsx +12 -0
  412. package/src/stories/components/index.ts +22 -0
  413. package/src/stories/components/types.ts +11 -0
  414. package/src/stories/testing/data.ts +135 -0
  415. package/src/stories/testing/index.ts +6 -0
  416. package/src/stories/testing/schema.ts +17 -0
  417. package/src/stories/testing/testing.tsx +291 -0
  418. package/src/testing/index.ts +3 -1
  419. package/src/testing/test-data.ts +248 -0
  420. package/src/testing/test-functions.ts +8 -3
  421. package/src/testing/test-generator.ts +261 -0
  422. package/src/testing/test-sequence.ts +2 -27
  423. package/src/translations.ts +32 -22
  424. package/src/types/Assistant.ts +61 -0
  425. package/src/types/AssistantAction.ts +62 -0
  426. package/src/types/defs.ts +5 -0
  427. package/src/types/index.ts +4 -1
  428. package/src/types/service.ts +2 -2
  429. package/src/vite-env.d.ts +30 -0
  430. package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
  431. package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
  432. package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
  433. package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
  434. package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs +0 -223
  435. package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
  436. package/dist/lib/browser/chunk-AEAEKWOC.mjs +0 -98
  437. package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
  438. package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
  439. package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
  440. package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
  441. package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
  442. package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
  443. package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
  444. package/dist/lib/browser/chunk-OWY4CUQY.mjs +0 -2245
  445. package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
  446. package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
  447. package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
  448. package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
  449. package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
  450. package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
  451. package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
  452. package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
  453. package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
  454. package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs +0 -224
  455. package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
  456. package/dist/lib/node-esm/chunk-2XL6MNPE.mjs +0 -99
  457. package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
  458. package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
  459. package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
  460. package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
  461. package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
  462. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
  463. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
  464. package/dist/lib/node-esm/chunk-SENTQAEO.mjs +0 -2246
  465. package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
  466. package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
  467. package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
  468. package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
  469. package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
  470. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
  471. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
  472. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
  473. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
  474. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
  475. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
  476. package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
  477. package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
  478. package/dist/types/src/components/TemplateContainer.d.ts +0 -8
  479. package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
  480. package/dist/types/src/hooks/chat-processor.d.ts +0 -86
  481. package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
  482. package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
  483. package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
  484. package/dist/types/src/hooks/presets.d.ts.map +0 -1
  485. package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
  486. package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
  487. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  488. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  489. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  490. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  491. package/dist/types/src/parser/index.d.ts +0 -4
  492. package/dist/types/src/parser/index.d.ts.map +0 -1
  493. package/dist/types/src/parser/query-parser.d.ts +0 -15
  494. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  495. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  496. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  497. package/dist/types/src/parser/types.d.ts +0 -24
  498. package/dist/types/src/parser/types.d.ts.map +0 -1
  499. package/dist/types/src/tools/function.d.ts +0 -5
  500. package/dist/types/src/tools/function.d.ts.map +0 -1
  501. package/dist/types/src/tools/index.d.ts +0 -3
  502. package/dist/types/src/tools/index.d.ts.map +0 -1
  503. package/dist/types/src/tools/openapi.d.ts +0 -10
  504. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  505. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  506. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  507. package/dist/types/src/types/schema.d.ts +0 -88
  508. package/dist/types/src/types/schema.d.ts.map +0 -1
  509. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
  510. package/src/components/ChatThread/ChatMessage.tsx +0 -268
  511. package/src/components/ChatThread/ToolBlock.tsx +0 -121
  512. package/src/components/ChatThread/reducer.ts +0 -52
  513. package/src/components/TemplateContainer.tsx +0 -24
  514. package/src/hooks/chat-processor.test.ts +0 -16
  515. package/src/hooks/chat-processor.ts +0 -314
  516. package/src/hooks/useBlueprints.ts +0 -57
  517. package/src/parser/filter-generator.test.ts +0 -32
  518. package/src/parser/filter-generator.ts +0 -81
  519. package/src/parser/index.ts +0 -7
  520. package/src/parser/query-parser.test.ts +0 -139
  521. package/src/parser/query-parser.ts +0 -199
  522. package/src/parser/types.ts +0 -34
  523. package/src/shims.d.ts +0 -8
  524. package/src/tools/function.ts +0 -46
  525. package/src/tools/index.ts +0 -6
  526. package/src/tools/openapi.test.ts +0 -217
  527. package/src/tools/openapi.ts +0 -338
  528. package/src/types/schema.ts +0 -95
  529. package/src/typings.d.ts +0 -9
@@ -0,0 +1,114 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React, { useEffect, useMemo, useState } from 'react';
7
+
8
+ import { Obj, TagInfo, type TagMap } from '@dxos/echo';
9
+ import { QueryBuilder } from '@dxos/echo-query';
10
+ import { D3ForceGraph, useGraphModel } from '@dxos/plugin-explorer';
11
+ import { faker } from '@dxos/random';
12
+ import { Filter, useSpaces } from '@dxos/react-client/echo';
13
+ import { useQuery } from '@dxos/react-client/echo';
14
+ import { withClientProvider } from '@dxos/react-client/testing';
15
+ import { withTheme } from '@dxos/react-ui/testing';
16
+ import { QueryEditor, type QueryEditorProps } from '@dxos/react-ui-components';
17
+ import { DataType } from '@dxos/schema';
18
+ import { type ValueGenerator, createObjectFactory } from '@dxos/schema/testing';
19
+ import { render } from '@dxos/storybook-utils';
20
+
21
+ import { translations } from '../translations';
22
+
23
+ faker.seed(1);
24
+ const generator = faker as any as ValueGenerator;
25
+
26
+ const DefaultStory = ({ value: valueParam }: QueryEditorProps) => {
27
+ const [query, setQuery] = useState(valueParam);
28
+ const [space] = useSpaces();
29
+ const builder = useMemo(() => new QueryBuilder(), []);
30
+ const [filter, setFilter] = useState<Filter.Any>(Filter.everything());
31
+ const objects = useQuery(space, filter).sort(Obj.sort(Obj.sortByTypename, Obj.sortByLabel));
32
+ const model = useGraphModel(space, filter);
33
+
34
+ useEffect(() => {
35
+ if (query) {
36
+ const filter = builder.build(query);
37
+ setFilter(filter ?? Filter.everything());
38
+ } else {
39
+ setFilter(Filter.everything());
40
+ }
41
+ }, [builder, query]);
42
+
43
+ return (
44
+ <div role='none' className='grid grid-cols-2 grow divide-x divide-subduedSeparator overflow-hidden'>
45
+ <div className='flex flex-col overflow-hidden'>
46
+ <QueryEditor
47
+ classNames='p-2 is-full border-b border-subduedSeparator'
48
+ space={space}
49
+ value={query}
50
+ onChange={setQuery}
51
+ />
52
+ <div className='bs-full overflow-y-auto'>
53
+ {objects.map((object) => (
54
+ <div
55
+ key={object.id}
56
+ className='grid grid-cols-3 gap-2 p-2 border-b border-subduedSeparator overflow-hidden'
57
+ >
58
+ <span className='truncate text-sm font-mono'>{object.id}</span>
59
+ <span className='truncate text-sm font-mono'>{Obj.getTypename(object)}</span>
60
+ <span className='truncate'>{Obj.getLabel(object)}</span>
61
+ </div>
62
+ ))}
63
+ </div>
64
+ <div className='p-2 text-right text-infoText text-xs'>{objects.length}</div>
65
+ </div>
66
+ <D3ForceGraph model={model} />
67
+ </div>
68
+ );
69
+ };
70
+
71
+ const tags: TagMap = {
72
+ ['tag_1' as const]: TagInfo.make({ label: 'Red' }),
73
+ ['tag_2' as const]: TagInfo.make({ label: 'Green' }),
74
+ ['tag_3' as const]: TagInfo.make({ label: 'Blue' }),
75
+ };
76
+
77
+ const meta: Meta<typeof QueryEditor> = {
78
+ title: 'plugins/plugin-assistant/QueryEditor',
79
+ component: QueryEditor,
80
+ render: render(DefaultStory),
81
+ decorators: [
82
+ withTheme,
83
+ withClientProvider({
84
+ types: [DataType.Organization, DataType.Person, DataType.Project, DataType.Employer],
85
+ createIdentity: true,
86
+ onCreateIdentity: async ({ client }) => {
87
+ const space = client.spaces.default;
88
+ const createObjects = createObjectFactory(space.db, generator);
89
+ const objects = await createObjects([
90
+ { type: DataType.Organization, count: 30 },
91
+ { type: DataType.Project, count: 20 },
92
+ { type: DataType.Person, count: 50 },
93
+ ]);
94
+ objects.forEach((obj) => {
95
+ Obj.getMeta(obj).tags = faker.helpers.uniqueArray(Object.keys(tags), faker.number.int(3));
96
+ });
97
+ },
98
+ }),
99
+ ],
100
+ parameters: {
101
+ layout: 'fullscreen',
102
+ translations,
103
+ },
104
+ };
105
+
106
+ export default meta;
107
+
108
+ type Story = StoryObj<typeof meta>;
109
+
110
+ export const Default: Story = {
111
+ args: {
112
+ value: '(type:dxos.org/type/Person OR type:dxos.org/type/Organization)',
113
+ },
114
+ };
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Blueprint } from '@dxos/blueprints';
8
+ import { Filter, Obj } from '@dxos/echo';
9
+ import { useQuery } from '@dxos/react-client/echo';
10
+ import { Toolbar, useTranslation } from '@dxos/react-ui';
11
+ import { descriptionMessage, mx } from '@dxos/react-ui-theme';
12
+
13
+ import { TemplateEditor } from '../../components';
14
+ import { meta } from '../../meta';
15
+
16
+ import { type ComponentProps } from './types';
17
+
18
+ export const BlueprintContainer = ({ space }: ComponentProps) => {
19
+ const [blueprint] = useQuery(space, Filter.type(Blueprint.Blueprint));
20
+ const { t } = useTranslation(meta.id);
21
+
22
+ return !blueprint?.instructions ? (
23
+ <p className={mx(descriptionMessage, 'm-trimLg')}>{t('no blueprint message')}</p>
24
+ ) : (
25
+ <div className='flex flex-col h-full'>
26
+ <Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
27
+ <h2>{Obj.getLabel(blueprint)}</h2>
28
+ <div className='flex-1' />
29
+ <Toolbar.IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' />
30
+ </Toolbar.Root>
31
+ <TemplateEditor id={blueprint.id} template={blueprint.instructions} />
32
+ </div>
33
+ );
34
+ };
@@ -0,0 +1,74 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { useCallback } from 'react';
6
+
7
+ import { Filter } from '@dxos/echo';
8
+ import { useQuery } from '@dxos/react-client/echo';
9
+ import { IconButton, Popover } from '@dxos/react-ui';
10
+ import { StackItem } from '@dxos/react-ui-stack';
11
+
12
+ import { Chat, Toolbar } from '../../components';
13
+ import { useBlueprintRegistry, useChatProcessor, useChatServices } from '../../hooks';
14
+ import { useOnline, usePresets } from '../../hooks';
15
+ import { Assistant } from '../../types';
16
+
17
+ import { ExecutionGraphContainer } from './ExecutionGraphContainer';
18
+ import { type ComponentProps } from './types';
19
+
20
+ export const ChatContainer = ({ space, onEvent }: ComponentProps) => {
21
+ const [online, setOnline] = useOnline();
22
+ const { preset, ...chatProps } = usePresets(online);
23
+
24
+ const chats = useQuery(space, Filter.type(Assistant.Chat));
25
+ const chat = chats.at(-1);
26
+
27
+ const blueprintRegistry = useBlueprintRegistry();
28
+ const services = useChatServices({ space, chat });
29
+ const processor = useChatProcessor({ chat, preset, services, blueprintRegistry });
30
+
31
+ const handleUpdateName = useCallback(() => {
32
+ if (chat) {
33
+ void processor?.updateName(chat);
34
+ }
35
+ }, [processor, chat]);
36
+
37
+ return !chat || !processor ? null : (
38
+ <StackItem.Content toolbar>
39
+ <div role='none' className='flex items-center gap-2 pie-2'>
40
+ <Toolbar classNames='is-min grow' chat={chat} onReset={() => onEvent?.('reset')} />
41
+ <Popover.Root>
42
+ <Popover.Trigger asChild>
43
+ <IconButton icon='ph--sort-ascending--regular' label='Logs' variant='ghost' />
44
+ </Popover.Trigger>
45
+ <Popover.Portal>
46
+ <Popover.Content>
47
+ <ExecutionGraphContainer space={space} />
48
+ <Popover.Arrow />
49
+ </Popover.Content>
50
+ </Popover.Portal>
51
+ </Popover.Root>
52
+ <div className='truncate text-subdued'>{chat.name ?? 'no name'}</div>
53
+ <IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Update name' onClick={handleUpdateName} />
54
+ </div>
55
+
56
+ <div role='none' className='relative'>
57
+ <Chat.Root chat={chat} processor={processor} classNames='absolute inset-0'>
58
+ <Chat.Thread />
59
+ {/* <ChatProgress chat={chat} /> */}
60
+ <div className='flex justify-center p-4'>
61
+ <Chat.Prompt
62
+ {...chatProps}
63
+ outline
64
+ classNames='max-is-prose'
65
+ preset={preset?.id}
66
+ online={online}
67
+ onOnlineChange={setOnline}
68
+ />
69
+ </div>
70
+ </Chat.Root>
71
+ </div>
72
+ </StackItem.Content>
73
+ );
74
+ };
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { type FC } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { Filter } from '@dxos/echo';
9
+ import { Chess } from '@dxos/plugin-chess';
10
+ import { useQuery } from '@dxos/react-client/echo';
11
+
12
+ import type { ComponentProps } from './types';
13
+
14
+ export const ChessContainer: FC<ComponentProps> = ({ space }) => {
15
+ const chess = useQuery(space, Filter.type(Chess.Game));
16
+ return <Surface role='section' limit={1} data={{ subject: chess.at(-1) }} />;
17
+ };
@@ -0,0 +1,25 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { useMemo } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { Filter, useQuery } from '@dxos/react-client/echo';
9
+
10
+ import { useContextBinder } from '../../hooks';
11
+ import { Assistant } from '../../types';
12
+
13
+ import { type ComponentProps } from './types';
14
+
15
+ export const CommentsContainer = ({ space }: ComponentProps) => {
16
+ const chats = useQuery(space, Filter.type(Assistant.Chat));
17
+ const binder = useContextBinder(chats.at(-1));
18
+ const object = binder?.objects.value[0]?.target;
19
+ const data = useMemo(() => ({ subject: 'comments', companionTo: object }), [object]);
20
+ if (!object) {
21
+ return null;
22
+ }
23
+
24
+ return <Surface role='article' data={data} />;
25
+ };
@@ -0,0 +1,61 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Obj, type Relation } from '@dxos/echo';
8
+ import { type ObjectId } from '@dxos/keys';
9
+
10
+ interface DebugCardProps {
11
+ obj: Obj.Any | Relation.Any;
12
+ }
13
+
14
+ export const DebugCard = ({ obj }: DebugCardProps) => {
15
+ return (
16
+ <div className='border border-separator rounded-lg p-4 bg-surface'>
17
+ <div className='flex items-center justify-between mb-2'>
18
+ <h3 className='font-medium text-lg'>{Obj.getLabel(obj)}</h3>
19
+ <p className='flex gap-2 items-center'>
20
+ <span className='text-sm font-mono dx-text-hue' data-hue={colors[insecureIdHash(obj.id, colors.length)]}>
21
+ #{obj.id.slice(-6)}
22
+ </span>
23
+ <span className='text-sm text-description bg-neutral-800 px-2 py-1 rounded'>{Obj.getTypename(obj)}</span>
24
+ </p>
25
+ </div>
26
+ <details className='group'>
27
+ <summary className='cursor-pointer text-sm text-primary hover:text-primaryHover'>View JSON</summary>
28
+ <pre className='mt-2 text-xs p-3 rounded overflow-x-auto'>{JSON.stringify(obj, null, 2)}</pre>
29
+ </details>
30
+ </div>
31
+ );
32
+ };
33
+
34
+ const insecureIdHash = (id: ObjectId, modulo: number) => {
35
+ let hash = 0;
36
+ for (let i = 0; i < id.length; i++) {
37
+ const num = id.charCodeAt(i);
38
+ hash = (hash ^ num) | 0;
39
+ }
40
+ return Math.abs(hash) % modulo;
41
+ };
42
+
43
+ const colors = [
44
+ 'red',
45
+ 'orange',
46
+ 'amber',
47
+ 'yellow',
48
+ 'lime',
49
+ 'green',
50
+ 'emerald',
51
+ 'teal',
52
+ 'cyan',
53
+ 'sky',
54
+ 'blue',
55
+ 'indigo',
56
+ 'violet',
57
+ 'purple',
58
+ 'fuchsia',
59
+ 'pink',
60
+ 'rose',
61
+ ];
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Filter } from '@dxos/echo';
8
+ import { Obj } from '@dxos/echo';
9
+ import { InvocationTraceStartEvent } from '@dxos/functions';
10
+ import { type Queue, useQuery, useQueue } from '@dxos/react-client/echo';
11
+ import { Timeline, useExecutionGraph } from '@dxos/react-ui-components';
12
+
13
+ import { Assistant } from '../../types';
14
+
15
+ import { type ComponentProps } from './types';
16
+
17
+ export const ExecutionGraphContainer = ({ space, traceQueue }: ComponentProps & { traceQueue?: Queue }) => {
18
+ const chats = useQuery(space, Filter.type(Assistant.Chat));
19
+ const invocations =
20
+ useQueue(space.properties?.invocationTraceQueue?.dxn)?.objects.filter(Obj.instanceOf(InvocationTraceStartEvent)) ??
21
+ [];
22
+ const queue = traceQueue ?? invocations?.at(-1)?.invocationTraceQueue?.target ?? chats.at(-1)?.traceQueue?.target;
23
+ const { branches, commits } = useExecutionGraph(queue);
24
+
25
+ return (
26
+ <div className='flex flex-col h-full'>
27
+ <Timeline branches={branches} commits={commits} />
28
+ </div>
29
+ );
30
+ };
@@ -0,0 +1,106 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Match from 'effect/Match';
6
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+
8
+ import { ResearchGraph } from '@dxos/assistant-testing';
9
+ import { Filter, Query } from '@dxos/echo';
10
+ import { QueryBuilder } from '@dxos/echo-query';
11
+ import { D3ForceGraph, useGraphModel } from '@dxos/plugin-explorer';
12
+ import { useQuery } from '@dxos/react-client/echo';
13
+ import { IconButton, Toolbar } from '@dxos/react-ui';
14
+ import { type ChatEditorProps } from '@dxos/react-ui-chat';
15
+ import { type EditorController, QueryEditor } from '@dxos/react-ui-components';
16
+ import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
17
+ import { mx } from '@dxos/react-ui-theme';
18
+
19
+ import { useFlush } from '../../hooks';
20
+
21
+ import { type ComponentProps } from './types';
22
+
23
+ export const GraphContainer = ({ space }: ComponentProps) => {
24
+ const [filter, setFilter] = useState<Filter.Any>();
25
+ const [open, setOpen] = useState(false);
26
+
27
+ const [researchGraph] = useQuery(space, Query.type(ResearchGraph));
28
+ const queue = researchGraph?.queue.target;
29
+
30
+ // TODO(burdon): Clean-up API.
31
+ const model = useGraphModel(space, undefined, undefined, queue);
32
+ useEffect(() => {
33
+ model?.setFilter(filter ?? Filter.everything());
34
+ }, [model, filter]);
35
+
36
+ const parser = useMemo(() => new QueryBuilder(), []);
37
+ const handleSubmit = useCallback<NonNullable<ChatEditorProps['onSubmit']>>(
38
+ (text) => {
39
+ // TODO(burdon): Get AST from filter?
40
+ const filter = parser.build(text);
41
+ if (filter) {
42
+ setFilter(filter);
43
+ setOpen(true);
44
+ }
45
+ },
46
+ [space, parser],
47
+ );
48
+
49
+ return (
50
+ <div className={mx('relative bs-full grid', open && 'grid-rows-[min-content_1fr]')}>
51
+ <SearchBar space={space} onSubmit={handleSubmit} />
52
+ <D3ForceGraph classNames='min-bs-[50vh]' model={model} />
53
+
54
+ {/* TODO(burdon): Create component with context state for story. */}
55
+ {(open && (
56
+ <div className='absolute left-2 right-2 bottom-2 h-[8rem] flex overflow-hidden bg-baseSurface border border-subduedSeparator'>
57
+ <SyntaxHighlighter language='json' classNames='text-sm'>
58
+ {JSON.stringify({ filter }, null, 2)}
59
+ </SyntaxHighlighter>
60
+ <div className='absolute bottom-1 right-1'>
61
+ <IconButton variant='ghost' icon='ph--x--regular' iconOnly label='Close' onClick={() => setOpen(false)} />
62
+ </div>
63
+ </div>
64
+ )) || (
65
+ <div className='absolute bottom-3 right-3'>
66
+ <IconButton
67
+ variant='ghost'
68
+ icon='ph--arrow-line-up--regular'
69
+ iconOnly
70
+ label='Open'
71
+ onClick={() => setOpen(true)}
72
+ />
73
+ </div>
74
+ )}
75
+ </div>
76
+ );
77
+ };
78
+
79
+ export const SearchBar = ({ space, onSubmit }: ComponentProps & Pick<ChatEditorProps, 'onSubmit'>) => {
80
+ const { state: flushState, handleFlush } = useFlush(space);
81
+ const editorRef = useRef<EditorController>(null);
82
+
83
+ return (
84
+ <Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
85
+ <QueryEditor classNames='p-2 is-full border-b border-subduedSeparator' space={space} onChange={onSubmit} />
86
+ <Toolbar.IconButton
87
+ icon='ph--magnifying-glass--regular'
88
+ iconOnly
89
+ label='Search'
90
+ onClick={() => onSubmit?.(editorRef.current?.view?.state.doc.toString() ?? '')}
91
+ />
92
+ <Toolbar.IconButton
93
+ disabled={flushState === 'flushing'}
94
+ icon={Match.value(flushState).pipe(
95
+ Match.when('idle', () => 'ph--floppy-disk--regular'),
96
+ Match.when('flushing', () => 'ph--spinner--regular'),
97
+ Match.when('flushed', () => 'ph--check--regular'),
98
+ Match.exhaustive,
99
+ )}
100
+ iconOnly
101
+ label='flush'
102
+ onClick={handleFlush}
103
+ />
104
+ </Toolbar.Root>
105
+ );
106
+ };
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { InvocationTraceContainer } from '@dxos/devtools';
8
+
9
+ import type { ComponentProps } from './types';
10
+
11
+ export const InvocationsContainer = ({ space }: ComponentProps) => {
12
+ return (
13
+ <div className='flex bs-full min-bs-[20rem] items-center justify-center'>
14
+ <InvocationTraceContainer space={space} detailAxis='block' />
15
+ </div>
16
+ );
17
+ };
@@ -0,0 +1,22 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { useMemo } from 'react';
6
+
7
+ import { Surface, useCapability } from '@dxos/app-framework';
8
+ import { Filter } from '@dxos/echo';
9
+ import { InboxCapabilities } from '@dxos/plugin-inbox';
10
+ import { Mailbox } from '@dxos/plugin-inbox/types';
11
+ import { fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
12
+
13
+ import { type ComponentProps } from './types';
14
+
15
+ export const MessageContainer = ({ space }: ComponentProps) => {
16
+ const [mailbox] = useQuery(space, Filter.type(Mailbox.Mailbox));
17
+ const state = useCapability(InboxCapabilities.MailboxState);
18
+ const message = mailbox && state[fullyQualifiedId(mailbox)];
19
+ const data = useMemo(() => ({ subject: message ?? 'message', companionTo: mailbox }), [message, mailbox]);
20
+
21
+ return <Surface role='section' data={data} limit={1} />;
22
+ };
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { type FC } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { Filter } from '@dxos/echo';
9
+ import { useQuery } from '@dxos/react-client/echo';
10
+ import { DataType } from '@dxos/schema';
11
+
12
+ import type { ComponentProps } from './types';
13
+
14
+ export const ProjectContainer: FC<ComponentProps> = ({ space }) => {
15
+ const projects = useQuery(space, Filter.type(DataType.Project));
16
+ return <Surface role='article' limit={1} data={{ subject: projects.at(-1) }} />;
17
+ };
@@ -0,0 +1,52 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Predicate from 'effect/Predicate';
6
+ import React from 'react';
7
+
8
+ import { Prompt } from '@dxos/blueprints';
9
+ import { Filter } from '@dxos/echo';
10
+ import { type Space, createDocAccessor, useQuery } from '@dxos/react-client/echo';
11
+ import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
12
+ import {
13
+ createBasicExtensions,
14
+ createDataExtensions,
15
+ createMarkdownExtensions,
16
+ createThemeExtensions,
17
+ useTextEditor,
18
+ } from '@dxos/react-ui-editor';
19
+ import { mx } from '@dxos/react-ui-theme';
20
+
21
+ export const PromptContainer = ({ space }: { space: Space }) => {
22
+ const [prompt] = useQuery(space, Filter.type(Prompt.Prompt));
23
+ if (!prompt) {
24
+ return null;
25
+ }
26
+ return (
27
+ <div style={{ minHeight: '300px' }}>
28
+ <PromptEditor prompt={prompt} />
29
+ </div>
30
+ );
31
+ };
32
+
33
+ const PromptEditor = ({ prompt, classNames }: ThemedClassName<{ prompt: Prompt.Prompt }>) => {
34
+ const { themeMode } = useThemeContext();
35
+ const { parentRef } = useTextEditor(() => {
36
+ return {
37
+ initialValue: prompt.instructions ?? '',
38
+ extensions: [
39
+ createDataExtensions({ id: prompt.id, text: createDocAccessor(prompt, ['instructions']) }),
40
+ createBasicExtensions({
41
+ bracketMatching: false,
42
+ lineNumbers: true,
43
+ lineWrapping: true,
44
+ }),
45
+ createThemeExtensions({ themeMode }),
46
+ createMarkdownExtensions(),
47
+ ].filter(Predicate.isTruthy),
48
+ };
49
+ }, [themeMode, prompt]);
50
+
51
+ return <div ref={parentRef} className={mx('bs-full overflow-hidden', classNames)} />;
52
+ };
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Filter } from '@dxos/echo';
8
+ import { useQuery, useQueue } from '@dxos/react-client/echo';
9
+
10
+ import { ResearchInputQueue } from '../testing';
11
+
12
+ import { DebugCard } from './DebugCard';
13
+ import type { ComponentProps } from './types';
14
+
15
+ export const ResearchInputStack = ({ space }: ComponentProps) => {
16
+ const [researchInput] = useQuery(space, Filter.type(ResearchInputQueue));
17
+ const queue = useQueue(researchInput?.queue.dxn);
18
+
19
+ return (
20
+ <div className='p-4 overflow-y-auto h-full'>
21
+ <ul className='space-y-4 '>
22
+ {queue?.objects.map((object) => (
23
+ <li key={object.id}>
24
+ <DebugCard obj={object} />
25
+ </li>
26
+ ))}
27
+ </ul>
28
+ </div>
29
+ );
30
+ };
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { ResearchGraph } from '@dxos/assistant-testing';
9
+ import { Filter } from '@dxos/echo';
10
+ import { useQuery, useQueue } from '@dxos/react-client/echo';
11
+
12
+ import type { ComponentProps } from './types';
13
+
14
+ export const ResearchOutputStack = ({ space }: ComponentProps) => {
15
+ const [researchGraph] = useQuery(space, Filter.type(ResearchGraph));
16
+ const queue = useQueue(researchGraph?.queue.dxn);
17
+
18
+ return (
19
+ <div className='p-4 overflow-y-auto h-full'>
20
+ <ul className='space-y-4 '>
21
+ {queue?.objects.map((object) => (
22
+ <li key={object.id}>
23
+ <Surface role='card' data={{ subject: object }} limit={1} />
24
+ </li>
25
+ ))}
26
+ </ul>
27
+ </div>
28
+ );
29
+ };
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Capabilities, useCapability } from '@dxos/app-framework';
8
+ import { Filter } from '@dxos/echo';
9
+ import { ScriptType } from '@dxos/functions';
10
+ import { ScriptCapabilities, ScriptContainer as ScriptContainerComponent, meta } from '@dxos/plugin-script';
11
+ import { type ScriptSettings } from '@dxos/plugin-script/types';
12
+ import { useQuery } from '@dxos/react-client/echo';
13
+
14
+ import { type ComponentProps } from './types';
15
+
16
+ export const ScriptContainer = ({ space }: ComponentProps) => {
17
+ const [script] = useQuery(space, Filter.type(ScriptType));
18
+ const compiler = useCapability(ScriptCapabilities.Compiler);
19
+ const settings = useCapability(Capabilities.SettingsStore).getStore<ScriptSettings>(meta.id)?.value;
20
+ if (!script) {
21
+ return null;
22
+ }
23
+ return (
24
+ <div className='flex is-full bs-[70vh] min-bs-[20rem] overflow-auto'>
25
+ <ScriptContainerComponent role={'section'} script={script} settings={settings} env={compiler.environment} />
26
+ </div>
27
+ );
28
+ };