@dxos/plugin-assistant 0.8.3 → 0.8.4-main.1068cf700f

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 (721) hide show
  1. package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs +30 -0
  2. package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs.map +7 -0
  3. package/dist/lib/browser/ChatCompanion-JOTRKE7B.mjs +200 -0
  4. package/dist/lib/browser/ChatCompanion-JOTRKE7B.mjs.map +7 -0
  5. package/dist/lib/browser/ChatContainer-ESDLG5JY.mjs +73 -0
  6. package/dist/lib/browser/ChatContainer-ESDLG5JY.mjs.map +7 -0
  7. package/dist/lib/browser/ChatDialog-LKY3FTYO.mjs +85 -0
  8. package/dist/lib/browser/ChatDialog-LKY3FTYO.mjs.map +7 -0
  9. package/dist/lib/browser/InitiativeContainer-T2SQ4O6J.mjs +267 -0
  10. package/dist/lib/browser/InitiativeContainer-T2SQ4O6J.mjs.map +7 -0
  11. package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs +52 -0
  12. package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs.map +7 -0
  13. package/dist/lib/browser/ai-service-CY2BYPH6.mjs +22 -0
  14. package/dist/lib/browser/ai-service-CY2BYPH6.mjs.map +7 -0
  15. package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs +234 -0
  16. package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs.map +7 -0
  17. package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs +14 -0
  18. package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs.map +7 -0
  19. package/dist/lib/browser/blueprints/index.mjs +12 -0
  20. package/dist/lib/browser/blueprints/index.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-3ETBCBMH.mjs +47 -0
  22. package/dist/lib/browser/chunk-3ETBCBMH.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-6BVCG5SJ.mjs +230 -0
  24. package/dist/lib/browser/chunk-6BVCG5SJ.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-DKQMSMBN.mjs +326 -0
  26. package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-EXVT7D4B.mjs +23 -0
  28. package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
  29. package/dist/lib/browser/chunk-IJYAKPEU.mjs +286 -0
  30. package/dist/lib/browser/chunk-IJYAKPEU.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  32. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  33. package/dist/lib/browser/chunk-POPBT2AQ.mjs +198 -0
  34. package/dist/lib/browser/chunk-POPBT2AQ.mjs.map +7 -0
  35. package/dist/lib/browser/chunk-Q4QUMX62.mjs +1974 -0
  36. package/dist/lib/browser/chunk-Q4QUMX62.mjs.map +7 -0
  37. package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs +21 -0
  38. package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs.map +7 -0
  39. package/dist/lib/browser/index.mjs +329 -207
  40. package/dist/lib/browser/index.mjs.map +4 -4
  41. package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs +20 -0
  42. package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +7 -0
  43. package/dist/lib/browser/meta.json +1 -1
  44. package/dist/lib/browser/operation-resolver-2673CFJS.mjs +133 -0
  45. package/dist/lib/browser/operation-resolver-2673CFJS.mjs.map +7 -0
  46. package/dist/lib/browser/react-surface-I7YJVK4K.mjs +125 -0
  47. package/dist/lib/browser/react-surface-I7YJVK4K.mjs.map +7 -0
  48. package/dist/lib/browser/repair-IRXDYF4R.mjs +51 -0
  49. package/dist/lib/browser/repair-IRXDYF4R.mjs.map +7 -0
  50. package/dist/lib/browser/settings-XF6GKHCG.mjs +33 -0
  51. package/dist/lib/browser/settings-XF6GKHCG.mjs.map +7 -0
  52. package/dist/lib/browser/state-OYDPWLKA.mjs +26 -0
  53. package/dist/lib/browser/state-OYDPWLKA.mjs.map +7 -0
  54. package/dist/lib/browser/toolkit-IDXQCSTX.mjs +19 -0
  55. package/dist/lib/browser/toolkit-IDXQCSTX.mjs.map +7 -0
  56. package/dist/lib/browser/types/index.mjs +11 -20
  57. package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs +31 -0
  58. package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs.map +7 -0
  59. package/dist/lib/node-esm/ChatCompanion-52OWAARX.mjs +201 -0
  60. package/dist/lib/node-esm/ChatCompanion-52OWAARX.mjs.map +7 -0
  61. package/dist/lib/node-esm/ChatContainer-VLWSQ3ZO.mjs +74 -0
  62. package/dist/lib/node-esm/ChatContainer-VLWSQ3ZO.mjs.map +7 -0
  63. package/dist/lib/node-esm/ChatDialog-5DUQIF2T.mjs +86 -0
  64. package/dist/lib/node-esm/ChatDialog-5DUQIF2T.mjs.map +7 -0
  65. package/dist/lib/node-esm/InitiativeContainer-ATD3D23L.mjs +268 -0
  66. package/dist/lib/node-esm/InitiativeContainer-ATD3D23L.mjs.map +7 -0
  67. package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs +53 -0
  68. package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs.map +7 -0
  69. package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +23 -0
  70. package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +7 -0
  71. package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs +235 -0
  72. package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs.map +7 -0
  73. package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs +15 -0
  74. package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs.map +7 -0
  75. package/dist/lib/node-esm/blueprints/index.mjs +13 -0
  76. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  77. package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs +48 -0
  78. package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs.map +7 -0
  79. package/dist/lib/node-esm/chunk-75PHXBN3.mjs +327 -0
  80. package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +7 -0
  81. package/dist/lib/node-esm/chunk-ESDMBGF7.mjs +1975 -0
  82. package/dist/lib/node-esm/chunk-ESDMBGF7.mjs.map +7 -0
  83. package/dist/lib/node-esm/chunk-F6LA7XNS.mjs +199 -0
  84. package/dist/lib/node-esm/chunk-F6LA7XNS.mjs.map +7 -0
  85. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  86. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  87. package/dist/lib/node-esm/chunk-LB72WG6R.mjs +231 -0
  88. package/dist/lib/node-esm/chunk-LB72WG6R.mjs.map +7 -0
  89. package/dist/lib/node-esm/chunk-MJD5XWQV.mjs +288 -0
  90. package/dist/lib/node-esm/chunk-MJD5XWQV.mjs.map +7 -0
  91. package/dist/lib/node-esm/chunk-POWB2BPC.mjs +25 -0
  92. package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
  93. package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs +22 -0
  94. package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +7 -0
  95. package/dist/lib/node-esm/index.mjs +329 -207
  96. package/dist/lib/node-esm/index.mjs.map +4 -4
  97. package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +21 -0
  98. package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +7 -0
  99. package/dist/lib/node-esm/meta.json +1 -1
  100. package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs +134 -0
  101. package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs.map +7 -0
  102. package/dist/lib/node-esm/react-surface-2CWJ6GZW.mjs +126 -0
  103. package/dist/lib/node-esm/react-surface-2CWJ6GZW.mjs.map +7 -0
  104. package/dist/lib/node-esm/repair-DMI55PON.mjs +52 -0
  105. package/dist/lib/node-esm/repair-DMI55PON.mjs.map +7 -0
  106. package/dist/lib/node-esm/settings-NGGZA7S7.mjs +34 -0
  107. package/dist/lib/node-esm/settings-NGGZA7S7.mjs.map +7 -0
  108. package/dist/lib/node-esm/state-VSCPGN7R.mjs +27 -0
  109. package/dist/lib/node-esm/state-VSCPGN7R.mjs.map +7 -0
  110. package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs +20 -0
  111. package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs.map +7 -0
  112. package/dist/lib/node-esm/types/index.mjs +11 -20
  113. package/dist/types/src/AssistantPlugin.d.ts +2 -1
  114. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  115. package/dist/types/src/blueprints/assistant-blueprint.d.ts +11 -0
  116. package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/index.d.ts +7 -0
  118. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/ai-service/ai-service.d.ts +6 -0
  120. package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
  122. package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  124. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  126. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +26 -0
  128. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +4 -0
  130. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +7 -0
  132. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
  134. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
  135. package/dist/types/src/capabilities/index.d.ts +11 -6
  136. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  137. package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
  138. package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +13 -0
  140. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
  141. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  142. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  143. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  144. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  145. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  146. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  147. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  148. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  149. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  150. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  151. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  152. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  153. package/dist/types/src/capabilities/settings/index.d.ts +15 -0
  154. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  155. package/dist/types/src/capabilities/settings/settings.d.ts +18 -0
  156. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  157. package/dist/types/src/capabilities/state/index.d.ts +11 -0
  158. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  159. package/dist/types/src/capabilities/state/state.d.ts +13 -0
  160. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  161. package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
  162. package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
  163. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +6 -0
  164. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
  165. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +6 -4
  166. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  167. package/dist/types/src/components/BlueprintArticle.d.ts +7 -0
  168. package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -0
  169. package/dist/types/src/components/Chat/Chat.d.ts +63 -0
  170. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
  171. package/dist/types/src/components/Chat/events.d.ts +39 -0
  172. package/dist/types/src/components/Chat/events.d.ts.map +1 -0
  173. package/dist/types/src/components/Chat/index.d.ts +3 -0
  174. package/dist/types/src/components/Chat/index.d.ts.map +1 -0
  175. package/dist/types/src/components/ChatCompanion.d.ts +13 -0
  176. package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
  177. package/dist/types/src/components/ChatContainer.d.ts +17 -9
  178. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  179. package/dist/types/src/components/ChatDialog.d.ts +8 -0
  180. package/dist/types/src/components/ChatDialog.d.ts.map +1 -0
  181. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
  182. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
  183. package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
  184. package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
  185. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +11 -0
  186. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -0
  187. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
  188. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  189. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +11 -0
  190. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
  191. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +10 -0
  192. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -0
  193. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +10 -0
  194. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -0
  195. package/dist/types/src/components/ChatPrompt/index.d.ts +6 -0
  196. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -0
  197. package/dist/types/src/components/ChatThread/ChatThread.d.ts +21 -0
  198. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
  199. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +455 -0
  200. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
  201. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  202. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  203. package/dist/types/src/components/ChatThread/index.d.ts +2 -0
  204. package/dist/types/src/components/ChatThread/index.d.ts.map +1 -0
  205. package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
  206. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  207. package/dist/types/src/components/ChatThread/sync.d.ts +42 -0
  208. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  209. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  210. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  211. package/dist/types/src/components/InitiativeContainer.d.ts +9 -0
  212. package/dist/types/src/components/InitiativeContainer.d.ts.map +1 -0
  213. package/dist/types/src/components/PromptArticle.d.ts +7 -0
  214. package/dist/types/src/components/PromptArticle.d.ts.map +1 -0
  215. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +5 -8
  216. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  217. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +431 -7
  218. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  219. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +16 -5
  220. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  221. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +429 -3
  222. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  223. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
  224. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
  225. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
  226. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
  227. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
  228. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
  229. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +21 -0
  230. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  231. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  232. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  233. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  234. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  235. package/dist/types/src/components/Toolbox/Toolbox.d.ts +13 -12
  236. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  237. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +432 -5
  238. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  239. package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts +4 -0
  240. package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  241. package/dist/types/src/components/TriggerStatus/index.d.ts +2 -0
  242. package/dist/types/src/components/TriggerStatus/index.d.ts.map +1 -0
  243. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
  244. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
  245. package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
  246. package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
  247. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
  248. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
  249. package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
  250. package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
  251. package/dist/types/src/components/Typewriter/index.d.ts +2 -0
  252. package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
  253. package/dist/types/src/components/index.d.ts +11 -14
  254. package/dist/types/src/components/index.d.ts.map +1 -1
  255. package/dist/types/src/functions/index.d.ts +4 -0
  256. package/dist/types/src/functions/index.d.ts.map +1 -0
  257. package/dist/types/src/functions/object-list.d.ts +10 -0
  258. package/dist/types/src/functions/object-list.d.ts.map +1 -0
  259. package/dist/types/src/functions/object-load.d.ts +8 -0
  260. package/dist/types/src/functions/object-load.d.ts.map +1 -0
  261. package/dist/types/src/functions/object-search.d.ts +10 -0
  262. package/dist/types/src/functions/object-search.d.ts.map +1 -0
  263. package/dist/types/src/hooks/index.d.ts +10 -5
  264. package/dist/types/src/hooks/index.d.ts.map +1 -1
  265. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
  266. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  267. package/dist/types/src/hooks/useChatProcessor.d.ts +13 -11
  268. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  269. package/dist/types/src/hooks/useChatServices.d.ts +13 -0
  270. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
  271. package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
  272. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
  273. package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
  274. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  275. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  276. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  277. package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
  278. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
  279. package/dist/types/src/hooks/useFlush.d.ts +6 -0
  280. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  281. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  282. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  283. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  284. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  285. package/dist/types/src/hooks/useReferencesProvider.d.ts +7 -0
  286. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
  287. package/dist/types/src/index.d.ts +2 -1
  288. package/dist/types/src/index.d.ts.map +1 -1
  289. package/dist/types/src/meta.d.ts +3 -4
  290. package/dist/types/src/meta.d.ts.map +1 -1
  291. package/dist/types/src/processor/index.d.ts +4 -0
  292. package/dist/types/src/processor/index.d.ts.map +1 -0
  293. package/dist/types/src/processor/presets.d.ts +13 -0
  294. package/dist/types/src/processor/presets.d.ts.map +1 -0
  295. package/dist/types/src/processor/processor.d.ts +79 -0
  296. package/dist/types/src/processor/processor.d.ts.map +1 -0
  297. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  298. package/dist/types/src/processor/update-name.d.ts +10 -0
  299. package/dist/types/src/processor/update-name.d.ts.map +1 -0
  300. package/dist/types/src/queue-logger.d.ts +5 -5
  301. package/dist/types/src/queue-logger.d.ts.map +1 -1
  302. package/dist/types/src/testing/index.d.ts +2 -2
  303. package/dist/types/src/testing/index.d.ts.map +1 -1
  304. package/dist/types/src/testing/test-generator.d.ts +8 -0
  305. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  306. package/dist/types/src/testing/test-sequence.d.ts +4 -0
  307. package/dist/types/src/testing/test-sequence.d.ts.map +1 -0
  308. package/dist/types/src/testing/test-services.d.ts +2 -2
  309. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  310. package/dist/types/src/translations.d.ts +416 -113
  311. package/dist/types/src/translations.d.ts.map +1 -1
  312. package/dist/types/src/types/Assistant.d.ts +20 -0
  313. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  314. package/dist/types/src/types/AssistantAction.d.ts +97 -0
  315. package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
  316. package/dist/types/src/types/capabilities.d.ts +33 -0
  317. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  318. package/dist/types/src/types/defs.d.ts +2 -0
  319. package/dist/types/src/types/defs.d.ts.map +1 -0
  320. package/dist/types/src/types/events.d.ts +5 -0
  321. package/dist/types/src/types/events.d.ts.map +1 -0
  322. package/dist/types/src/types/index.d.ts +6 -3
  323. package/dist/types/src/types/index.d.ts.map +1 -1
  324. package/dist/types/src/types/service.d.ts +14 -213
  325. package/dist/types/src/types/service.d.ts.map +1 -1
  326. package/dist/types/tsconfig.tsbuildinfo +1 -1
  327. package/package.json +127 -92
  328. package/src/AssistantPlugin.tsx +159 -115
  329. package/src/blueprints/assistant-blueprint.ts +57 -0
  330. package/src/blueprints/index.ts +12 -0
  331. package/src/capabilities/ai-service/ai-service.ts +30 -0
  332. package/src/capabilities/ai-service/index.ts +7 -0
  333. package/src/capabilities/app-graph-builder/app-graph-builder.ts +200 -0
  334. package/src/capabilities/app-graph-builder/index.ts +7 -0
  335. package/src/capabilities/blueprint-definition/blueprint-definition.ts +74 -0
  336. package/src/capabilities/blueprint-definition/index.ts +8 -0
  337. package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +33 -0
  338. package/src/capabilities/edge-model-resolver/index.ts +7 -0
  339. package/src/capabilities/index.ts +11 -9
  340. package/src/capabilities/local-model-resolver/index.ts +7 -0
  341. package/src/capabilities/local-model-resolver/local-model-resolver.ts +38 -0
  342. package/src/capabilities/operation-resolver/index.ts +7 -0
  343. package/src/capabilities/operation-resolver/operation-resolver.ts +112 -0
  344. package/src/capabilities/react-surface/index.ts +7 -0
  345. package/src/capabilities/react-surface/react-surface.tsx +111 -0
  346. package/src/capabilities/repair/index.ts +7 -0
  347. package/src/capabilities/repair/repair.ts +62 -0
  348. package/src/capabilities/settings/index.ts +7 -0
  349. package/src/capabilities/settings/settings.ts +31 -0
  350. package/src/capabilities/state/index.ts +7 -0
  351. package/src/capabilities/state/state.ts +27 -0
  352. package/src/capabilities/toolkit/index.ts +7 -0
  353. package/src/capabilities/toolkit/toolkit.ts +27 -0
  354. package/src/components/AssistantSettings/AssistantSettings.tsx +94 -79
  355. package/src/components/BlueprintArticle.tsx +28 -0
  356. package/src/components/Chat/Chat.tsx +458 -0
  357. package/src/components/Chat/events.ts +63 -0
  358. package/src/components/Chat/index.ts +7 -0
  359. package/src/components/ChatCompanion.tsx +226 -0
  360. package/src/components/ChatContainer.tsx +55 -26
  361. package/src/components/ChatDialog.tsx +75 -0
  362. package/src/components/ChatProgress/ChatProgress.tsx +53 -0
  363. package/src/components/{AmbientDialog → ChatProgress}/index.ts +1 -1
  364. package/src/components/ChatPrompt/ChatActions.tsx +63 -0
  365. package/src/components/ChatPrompt/ChatOptions.tsx +238 -0
  366. package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
  367. package/src/components/ChatPrompt/ChatReferences.tsx +47 -0
  368. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +42 -0
  369. package/src/components/ChatPrompt/index.ts +9 -0
  370. package/src/components/ChatThread/ChatThread.stories.tsx +150 -0
  371. package/src/components/ChatThread/ChatThread.tsx +96 -0
  372. package/src/components/ChatThread/Link.tsx +26 -0
  373. package/src/{experimental/transcription → components/ChatThread}/index.ts +2 -0
  374. package/src/components/ChatThread/registry.tsx +174 -0
  375. package/src/components/ChatThread/sync.test.ts +97 -0
  376. package/src/components/ChatThread/sync.ts +154 -0
  377. package/src/components/ChatThread/testing/thread.md +37 -0
  378. package/src/components/InitiativeContainer.tsx +340 -0
  379. package/src/components/PromptArticle.tsx +49 -0
  380. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +57 -41
  381. package/src/components/TemplateEditor/TemplateEditor.tsx +40 -46
  382. package/src/components/TemplateEditor/TemplateForm.stories.tsx +39 -26
  383. package/src/components/TemplateEditor/TemplateForm.tsx +121 -79
  384. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
  385. package/src/components/TemplateEditor/extensions/index.ts +6 -0
  386. package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
  387. package/src/components/ToolBlock/ToolBlock.tsx +143 -0
  388. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  389. package/src/components/ToolBlock/index.ts +6 -0
  390. package/src/components/Toolbox/Toolbox.stories.tsx +18 -29
  391. package/src/components/Toolbox/Toolbox.tsx +77 -53
  392. package/src/components/TriggerStatus/TriggerStatus.tsx +142 -0
  393. package/src/components/TriggerStatus/index.ts +5 -0
  394. package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
  395. package/src/components/Typewriter/Typewriter.stories.tsx +83 -0
  396. package/src/components/Typewriter/Typewriter.tsx +54 -0
  397. package/src/components/Typewriter/assistant-extension.tsx +144 -0
  398. package/src/components/Typewriter/index.ts +5 -0
  399. package/src/components/index.ts +16 -12
  400. package/src/functions/index.ts +7 -0
  401. package/src/functions/object-list.ts +49 -0
  402. package/src/functions/object-load.ts +44 -0
  403. package/src/functions/object-search.ts +46 -0
  404. package/src/hooks/index.ts +10 -6
  405. package/src/hooks/useBlueprintRegistry.ts +105 -0
  406. package/src/hooks/useChatProcessor.ts +78 -0
  407. package/src/hooks/useChatServices.ts +47 -0
  408. package/src/hooks/useChatToolbarActions.ts +122 -0
  409. package/src/hooks/useContextBinder.ts +32 -0
  410. package/src/hooks/useContextObjects.ts +46 -0
  411. package/src/hooks/useFilteredTypes.ts +37 -0
  412. package/src/hooks/useFlush.ts +35 -0
  413. package/src/hooks/useOnline.ts +10 -0
  414. package/src/hooks/usePresets.ts +44 -0
  415. package/src/hooks/useReferencesProvider.ts +58 -0
  416. package/src/index.ts +2 -1
  417. package/src/meta.ts +11 -8
  418. package/src/processor/index.ts +7 -0
  419. package/src/processor/presets.ts +60 -0
  420. package/src/processor/processor.test.ts +72 -0
  421. package/src/processor/processor.ts +301 -0
  422. package/src/processor/update-name.ts +58 -0
  423. package/src/queue-logger.ts +23 -24
  424. package/src/testing/index.ts +2 -2
  425. package/src/testing/test-generator.ts +262 -0
  426. package/src/testing/test-sequence.ts +26 -0
  427. package/src/testing/test-services.ts +10 -14
  428. package/src/translations.ts +90 -27
  429. package/src/types/Assistant.ts +28 -0
  430. package/src/types/AssistantAction.ts +76 -0
  431. package/src/types/capabilities.ts +27 -0
  432. package/src/types/defs.ts +5 -0
  433. package/src/types/events.ts +11 -0
  434. package/src/types/index.ts +9 -3
  435. package/src/types/service.ts +25 -14
  436. package/src/vite-env.d.ts +30 -0
  437. package/dist/lib/browser/AssistantDialog-MQOOR364.mjs +0 -47
  438. package/dist/lib/browser/AssistantDialog-MQOOR364.mjs.map +0 -7
  439. package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs +0 -321
  440. package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs.map +0 -7
  441. package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs +0 -40
  442. package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs.map +0 -7
  443. package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs +0 -28
  444. package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs.map +0 -7
  445. package/dist/lib/browser/ai-client-MK2ZZII2.mjs +0 -39
  446. package/dist/lib/browser/ai-client-MK2ZZII2.mjs.map +0 -7
  447. package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs +0 -225
  448. package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs.map +0 -7
  449. package/dist/lib/browser/chunk-AAOKC2JN.mjs +0 -208
  450. package/dist/lib/browser/chunk-AAOKC2JN.mjs.map +0 -7
  451. package/dist/lib/browser/chunk-BI6AHRNJ.mjs +0 -157
  452. package/dist/lib/browser/chunk-BI6AHRNJ.mjs.map +0 -7
  453. package/dist/lib/browser/chunk-JO4W3MF7.mjs +0 -2101
  454. package/dist/lib/browser/chunk-JO4W3MF7.mjs.map +0 -7
  455. package/dist/lib/browser/chunk-JQFUME3B.mjs +0 -87
  456. package/dist/lib/browser/chunk-JQFUME3B.mjs.map +0 -7
  457. package/dist/lib/browser/chunk-MEGMOFJB.mjs +0 -16
  458. package/dist/lib/browser/chunk-MEGMOFJB.mjs.map +0 -7
  459. package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +0 -96
  460. package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +0 -7
  461. package/dist/lib/browser/chunk-UE3IZ4PN.mjs +0 -15
  462. package/dist/lib/browser/chunk-UE3IZ4PN.mjs.map +0 -7
  463. package/dist/lib/browser/chunk-XOZ7YMO3.mjs +0 -20
  464. package/dist/lib/browser/chunk-XOZ7YMO3.mjs.map +0 -7
  465. package/dist/lib/browser/intent-resolver-3UICTGPM.mjs +0 -43
  466. package/dist/lib/browser/intent-resolver-3UICTGPM.mjs.map +0 -7
  467. package/dist/lib/browser/react-surface-LXCNUSZN.mjs +0 -159
  468. package/dist/lib/browser/react-surface-LXCNUSZN.mjs.map +0 -7
  469. package/dist/lib/browser/settings-XRHXVWGB.mjs +0 -22
  470. package/dist/lib/browser/settings-XRHXVWGB.mjs.map +0 -7
  471. package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs +0 -73
  472. package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs.map +0 -7
  473. package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs +0 -344
  474. package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs.map +0 -7
  475. package/dist/lib/node/ChatContainer-VKYBQHUB.cjs +0 -68
  476. package/dist/lib/node/ChatContainer-VKYBQHUB.cjs.map +0 -7
  477. package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs +0 -58
  478. package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs.map +0 -7
  479. package/dist/lib/node/ai-client-7HNSMUMT.cjs +0 -53
  480. package/dist/lib/node/ai-client-7HNSMUMT.cjs.map +0 -7
  481. package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs +0 -235
  482. package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs.map +0 -7
  483. package/dist/lib/node/chunk-4EEWTDQK.cjs +0 -117
  484. package/dist/lib/node/chunk-4EEWTDQK.cjs.map +0 -7
  485. package/dist/lib/node/chunk-FUAGEO7Q.cjs +0 -52
  486. package/dist/lib/node/chunk-FUAGEO7Q.cjs.map +0 -7
  487. package/dist/lib/node/chunk-HRNIUYVQ.cjs +0 -128
  488. package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +0 -7
  489. package/dist/lib/node/chunk-IKZBMHSW.cjs +0 -184
  490. package/dist/lib/node/chunk-IKZBMHSW.cjs.map +0 -7
  491. package/dist/lib/node/chunk-LMDJEGZ2.cjs +0 -233
  492. package/dist/lib/node/chunk-LMDJEGZ2.cjs.map +0 -7
  493. package/dist/lib/node/chunk-NIDICM57.cjs +0 -2080
  494. package/dist/lib/node/chunk-NIDICM57.cjs.map +0 -7
  495. package/dist/lib/node/chunk-P74TWGMG.cjs +0 -44
  496. package/dist/lib/node/chunk-P74TWGMG.cjs.map +0 -7
  497. package/dist/lib/node/chunk-QGPWY6GW.cjs +0 -34
  498. package/dist/lib/node/chunk-QGPWY6GW.cjs.map +0 -7
  499. package/dist/lib/node/index.cjs +0 -289
  500. package/dist/lib/node/index.cjs.map +0 -7
  501. package/dist/lib/node/intent-resolver-QSWGTKON.cjs +0 -58
  502. package/dist/lib/node/intent-resolver-QSWGTKON.cjs.map +0 -7
  503. package/dist/lib/node/meta.json +0 -1
  504. package/dist/lib/node/react-surface-D3NBYRZ6.cjs +0 -172
  505. package/dist/lib/node/react-surface-D3NBYRZ6.cjs.map +0 -7
  506. package/dist/lib/node/settings-2JXLKYGE.cjs +0 -36
  507. package/dist/lib/node/settings-2JXLKYGE.cjs.map +0 -7
  508. package/dist/lib/node/types/index.cjs +0 -54
  509. package/dist/lib/node/types/index.cjs.map +0 -7
  510. package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs +0 -48
  511. package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs.map +0 -7
  512. package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs +0 -322
  513. package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs.map +0 -7
  514. package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs +0 -41
  515. package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs.map +0 -7
  516. package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs +0 -29
  517. package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs.map +0 -7
  518. package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs +0 -40
  519. package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs.map +0 -7
  520. package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs +0 -226
  521. package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs.map +0 -7
  522. package/dist/lib/node-esm/chunk-34EX6E5Q.mjs +0 -18
  523. package/dist/lib/node-esm/chunk-34EX6E5Q.mjs.map +0 -7
  524. package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs +0 -16
  525. package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs.map +0 -7
  526. package/dist/lib/node-esm/chunk-BB2TAT4P.mjs +0 -22
  527. package/dist/lib/node-esm/chunk-BB2TAT4P.mjs.map +0 -7
  528. package/dist/lib/node-esm/chunk-CDAILLCU.mjs +0 -98
  529. package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +0 -7
  530. package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs +0 -209
  531. package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs.map +0 -7
  532. package/dist/lib/node-esm/chunk-OD574YIU.mjs +0 -2102
  533. package/dist/lib/node-esm/chunk-OD574YIU.mjs.map +0 -7
  534. package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs +0 -88
  535. package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs.map +0 -7
  536. package/dist/lib/node-esm/chunk-UCOFKNKN.mjs +0 -158
  537. package/dist/lib/node-esm/chunk-UCOFKNKN.mjs.map +0 -7
  538. package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs +0 -44
  539. package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs.map +0 -7
  540. package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs +0 -160
  541. package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs.map +0 -7
  542. package/dist/lib/node-esm/settings-5IAY6BT4.mjs +0 -23
  543. package/dist/lib/node-esm/settings-5IAY6BT4.mjs.map +0 -7
  544. package/dist/types/src/capabilities/ai-client.d.ts +0 -5
  545. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  546. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  547. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  548. package/dist/types/src/capabilities/capabilities.d.ts +0 -6
  549. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  550. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  551. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  552. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  553. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  554. package/dist/types/src/capabilities/settings.d.ts +0 -4
  555. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  556. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +0 -10
  557. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +0 -1
  558. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +0 -8
  559. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +0 -1
  560. package/dist/types/src/components/AmbientDialog/index.d.ts +0 -2
  561. package/dist/types/src/components/AmbientDialog/index.d.ts.map +0 -1
  562. package/dist/types/src/components/AssistantDialog.d.ts +0 -7
  563. package/dist/types/src/components/AssistantDialog.d.ts.map +0 -1
  564. package/dist/types/src/components/BlueprintContainer.d.ts +0 -9
  565. package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
  566. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +0 -13
  567. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +0 -1
  568. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +0 -8
  569. package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +0 -1
  570. package/dist/types/src/components/BlueprintEditor/index.d.ts +0 -2
  571. package/dist/types/src/components/BlueprintEditor/index.d.ts.map +0 -1
  572. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -23
  573. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  574. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -13
  575. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  576. package/dist/types/src/components/Prompt/PromptBar.d.ts +0 -16
  577. package/dist/types/src/components/Prompt/PromptBar.d.ts.map +0 -1
  578. package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +0 -9
  579. package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +0 -1
  580. package/dist/types/src/components/Prompt/autocomplete.d.ts +0 -25
  581. package/dist/types/src/components/Prompt/autocomplete.d.ts.map +0 -1
  582. package/dist/types/src/components/Prompt/index.d.ts +0 -3
  583. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  584. package/dist/types/src/components/Prompt/references.d.ts +0 -30
  585. package/dist/types/src/components/Prompt/references.d.ts.map +0 -1
  586. package/dist/types/src/components/PromptSettings.d.ts +0 -6
  587. package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
  588. package/dist/types/src/components/TemplateContainer.d.ts +0 -8
  589. package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
  590. package/dist/types/src/components/Thread/Thread.d.ts +0 -28
  591. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  592. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  593. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  594. package/dist/types/src/components/Thread/ThreadContainer.d.ts +0 -13
  595. package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +0 -1
  596. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +0 -16
  597. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +0 -1
  598. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -16
  599. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  600. package/dist/types/src/components/Thread/ToolInvocations.d.ts +0 -13
  601. package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +0 -1
  602. package/dist/types/src/components/Thread/index.d.ts +0 -3
  603. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  604. package/dist/types/src/components/Thread/reducer.d.ts +0 -12
  605. package/dist/types/src/components/Thread/reducer.d.ts.map +0 -1
  606. package/dist/types/src/events.d.ts +0 -4
  607. package/dist/types/src/events.d.ts.map +0 -1
  608. package/dist/types/src/experimental/transcription/index.d.ts +0 -1
  609. package/dist/types/src/experimental/transcription/index.d.ts.map +0 -1
  610. package/dist/types/src/hooks/processor.d.ts +0 -72
  611. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  612. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  613. package/dist/types/src/hooks/useContextProvider.d.ts +0 -17
  614. package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
  615. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -42
  616. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  617. package/dist/types/src/hooks/useServices.d.ts +0 -7
  618. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  619. package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
  620. package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
  621. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  622. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  623. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  624. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  625. package/dist/types/src/parser/index.d.ts +0 -4
  626. package/dist/types/src/parser/index.d.ts.map +0 -1
  627. package/dist/types/src/parser/query-parser.d.ts +0 -15
  628. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  629. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  630. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  631. package/dist/types/src/parser/types.d.ts +0 -24
  632. package/dist/types/src/parser/types.d.ts.map +0 -1
  633. package/dist/types/src/stories/Prompt.stories.d.ts +0 -8
  634. package/dist/types/src/stories/Prompt.stories.d.ts.map +0 -1
  635. package/dist/types/src/stories/Query.stories.d.ts +0 -19
  636. package/dist/types/src/stories/Query.stories.d.ts.map +0 -1
  637. package/dist/types/src/stories/Research.stories.d.ts +0 -15
  638. package/dist/types/src/stories/Research.stories.d.ts.map +0 -1
  639. package/dist/types/src/stories/test-data.d.ts +0 -3
  640. package/dist/types/src/stories/test-data.d.ts.map +0 -1
  641. package/dist/types/src/stories/testing.d.ts +0 -12
  642. package/dist/types/src/stories/testing.d.ts.map +0 -1
  643. package/dist/types/src/testing/test-blueprint.d.ts +0 -8
  644. package/dist/types/src/testing/test-blueprint.d.ts.map +0 -1
  645. package/dist/types/src/testing/test-functions.d.ts +0 -3
  646. package/dist/types/src/testing/test-functions.d.ts.map +0 -1
  647. package/dist/types/src/tools/function.d.ts +0 -5
  648. package/dist/types/src/tools/function.d.ts.map +0 -1
  649. package/dist/types/src/tools/index.d.ts +0 -3
  650. package/dist/types/src/tools/index.d.ts.map +0 -1
  651. package/dist/types/src/tools/openapi.d.ts +0 -10
  652. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  653. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  654. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  655. package/dist/types/src/types/chat.d.ts +0 -23
  656. package/dist/types/src/types/chat.d.ts.map +0 -1
  657. package/dist/types/src/types/template.d.ts +0 -56
  658. package/dist/types/src/types/template.d.ts.map +0 -1
  659. package/dist/types/src/types/types.d.ts +0 -50
  660. package/dist/types/src/types/types.d.ts.map +0 -1
  661. package/src/capabilities/ai-client.ts +0 -42
  662. package/src/capabilities/app-graph-builder.ts +0 -248
  663. package/src/capabilities/capabilities.ts +0 -15
  664. package/src/capabilities/intent-resolver.ts +0 -45
  665. package/src/capabilities/react-surface.tsx +0 -137
  666. package/src/capabilities/settings.ts +0 -19
  667. package/src/components/AmbientDialog/AmbientDialog.stories.tsx +0 -84
  668. package/src/components/AmbientDialog/AmbientDialog.tsx +0 -117
  669. package/src/components/AssistantDialog.tsx +0 -37
  670. package/src/components/BlueprintContainer.tsx +0 -148
  671. package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +0 -32
  672. package/src/components/BlueprintEditor/BlueprintEditor.tsx +0 -50
  673. package/src/components/BlueprintEditor/index.ts +0 -5
  674. package/src/components/Prompt/Prompt.stories.tsx +0 -121
  675. package/src/components/Prompt/Prompt.tsx +0 -124
  676. package/src/components/Prompt/PromptBar.stories.tsx +0 -69
  677. package/src/components/Prompt/PromptBar.tsx +0 -105
  678. package/src/components/Prompt/autocomplete.ts +0 -218
  679. package/src/components/Prompt/index.ts +0 -6
  680. package/src/components/Prompt/references.ts +0 -180
  681. package/src/components/PromptSettings.tsx +0 -91
  682. package/src/components/TemplateContainer.tsx +0 -23
  683. package/src/components/Thread/Thread.stories.tsx +0 -201
  684. package/src/components/Thread/Thread.tsx +0 -118
  685. package/src/components/Thread/ThreadContainer.stories.tsx +0 -283
  686. package/src/components/Thread/ThreadContainer.tsx +0 -105
  687. package/src/components/Thread/ThreadMessage.tsx +0 -234
  688. package/src/components/Thread/ToolInvocations.tsx +0 -106
  689. package/src/components/Thread/index.ts +0 -6
  690. package/src/components/Thread/reducer.ts +0 -52
  691. package/src/events.ts +0 -11
  692. package/src/hooks/processor.test.ts +0 -15
  693. package/src/hooks/processor.ts +0 -238
  694. package/src/hooks/useChatProcessor.tsx +0 -97
  695. package/src/hooks/useContextProvider.ts +0 -55
  696. package/src/hooks/useMessageQueue.ts +0 -22
  697. package/src/hooks/useServices.ts +0 -28
  698. package/src/hooks/useTextInputEvents.ts +0 -49
  699. package/src/parser/filter-generator.test.ts +0 -32
  700. package/src/parser/filter-generator.ts +0 -81
  701. package/src/parser/index.ts +0 -7
  702. package/src/parser/query-parser.test.ts +0 -139
  703. package/src/parser/query-parser.ts +0 -199
  704. package/src/parser/types.ts +0 -34
  705. package/src/shims.d.ts +0 -8
  706. package/src/stories/Prompt.stories.tsx +0 -60
  707. package/src/stories/Query.stories.tsx +0 -514
  708. package/src/stories/Research.stories.tsx +0 -482
  709. package/src/stories/test-data.ts +0 -128
  710. package/src/stories/testing.ts +0 -60
  711. package/src/testing/test-blueprint.ts +0 -58
  712. package/src/testing/test-functions.ts +0 -11
  713. package/src/tools/function.ts +0 -46
  714. package/src/tools/index.ts +0 -6
  715. package/src/tools/openapi.test.ts +0 -217
  716. package/src/tools/openapi.ts +0 -338
  717. package/src/types/chat.ts +0 -32
  718. package/src/types/template.ts +0 -66
  719. package/src/types/types.ts +0 -48
  720. package/src/typings.d.ts +0 -9
  721. /package/dist/types/src/{hooks → processor}/processor.test.d.ts +0 -0
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Layer from 'effect/Layer';
7
+
8
+ import { AiModelResolver } from '@dxos/ai';
9
+ import { Capability } from '@dxos/app-framework';
10
+ import { AppCapabilities } from '@dxos/app-toolkit';
11
+
12
+ export default Capability.makeModule(
13
+ Effect.fnUntraced(function* () {
14
+ const resolvers = yield* Capability.getAll(AppCapabilities.AiModelResolver);
15
+
16
+ // TODO(dmaretskyi): Extract function to reduce them.
17
+ const combinedLayer = resolvers.reduce(
18
+ (acc, resolver) => resolver.pipe(Layer.provide(acc)),
19
+ AiModelResolver.AiModelResolver.fromModelMap({ name: 'Fallback' }, Effect.succeed({})), // Empty resolver as fallback.
20
+ );
21
+
22
+ return [
23
+ // TODO(dmaretskyi): Read config from settings.
24
+ Capability.contributes(
25
+ AppCapabilities.AiServiceLayer,
26
+ AiModelResolver.AiModelResolver.buildAiService.pipe(Layer.provide(combinedLayer)),
27
+ ),
28
+ ];
29
+ }),
30
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AiService = Capability.lazy('AiService', () => import('./ai-service'));
@@ -0,0 +1,200 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Chat } from '@dxos/assistant-toolkit';
10
+ import { Blueprint, Prompt } from '@dxos/blueprints';
11
+ import { Sequence } from '@dxos/conductor';
12
+ import { DXN, Database, Obj, type Ref } from '@dxos/echo';
13
+ import { AtomObj } from '@dxos/echo-atom';
14
+ import { invariant } from '@dxos/invariant';
15
+ import { Operation, type OperationInvoker } from '@dxos/operation';
16
+ import { ClientCapabilities } from '@dxos/plugin-client';
17
+ import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
18
+ import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
19
+ import { getActiveSpace } from '@dxos/plugin-space';
20
+ import { SpaceOperation } from '@dxos/plugin-space/types';
21
+ import { Query } from '@dxos/react-client/echo';
22
+
23
+ import { ASSISTANT_DIALOG, meta } from '../../meta';
24
+ import { AssistantCapabilities, AssistantOperation } from '../../types';
25
+
26
+ export default Capability.makeModule(
27
+ Effect.fnUntraced(function* () {
28
+ const capabilities = yield* Capability.Service;
29
+
30
+ const extensions = yield* Effect.all([
31
+ GraphBuilder.createTypeExtension({
32
+ id: `${meta.id}/root`,
33
+ type: Chat.Chat,
34
+ actions: (chat) => {
35
+ const id = Obj.getDXN(chat).toString();
36
+ return Effect.succeed([
37
+ {
38
+ id: `${AssistantOperation.UpdateChatName.meta.key}/${id}`,
39
+ data: () => Operation.invoke(AssistantOperation.UpdateChatName, { chat }),
40
+ properties: {
41
+ label: ['chat update name label', { ns: meta.id }],
42
+ icon: 'ph--magic-wand--regular',
43
+ disposition: 'list-item',
44
+ },
45
+ },
46
+ ]);
47
+ },
48
+ }),
49
+
50
+ GraphBuilder.createExtension({
51
+ id: `${meta.id}/assistant`,
52
+ match: NodeMatcher.whenRoot,
53
+ actions: () =>
54
+ Effect.succeed([
55
+ {
56
+ id: `${LayoutOperation.UpdateDialog.meta.key}/assistant/open`,
57
+ data: Effect.fnUntraced(function* () {
58
+ const capabilities = yield* Capability.Service;
59
+ const client = yield* Capability.get(ClientCapabilities.Client);
60
+ const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
61
+ const space = getActiveSpace(capabilities) ?? client.spaces.default;
62
+ const chat = yield* Effect.tryPromise(() => getOrCreateChat(operationInvoker.invokePromise, space.db));
63
+ if (!chat) {
64
+ return;
65
+ }
66
+
67
+ yield* Operation.invoke(LayoutOperation.UpdateDialog, {
68
+ subject: ASSISTANT_DIALOG,
69
+ state: true,
70
+ blockAlign: 'end',
71
+ props: {
72
+ chat,
73
+ },
74
+ });
75
+ }),
76
+ properties: {
77
+ label: ['open assistant label', { ns: meta.id }],
78
+ icon: 'ph--sparkle--regular',
79
+ disposition: 'pin-end',
80
+ position: 'hoist',
81
+ keyBinding: {
82
+ macos: 'shift+meta+k',
83
+ windows: 'shift+ctrl+k',
84
+ },
85
+ },
86
+ },
87
+ {
88
+ id: `${meta.id}/reset-blueprints`,
89
+ data: Effect.fnUntraced(function* () {
90
+ const capabilities = yield* Capability.Service;
91
+ const client = yield* Capability.get(ClientCapabilities.Client);
92
+ const space = getActiveSpace(capabilities) ?? client.spaces.default;
93
+ const blueprints = yield* Effect.tryPromise(() =>
94
+ space.db.query(Query.type(Blueprint.Blueprint)).run(),
95
+ );
96
+ for (const blueprint of blueprints) {
97
+ space.db.remove(blueprint);
98
+ }
99
+ yield* Database.flush({ indexes: true });
100
+ }),
101
+ properties: {
102
+ label: ['reset blueprints label', { ns: meta.id }],
103
+ icon: 'ph--arrow-clockwise--regular',
104
+ },
105
+ },
106
+ ]),
107
+ }),
108
+
109
+ GraphBuilder.createExtension({
110
+ id: `${meta.id}/companion-chat`,
111
+ match: NodeMatcher.whenEchoObject,
112
+ connector: (object, get) =>
113
+ Effect.gen(function* () {
114
+ const state = get(yield* Capability.get(AssistantCapabilities.State));
115
+ const currentChatState = state.currentChat[Obj.getDXN(object).toString()];
116
+ // If no state, continue to allow chat initialization.
117
+ if (!currentChatState) {
118
+ return [
119
+ {
120
+ id: [Obj.getDXN(object).toString(), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
121
+ type: PLANK_COMPANION_TYPE,
122
+ data: 'assistant-chat',
123
+ properties: {
124
+ label: ['assistant chat label', { ns: meta.id }],
125
+ icon: 'ph--sparkle--regular',
126
+ position: 'hoist',
127
+ disposition: 'hidden',
128
+ },
129
+ },
130
+ ];
131
+ }
132
+
133
+ const db = Obj.getDatabase(object);
134
+ const currentChatDxn = DXN.tryParse(currentChatState);
135
+ const currentChatRef = currentChatDxn ? db?.makeRef(currentChatDxn) : undefined;
136
+ const currentChat = currentChatRef ? get(AtomObj.make(currentChatRef as Ref.Ref<Obj.Unknown>)) : undefined;
137
+
138
+ // Return the resolved chat object, or fall back to 'assistant-chat' string if it can't be resolved.
139
+ // This ensures the companion remains visible even during transient states.
140
+ return [
141
+ {
142
+ id: [Obj.getDXN(object).toString(), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
143
+ type: PLANK_COMPANION_TYPE,
144
+ data: Obj.isObject(currentChat) ? currentChat : 'assistant-chat',
145
+ properties: {
146
+ label: ['assistant chat label', { ns: meta.id }],
147
+ icon: 'ph--sparkle--regular',
148
+ position: 'hoist',
149
+ disposition: 'hidden',
150
+ },
151
+ },
152
+ ];
153
+ }),
154
+ }),
155
+
156
+ GraphBuilder.createExtension({
157
+ id: `${meta.id}/invocations`,
158
+ match: NodeMatcher.whenAny(
159
+ NodeMatcher.whenEchoTypeMatches(Sequence),
160
+ NodeMatcher.whenEchoTypeMatches(Prompt.Prompt),
161
+ ),
162
+ connector: (node) =>
163
+ Effect.succeed([
164
+ {
165
+ id: [node.id, 'invocations'].join(ATTENDABLE_PATH_SEPARATOR),
166
+ type: PLANK_COMPANION_TYPE,
167
+ data: 'invocations',
168
+ properties: {
169
+ label: ['invocations label', { ns: meta.id }],
170
+ icon: 'ph--clock-countdown--regular',
171
+ disposition: 'hidden',
172
+ },
173
+ },
174
+ ]),
175
+ }),
176
+ ]);
177
+
178
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
179
+ }),
180
+ );
181
+
182
+ // TODO(burdon): Factor out.
183
+ const getOrCreateChat = async (
184
+ invokePromise: OperationInvoker.OperationInvoker['invokePromise'],
185
+ db: Database.Database,
186
+ ): Promise<Chat.Chat | undefined> => {
187
+ // TODO(wittjosiah): This should be possible with a single query.
188
+ const allChats = await db.query(Query.type(Chat.Chat)).run();
189
+ const relatedChats = await db.query(Query.type(Chat.Chat).sourceOf(Chat.CompanionTo).source()).run();
190
+
191
+ const chats = allChats.filter((chat) => !relatedChats.includes(chat));
192
+ if (chats.length > 0) {
193
+ return chats.at(-1);
194
+ }
195
+
196
+ const { data } = await invokePromise(AssistantOperation.CreateChat, { db });
197
+ invariant(Obj.instanceOf(Chat.Chat, data?.object));
198
+ await invokePromise(SpaceOperation.AddObject, { target: db, object: data.object });
199
+ return data.object;
200
+ };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
@@ -0,0 +1,74 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Record from 'effect/Record';
7
+
8
+ import { Capability } from '@dxos/app-framework';
9
+ import { AppCapabilities } from '@dxos/app-toolkit';
10
+ import {
11
+ Agent,
12
+ Discord,
13
+ DiscordBlueprint,
14
+ EntityExtraction,
15
+ Initiative,
16
+ Linear,
17
+ LinearBlueprint,
18
+ Planning,
19
+ Research,
20
+ ResearchBlueprint,
21
+ WebSearchBlueprint,
22
+ } from '@dxos/assistant-toolkit';
23
+ import { type Blueprint } from '@dxos/blueprints';
24
+
25
+ import { AssistantBlueprint } from '../../blueprints';
26
+
27
+ export const createBlueprint: () => Blueprint.Blueprint = AssistantBlueprint.make;
28
+ export { AssistantBlueprint };
29
+
30
+ export type BlueprintCapabilities = [
31
+ Capability.Capability<typeof AppCapabilities.Functions>,
32
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
33
+ Capability.Capability<typeof AppCapabilities.Functions>,
34
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
35
+ Capability.Capability<typeof AppCapabilities.Functions>,
36
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
37
+ Capability.Capability<typeof AppCapabilities.Functions>,
38
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
39
+ Capability.Capability<typeof AppCapabilities.Functions>,
40
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
41
+ Capability.Capability<typeof AppCapabilities.Functions>,
42
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
43
+ Capability.Capability<typeof AppCapabilities.Functions>,
44
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
45
+ ];
46
+
47
+ export default Capability.makeModule<[], BlueprintCapabilities>(() =>
48
+ Effect.succeed([
49
+ Capability.contributes(AppCapabilities.Functions, AssistantBlueprint.functions$),
50
+ Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint.blueprint),
51
+
52
+ // TODO(burdon): Factor out.
53
+ Capability.contributes(AppCapabilities.Functions, [Research.create, Research.research]),
54
+ Capability.contributes(AppCapabilities.BlueprintDefinition, ResearchBlueprint),
55
+
56
+ // TODO(burdon): Factor out.
57
+ Capability.contributes(AppCapabilities.Functions, [Agent.prompt, EntityExtraction.extract]),
58
+ Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
59
+
60
+ // TODO(burdon): Factor out.
61
+ Capability.contributes(AppCapabilities.Functions, [Discord.fetch]),
62
+ Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
63
+
64
+ // TODO(burdon): Factor out.
65
+ Capability.contributes(AppCapabilities.Functions, [Linear.sync]),
66
+ Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
67
+
68
+ Capability.contributes(AppCapabilities.Functions, Initiative.getFunctions()),
69
+ Capability.contributes(AppCapabilities.BlueprintDefinition, Initiative.makeBlueprint()),
70
+
71
+ Capability.contributes(AppCapabilities.Functions, Record.values(Planning.PlanningFunctions)),
72
+ Capability.contributes(AppCapabilities.BlueprintDefinition, Planning.PlanningBlueprint),
73
+ ]),
74
+ );
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
8
+ export { AssistantBlueprint } from './blueprint-definition';
@@ -0,0 +1,33 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
6
+ import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
7
+ import * as Effect from 'effect/Effect';
8
+ import * as Layer from 'effect/Layer';
9
+
10
+ import { AnthropicResolver } from '@dxos/ai/resolvers';
11
+ import { Capability } from '@dxos/app-framework';
12
+ import { AppCapabilities } from '@dxos/app-toolkit';
13
+
14
+ export type EdgeModelResolverCapabilities = [Capability.Capability<typeof AppCapabilities.AiModelResolver>];
15
+
16
+ const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(() =>
17
+ Effect.succeed([
18
+ Capability.contributes(
19
+ AppCapabilities.AiModelResolver,
20
+ AnthropicResolver.make().pipe(
21
+ Layer.provide(
22
+ AnthropicClient.layer({
23
+ // TODO(dmaretskyi): Read endpoint from config/settings.
24
+ apiUrl: 'https://ai-service.dxos.workers.dev/provider/anthropic',
25
+ }),
26
+ ),
27
+ Layer.provide(FetchHttpClient.layer),
28
+ ),
29
+ ),
30
+ ]),
31
+ );
32
+
33
+ export default edgeModelResolver;
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
@@ -2,12 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const AiClient = lazy(() => import('./ai-client'));
8
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
9
- export const IntentResolver = lazy(() => import('./intent-resolver'));
10
- export const ReactSurface = lazy(() => import('./react-surface'));
11
- export const Settings = lazy(() => import('./settings'));
12
-
13
- export * from './capabilities';
5
+ export * from './ai-service';
6
+ export * from './app-graph-builder';
7
+ export * from './blueprint-definition';
8
+ export * from './edge-model-resolver';
9
+ export * from './local-model-resolver';
10
+ export * from './operation-resolver';
11
+ export * from './react-surface';
12
+ export * from './repair';
13
+ export * from './settings';
14
+ export * from './state';
15
+ export * from './toolkit';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as OpenAiClient from '@effect/ai-openai/OpenAiClient';
6
+ import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
7
+ import * as Effect from 'effect/Effect';
8
+ import * as Layer from 'effect/Layer';
9
+
10
+ import { LMStudioResolver } from '@dxos/ai/resolvers';
11
+ import { Capability } from '@dxos/app-framework';
12
+ import { AppCapabilities } from '@dxos/app-toolkit';
13
+
14
+ export type LocalModelResolverCapabilities = [Capability.Capability<typeof AppCapabilities.AiModelResolver>];
15
+
16
+ /**
17
+ * To start LM Studio server:
18
+ * ```bash
19
+ * ~/.lmstudio/bin/lms server start --cors
20
+ * ```
21
+ */
22
+ const localModelResolver = Capability.makeModule<[], LocalModelResolverCapabilities>(() =>
23
+ Effect.succeed([
24
+ Capability.contributes(
25
+ AppCapabilities.AiModelResolver,
26
+ LMStudioResolver.make().pipe(
27
+ Layer.provide(
28
+ OpenAiClient.layer({
29
+ apiUrl: LMStudioResolver.DEFAULT_LMSTUDIO_ENDPOINT,
30
+ }),
31
+ ),
32
+ Layer.provide(FetchHttpClient.layer),
33
+ ),
34
+ ),
35
+ ]),
36
+ );
37
+
38
+ export default localModelResolver;
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));
@@ -0,0 +1,112 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { AiContextBinder, AiConversation } from '@dxos/assistant';
9
+ import { Agent, Chat } from '@dxos/assistant-toolkit';
10
+ import { Blueprint, Prompt } from '@dxos/blueprints';
11
+ import { type Queue } from '@dxos/client/echo';
12
+ import { Filter, Obj, Ref, Type } from '@dxos/echo';
13
+ import { TracingService, serializeFunction } from '@dxos/functions';
14
+ import { invariant } from '@dxos/invariant';
15
+ import { Operation, OperationResolver } from '@dxos/operation';
16
+ import { AutomationCapabilities } from '@dxos/plugin-automation';
17
+ import { ClientCapabilities } from '@dxos/plugin-client';
18
+ import { Collection } from '@dxos/schema';
19
+ import { type Message } from '@dxos/types';
20
+
21
+ import { type AiChatServices, updateName } from '../../processor';
22
+ import { AssistantCapabilities, AssistantOperation } from '../../types';
23
+ import { AssistantBlueprint, createBlueprint } from '../blueprint-definition/blueprint-definition';
24
+
25
+ export default Capability.makeModule(
26
+ Effect.fnUntraced(function* () {
27
+ return Capability.contributes(Capabilities.OperationResolver, [
28
+ OperationResolver.make({
29
+ operation: AssistantOperation.OnCreateSpace,
30
+ handler: Effect.fnUntraced(function* ({ space, rootCollection }) {
31
+ const chatCollection = Collection.makeManaged({ key: Chat.Chat.typename });
32
+ const blueprintCollection = Collection.makeManaged({ key: Blueprint.Blueprint.typename });
33
+ const promptCollection = Collection.makeManaged({ key: Type.getTypename(Prompt.Prompt) });
34
+ Obj.change(rootCollection, (c) => {
35
+ c.objects.push(Ref.make(chatCollection), Ref.make(blueprintCollection), Ref.make(promptCollection));
36
+ });
37
+
38
+ // TODO(wittjosiah): Remove once function registry is avaiable.
39
+ space.db.add(serializeFunction(Agent.prompt));
40
+
41
+ // Create default chat.
42
+ const { object: chat } = yield* Operation.invoke(AssistantOperation.CreateChat, { db: space.db });
43
+ space.db.add(chat);
44
+ }),
45
+ }),
46
+ OperationResolver.make({
47
+ operation: AssistantOperation.CreateChat,
48
+ handler: Effect.fnUntraced(function* ({ db, name, addToSpace = true }) {
49
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
50
+ const client = yield* Capability.get(ClientCapabilities.Client);
51
+ const space = client.spaces.get(db.spaceId);
52
+ invariant(space, 'Space not found');
53
+ const queue = space.queues.create();
54
+ const chat = Chat.make({ name, queue: Ref.fromDXN(queue.dxn) });
55
+ if (addToSpace) {
56
+ space.db.add(chat);
57
+ }
58
+
59
+ // TODO(wittjosiah): This should be a space-level setting.
60
+ // TODO(burdon): Clone when activated. Copy-on-write for template.
61
+ const blueprints = yield* Effect.promise(() => db.query(Filter.type(Blueprint.Blueprint)).run());
62
+ let defaultBlueprint = blueprints.find((blueprint) => blueprint.key === AssistantBlueprint.Key);
63
+ if (!defaultBlueprint) {
64
+ defaultBlueprint = db.add(createBlueprint());
65
+ }
66
+
67
+ const binder = new AiContextBinder({ queue, registry });
68
+ yield* Effect.promise(() =>
69
+ binder.use((b: AiContextBinder) => b.bind({ blueprints: [Ref.make(defaultBlueprint!)] })),
70
+ );
71
+
72
+ return { object: chat };
73
+ }),
74
+ }),
75
+ OperationResolver.make({
76
+ operation: AssistantOperation.UpdateChatName,
77
+ handler: Effect.fnUntraced(function* ({ chat }) {
78
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
79
+ const db = Obj.getDatabase(chat);
80
+ const queue = chat.queue.target as Queue<Message.Message>;
81
+ if (!db || !queue) {
82
+ return;
83
+ }
84
+
85
+ const runtimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
86
+ const runtime = yield* Effect.promise(() =>
87
+ runtimeResolver
88
+ .getRuntime(db.spaceId)
89
+ .runPromise(Effect.runtime<AiChatServices>().pipe(Effect.provide(TracingService.layerNoop))),
90
+ );
91
+
92
+ yield* Effect.promise(() =>
93
+ new AiConversation({ queue, registry }).use(async (conversation) =>
94
+ updateName(runtime, conversation, chat),
95
+ ),
96
+ );
97
+ }),
98
+ }),
99
+ OperationResolver.make({
100
+ operation: AssistantOperation.SetCurrentChat,
101
+ handler: Effect.fnUntraced(function* ({ companionTo, chat }) {
102
+ const companionToId = Obj.getDXN(companionTo).toString();
103
+ const chatId = chat && Obj.getDXN(chat).toString();
104
+ yield* Capabilities.updateAtomValue(AssistantCapabilities.State, (current) => ({
105
+ ...current,
106
+ currentChat: { ...current.currentChat, [companionToId]: chatId },
107
+ }));
108
+ }),
109
+ }),
110
+ ]);
111
+ }),
112
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));