@dxos/plugin-thread 0.8.4-main.3c1ae3b → 0.8.4-main.52d7546f51

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 (343) hide show
  1. package/dist/lib/browser/app-graph-builder-XFGLMIGK.mjs +189 -0
  2. package/dist/lib/browser/app-graph-builder-XFGLMIGK.mjs.map +7 -0
  3. package/dist/lib/browser/blueprint-definition-ACPH22F7.mjs +18 -0
  4. package/dist/lib/browser/blueprint-definition-ACPH22F7.mjs.map +7 -0
  5. package/dist/lib/browser/blueprints/index.mjs +8 -0
  6. package/dist/lib/browser/call-manager-GDGIKJKN.mjs +26 -0
  7. package/dist/lib/browser/call-manager-GDGIKJKN.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-2FIHSX35.mjs +293 -0
  9. package/dist/lib/browser/chunk-2FIHSX35.mjs.map +7 -0
  10. package/dist/lib/browser/chunk-4EUEMHNI.mjs +1817 -0
  11. package/dist/lib/browser/chunk-4EUEMHNI.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-ZCW3NSDZ.mjs → chunk-ERK254BS.mjs} +68 -51
  13. package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
  14. package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-JBB73URQ.mjs} +14 -12
  15. package/dist/lib/browser/chunk-JBB73URQ.mjs.map +7 -0
  16. package/dist/lib/browser/{blueprint-definition-UO43FHAE.mjs → chunk-RH7XTXSR.mjs} +43 -39
  17. package/dist/lib/browser/chunk-RH7XTXSR.mjs.map +7 -0
  18. package/dist/lib/browser/index.mjs +122 -111
  19. package/dist/lib/browser/index.mjs.map +4 -4
  20. package/dist/lib/browser/markdown-YJCSOWXX.mjs +210 -0
  21. package/dist/lib/browser/markdown-YJCSOWXX.mjs.map +7 -0
  22. package/dist/lib/browser/meta.json +1 -1
  23. package/dist/lib/browser/operation-resolver-PROCP5L4.mjs +441 -0
  24. package/dist/lib/browser/operation-resolver-PROCP5L4.mjs.map +7 -0
  25. package/dist/lib/browser/react-root-FHK2SVPU.mjs +25 -0
  26. package/dist/lib/browser/react-root-FHK2SVPU.mjs.map +7 -0
  27. package/dist/lib/browser/{react-surface-C2OIZGFN.mjs → react-surface-7MQA6VSH.mjs} +33 -33
  28. package/dist/lib/browser/react-surface-7MQA6VSH.mjs.map +7 -0
  29. package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-6OZ75AUU.mjs} +12 -9
  30. package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
  31. package/dist/lib/browser/settings-TWKOTGSU.mjs +33 -0
  32. package/dist/lib/browser/settings-TWKOTGSU.mjs.map +7 -0
  33. package/dist/lib/browser/state-SJR2GL5G.mjs +24 -0
  34. package/dist/lib/browser/state-SJR2GL5G.mjs.map +7 -0
  35. package/dist/lib/browser/types/index.mjs +5 -4
  36. package/dist/lib/node-esm/app-graph-builder-IN6VLJBO.mjs +190 -0
  37. package/dist/lib/node-esm/app-graph-builder-IN6VLJBO.mjs.map +7 -0
  38. package/dist/lib/node-esm/blueprint-definition-SXVKFUNV.mjs +19 -0
  39. package/dist/lib/node-esm/blueprint-definition-SXVKFUNV.mjs.map +7 -0
  40. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  41. package/dist/lib/node-esm/call-manager-36UAAQCJ.mjs +27 -0
  42. package/dist/lib/node-esm/call-manager-36UAAQCJ.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-G7PZNN3Z.mjs} +14 -12
  44. package/dist/lib/node-esm/chunk-G7PZNN3Z.mjs.map +7 -0
  45. package/dist/lib/node-esm/{blueprint-definition-WANHWSF5.mjs → chunk-OKVE6CLS.mjs} +43 -39
  46. package/dist/lib/node-esm/chunk-OKVE6CLS.mjs.map +7 -0
  47. package/dist/lib/node-esm/{chunk-7KZWZS2U.mjs → chunk-QP3KQOPQ.mjs} +68 -51
  48. package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
  49. package/dist/lib/node-esm/chunk-RBRWHRHE.mjs +1818 -0
  50. package/dist/lib/node-esm/chunk-RBRWHRHE.mjs.map +7 -0
  51. package/dist/lib/node-esm/chunk-WMWUXWAS.mjs +294 -0
  52. package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +7 -0
  53. package/dist/lib/node-esm/index.mjs +122 -111
  54. package/dist/lib/node-esm/index.mjs.map +4 -4
  55. package/dist/lib/node-esm/markdown-6LRP3PAP.mjs +211 -0
  56. package/dist/lib/node-esm/markdown-6LRP3PAP.mjs.map +7 -0
  57. package/dist/lib/node-esm/meta.json +1 -1
  58. package/dist/lib/node-esm/operation-resolver-LPEPV5BF.mjs +442 -0
  59. package/dist/lib/node-esm/operation-resolver-LPEPV5BF.mjs.map +7 -0
  60. package/dist/lib/node-esm/react-root-P5P4VGQJ.mjs +26 -0
  61. package/dist/lib/node-esm/react-root-P5P4VGQJ.mjs.map +7 -0
  62. package/dist/lib/node-esm/{react-surface-GWBXMENS.mjs → react-surface-M7VI5XG2.mjs} +33 -33
  63. package/dist/lib/node-esm/react-surface-M7VI5XG2.mjs.map +7 -0
  64. package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-6777EPOM.mjs} +12 -9
  65. package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
  66. package/dist/lib/node-esm/settings-5O254B3Z.mjs +34 -0
  67. package/dist/lib/node-esm/settings-5O254B3Z.mjs.map +7 -0
  68. package/dist/lib/node-esm/state-5R3TZJQE.mjs +25 -0
  69. package/dist/lib/node-esm/state-5R3TZJQE.mjs.map +7 -0
  70. package/dist/lib/node-esm/types/index.mjs +5 -4
  71. package/dist/types/src/ThreadPlugin.d.ts +2 -1
  72. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  73. package/dist/types/src/blueprints/index.d.ts +2 -0
  74. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  75. package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
  76. package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
  77. package/dist/types/src/calls/call-manager.d.ts +40 -30
  78. package/dist/types/src/calls/call-manager.d.ts.map +1 -1
  79. package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
  80. package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
  81. package/dist/types/src/calls/media-manager.d.ts +1 -1
  82. package/dist/types/src/calls/media-manager.d.ts.map +1 -1
  83. package/dist/types/src/calls/util/calls-service.d.ts +1 -1
  84. package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
  85. package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
  86. package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  88. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  90. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +10 -0
  92. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
  96. package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
  98. package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/index.d.ts +10 -17
  100. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  102. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  104. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  106. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  108. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  110. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  112. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  116. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  118. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  120. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/settings/index.d.ts +3 -0
  122. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/settings/settings.d.ts +6 -0
  124. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/state/index.d.ts +3 -0
  126. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/state/state.d.ts +7 -0
  128. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  129. package/dist/types/src/components/Call/Call.d.ts.map +1 -1
  130. package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
  131. package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
  132. package/dist/types/src/components/ChannelContainer.d.ts +4 -5
  133. package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
  134. package/dist/types/src/components/ChannelContainer.stories.d.ts +1 -1
  135. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
  137. package/dist/types/src/components/ChatContainer.d.ts +1 -1
  138. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  139. package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
  140. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  141. package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
  142. package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
  143. package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
  144. package/dist/types/src/components/MessageContainer.d.ts +3 -4
  145. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  146. package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
  147. package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -1
  148. package/dist/types/src/components/ThreadSettings.d.ts +4 -2
  149. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  150. package/dist/types/src/components/index.d.ts +2 -2
  151. package/dist/types/src/components/index.d.ts.map +1 -1
  152. package/dist/types/src/extensions/threads.d.ts +7 -2
  153. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  154. package/dist/types/src/functions/create-proposals.d.ts +8 -1
  155. package/dist/types/src/functions/create-proposals.d.ts.map +1 -1
  156. package/dist/types/src/hooks/analytics.d.ts +1 -2
  157. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  158. package/dist/types/src/index.d.ts +1 -1
  159. package/dist/types/src/index.d.ts.map +1 -1
  160. package/dist/types/src/meta.d.ts +2 -2
  161. package/dist/types/src/meta.d.ts.map +1 -1
  162. package/dist/types/src/testing/stories.d.ts +2 -1
  163. package/dist/types/src/testing/stories.d.ts.map +1 -1
  164. package/dist/types/src/types/Channel.d.ts +691 -12
  165. package/dist/types/src/types/Channel.d.ts.map +1 -1
  166. package/dist/types/src/types/capabilities.d.ts +23 -0
  167. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  168. package/dist/types/src/types/index.d.ts +1 -0
  169. package/dist/types/src/types/index.d.ts.map +1 -1
  170. package/dist/types/src/types/types.d.ts +3182 -295
  171. package/dist/types/src/types/types.d.ts.map +1 -1
  172. package/dist/types/tsconfig.tsbuildinfo +1 -1
  173. package/package.json +88 -69
  174. package/src/ThreadPlugin.tsx +63 -92
  175. package/src/blueprints/index.ts +5 -0
  176. package/src/blueprints/thread-blueprint.ts +32 -0
  177. package/src/calls/call-manager.ts +76 -52
  178. package/src/calls/call-swarm-synchronizer.ts +2 -2
  179. package/src/calls/media-manager.ts +1 -1
  180. package/src/calls/util/calls-service.ts +1 -1
  181. package/src/calls/util/task-scheduling.ts +4 -4
  182. package/src/calls-service.stories.tsx +1 -1
  183. package/src/capabilities/app-graph-builder/app-graph-builder.ts +202 -0
  184. package/src/capabilities/app-graph-builder/index.ts +7 -0
  185. package/src/capabilities/blueprint-definition/blueprint-definition.ts +24 -0
  186. package/src/capabilities/blueprint-definition/index.ts +7 -0
  187. package/src/capabilities/call-manager/call-manager.ts +26 -0
  188. package/src/capabilities/call-manager/index.ts +7 -0
  189. package/src/capabilities/index.ts +10 -14
  190. package/src/capabilities/markdown/index.ts +7 -0
  191. package/src/capabilities/markdown/markdown.ts +83 -0
  192. package/src/capabilities/operation-resolver/index.ts +7 -0
  193. package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
  194. package/src/capabilities/react-root/index.ts +7 -0
  195. package/src/capabilities/react-root/react-root.tsx +20 -0
  196. package/src/capabilities/react-surface/index.ts +7 -0
  197. package/src/capabilities/react-surface/react-surface.tsx +98 -0
  198. package/src/capabilities/repair/index.ts +7 -0
  199. package/src/capabilities/{repair.ts → repair/repair.ts} +21 -10
  200. package/src/capabilities/settings/index.ts +7 -0
  201. package/src/capabilities/settings/settings.ts +34 -0
  202. package/src/capabilities/state/index.ts +7 -0
  203. package/src/capabilities/state/state.ts +22 -0
  204. package/src/components/Call/Call.tsx +8 -4
  205. package/src/components/Call/Toolbar.tsx +30 -21
  206. package/src/components/CallSidebar.tsx +5 -3
  207. package/src/components/ChannelContainer.stories.tsx +10 -9
  208. package/src/components/ChannelContainer.tsx +26 -23
  209. package/src/components/Chat.stories.tsx +7 -6
  210. package/src/components/ChatContainer.tsx +19 -20
  211. package/src/components/Comments.stories.tsx +22 -19
  212. package/src/components/CommentsThreadContainer.tsx +9 -9
  213. package/src/components/Lobby/Lobby.tsx +9 -7
  214. package/src/components/Media/AudioStream.tsx +2 -2
  215. package/src/components/Media/VideoObject.stories.tsx +1 -1
  216. package/src/components/Media/VideoObject.tsx +1 -1
  217. package/src/components/MessageContainer.tsx +54 -25
  218. package/src/components/Participant/Participant.tsx +32 -19
  219. package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +1 -1
  220. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
  221. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +1 -1
  222. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
  223. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
  224. package/src/components/ThreadCompanion.tsx +70 -64
  225. package/src/components/ThreadSettings.tsx +9 -3
  226. package/src/components/command-extension.ts +2 -2
  227. package/src/components/index.ts +2 -5
  228. package/src/extensions/threads.ts +72 -38
  229. package/src/functions/create-proposals.ts +9 -9
  230. package/src/hooks/analytics.ts +23 -20
  231. package/src/index.ts +1 -1
  232. package/src/meta.ts +2 -2
  233. package/src/testing/stories.ts +16 -11
  234. package/src/types/Channel.ts +10 -6
  235. package/src/types/capabilities.ts +34 -0
  236. package/src/types/index.ts +1 -0
  237. package/src/types/types.ts +160 -73
  238. package/dist/lib/browser/ChannelContainer-3BKLNZ4D.mjs +0 -17
  239. package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +0 -16
  240. package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs +0 -171
  241. package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +0 -7
  242. package/dist/lib/browser/blueprint-definition-UO43FHAE.mjs.map +0 -7
  243. package/dist/lib/browser/call-manager-4YFT4XA6.mjs +0 -25
  244. package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +0 -7
  245. package/dist/lib/browser/chunk-6E6VNV6V.mjs +0 -25
  246. package/dist/lib/browser/chunk-6E6VNV6V.mjs.map +0 -7
  247. package/dist/lib/browser/chunk-ALZKJOZK.mjs +0 -989
  248. package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
  249. package/dist/lib/browser/chunk-CFC7LEPD.mjs +0 -18
  250. package/dist/lib/browser/chunk-CFC7LEPD.mjs.map +0 -7
  251. package/dist/lib/browser/chunk-JDJPMI7V.mjs +0 -143
  252. package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-QM34EZQK.mjs +0 -20
  255. package/dist/lib/browser/chunk-QM34EZQK.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-SS3O5SOQ.mjs +0 -611
  257. package/dist/lib/browser/chunk-SS3O5SOQ.mjs.map +0 -7
  258. package/dist/lib/browser/chunk-TLOOZTRD.mjs +0 -377
  259. package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +0 -7
  260. package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
  261. package/dist/lib/browser/intent-resolver-G33FT3NO.mjs +0 -355
  262. package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +0 -7
  263. package/dist/lib/browser/markdown-GSTZY2JL.mjs +0 -172
  264. package/dist/lib/browser/markdown-GSTZY2JL.mjs.map +0 -7
  265. package/dist/lib/browser/react-root-GRZVEGGE.mjs +0 -29
  266. package/dist/lib/browser/react-root-GRZVEGGE.mjs.map +0 -7
  267. package/dist/lib/browser/react-surface-C2OIZGFN.mjs.map +0 -7
  268. package/dist/lib/browser/repair-JFJLEM2O.mjs.map +0 -7
  269. package/dist/lib/browser/settings-E6IOLK46.mjs +0 -23
  270. package/dist/lib/browser/settings-E6IOLK46.mjs.map +0 -7
  271. package/dist/lib/browser/state-UYPLBGZJ.mjs +0 -35
  272. package/dist/lib/browser/state-UYPLBGZJ.mjs.map +0 -7
  273. package/dist/lib/node-esm/ChannelContainer-I4U4TEEY.mjs +0 -18
  274. package/dist/lib/node-esm/ChannelContainer-I4U4TEEY.mjs.map +0 -7
  275. package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +0 -17
  276. package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +0 -7
  277. package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs +0 -172
  278. package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +0 -7
  279. package/dist/lib/node-esm/blueprint-definition-WANHWSF5.mjs.map +0 -7
  280. package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs +0 -26
  281. package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +0 -7
  282. package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +0 -22
  283. package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +0 -7
  284. package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
  285. package/dist/lib/node-esm/chunk-AB42KYF3.mjs +0 -990
  286. package/dist/lib/node-esm/chunk-AB42KYF3.mjs.map +0 -7
  287. package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +0 -378
  288. package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +0 -7
  289. package/dist/lib/node-esm/chunk-P2M364TO.mjs +0 -144
  290. package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +0 -7
  291. package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-RDD44HYY.mjs +0 -612
  293. package/dist/lib/node-esm/chunk-RDD44HYY.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +0 -19
  295. package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-UPA2Q5YI.mjs +0 -27
  297. package/dist/lib/node-esm/chunk-UPA2Q5YI.mjs.map +0 -7
  298. package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs +0 -356
  299. package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +0 -7
  300. package/dist/lib/node-esm/markdown-MC5OP2UR.mjs +0 -173
  301. package/dist/lib/node-esm/markdown-MC5OP2UR.mjs.map +0 -7
  302. package/dist/lib/node-esm/react-root-5IYK7CTL.mjs +0 -30
  303. package/dist/lib/node-esm/react-root-5IYK7CTL.mjs.map +0 -7
  304. package/dist/lib/node-esm/react-surface-GWBXMENS.mjs.map +0 -7
  305. package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +0 -7
  306. package/dist/lib/node-esm/settings-RGZHWDSO.mjs +0 -24
  307. package/dist/lib/node-esm/settings-RGZHWDSO.mjs.map +0 -7
  308. package/dist/lib/node-esm/state-XNWOLBNE.mjs +0 -36
  309. package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +0 -7
  310. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  311. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  312. package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
  313. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
  314. package/dist/types/src/capabilities/call-manager.d.ts +0 -5
  315. package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
  316. package/dist/types/src/capabilities/capabilities.d.ts +0 -27
  317. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  318. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  319. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  320. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  321. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  322. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  323. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  324. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  325. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  326. package/dist/types/src/capabilities/repair.d.ts +0 -4
  327. package/dist/types/src/capabilities/repair.d.ts.map +0 -1
  328. package/dist/types/src/capabilities/settings.d.ts +0 -4
  329. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  330. package/dist/types/src/capabilities/state.d.ts +0 -7
  331. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  332. package/src/capabilities/app-graph-builder.ts +0 -194
  333. package/src/capabilities/blueprint-definition.ts +0 -38
  334. package/src/capabilities/call-manager.ts +0 -20
  335. package/src/capabilities/capabilities.ts +0 -33
  336. package/src/capabilities/intent-resolver.ts +0 -311
  337. package/src/capabilities/markdown.ts +0 -71
  338. package/src/capabilities/react-root.tsx +0 -17
  339. package/src/capabilities/react-surface.tsx +0 -91
  340. package/src/capabilities/settings.ts +0 -19
  341. package/src/capabilities/state.ts +0 -26
  342. /package/dist/lib/browser/{ChannelContainer-3BKLNZ4D.mjs.map → blueprints/index.mjs.map} +0 -0
  343. /package/dist/lib/{browser/ChatContainer-KPY4BAUE.mjs.map → node-esm/blueprints/index.mjs.map} +0 -0
@@ -2,13 +2,12 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { computed } from '@preact/signals-core';
5
+ import { Atom, type Registry } from '@effect-atom/atom-react';
6
6
 
7
7
  import { Event, synchronized } from '@dxos/async';
8
8
  import { type Client } from '@dxos/client';
9
9
  import { Resource } from '@dxos/context';
10
10
  import { invariant } from '@dxos/invariant';
11
- import { live } from '@dxos/live-object';
12
11
  import { type Tracks } from '@dxos/protocols/proto/dxos/edge/calls';
13
12
  import { isNonNullable } from '@dxos/util';
14
13
 
@@ -31,84 +30,103 @@ export class CallManager extends Resource {
31
30
  public readonly left = new Event<string>();
32
31
 
33
32
  /**
34
- * Live object state. Is changed on internal events.
33
+ * Atom-based state. Updated via `_updateState()`.
35
34
  * CAUTION: Do not change directly.
36
35
  */
37
- private readonly _state = live<GlobalState>({
36
+ private readonly _stateAtom = Atom.make<GlobalState>({
38
37
  call: {},
39
38
  media: { pulledAudioTracks: {}, pulledVideoStreams: {} },
40
39
  });
41
40
 
42
- // TODO(wittjosiah): This shouldn't be necessary, live-object's signals should be granular.
43
- private readonly _raisedHandSignal = computed(() => this._state.call.raisedHand ?? false);
44
- private readonly _speakingSignal = computed(() => this._state.call.speaking ?? false);
45
- private readonly _joinedSignal = computed(() => this._state.call.joined ?? false);
41
+ // Derived atoms for reactive subscriptions.
42
+ private readonly _roomIdAtom = Atom.make((get) => get(this._stateAtom).call.roomId);
43
+ private readonly _raisedHandAtom = Atom.make((get) => get(this._stateAtom).call.raisedHand ?? false);
44
+ private readonly _speakingAtom = Atom.make((get) => get(this._stateAtom).call.speaking ?? false);
45
+ private readonly _joinedAtom = Atom.make((get) => get(this._stateAtom).call.joined ?? false);
46
+ private readonly _selfAtom = Atom.make((get) => get(this._stateAtom).call.self ?? {});
47
+ private readonly _tracksAtom = Atom.make((get) => get(this._stateAtom).call.tracks ?? {});
48
+ private readonly _usersAtom = Atom.make((get) => get(this._stateAtom).call.users ?? []);
49
+ private readonly _mediaAtom = Atom.make((get) => get(this._stateAtom).media);
50
+ private readonly _audioTracksToPlayAtom = Atom.make((get) => {
51
+ const state = get(this._stateAtom);
52
+ return (state.call.users ?? [])
53
+ .map((user: UserState) => (user.tracks?.audioEnabled ? user.tracks?.audio : undefined))
54
+ .filter(isNonNullable)
55
+ .map((track: string) => state.media.pulledAudioTracks[track as EncodedTrackName]?.track)
56
+ .filter(isNonNullable);
57
+ });
58
+ private readonly _videoStreamAtomFamily = Atom.family<EncodedTrackName, Atom.Atom<MediaStream | undefined>>((name) =>
59
+ Atom.make((get) => get(this._stateAtom).media.pulledVideoStreams[name]?.stream),
60
+ );
61
+ private readonly _activityAtomFamily = Atom.family<string, Atom.Atom<ActivityState | undefined>>((key) =>
62
+ Atom.make((get) => get(this._stateAtom).call.activities?.[key]),
63
+ );
46
64
 
47
65
  private readonly _swarmSynchronizer: CallSwarmSynchronizer;
48
66
  private readonly _mediaManager: MediaManager;
49
67
 
50
- /** @reactive */
51
- get roomId(): string | undefined {
52
- return this._state.call.roomId;
68
+ //
69
+ // Derived atoms for reactive UI subscriptions.
70
+ //
71
+
72
+ /** Derived atom for roomId. */
73
+ get roomIdAtom(): Atom.Atom<string | undefined> {
74
+ return this._roomIdAtom;
53
75
  }
54
76
 
55
- /** @reactive */
56
- get raisedHand(): boolean {
57
- return this._raisedHandSignal.value;
77
+ /** Derived atom for raisedHand. */
78
+ get raisedHandAtom(): Atom.Atom<boolean> {
79
+ return this._raisedHandAtom;
58
80
  }
59
81
 
60
- /** @reactive */
61
- get speaking(): boolean {
62
- return this._speakingSignal.value;
82
+ /** Derived atom for speaking. */
83
+ get speakingAtom(): Atom.Atom<boolean> {
84
+ return this._speakingAtom;
63
85
  }
64
86
 
65
- /** @reactive */
66
- get joined(): boolean {
67
- return this._joinedSignal.value;
87
+ /** Derived atom for joined. */
88
+ get joinedAtom(): Atom.Atom<boolean> {
89
+ return this._joinedAtom;
68
90
  }
69
91
 
70
- /** @reactive */
71
- get self(): UserState {
72
- return this._state.call.self ?? {};
92
+ /** Derived atom for self. */
93
+ get selfAtom(): Atom.Atom<UserState> {
94
+ return this._selfAtom;
73
95
  }
74
96
 
75
- /** @reactive */
76
- get tracks(): Tracks {
77
- return this._state.call.tracks ?? {};
97
+ /** Derived atom for tracks. */
98
+ get tracksAtom(): Atom.Atom<Tracks> {
99
+ return this._tracksAtom;
78
100
  }
79
101
 
80
- /** @reactive */
81
- get users(): UserState[] {
82
- return this._state.call.users ?? [];
102
+ /** Derived atom for users. */
103
+ get usersAtom(): Atom.Atom<UserState[]> {
104
+ return this._usersAtom;
83
105
  }
84
106
 
85
- /** @reactive */
86
- get media() {
87
- return this._state.media;
107
+ /** Derived atom for media. */
108
+ get mediaAtom(): Atom.Atom<MediaState> {
109
+ return this._mediaAtom;
88
110
  }
89
111
 
90
- /** @reactive */
91
- get audioTracksToPlay(): MediaStreamTrack[] {
92
- return (this._state.call.users ?? [])
93
- .map((user) => (user.tracks?.audioEnabled ? user.tracks?.audio : undefined))
94
- .filter(isNonNullable)
95
- .map((track) => this._state.media.pulledAudioTracks[track as EncodedTrackName]?.track)
96
- .filter(isNonNullable);
112
+ /** Derived atom for audioTracksToPlay. */
113
+ get audioTracksToPlayAtom(): Atom.Atom<MediaStreamTrack[]> {
114
+ return this._audioTracksToPlayAtom;
97
115
  }
98
116
 
99
- /** @reactive */
100
- get state() {
101
- return this._state;
117
+ /** Returns the full state atom for reactive subscriptions. */
118
+ get stateAtom(): Atom.Atom<GlobalState> {
119
+ return this._stateAtom;
102
120
  }
103
121
 
104
- /** @reactive */
105
- getVideoStream(name?: EncodedTrackName): MediaStream | undefined {
106
- return name ? this._state.media.pulledVideoStreams[name]?.stream : undefined;
122
+ /** Returns a derived atom for a video stream by name. */
123
+ videoStreamAtom(name: EncodedTrackName): Atom.Atom<MediaStream | undefined> {
124
+ return this._videoStreamAtomFamily(name);
107
125
  }
108
126
 
109
- /** @reactive */
110
- getActivity(key: string): ActivityState | undefined {
111
- return this._state.call.activities?.[key];
127
+ /** Returns a derived atom for an activity by key. */
128
+ activityAtom(key: string): Atom.Atom<ActivityState | undefined> {
129
+ return this._activityAtomFamily(key);
112
130
  }
113
131
 
114
132
  setRoomId(roomId: string): void {
@@ -152,7 +170,10 @@ export class CallManager extends Resource {
152
170
  }
153
171
 
154
172
  // TODO(burdon): Can this be mocked?
155
- constructor(private readonly _client: Client) {
173
+ constructor(
174
+ private readonly _client: Client,
175
+ private readonly _registry: Registry.Registry,
176
+ ) {
156
177
  super();
157
178
  this._client.config.getOrThrow('runtime.services.edge.url');
158
179
  const networkService = this._client.services.services.NetworkService;
@@ -205,7 +226,8 @@ export class CallManager extends Resource {
205
226
  this._swarmSynchronizer.setJoined(false);
206
227
  await this._swarmSynchronizer.leave();
207
228
  await this._mediaManager.leave();
208
- this.roomId && this.left.emit(this.roomId);
229
+ const roomId = this._registry.get(this._roomIdAtom);
230
+ roomId && this.left.emit(roomId);
209
231
  }
210
232
 
211
233
  private _onCallStateUpdated(state: CallState): void {
@@ -240,7 +262,9 @@ export class CallManager extends Resource {
240
262
  * Only this method is allowed to change state.
241
263
  */
242
264
  private _updateState(): void {
243
- this._state.call = this._swarmSynchronizer._getState();
244
- this._state.media = this._mediaManager._getState();
265
+ this._registry.set(this._stateAtom, {
266
+ call: this._swarmSynchronizer._getState(),
267
+ media: this._mediaManager._getState(),
268
+ });
245
269
  }
246
270
  }
@@ -50,7 +50,7 @@ export type CallState = {
50
50
  tracks?: UserState['tracks'];
51
51
  };
52
52
 
53
- export type CallSwarmSynchronizerParams = { networkService: NetworkService };
53
+ export type CallSwarmSynchronizerProps = { networkService: NetworkService };
54
54
 
55
55
  /**
56
56
  * Period for peer to reconnect to the call swarm gracefully if connection was lost abruptly.
@@ -76,7 +76,7 @@ export class CallSwarmSynchronizer extends Resource {
76
76
 
77
77
  private _sendStateTask?: DeferredTask = undefined;
78
78
 
79
- constructor({ networkService }: CallSwarmSynchronizerParams) {
79
+ constructor({ networkService }: CallSwarmSynchronizerProps) {
80
80
  super();
81
81
  this._networkService = networkService;
82
82
  }
@@ -51,7 +51,7 @@ const MAX_WEB_CAM_FRAMERATE = 24;
51
51
  const MAX_WEB_CAM_BITRATE = 120_0000;
52
52
  const RETRY_INTERVAL = 100;
53
53
 
54
- export type MediaManagerParams = {
54
+ export type MediaManagerProps = {
55
55
  serviceConfig: CallsServiceConfig;
56
56
  };
57
57
 
@@ -27,7 +27,7 @@ export type Session = {
27
27
 
28
28
  export type CallsServiceConfig = {
29
29
  apiBase: string;
30
- apiExtraParams?: string;
30
+ apiExtraProps?: string;
31
31
  iceServers?: RTCIceServer[];
32
32
  };
33
33
 
@@ -27,8 +27,8 @@ export class FIFOScheduler {
27
27
  }
28
28
 
29
29
  // TODO(mykola): Reconcile with @dxos/async task scheduling.
30
- export class BulkRequestDispatcher<RequestEntryParams, BulkResponse> {
31
- #currentBatch: RequestEntryParams[];
30
+ export class BulkRequestDispatcher<RequestEntryProps, BulkResponse> {
31
+ #currentBatch: RequestEntryProps[];
32
32
  #currentBulkResponse: Promise<BulkResponse> | null;
33
33
  #batchSizeLimit: number;
34
34
 
@@ -43,8 +43,8 @@ export class BulkRequestDispatcher<RequestEntryParams, BulkResponse> {
43
43
  * At the event loop iteration end, the accumulated entries will be dispatched as a bulk request.
44
44
  */
45
45
  doBulkRequest(
46
- params: RequestEntryParams,
47
- bulkRequestFunc: (bulkCopy: RequestEntryParams[]) => Promise<BulkResponse>,
46
+ params: RequestEntryProps,
47
+ bulkRequestFunc: (bulkCopy: RequestEntryProps[]) => Promise<BulkResponse>,
48
48
  ): Promise<BulkResponse> {
49
49
  if (this.#currentBatch.length >= this.#batchSizeLimit) {
50
50
  // If it reaches the batch size limit, we make another bulk request.
@@ -175,7 +175,7 @@ const meta = {
175
175
  title: 'plugins/plugin-thread/calls-service',
176
176
  render: DefaultStory,
177
177
  decorators: [
178
- withTheme,
178
+ withTheme(),
179
179
  withClientProvider({
180
180
  config: new Config({
181
181
  runtime: {
@@ -0,0 +1,202 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Atom } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Option from 'effect/Option';
8
+
9
+ import { Capability } from '@dxos/app-framework';
10
+ import { AppCapabilities } from '@dxos/app-toolkit';
11
+ import { Obj } from '@dxos/echo';
12
+ import { Operation } from '@dxos/operation';
13
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
14
+ import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
15
+ import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
16
+ import { type SelectionManager, type SelectionMode, defaultSelection } from '@dxos/react-ui-attention';
17
+
18
+ import { meta } from '../../meta';
19
+ import { Channel, ThreadCapabilities, ThreadOperation, type ThreadState } from '../../types';
20
+ import { getAnchor } from '../../util';
21
+
22
+ type CommentDisabledParams = {
23
+ stateAtom: Atom.Atom<Atom.Writable<ThreadState>[]>;
24
+ selectionManager: SelectionManager;
25
+ objectId: string;
26
+ commentsType: string;
27
+ selectionMode: SelectionMode | undefined;
28
+ };
29
+
30
+ /**
31
+ * Atom family to derive whether the comment button should be disabled.
32
+ * Uses a composite key to ensure proper caching.
33
+ */
34
+ const commentDisabledFamily = Atom.family(
35
+ ({ stateAtom, selectionManager, objectId, commentsType, selectionMode }: CommentDisabledParams) =>
36
+ Atom.make((get) => {
37
+ const stateAtoms = get(stateAtom);
38
+ const state = stateAtoms[0] ? get(stateAtoms[0]) : undefined;
39
+ const toolbar = state?.toolbar ?? {};
40
+ const selectionState = get(selectionManager.state);
41
+ const selection =
42
+ selectionState.selections[objectId] ?? (selectionMode ? defaultSelection(selectionMode) : undefined);
43
+ const anchor = getAnchor(selection);
44
+ const invalidSelection = !anchor;
45
+ const overlappingComment = toolbar[objectId];
46
+ return (commentsType === 'anchored' && invalidSelection) || overlappingComment;
47
+ }),
48
+ );
49
+
50
+ /** Match ECHO objects that are NOT Channels (i.e. objects that can have comments). */
51
+ const whenCommentableObject = NodeMatcher.whenAll(
52
+ NodeMatcher.whenEchoObjectMatches,
53
+ NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Channel.Channel)),
54
+ );
55
+
56
+ // TODO(wittjosiah): Highlight active calls in L1.
57
+ // Track active meetings by subscribing to meetings query and polling the swarms of recent meetings in the space.
58
+ export default Capability.makeModule(
59
+ Effect.fnUntraced(function* () {
60
+ const capabilities = yield* Capability.Service;
61
+
62
+ const resolve = (typename: string) =>
63
+ capabilities.getAll(AppCapabilities.Metadata).find(({ id }: { id: string }) => id === typename)?.metadata ?? {};
64
+
65
+ const extensions = yield* Effect.all([
66
+ GraphBuilder.createExtension({
67
+ id: `${meta.id}/active-call`,
68
+ match: NodeMatcher.whenRoot,
69
+ connector: (node, get) => {
70
+ const callManagerAtom = capabilities.atom(ThreadCapabilities.CallManager);
71
+ const [call] = get(callManagerAtom);
72
+ if (!call) {
73
+ return Effect.succeed([]);
74
+ }
75
+ // Use derived joinedAtom for efficient subscription.
76
+ const joined = get(call.joinedAtom);
77
+ return Effect.succeed(
78
+ joined
79
+ ? [
80
+ {
81
+ id: `${node.id}${ATTENDABLE_PATH_SEPARATOR}active-call`,
82
+ type: DECK_COMPANION_TYPE,
83
+ data: null,
84
+ properties: {
85
+ label: ['call panel label', { ns: meta.id }],
86
+ icon: 'ph--video-conference--regular',
87
+ position: 'hoist',
88
+ disposition: 'hidden',
89
+ },
90
+ },
91
+ ]
92
+ : [],
93
+ );
94
+ },
95
+ }),
96
+ GraphBuilder.createTypeExtension({
97
+ id: `${meta.id}/channel-chat-companion`,
98
+ type: Channel.Channel,
99
+ connector: (channel, get) => {
100
+ const callManager = capabilities.get(ThreadCapabilities.CallManager);
101
+ // Use derived atoms for efficient subscription.
102
+ const joined = get(callManager.joinedAtom);
103
+ const roomId = get(callManager.roomIdAtom);
104
+ const isActive = joined && roomId === Obj.getDXN(channel).toString();
105
+ if (!isActive) {
106
+ return Effect.succeed([]);
107
+ }
108
+
109
+ return Effect.succeed([
110
+ {
111
+ id: `${Obj.getDXN(channel).toString()}${ATTENDABLE_PATH_SEPARATOR}chat`,
112
+ type: PLANK_COMPANION_TYPE,
113
+ data: 'chat',
114
+ properties: {
115
+ label: ['channel companion label', { ns: meta.id }],
116
+ icon: 'ph--hash--regular',
117
+ position: 'hoist',
118
+ disposition: 'hidden',
119
+ },
120
+ },
121
+ ]);
122
+ },
123
+ }),
124
+ GraphBuilder.createExtension({
125
+ id: `${meta.id}/comments-companion`,
126
+ match: (node) => {
127
+ if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
128
+ return Option.none();
129
+ }
130
+ const metadata = resolve(Obj.getTypename(node.data)!);
131
+ return typeof metadata.comments === 'string' ? Option.some(node) : Option.none();
132
+ },
133
+ connector: (node) =>
134
+ Effect.succeed([
135
+ {
136
+ id: [node.id, 'comments'].join(ATTENDABLE_PATH_SEPARATOR),
137
+ type: PLANK_COMPANION_TYPE,
138
+ data: 'comments',
139
+ properties: {
140
+ label: ['comments label', { ns: meta.id }],
141
+ icon: 'ph--chat-text--regular',
142
+ disposition: 'hidden',
143
+ position: 'hoist',
144
+ },
145
+ },
146
+ ]),
147
+ }),
148
+ GraphBuilder.createExtension({
149
+ id: `${meta.id}/comment-toolbar`,
150
+ match: (node) => {
151
+ if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
152
+ return Option.none();
153
+ }
154
+ const metadata = resolve(Obj.getTypename(node.data)!);
155
+ return typeof metadata.comments === 'string' ? Option.some(node.data) : Option.none();
156
+ },
157
+ actions: (object, get) => {
158
+ const stateAtom = capabilities.atom(ThreadCapabilities.State);
159
+ const selectionManager = capabilities.get(AttentionCapabilities.Selection);
160
+ const objectId = Obj.getDXN(object).toString();
161
+ const metadata = resolve(Obj.getTypename(object)!);
162
+
163
+ const disabled = get(
164
+ commentDisabledFamily({
165
+ stateAtom,
166
+ selectionManager,
167
+ objectId,
168
+ commentsType: metadata.comments as string,
169
+ selectionMode: metadata.selectionMode,
170
+ }),
171
+ );
172
+
173
+ return Effect.succeed([
174
+ {
175
+ id: `${Obj.getDXN(object).toString()}/comment`,
176
+ data: Effect.fnUntraced(function* () {
177
+ const metadata = resolve(Obj.getTypename(object)!);
178
+ const selection = selectionManager.getSelection(Obj.getDXN(object).toString());
179
+ const anchor = metadata.comments === 'anchored' ? getAnchor(selection) : Date.now().toString();
180
+ const name = metadata.getAnchorLabel?.(object, anchor);
181
+ yield* Operation.invoke(ThreadOperation.Create, {
182
+ anchor,
183
+ name,
184
+ subject: object,
185
+ });
186
+ }),
187
+ properties: {
188
+ label: ['add comment label', { ns: meta.id }],
189
+ icon: 'ph--chat-text--regular',
190
+ disposition: 'toolbar',
191
+ disabled,
192
+ testId: 'thread.comment.add',
193
+ },
194
+ },
195
+ ]);
196
+ },
197
+ }),
198
+ ]);
199
+
200
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
201
+ }),
202
+ );
@@ -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,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+
10
+ import { ThreadBlueprint } from '../../blueprints';
11
+
12
+ export type BlueprintCapabilities = [
13
+ Capability.Capability<typeof AppCapabilities.Functions>,
14
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
15
+ ];
16
+
17
+ const blueprintDefinition = Capability.makeModule<[], BlueprintCapabilities>(() =>
18
+ Effect.succeed([
19
+ Capability.contributes(AppCapabilities.Functions, ThreadBlueprint.functions),
20
+ Capability.contributes(AppCapabilities.BlueprintDefinition, ThreadBlueprint.make()),
21
+ ]),
22
+ );
23
+
24
+ export default blueprintDefinition;
@@ -0,0 +1,7 @@
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'));
@@ -0,0 +1,26 @@
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 { ClientCapabilities } from '@dxos/plugin-client';
9
+
10
+ import { CallManager } from '../../calls';
11
+ import { ThreadCapabilities } from '../../types';
12
+
13
+ export default Capability.makeModule(
14
+ Effect.fnUntraced(function* () {
15
+ const client = yield* Capability.get(ClientCapabilities.Client);
16
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
17
+ const callManager = new CallManager(client, registry);
18
+ yield* Effect.tryPromise(() => callManager.open());
19
+
20
+ return Capability.contributes(ThreadCapabilities.CallManager, callManager, () =>
21
+ Effect.sync(() => {
22
+ void callManager.close();
23
+ }),
24
+ );
25
+ }),
26
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const CallManager = Capability.lazy('CallManager', () => import('./call-manager'));
@@ -2,17 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
8
- export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
9
- export const CallManager = lazy(() => import('./call-manager'));
10
- export const IntentResolver = lazy(() => import('./intent-resolver'));
11
- export const Markdown = lazy(() => import('./markdown'));
12
- export const ReactRoot = lazy(() => import('./react-root'));
13
- export const ReactSurface = lazy(() => import('./react-surface'));
14
- export const Repair = lazy(() => import('./repair'));
15
- export const ThreadSettings = lazy(() => import('./settings'));
16
- export const ThreadState = lazy(() => import('./state'));
17
-
18
- export * from './capabilities';
5
+ export * from './app-graph-builder';
6
+ export * from './blueprint-definition';
7
+ export * from './call-manager';
8
+ export * from './markdown';
9
+ export * from './operation-resolver';
10
+ export * from './react-root';
11
+ export * from './react-surface';
12
+ export * from './repair';
13
+ export * from './settings';
14
+ export * from './state';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));