@dxos/plugin-thread 0.8.4-main.3c1ae3b → 0.8.4-main.3eb6e50203
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.
- package/dist/lib/browser/app-graph-builder-XFGLMIGK.mjs +189 -0
- package/dist/lib/browser/app-graph-builder-XFGLMIGK.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-ACPH22F7.mjs +18 -0
- package/dist/lib/browser/blueprint-definition-ACPH22F7.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-GDGIKJKN.mjs +26 -0
- package/dist/lib/browser/call-manager-GDGIKJKN.mjs.map +7 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs +293 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs.map +7 -0
- package/dist/lib/browser/chunk-4EUEMHNI.mjs +1817 -0
- package/dist/lib/browser/chunk-4EUEMHNI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZCW3NSDZ.mjs → chunk-ERK254BS.mjs} +68 -51
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-JBB73URQ.mjs} +14 -12
- package/dist/lib/browser/chunk-JBB73URQ.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-UO43FHAE.mjs → chunk-RH7XTXSR.mjs} +43 -39
- package/dist/lib/browser/chunk-RH7XTXSR.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +122 -111
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-YJCSOWXX.mjs +210 -0
- package/dist/lib/browser/markdown-YJCSOWXX.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-PROCP5L4.mjs +441 -0
- package/dist/lib/browser/operation-resolver-PROCP5L4.mjs.map +7 -0
- package/dist/lib/browser/react-root-FHK2SVPU.mjs +25 -0
- package/dist/lib/browser/react-root-FHK2SVPU.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-C2OIZGFN.mjs → react-surface-7MQA6VSH.mjs} +33 -33
- package/dist/lib/browser/react-surface-7MQA6VSH.mjs.map +7 -0
- package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-6OZ75AUU.mjs} +12 -9
- package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
- package/dist/lib/browser/settings-TWKOTGSU.mjs +33 -0
- package/dist/lib/browser/settings-TWKOTGSU.mjs.map +7 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs +24 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -4
- package/dist/lib/node-esm/app-graph-builder-IN6VLJBO.mjs +190 -0
- package/dist/lib/node-esm/app-graph-builder-IN6VLJBO.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-SXVKFUNV.mjs +19 -0
- package/dist/lib/node-esm/blueprint-definition-SXVKFUNV.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/call-manager-36UAAQCJ.mjs +27 -0
- package/dist/lib/node-esm/call-manager-36UAAQCJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-G7PZNN3Z.mjs} +14 -12
- package/dist/lib/node-esm/chunk-G7PZNN3Z.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-WANHWSF5.mjs → chunk-OKVE6CLS.mjs} +43 -39
- package/dist/lib/node-esm/chunk-OKVE6CLS.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7KZWZS2U.mjs → chunk-QP3KQOPQ.mjs} +68 -51
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RBRWHRHE.mjs +1818 -0
- package/dist/lib/node-esm/chunk-RBRWHRHE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs +294 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +122 -111
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-6LRP3PAP.mjs +211 -0
- package/dist/lib/node-esm/markdown-6LRP3PAP.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-LPEPV5BF.mjs +442 -0
- package/dist/lib/node-esm/operation-resolver-LPEPV5BF.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-P5P4VGQJ.mjs +26 -0
- package/dist/lib/node-esm/react-root-P5P4VGQJ.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-GWBXMENS.mjs → react-surface-M7VI5XG2.mjs} +33 -33
- package/dist/lib/node-esm/react-surface-M7VI5XG2.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-6777EPOM.mjs} +12 -9
- package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-5O254B3Z.mjs +34 -0
- package/dist/lib/node-esm/settings-5O254B3Z.mjs.map +7 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs +25 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -4
- package/dist/types/src/ThreadPlugin.d.ts +2 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
- package/dist/types/src/calls/call-manager.d.ts +40 -30
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +10 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -17
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +6 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +7 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +4 -5
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +3 -4
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +4 -2
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +7 -2
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/functions/create-proposals.d.ts +8 -1
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +1 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +691 -12
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +23 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3182 -295
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +88 -69
- package/src/ThreadPlugin.tsx +63 -92
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +32 -0
- package/src/calls/call-manager.ts +76 -52
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +1 -1
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/calls-service.stories.tsx +1 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +202 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +24 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/call-manager/call-manager.ts +26 -0
- package/src/capabilities/call-manager/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +83 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +98 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -10
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +34 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +8 -4
- package/src/components/Call/Toolbar.tsx +30 -21
- package/src/components/CallSidebar.tsx +5 -3
- package/src/components/ChannelContainer.stories.tsx +10 -9
- package/src/components/ChannelContainer.tsx +26 -23
- package/src/components/Chat.stories.tsx +7 -6
- package/src/components/ChatContainer.tsx +19 -20
- package/src/components/Comments.stories.tsx +22 -19
- package/src/components/CommentsThreadContainer.tsx +9 -9
- package/src/components/Lobby/Lobby.tsx +9 -7
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +1 -1
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +54 -25
- package/src/components/Participant/Participant.tsx +32 -19
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
- package/src/components/ThreadCompanion.tsx +70 -64
- package/src/components/ThreadSettings.tsx +9 -3
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +2 -5
- package/src/extensions/threads.ts +72 -38
- package/src/functions/create-proposals.ts +9 -9
- package/src/hooks/analytics.ts +23 -20
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +16 -11
- package/src/types/Channel.ts +10 -6
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +160 -73
- package/dist/lib/browser/ChannelContainer-3BKLNZ4D.mjs +0 -17
- package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +0 -16
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-UO43FHAE.mjs.map +0 -7
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs +0 -25
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +0 -7
- package/dist/lib/browser/chunk-6E6VNV6V.mjs +0 -25
- package/dist/lib/browser/chunk-6E6VNV6V.mjs.map +0 -7
- package/dist/lib/browser/chunk-ALZKJOZK.mjs +0 -989
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-CFC7LEPD.mjs +0 -18
- package/dist/lib/browser/chunk-CFC7LEPD.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDJPMI7V.mjs +0 -143
- package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +0 -7
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
- package/dist/lib/browser/chunk-QM34EZQK.mjs +0 -20
- package/dist/lib/browser/chunk-QM34EZQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-SS3O5SOQ.mjs +0 -611
- package/dist/lib/browser/chunk-SS3O5SOQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TLOOZTRD.mjs +0 -377
- package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs +0 -355
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +0 -7
- package/dist/lib/browser/markdown-GSTZY2JL.mjs +0 -172
- package/dist/lib/browser/markdown-GSTZY2JL.mjs.map +0 -7
- package/dist/lib/browser/react-root-GRZVEGGE.mjs +0 -29
- package/dist/lib/browser/react-root-GRZVEGGE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-C2OIZGFN.mjs.map +0 -7
- package/dist/lib/browser/repair-JFJLEM2O.mjs.map +0 -7
- package/dist/lib/browser/settings-E6IOLK46.mjs +0 -23
- package/dist/lib/browser/settings-E6IOLK46.mjs.map +0 -7
- package/dist/lib/browser/state-UYPLBGZJ.mjs +0 -35
- package/dist/lib/browser/state-UYPLBGZJ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-I4U4TEEY.mjs +0 -18
- package/dist/lib/node-esm/ChannelContainer-I4U4TEEY.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-WANHWSF5.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs +0 -26
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +0 -22
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs +0 -990
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +0 -378
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2M364TO.mjs +0 -144
- package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RDD44HYY.mjs +0 -612
- package/dist/lib/node-esm/chunk-RDD44HYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +0 -19
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UPA2Q5YI.mjs +0 -27
- package/dist/lib/node-esm/chunk-UPA2Q5YI.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs +0 -356
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-MC5OP2UR.mjs +0 -173
- package/dist/lib/node-esm/markdown-MC5OP2UR.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-5IYK7CTL.mjs +0 -30
- package/dist/lib/node-esm/react-root-5IYK7CTL.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-GWBXMENS.mjs.map +0 -7
- package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +0 -7
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs +0 -24
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs.map +0 -7
- package/dist/lib/node-esm/state-XNWOLBNE.mjs +0 -36
- package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -5
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -27
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -7
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -194
- package/src/capabilities/blueprint-definition.ts +0 -38
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -311
- package/src/capabilities/markdown.ts +0 -71
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -91
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-3BKLNZ4D.mjs.map → blueprints/index.mjs.map} +0 -0
- /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 {
|
|
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
|
-
*
|
|
33
|
+
* Atom-based state. Updated via `_updateState()`.
|
|
35
34
|
* CAUTION: Do not change directly.
|
|
36
35
|
*/
|
|
37
|
-
private readonly
|
|
36
|
+
private readonly _stateAtom = Atom.make<GlobalState>({
|
|
38
37
|
call: {},
|
|
39
38
|
media: { pulledAudioTracks: {}, pulledVideoStreams: {} },
|
|
40
39
|
});
|
|
41
40
|
|
|
42
|
-
//
|
|
43
|
-
private readonly
|
|
44
|
-
private readonly
|
|
45
|
-
private readonly
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
/**
|
|
56
|
-
get
|
|
57
|
-
return this.
|
|
77
|
+
/** Derived atom for raisedHand. */
|
|
78
|
+
get raisedHandAtom(): Atom.Atom<boolean> {
|
|
79
|
+
return this._raisedHandAtom;
|
|
58
80
|
}
|
|
59
81
|
|
|
60
|
-
/**
|
|
61
|
-
get
|
|
62
|
-
return this.
|
|
82
|
+
/** Derived atom for speaking. */
|
|
83
|
+
get speakingAtom(): Atom.Atom<boolean> {
|
|
84
|
+
return this._speakingAtom;
|
|
63
85
|
}
|
|
64
86
|
|
|
65
|
-
/**
|
|
66
|
-
get
|
|
67
|
-
return this.
|
|
87
|
+
/** Derived atom for joined. */
|
|
88
|
+
get joinedAtom(): Atom.Atom<boolean> {
|
|
89
|
+
return this._joinedAtom;
|
|
68
90
|
}
|
|
69
91
|
|
|
70
|
-
/**
|
|
71
|
-
get
|
|
72
|
-
return this.
|
|
92
|
+
/** Derived atom for self. */
|
|
93
|
+
get selfAtom(): Atom.Atom<UserState> {
|
|
94
|
+
return this._selfAtom;
|
|
73
95
|
}
|
|
74
96
|
|
|
75
|
-
/**
|
|
76
|
-
get
|
|
77
|
-
return this.
|
|
97
|
+
/** Derived atom for tracks. */
|
|
98
|
+
get tracksAtom(): Atom.Atom<Tracks> {
|
|
99
|
+
return this._tracksAtom;
|
|
78
100
|
}
|
|
79
101
|
|
|
80
|
-
/**
|
|
81
|
-
get
|
|
82
|
-
return this.
|
|
102
|
+
/** Derived atom for users. */
|
|
103
|
+
get usersAtom(): Atom.Atom<UserState[]> {
|
|
104
|
+
return this._usersAtom;
|
|
83
105
|
}
|
|
84
106
|
|
|
85
|
-
/**
|
|
86
|
-
get
|
|
87
|
-
return this.
|
|
107
|
+
/** Derived atom for media. */
|
|
108
|
+
get mediaAtom(): Atom.Atom<MediaState> {
|
|
109
|
+
return this._mediaAtom;
|
|
88
110
|
}
|
|
89
111
|
|
|
90
|
-
/**
|
|
91
|
-
get
|
|
92
|
-
return
|
|
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
|
-
/**
|
|
100
|
-
get
|
|
101
|
-
return this.
|
|
117
|
+
/** Returns the full state atom for reactive subscriptions. */
|
|
118
|
+
get stateAtom(): Atom.Atom<GlobalState> {
|
|
119
|
+
return this._stateAtom;
|
|
102
120
|
}
|
|
103
121
|
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
return
|
|
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
|
-
/**
|
|
110
|
-
|
|
111
|
-
return this.
|
|
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(
|
|
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
|
-
|
|
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.
|
|
244
|
-
|
|
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
|
|
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 }:
|
|
79
|
+
constructor({ networkService }: CallSwarmSynchronizerProps) {
|
|
80
80
|
super();
|
|
81
81
|
this._networkService = networkService;
|
|
82
82
|
}
|
|
@@ -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<
|
|
31
|
-
#currentBatch:
|
|
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:
|
|
47
|
-
bulkRequestFunc: (bulkCopy:
|
|
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.
|
|
@@ -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,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,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
|
+
);
|
|
@@ -2,17 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
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';
|