@dxos/plugin-assistant 0.8.4-main.67995b8 → 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 (521) hide show
  1. package/dist/lib/browser/{BlueprintContainer-IZ4AK5EO.mjs → BlueprintContainer-TO35YXHT.mjs} +4 -3
  2. package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs +127 -0
  3. package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs.map +7 -0
  4. package/dist/lib/browser/{ChatContainer-RP3QEXYX.mjs → ChatContainer-MA5BVDGH.mjs} +33 -14
  5. package/dist/lib/browser/ChatContainer-MA5BVDGH.mjs.map +7 -0
  6. package/dist/lib/browser/{ChatDialog-ZVLXFHEY.mjs → ChatDialog-7OXLIWZI.mjs} +26 -12
  7. package/dist/lib/browser/ChatDialog-7OXLIWZI.mjs.map +7 -0
  8. package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-2FEWMQGW.mjs} +7 -19
  9. package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
  10. package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
  11. package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
  12. package/dist/lib/browser/{app-graph-builder-XSEOKJLG.mjs → app-graph-builder-VKFRYY2N.mjs} +31 -41
  13. package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs.map +7 -0
  14. package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs +12 -0
  15. package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs.map +7 -0
  16. package/dist/lib/browser/chunk-2CE2KPKZ.mjs +175 -0
  17. package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
  18. package/dist/lib/browser/chunk-43I2LR6O.mjs +216 -0
  19. package/dist/lib/browser/chunk-43I2LR6O.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-5EGXHCAZ.mjs +16 -0
  21. package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-5RICKAMN.mjs +18 -0
  23. package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
  24. package/dist/lib/browser/chunk-B2RCJXEO.mjs +202 -0
  25. package/dist/lib/browser/chunk-B2RCJXEO.mjs.map +7 -0
  26. package/dist/lib/browser/chunk-BRJMNZOS.mjs +169 -0
  27. package/dist/lib/browser/chunk-BRJMNZOS.mjs.map +7 -0
  28. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  29. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  30. package/dist/lib/browser/chunk-P5P7QXBS.mjs +296 -0
  31. package/dist/lib/browser/chunk-P5P7QXBS.mjs.map +7 -0
  32. package/dist/lib/browser/chunk-UDH4MR7H.mjs +1744 -0
  33. package/dist/lib/browser/chunk-UDH4MR7H.mjs.map +7 -0
  34. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
  35. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
  36. package/dist/lib/browser/index.mjs +144 -63
  37. package/dist/lib/browser/index.mjs.map +3 -3
  38. package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs +112 -0
  39. package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs.map +7 -0
  40. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
  41. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
  42. package/dist/lib/browser/meta.json +1 -1
  43. package/dist/lib/browser/react-surface-WQZXU624.mjs +107 -0
  44. package/dist/lib/browser/react-surface-WQZXU624.mjs.map +7 -0
  45. package/dist/lib/browser/{settings-5GTTCVGD.mjs → settings-4B2NA4CE.mjs} +8 -7
  46. package/dist/lib/{node-esm/settings-J2EXEM5H.mjs.map → browser/settings-4B2NA4CE.mjs.map} +1 -1
  47. package/dist/lib/browser/state-LXTS54DI.mjs +21 -0
  48. package/dist/lib/browser/state-LXTS54DI.mjs.map +7 -0
  49. package/dist/lib/browser/toolkit-NQ2GXCF5.mjs +199 -0
  50. package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
  51. package/dist/lib/browser/types/index.mjs +7 -4
  52. package/dist/lib/node-esm/{BlueprintContainer-RGTMNLNX.mjs → BlueprintContainer-J664LTU3.mjs} +4 -3
  53. package/dist/lib/{browser/BlueprintContainer-IZ4AK5EO.mjs.map → node-esm/BlueprintContainer-J664LTU3.mjs.map} +1 -1
  54. package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs +128 -0
  55. package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs.map +7 -0
  56. package/dist/lib/node-esm/{ChatContainer-W3W6FWV3.mjs → ChatContainer-WLTOQLHH.mjs} +33 -14
  57. package/dist/lib/node-esm/ChatContainer-WLTOQLHH.mjs.map +7 -0
  58. package/dist/lib/node-esm/{ChatDialog-QW4JRKVO.mjs → ChatDialog-ADKF62SY.mjs} +26 -12
  59. package/dist/lib/node-esm/ChatDialog-ADKF62SY.mjs.map +7 -0
  60. package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-PGGJUQ46.mjs} +7 -19
  61. package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
  62. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
  63. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
  64. package/dist/lib/node-esm/{app-graph-builder-PANCJUHV.mjs → app-graph-builder-K6AYO4YM.mjs} +31 -41
  65. package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs.map +7 -0
  66. package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs +13 -0
  67. package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs.map +7 -0
  68. package/dist/lib/node-esm/chunk-73ABYRYX.mjs +20 -0
  69. package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-DBDKOC3I.mjs +203 -0
  71. package/dist/lib/node-esm/chunk-DBDKOC3I.mjs.map +7 -0
  72. package/dist/lib/node-esm/chunk-DSE2IILK.mjs +217 -0
  73. package/dist/lib/node-esm/chunk-DSE2IILK.mjs.map +7 -0
  74. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  75. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  76. package/dist/lib/node-esm/chunk-I7BZMIAG.mjs +170 -0
  77. package/dist/lib/node-esm/chunk-I7BZMIAG.mjs.map +7 -0
  78. package/dist/lib/node-esm/chunk-TBQOICXZ.mjs +297 -0
  79. package/dist/lib/node-esm/chunk-TBQOICXZ.mjs.map +7 -0
  80. package/dist/lib/node-esm/chunk-U2NYUS2N.mjs +177 -0
  81. package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
  82. package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs +1745 -0
  83. package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs.map +7 -0
  84. package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs +17 -0
  85. package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
  86. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
  87. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
  88. package/dist/lib/node-esm/index.mjs +144 -63
  89. package/dist/lib/node-esm/index.mjs.map +3 -3
  90. package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs +113 -0
  91. package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs.map +7 -0
  92. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
  93. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
  94. package/dist/lib/node-esm/meta.json +1 -1
  95. package/dist/lib/node-esm/{react-surface-QDQWJ7FZ.mjs → react-surface-TVVVRIR3.mjs} +25 -68
  96. package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs.map +7 -0
  97. package/dist/lib/node-esm/{settings-J2EXEM5H.mjs → settings-7Y3CRASE.mjs} +8 -7
  98. package/dist/lib/{browser/settings-5GTTCVGD.mjs.map → node-esm/settings-7Y3CRASE.mjs.map} +1 -1
  99. package/dist/lib/node-esm/state-BO6GUFLB.mjs +22 -0
  100. package/dist/lib/node-esm/state-BO6GUFLB.mjs.map +7 -0
  101. package/dist/lib/node-esm/toolkit-V57PRJNG.mjs +200 -0
  102. package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
  103. package/dist/lib/node-esm/types/index.mjs +7 -4
  104. package/dist/types/src/AssistantPlugin.d.ts +1 -1
  105. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  106. package/dist/types/src/capabilities/ai-service.d.ts +4 -0
  107. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  108. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  109. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
  111. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  112. package/dist/types/src/capabilities/capabilities.d.ts +11 -0
  113. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  114. package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
  115. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  116. package/dist/types/src/capabilities/index.d.ts +11 -3
  117. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  119. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  120. package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
  121. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  123. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/settings.d.ts +1 -1
  125. package/dist/types/src/capabilities/state.d.ts +4 -0
  126. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/toolkit.d.ts +4 -0
  128. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  129. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  130. package/dist/types/src/components/Chat/Chat.d.ts +20 -17
  131. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  132. package/dist/types/src/components/Chat/events.d.ts +5 -0
  133. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  134. package/dist/types/src/components/ChatCompanion.d.ts +13 -0
  135. package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
  136. package/dist/types/src/components/ChatContainer.d.ts +4 -4
  137. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  138. package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
  139. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
  140. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
  141. package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
  142. package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
  143. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  144. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
  145. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  146. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  147. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
  148. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  149. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
  150. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  151. package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
  152. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  153. package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
  154. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  155. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -33
  156. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  157. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  158. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  159. package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
  160. package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
  161. package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
  162. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  163. package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
  164. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  165. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  166. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  167. package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
  168. package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
  169. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +1 -1
  170. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
  171. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +264 -3
  172. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
  173. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -5
  174. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  175. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +262 -7
  176. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  177. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +1 -1
  178. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  179. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +259 -2
  180. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  181. package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
  182. package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
  183. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
  184. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  185. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  186. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  187. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  188. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  189. package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
  190. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
  191. package/dist/types/src/components/Toolbar/index.d.ts +2 -0
  192. package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
  193. package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
  194. package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
  195. package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
  196. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  197. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -5
  198. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  199. package/dist/types/src/components/index.d.ts +4 -1
  200. package/dist/types/src/components/index.d.ts.map +1 -1
  201. package/dist/types/src/events.d.ts +1 -1
  202. package/dist/types/src/events.d.ts.map +1 -1
  203. package/dist/types/src/functions/analysis.d.ts +5 -0
  204. package/dist/types/src/functions/analysis.d.ts.map +1 -0
  205. package/dist/types/src/functions/index.d.ts +4 -0
  206. package/dist/types/src/functions/index.d.ts.map +1 -0
  207. package/dist/types/src/functions/list.d.ts +10 -0
  208. package/dist/types/src/functions/list.d.ts.map +1 -0
  209. package/dist/types/src/functions/load.d.ts +8 -0
  210. package/dist/types/src/functions/load.d.ts.map +1 -0
  211. package/dist/types/src/hooks/index.d.ts +7 -3
  212. package/dist/types/src/hooks/index.d.ts.map +1 -1
  213. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
  214. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  215. package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
  216. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  217. package/dist/types/src/hooks/useChatServices.d.ts +5 -6
  218. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  219. package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
  220. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  221. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  222. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  223. package/dist/types/src/hooks/useFlush.d.ts +6 -0
  224. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  225. package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
  226. package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
  227. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  228. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  229. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  230. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  231. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  232. package/dist/types/src/meta.d.ts +1 -2
  233. package/dist/types/src/meta.d.ts.map +1 -1
  234. package/dist/types/src/processor/index.d.ts +3 -0
  235. package/dist/types/src/processor/index.d.ts.map +1 -0
  236. package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
  237. package/dist/types/src/processor/presets.d.ts.map +1 -0
  238. package/dist/types/src/processor/processor.d.ts +74 -0
  239. package/dist/types/src/processor/processor.d.ts.map +1 -0
  240. package/dist/types/src/processor/processor.test.d.ts +2 -0
  241. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  242. package/dist/types/src/stories/Chat.stories.d.ts +28 -203
  243. package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
  244. package/dist/types/src/stories/QueryEditor.stories.d.ts +7 -0
  245. package/dist/types/src/stories/QueryEditor.stories.d.ts.map +1 -0
  246. package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
  247. package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
  248. package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
  249. package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
  250. package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
  251. package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
  252. package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
  253. package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
  254. package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
  255. package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
  256. package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts +7 -0
  257. package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts.map +1 -0
  258. package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
  259. package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
  260. package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
  261. package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
  262. package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
  263. package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
  264. package/dist/types/src/stories/components/ProjectContainer.d.ts +4 -0
  265. package/dist/types/src/stories/components/ProjectContainer.d.ts.map +1 -0
  266. package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
  267. package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
  268. package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
  269. package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
  270. package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
  271. package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
  272. package/dist/types/src/stories/components/ScriptContainer.d.ts +4 -0
  273. package/dist/types/src/stories/components/ScriptContainer.d.ts.map +1 -0
  274. package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
  275. package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
  276. package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
  277. package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
  278. package/dist/types/src/stories/components/TriggersContainer.d.ts +3 -0
  279. package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
  280. package/dist/types/src/stories/components/index.d.ts +18 -0
  281. package/dist/types/src/stories/components/index.d.ts.map +1 -0
  282. package/dist/types/src/stories/components/types.d.ts +7 -0
  283. package/dist/types/src/stories/components/types.d.ts.map +1 -0
  284. package/dist/types/src/stories/testing/data.d.ts +9 -0
  285. package/dist/types/src/stories/testing/data.d.ts.map +1 -0
  286. package/dist/types/src/stories/testing/index.d.ts +3 -0
  287. package/dist/types/src/stories/testing/index.d.ts.map +1 -0
  288. package/dist/types/src/stories/testing/schema.d.ts +7 -0
  289. package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
  290. package/dist/types/src/stories/testing/testing.d.ts +51 -0
  291. package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
  292. package/dist/types/src/testing/index.d.ts +3 -1
  293. package/dist/types/src/testing/index.d.ts.map +1 -1
  294. package/dist/types/src/testing/test-data.d.ts +14 -0
  295. package/dist/types/src/testing/test-data.d.ts.map +1 -0
  296. package/dist/types/src/testing/test-functions.d.ts +5 -2
  297. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  298. package/dist/types/src/testing/test-generator.d.ts +7 -0
  299. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  300. package/dist/types/src/testing/test-sequence.d.ts +0 -4
  301. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  302. package/dist/types/src/translations.d.ts +28 -12
  303. package/dist/types/src/translations.d.ts.map +1 -1
  304. package/dist/types/src/types/Assistant.d.ts +42 -0
  305. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  306. package/dist/types/src/types/AssistantAction.d.ts +107 -0
  307. package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
  308. package/dist/types/src/types/defs.d.ts +2 -0
  309. package/dist/types/src/types/defs.d.ts.map +1 -0
  310. package/dist/types/src/types/index.d.ts +3 -1
  311. package/dist/types/src/types/index.d.ts.map +1 -1
  312. package/dist/types/src/types/service.d.ts +15 -12
  313. package/dist/types/src/types/service.d.ts.map +1 -1
  314. package/dist/types/tsconfig.tsbuildinfo +1 -1
  315. package/package.json +115 -96
  316. package/src/AssistantPlugin.tsx +150 -107
  317. package/src/capabilities/ai-service.ts +27 -0
  318. package/src/capabilities/app-graph-builder.ts +45 -51
  319. package/src/capabilities/blueprint-definition.ts +64 -0
  320. package/src/capabilities/capabilities.ts +18 -0
  321. package/src/capabilities/edge-model-resolver.ts +25 -0
  322. package/src/capabilities/index.ts +9 -0
  323. package/src/capabilities/intent-resolver.ts +46 -24
  324. package/src/capabilities/local-model-resolver.ts +30 -0
  325. package/src/capabilities/react-surface.tsx +10 -57
  326. package/src/capabilities/state.ts +20 -0
  327. package/src/capabilities/toolkit.ts +168 -0
  328. package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
  329. package/src/components/Chat/Chat.tsx +180 -176
  330. package/src/components/Chat/events.ts +7 -0
  331. package/src/components/ChatCompanion.tsx +114 -0
  332. package/src/components/ChatContainer.tsx +19 -13
  333. package/src/components/ChatDialog.tsx +18 -14
  334. package/src/components/ChatProgress/ChatProgress.tsx +67 -0
  335. package/src/components/ChatProgress/index.ts +5 -0
  336. package/src/components/ChatPrompt/ChatActions.tsx +10 -24
  337. package/src/components/ChatPrompt/ChatOptions.tsx +225 -0
  338. package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
  339. package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
  340. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
  341. package/src/components/ChatPrompt/index.ts +1 -1
  342. package/src/components/ChatThread/ChatThread.stories.tsx +98 -112
  343. package/src/components/ChatThread/ChatThread.tsx +65 -29
  344. package/src/components/ChatThread/Link.tsx +26 -0
  345. package/src/components/ChatThread/reducers.ts +151 -0
  346. package/src/components/ChatThread/registry.tsx +184 -0
  347. package/src/components/ChatThread/sync.test.ts +81 -0
  348. package/src/components/ChatThread/sync.ts +113 -0
  349. package/src/components/PromptSettings.tsx +1 -0
  350. package/src/components/SequenceContainer.tsx +29 -30
  351. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +11 -8
  352. package/src/components/SequenceEditor/SequenceEditor.tsx +3 -3
  353. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +26 -15
  354. package/src/components/TemplateEditor/TemplateEditor.tsx +17 -50
  355. package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -10
  356. package/src/components/TemplateEditor/TemplateForm.tsx +4 -2
  357. package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
  358. package/src/components/ToolBlock/ToolBlock.tsx +152 -0
  359. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  360. package/src/components/ToolBlock/index.ts +6 -0
  361. package/src/components/Toolbar/Toolbar.tsx +21 -0
  362. package/src/components/Toolbar/index.ts +5 -0
  363. package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
  364. package/src/components/Toolbox/Toolbox.stories.tsx +13 -22
  365. package/src/components/Toolbox/Toolbox.tsx +21 -51
  366. package/src/components/index.ts +3 -4
  367. package/src/events.ts +2 -2
  368. package/src/functions/analysis.ts +22 -0
  369. package/src/functions/index.ts +7 -0
  370. package/src/functions/list.ts +48 -0
  371. package/src/functions/load.ts +46 -0
  372. package/src/hooks/index.ts +7 -4
  373. package/src/hooks/useBlueprintRegistry.ts +94 -0
  374. package/src/hooks/useChatProcessor.ts +21 -98
  375. package/src/hooks/useChatServices.ts +30 -48
  376. package/src/hooks/useContextBinder.ts +18 -0
  377. package/src/hooks/useContextObjects.ts +58 -0
  378. package/src/hooks/useFlush.ts +35 -0
  379. package/src/hooks/useItemTypes.ts +37 -0
  380. package/src/hooks/useOnline.ts +10 -0
  381. package/src/hooks/usePresets.ts +44 -0
  382. package/src/hooks/useReferencesProvider.ts +11 -9
  383. package/src/meta.ts +4 -6
  384. package/src/processor/index.ts +6 -0
  385. package/src/{hooks → processor}/presets.ts +15 -7
  386. package/src/processor/processor.test.ts +81 -0
  387. package/src/processor/processor.ts +303 -0
  388. package/src/queue-logger.ts +10 -10
  389. package/src/stories/Chat.stories.tsx +816 -305
  390. package/src/stories/QueryEditor.stories.tsx +114 -0
  391. package/src/stories/components/BlueprintContainer.tsx +34 -0
  392. package/src/stories/components/ChatContainer.tsx +74 -0
  393. package/src/stories/components/ChessContainer.tsx +17 -0
  394. package/src/stories/components/CommentsContainer.tsx +25 -0
  395. package/src/stories/components/DebugCard.tsx +61 -0
  396. package/src/stories/components/ExecutionGraphContainer.tsx +30 -0
  397. package/src/stories/components/GraphContainer.tsx +106 -0
  398. package/src/stories/components/InvocationsContainer.tsx +17 -0
  399. package/src/stories/components/MessageContainer.tsx +22 -0
  400. package/src/stories/components/ProjectContainer.tsx +17 -0
  401. package/src/stories/components/PromptContainer.tsx +52 -0
  402. package/src/stories/components/ResearchInputStack.tsx +30 -0
  403. package/src/stories/components/ResearchOutputStack.tsx +29 -0
  404. package/src/stories/components/ScriptContainer.tsx +28 -0
  405. package/src/stories/components/TasksContainer.tsx +47 -0
  406. package/src/stories/components/TokenManagerContainer.tsx +14 -0
  407. package/src/stories/components/TriggersContainer.tsx +12 -0
  408. package/src/stories/components/index.ts +22 -0
  409. package/src/stories/components/types.ts +11 -0
  410. package/src/stories/testing/data.ts +135 -0
  411. package/src/stories/testing/index.ts +6 -0
  412. package/src/stories/testing/schema.ts +17 -0
  413. package/src/stories/testing/testing.tsx +291 -0
  414. package/src/testing/index.ts +3 -1
  415. package/src/testing/test-data.ts +248 -0
  416. package/src/testing/test-functions.ts +8 -3
  417. package/src/testing/test-generator.ts +261 -0
  418. package/src/testing/test-sequence.ts +2 -27
  419. package/src/translations.ts +31 -12
  420. package/src/types/Assistant.ts +61 -0
  421. package/src/types/AssistantAction.ts +62 -0
  422. package/src/types/defs.ts +5 -0
  423. package/src/types/index.ts +4 -1
  424. package/src/types/service.ts +2 -2
  425. package/src/vite-env.d.ts +30 -0
  426. package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs.map +0 -7
  427. package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs.map +0 -7
  428. package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
  429. package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs.map +0 -7
  430. package/dist/lib/browser/chunk-63GG6U6D.mjs +0 -2226
  431. package/dist/lib/browser/chunk-63GG6U6D.mjs.map +0 -7
  432. package/dist/lib/browser/chunk-7W7LHTRH.mjs +0 -171
  433. package/dist/lib/browser/chunk-7W7LHTRH.mjs.map +0 -7
  434. package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
  435. package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
  436. package/dist/lib/browser/chunk-KFXSBNZR.mjs +0 -89
  437. package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
  438. package/dist/lib/browser/chunk-LERGF5YG.mjs +0 -108
  439. package/dist/lib/browser/chunk-LERGF5YG.mjs.map +0 -7
  440. package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs +0 -75
  441. package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs.map +0 -7
  442. package/dist/lib/browser/react-surface-3GYEHQRP.mjs +0 -150
  443. package/dist/lib/browser/react-surface-3GYEHQRP.mjs.map +0 -7
  444. package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs.map +0 -7
  445. package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs.map +0 -7
  446. package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
  447. package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs.map +0 -7
  448. package/dist/lib/node-esm/chunk-BFO3KHYL.mjs +0 -2227
  449. package/dist/lib/node-esm/chunk-BFO3KHYL.mjs.map +0 -7
  450. package/dist/lib/node-esm/chunk-MS3PJARN.mjs +0 -109
  451. package/dist/lib/node-esm/chunk-MS3PJARN.mjs.map +0 -7
  452. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
  453. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
  454. package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs +0 -90
  455. package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs.map +0 -7
  456. package/dist/lib/node-esm/chunk-Z7PUODRT.mjs +0 -172
  457. package/dist/lib/node-esm/chunk-Z7PUODRT.mjs.map +0 -7
  458. package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs +0 -76
  459. package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs.map +0 -7
  460. package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs.map +0 -7
  461. package/dist/types/src/capability-definitions.d.ts +0 -7
  462. package/dist/types/src/capability-definitions.d.ts.map +0 -1
  463. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
  464. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
  465. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
  466. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
  467. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
  468. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
  469. package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
  470. package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
  471. package/dist/types/src/hooks/chat-processor.d.ts +0 -86
  472. package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
  473. package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
  474. package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
  475. package/dist/types/src/hooks/presets.d.ts.map +0 -1
  476. package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
  477. package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
  478. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  479. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  480. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  481. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  482. package/dist/types/src/parser/index.d.ts +0 -4
  483. package/dist/types/src/parser/index.d.ts.map +0 -1
  484. package/dist/types/src/parser/query-parser.d.ts +0 -15
  485. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  486. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  487. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  488. package/dist/types/src/parser/types.d.ts +0 -24
  489. package/dist/types/src/parser/types.d.ts.map +0 -1
  490. package/dist/types/src/tools/function.d.ts +0 -5
  491. package/dist/types/src/tools/function.d.ts.map +0 -1
  492. package/dist/types/src/tools/index.d.ts +0 -3
  493. package/dist/types/src/tools/index.d.ts.map +0 -1
  494. package/dist/types/src/tools/openapi.d.ts +0 -10
  495. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  496. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  497. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  498. package/dist/types/src/types/schema.d.ts +0 -120
  499. package/dist/types/src/types/schema.d.ts.map +0 -1
  500. package/src/capability-definitions.ts +0 -15
  501. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
  502. package/src/components/ChatThread/ChatMessage.tsx +0 -268
  503. package/src/components/ChatThread/ToolBlock.tsx +0 -121
  504. package/src/components/ChatThread/reducer.ts +0 -52
  505. package/src/hooks/chat-processor.test.ts +0 -16
  506. package/src/hooks/chat-processor.ts +0 -314
  507. package/src/hooks/useBlueprints.ts +0 -57
  508. package/src/parser/filter-generator.test.ts +0 -32
  509. package/src/parser/filter-generator.ts +0 -81
  510. package/src/parser/index.ts +0 -7
  511. package/src/parser/query-parser.test.ts +0 -139
  512. package/src/parser/query-parser.ts +0 -199
  513. package/src/parser/types.ts +0 -34
  514. package/src/shims.d.ts +0 -8
  515. package/src/tools/function.ts +0 -46
  516. package/src/tools/index.ts +0 -6
  517. package/src/tools/openapi.test.ts +0 -217
  518. package/src/tools/openapi.ts +0 -338
  519. package/src/types/schema.ts +0 -108
  520. package/src/typings.d.ts +0 -9
  521. /package/dist/lib/{node-esm/BlueprintContainer-RGTMNLNX.mjs.map → browser/BlueprintContainer-TO35YXHT.mjs.map} +0 -0
@@ -0,0 +1,47 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Filter, Obj } from '@dxos/echo';
8
+ import { Markdown } from '@dxos/plugin-markdown/types';
9
+ import { createDocAccessor, useQuery } from '@dxos/react-client/echo';
10
+ import { Toolbar, useThemeContext } from '@dxos/react-ui';
11
+ import {
12
+ Editor,
13
+ createBasicExtensions,
14
+ createDataExtensions,
15
+ createMarkdownExtensions,
16
+ createThemeExtensions,
17
+ outliner,
18
+ } from '@dxos/react-ui-editor';
19
+
20
+ import { type ComponentProps } from './types';
21
+
22
+ export const TasksContainer = ({ space }: ComponentProps) => {
23
+ const { themeMode } = useThemeContext();
24
+ const [document] = useQuery(space, Filter.type(Markdown.Document));
25
+ if (!document?.content.target) {
26
+ return null;
27
+ }
28
+
29
+ return (
30
+ <>
31
+ <Toolbar.Root classNames='border-b border-subduedSeparator'>
32
+ <h2>{Obj.getLabel(document)}</h2>
33
+ </Toolbar.Root>
34
+ <Editor
35
+ id={document.id}
36
+ classNames='h-full p-2 overflow-hidden'
37
+ extensions={[
38
+ createDataExtensions({ id: document.id, text: createDocAccessor(document.content.target, ['content']) }),
39
+ createBasicExtensions({ readOnly: false }),
40
+ createMarkdownExtensions(),
41
+ createThemeExtensions({ themeMode }),
42
+ outliner(),
43
+ ]}
44
+ />
45
+ </>
46
+ );
47
+ };
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { useMemo } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { meta } from '@dxos/plugin-token-manager';
9
+
10
+ export const TokenManagerContainer = () => {
11
+ const data = useMemo(() => ({ subject: `${meta.id}/space-settings` }), []);
12
+
13
+ return <Surface role='article' data={data} limit={1} />;
14
+ };
@@ -0,0 +1,12 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { meta as automationMeta } from '@dxos/plugin-automation';
9
+
10
+ export const TriggersContainer = () => {
11
+ return <Surface role='article' data={{ subject: `${automationMeta.id}/space-settings-automation` }} />;
12
+ };
@@ -0,0 +1,22 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './types';
6
+
7
+ export * from './BlueprintContainer';
8
+ export * from './ChatContainer';
9
+ export * from './ChessContainer';
10
+ export * from './CommentsContainer';
11
+ export * from './ExecutionGraphContainer';
12
+ export * from './GraphContainer';
13
+ export * from './InvocationsContainer';
14
+ export * from './MessageContainer';
15
+ export * from './ProjectContainer';
16
+ export * from './PromptContainer';
17
+ export * from './ResearchInputStack';
18
+ export * from './ResearchOutputStack';
19
+ export * from './ScriptContainer';
20
+ export * from './TasksContainer';
21
+ export * from './TokenManagerContainer';
22
+ export * from './TriggersContainer';
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Space } from '@dxos/client/echo';
6
+
7
+ export type ComponentProps = {
8
+ space: Space;
9
+ debug?: boolean;
10
+ onEvent?: (event: string) => void;
11
+ };
@@ -0,0 +1,135 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Live, type Space } from '@dxos/client/echo';
6
+ import { Obj, Relation, type Type } from '@dxos/echo';
7
+ import { invariant } from '@dxos/invariant';
8
+ import { DataType } from '@dxos/schema';
9
+
10
+ export const testTypes: Type.Obj.Any[] = [
11
+ DataType.Organization,
12
+ DataType.Person,
13
+ DataType.Employer,
14
+ DataType.HasConnection,
15
+ ];
16
+
17
+ export const organizations: (Type.Properties<DataType.Organization> & { id: string })[] = [
18
+ { id: 'dxos', name: 'DXOS', website: 'https://dxos.org' },
19
+ { id: 'socket_supply', name: 'Socket Supply', website: 'https://socketsupply.com' },
20
+ { id: 'ink_and_switch', name: 'Ink & Switch', website: 'https://inkandswitch.com' },
21
+ { id: 'effectful', name: 'Effectful', website: 'https://effect.co' },
22
+ { id: 'blueyard', name: 'Blue Yard', website: 'https://blueyard.com' },
23
+ { id: 'backed', name: 'Backed', website: 'https://backed.vc' },
24
+ { id: 'protocol_labs', name: 'Protocol Labs', website: 'https://protocol.ai' },
25
+ { id: 'newlab', name: 'Newlab', website: 'https://newlab.com' },
26
+ { id: 'google', name: 'Google', website: 'https://google.com' },
27
+ { id: 'microsoft', name: 'Microsoft', website: 'https://microsoft.com' },
28
+ { id: 'openai', name: 'OpenAI', website: 'https://openai.com' },
29
+ { id: 'anthropic', name: 'Anthropic', website: 'https://anthropic.com' },
30
+ { id: 'amazon', name: 'Amazon', website: 'https://amazon.com' },
31
+ { id: 'deshaw', name: 'D. E. Shaw & Co.', website: 'https://deshaw.com' },
32
+ ];
33
+
34
+ const people: (Type.Properties<DataType.Person> & { id: string })[] = [
35
+ { id: 'rich_burdon', fullName: 'Rich Burdon' },
36
+ { id: 'josiah_witt', fullName: 'Josiah Witt' },
37
+ { id: 'dima_dmaretskyi', fullName: 'Dima Maretskyi' },
38
+ { id: 'chad_fowler', fullName: 'Chad Fowler' },
39
+ { id: 'ciaran_oleary', fullName: "Ciarán O'Leary" },
40
+ { id: 'jason_whitmire', fullName: 'Jason Whitmire' },
41
+ { id: 'alex_brunicki', fullName: 'Alex Brunicki' },
42
+ { id: 'andre_de_haes', fullName: 'Andre de Haes' },
43
+ { id: 'scott_cohen', fullName: 'Scott Cohen' },
44
+ { id: 'juan_benet', fullName: 'Juan Benet' },
45
+ { id: 'satya_nadella', fullName: 'Satya Nadella' },
46
+ { id: 'kevin_scott', fullName: 'Kevin Scott' },
47
+ { id: 'jeff_bezos', fullName: 'Jeff Bezos' },
48
+ ];
49
+
50
+ const testObjects: Record<string, any[]> = {
51
+ [DataType.Organization.typename]: organizations,
52
+ [DataType.Person.typename]: people,
53
+ };
54
+
55
+ const testRelationships: Record<
56
+ string,
57
+ ({
58
+ source: string;
59
+ target: string;
60
+ } & Record<string, any>)[]
61
+ > = {
62
+ [DataType.Employer.typename]: [
63
+ // prettier-ignore
64
+ { source: 'rich_burdon', target: 'dxos' },
65
+ { source: 'rich_burdon', target: 'google', active: false }, // TODO(burdon): Should not contribute to force.
66
+ { source: 'rich_burdon', target: 'deshaw', active: false },
67
+ { source: 'josiah_witt', target: 'dxos' },
68
+ { source: 'dima_dmaretskyi', target: 'dxos' },
69
+ { source: 'chad_fowler', target: 'blueyard' },
70
+ { source: 'chad_fowler', target: 'microsoft', active: false },
71
+ { source: 'ciaran_oleary', target: 'blueyard' },
72
+ { source: 'jason_whitmire', target: 'blueyard' },
73
+ { source: 'juan_benet', target: 'protocol_labs' },
74
+ { source: 'alex_brunicki', target: 'backed' },
75
+ { source: 'andre_de_haes', target: 'backed' },
76
+ { source: 'scott_cohen', target: 'newlab' },
77
+ { source: 'satya_nadella', target: 'microsoft' },
78
+ { source: 'kevin_scott', target: 'microsoft' },
79
+ { source: 'kevin_scott', target: 'google', active: false },
80
+ { source: 'jeff_bezos', target: 'amazon' },
81
+ { source: 'jeff_bezos', target: 'deshaw', active: false },
82
+ ],
83
+
84
+ // TODO(burdon): Limit graph view to selected relationship types.
85
+ [DataType.HasConnection.typename]: [
86
+ // prettier-ignore
87
+ { kind: 'partner', source: 'dxos', target: 'ink_and_switch' },
88
+ { kind: 'partner', source: 'dxos', target: 'effectful' },
89
+ { kind: 'partner', source: 'dxos', target: 'socket_supply' },
90
+
91
+ // prettier-ignore
92
+ { kind: 'investor', source: 'blueyard', target: 'dxos' },
93
+ { kind: 'investor', source: 'blueyard', target: 'protocol_labs' },
94
+ { kind: 'investor', source: 'protocol_labs', target: 'dxos' },
95
+ { kind: 'investor', source: 'backed', target: 'dxos' },
96
+ { kind: 'investor', source: 'newlab', target: 'dxos' },
97
+ { kind: 'investor', source: 'microsoft', target: 'openai' },
98
+ { kind: 'investor', source: 'google', target: 'anthropic' },
99
+ { kind: 'investor', source: 'amazon', target: 'anthropic' },
100
+ ],
101
+ };
102
+
103
+ export const addTestData = async (space: Space): Promise<void> => {
104
+ const objectMap = new Map<string, Live<any>>();
105
+
106
+ for (const [typename, objects] of Object.entries(testObjects)) {
107
+ const schema = space.db.graph.schemaRegistry.getSchema(typename);
108
+ invariant(schema, `Schema not found: ${typename}`);
109
+ for (const { id, ...data } of objects) {
110
+ const object = space.db.add(Obj.make(schema, data));
111
+ objectMap.set(id, object);
112
+ }
113
+ }
114
+
115
+ for (const [typename, relationships] of Object.entries(testRelationships)) {
116
+ const schema = space.db.graph.schemaRegistry.getSchema(typename);
117
+ invariant(schema, `Schema not found: ${typename}`);
118
+
119
+ for (const { source, target, ...data } of relationships) {
120
+ const sourceObject = objectMap.get(source);
121
+ const targetObject = objectMap.get(target);
122
+ invariant(sourceObject, `Source object not found: ${source}`);
123
+ invariant(targetObject, `Target object not found: ${target}`);
124
+
125
+ space.db.add(
126
+ Relation.make(schema, {
127
+ // TODO(burdon): Test source/target types match.
128
+ [Relation.Source]: sourceObject,
129
+ [Relation.Target]: targetObject,
130
+ ...data,
131
+ }),
132
+ );
133
+ }
134
+ }
135
+ };
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './testing';
6
+ export * from './schema';
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { Type } from '@dxos/echo';
8
+ import { Queue } from '@dxos/echo-db';
9
+
10
+ export const ResearchInputQueue = Schema.Struct({
11
+ queue: Type.Ref(Queue),
12
+ }).pipe(
13
+ Type.Obj({
14
+ typename: 'dxos.org/type/ResearchInputQueue',
15
+ version: '0.1.0',
16
+ }),
17
+ );
@@ -0,0 +1,291 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Tool from '@effect/ai/Tool';
6
+ import * as Toolkit from '@effect/ai/Toolkit';
7
+ import * as Console from 'effect/Console';
8
+ import * as Schema from 'effect/Schema';
9
+
10
+ import { SERVICES_CONFIG } from '@dxos/ai/testing';
11
+ import {
12
+ Capabilities,
13
+ Events,
14
+ IntentPlugin,
15
+ LayoutAction,
16
+ type Plugin,
17
+ type PluginContext,
18
+ SettingsPlugin,
19
+ allOf,
20
+ contributes,
21
+ createIntent,
22
+ createResolver,
23
+ defineModule,
24
+ definePlugin,
25
+ } from '@dxos/app-framework';
26
+ import { withPluginManager } from '@dxos/app-framework/testing';
27
+ import { AiContextBinder, ArtifactId } from '@dxos/assistant';
28
+ import {
29
+ DESIGN_BLUEPRINT,
30
+ PLANNING_BLUEPRINT,
31
+ agent,
32
+ createResearchNote,
33
+ readDocument,
34
+ readTasks,
35
+ research,
36
+ updateDocument,
37
+ updateTasks,
38
+ } from '@dxos/assistant-testing';
39
+ import { Blueprint, Prompt } from '@dxos/blueprints';
40
+ import { type Space } from '@dxos/client/echo';
41
+ import { Obj, Ref } from '@dxos/echo';
42
+ import { FunctionTrigger, FunctionType, exampleFunctions } from '@dxos/functions';
43
+ import { log } from '@dxos/log';
44
+ import { AttentionPlugin } from '@dxos/plugin-attention';
45
+ import { AutomationPlugin } from '@dxos/plugin-automation';
46
+ import { ClientCapabilities, ClientEvents, ClientPlugin } from '@dxos/plugin-client';
47
+ import { type ClientPluginOptions } from '@dxos/plugin-client/types';
48
+ import { DeckAction } from '@dxos/plugin-deck/types';
49
+ import { GraphPlugin } from '@dxos/plugin-graph';
50
+ import { Markdown } from '@dxos/plugin-markdown/types';
51
+ import { PreviewPlugin } from '@dxos/plugin-preview';
52
+ import { SpacePlugin } from '@dxos/plugin-space';
53
+ import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
54
+ import { ThemePlugin } from '@dxos/plugin-theme';
55
+ import { type Client, Config } from '@dxos/react-client';
56
+ import { defaultTx } from '@dxos/react-ui-theme';
57
+ import { DataType } from '@dxos/schema';
58
+ import { trim } from '@dxos/util';
59
+
60
+ import { AssistantPlugin } from '../../AssistantPlugin';
61
+ import { Assistant, AssistantAction } from '../../types';
62
+
63
+ // TODO(burdon): Factor out.
64
+ export const config = {
65
+ remote: new Config({
66
+ runtime: {
67
+ services: SERVICES_CONFIG.REMOTE,
68
+ },
69
+ }),
70
+ persistent: new Config({
71
+ runtime: {
72
+ client: {
73
+ storage: {
74
+ persistent: true,
75
+ },
76
+ },
77
+ services: SERVICES_CONFIG.REMOTE,
78
+ },
79
+ }),
80
+ local: new Config({
81
+ runtime: {
82
+ services: SERVICES_CONFIG.LOCAL,
83
+ },
84
+ }),
85
+ };
86
+
87
+ class TestingToolkit extends Toolkit.make(
88
+ Tool.make('open-item', {
89
+ description: trim`
90
+ Opens an item in the application.
91
+ `,
92
+ parameters: {
93
+ id: ArtifactId,
94
+ },
95
+ success: Schema.Any,
96
+ failure: Schema.Never,
97
+ }),
98
+ ) {
99
+ static layer = (_context: PluginContext) =>
100
+ TestingToolkit.toLayer({
101
+ 'open-item': ({ id }) => Console.log('Called open-item', { id }),
102
+ });
103
+ }
104
+
105
+ type DecoratorsProps = Omit<ClientPluginOptions, 'onClientInitialized' | 'onSpacesReady'> &
106
+ Pick<StoryPluginOptions, 'onChatCreated'> & {
107
+ plugins?: Plugin[];
108
+ accessTokens?: DataType.AccessToken[];
109
+ onInit?: (props: { client: Client; space: Space }) => Promise<void>;
110
+ };
111
+
112
+ /**
113
+ * Create storybook decorators.
114
+ */
115
+ export const getDecorators = ({
116
+ types = [],
117
+ plugins = [],
118
+ accessTokens = [],
119
+ onInit,
120
+ onChatCreated,
121
+ ...props
122
+ }: DecoratorsProps) => [
123
+ withPluginManager({
124
+ plugins: [
125
+ // System plugins.
126
+ AttentionPlugin(),
127
+ AutomationPlugin(),
128
+ GraphPlugin(),
129
+ IntentPlugin(),
130
+ SettingsPlugin(),
131
+ SpacePlugin({}),
132
+ ClientPlugin({
133
+ types: [
134
+ Markdown.Document,
135
+ Assistant.Chat,
136
+ Blueprint.Blueprint,
137
+ Prompt.Prompt,
138
+ DataType.AccessToken,
139
+ FunctionTrigger,
140
+ FunctionType,
141
+ ...types,
142
+ ],
143
+ onClientInitialized: async ({ client }) => {
144
+ log('onClientInitialized', { identity: client.halo.identity.get()?.did });
145
+ // Abort if already initialized.
146
+ if (client.halo.identity.get()) {
147
+ return;
148
+ }
149
+
150
+ await client.halo.createIdentity();
151
+ await client.spaces.waitUntilReady();
152
+
153
+ const space = client.spaces.default;
154
+ // TODO(burdon): Should not require this.
155
+ // ERROR: invariant violation: Database was not initialized with root object.
156
+ // TODO(burdon): onSpacesReady is never called.
157
+ await space.waitUntilReady();
158
+
159
+ // Add tokens.
160
+ for (const accessToken of accessTokens) {
161
+ space.db.add(Obj.clone(accessToken));
162
+ }
163
+
164
+ await space.db.flush({ indexes: true });
165
+ await onInit?.({ client, space });
166
+ await space.db.flush({ indexes: true });
167
+ },
168
+ ...props,
169
+ }),
170
+
171
+ // Cards
172
+ ThemePlugin({ tx: defaultTx }),
173
+ StorybookLayoutPlugin({}),
174
+ PreviewPlugin(),
175
+
176
+ // User plugins.
177
+ AssistantPlugin(),
178
+ StoryPlugin({ onChatCreated }),
179
+
180
+ // Test-specific.
181
+ ...plugins,
182
+ ],
183
+ }),
184
+ ];
185
+
186
+ /**
187
+ * Creates access tokens from environment variables.
188
+ * @param tokens - Record of token sources mapped to their VITE_ prefixed environment variable values
189
+ * @returns Array of AccessToken objects for non-empty token values
190
+ * @example
191
+ * ```tsx
192
+ * const tokens = accessTokensFromEnv({
193
+ * 'exa.ai': process.env.VITE_EXA_API_KEY,
194
+ * 'linear.app': process.env.VITE_LINEAR_API_KEY
195
+ * });
196
+ * ```
197
+ * @note All environment variables should use the VITE_ prefix for proper Vite bundling
198
+ */
199
+
200
+ export const accessTokensFromEnv = (tokens: Record<string, string | undefined>) => {
201
+ return Object.entries(tokens)
202
+ .filter(([, token]) => !!token)
203
+ .map(([source, token]) => Obj.make(DataType.AccessToken, { source, token: token! }));
204
+ };
205
+
206
+ type StoryPluginOptions = {
207
+ onChatCreated?: (props: { space: Space; chat: Assistant.Chat; binder: AiContextBinder }) => Promise<void>;
208
+ };
209
+
210
+ const StoryPlugin = definePlugin<StoryPluginOptions>(
211
+ {
212
+ id: 'example.com/plugin/testing',
213
+ name: 'Testing',
214
+ },
215
+ ({ onChatCreated }) => [
216
+ defineModule({
217
+ id: 'example.com/plugin/testing/module/testing',
218
+ activatesOn: Events.SetupArtifactDefinition,
219
+ activate: () => [
220
+ // TODO(burdon): Move into assistnat?
221
+ contributes(Capabilities.BlueprintDefinition, DESIGN_BLUEPRINT),
222
+ contributes(Capabilities.BlueprintDefinition, PLANNING_BLUEPRINT),
223
+ contributes(Capabilities.Functions, [agent]),
224
+ contributes(Capabilities.Functions, [readDocument, updateDocument]),
225
+ contributes(Capabilities.Functions, [readTasks, updateTasks]),
226
+ contributes(Capabilities.Functions, [research, createResearchNote]),
227
+ contributes(Capabilities.Functions, [exampleFunctions.reply]),
228
+ ],
229
+ }),
230
+ defineModule({
231
+ id: 'example.com/plugin/testing/module/toolkit',
232
+ activatesOn: Events.Startup,
233
+ activate: (context) => [
234
+ contributes(Capabilities.Toolkit, TestingToolkit),
235
+ contributes(Capabilities.ToolkitHandler, TestingToolkit.layer(context)),
236
+ ],
237
+ }),
238
+ defineModule({
239
+ id: 'example.com/plugin/testing/module/setup',
240
+ activatesOn: allOf(Events.DispatcherReady, ClientEvents.SpacesReady),
241
+ activate: async (context) => {
242
+ const client = context.getCapability(ClientCapabilities.Client);
243
+ const space = client.spaces.default;
244
+ const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
245
+
246
+ // Ensure workspace is set.
247
+ await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: space.id }));
248
+
249
+ // Create initial chat.
250
+ await dispatch(createIntent(AssistantAction.CreateChat, { space }));
251
+
252
+ return [];
253
+ },
254
+ }),
255
+ defineModule({
256
+ id: 'example.com/plugin/testing/module/intent-resolver',
257
+ activatesOn: Events.SetupIntentResolver,
258
+ activate: () => [
259
+ contributes(Capabilities.IntentResolver, [
260
+ createResolver({
261
+ intent: DeckAction.ChangeCompanion,
262
+ resolve: () => ({}),
263
+ }),
264
+ createResolver({
265
+ intent: AssistantAction.CreateChat,
266
+ position: 'hoist',
267
+ resolve: async ({ space, name }) => {
268
+ const queue = space.queues.create();
269
+ const traceQueue = space.queues.create();
270
+ const chat = Obj.make(Assistant.Chat, {
271
+ name,
272
+ queue: Ref.fromDXN(queue.dxn),
273
+ traceQueue: Ref.fromDXN(traceQueue.dxn),
274
+ });
275
+ const binder = new AiContextBinder(queue);
276
+
277
+ // Story-specific behaviour to allow chat creation to be extended.
278
+ space.db.add(chat);
279
+ await space.db.flush({ indexes: true });
280
+ await onChatCreated?.({ space, chat, binder });
281
+
282
+ return {
283
+ data: { object: chat },
284
+ };
285
+ },
286
+ }),
287
+ ]),
288
+ ],
289
+ }),
290
+ ],
291
+ );
@@ -2,6 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export * from './test-sequence';
5
+ export * from './test-data';
6
6
  export * from './test-functions';
7
+ export * from './test-generator';
8
+ export * from './test-sequence';
7
9
  export * from './test-services';