@dxos/plugin-thread 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
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-SPAZN5XL.mjs +188 -0
- package/dist/lib/browser/app-graph-builder-SPAZN5XL.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-YBRTG6T3.mjs +26 -0
- package/dist/lib/browser/call-manager-YBRTG6T3.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-DLO2G3DM.mjs} +14 -12
- package/dist/lib/browser/chunk-DLO2G3DM.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-TAWDJPMD.mjs +293 -0
- package/dist/lib/browser/chunk-TAWDJPMD.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZICDGBW.mjs +1813 -0
- package/dist/lib/browser/chunk-VZICDGBW.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-TQ4JFMZZ.mjs → chunk-ZFLSTQSE.mjs} +39 -34
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +100 -90
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-TSXOA3GV.mjs +210 -0
- package/dist/lib/browser/markdown-TSXOA3GV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-MDMEBYH2.mjs +441 -0
- package/dist/lib/browser/operation-resolver-MDMEBYH2.mjs.map +7 -0
- package/dist/lib/browser/react-root-Q7U5D3DA.mjs +25 -0
- package/dist/lib/browser/react-root-Q7U5D3DA.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-AUQQSQQC.mjs → react-surface-WDZQSDWH.mjs} +32 -33
- package/dist/lib/browser/react-surface-WDZQSDWH.mjs.map +7 -0
- package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-TDKAFAGH.mjs} +12 -9
- package/dist/lib/browser/repair-TDKAFAGH.mjs.map +7 -0
- package/dist/lib/browser/settings-OOKKVXV7.mjs +32 -0
- package/dist/lib/browser/settings-OOKKVXV7.mjs.map +7 -0
- package/dist/lib/browser/state-3LKZHDRI.mjs +24 -0
- package/dist/lib/browser/state-3LKZHDRI.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -4
- package/dist/lib/node-esm/app-graph-builder-3LJAPDUW.mjs +189 -0
- package/dist/lib/node-esm/app-graph-builder-3LJAPDUW.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/call-manager-MMCTNFOH.mjs +27 -0
- package/dist/lib/node-esm/call-manager-MMCTNFOH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3RD3IVVD.mjs +1814 -0
- package/dist/lib/node-esm/chunk-3RD3IVVD.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-TSX5HHW7.mjs → chunk-AQHPP6ZX.mjs} +39 -34
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ARTUUKTM.mjs +294 -0
- package/dist/lib/node-esm/chunk-ARTUUKTM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-KRBZBJRI.mjs} +14 -12
- package/dist/lib/node-esm/chunk-KRBZBJRI.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/index.mjs +100 -90
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-N2UJ3D6L.mjs +211 -0
- package/dist/lib/node-esm/markdown-N2UJ3D6L.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-7PHDJZA2.mjs +442 -0
- package/dist/lib/node-esm/operation-resolver-7PHDJZA2.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-SZIGQRDZ.mjs +26 -0
- package/dist/lib/node-esm/react-root-SZIGQRDZ.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-AMVESEF4.mjs → react-surface-24PNWUDX.mjs} +32 -33
- package/dist/lib/node-esm/react-surface-24PNWUDX.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-LHLLGXKF.mjs} +12 -9
- package/dist/lib/node-esm/repair-LHLLGXKF.mjs.map +7 -0
- package/dist/lib/node-esm/settings-LXZQXSPL.mjs +33 -0
- package/dist/lib/node-esm/settings-LXZQXSPL.mjs.map +7 -0
- package/dist/lib/node-esm/state-YYAK5ENM.mjs +25 -0
- package/dist/lib/node-esm/state-YYAK5ENM.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 +9 -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 +5 -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/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.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 +86 -69
- package/src/ThreadPlugin.tsx +50 -80
- 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/capabilities/app-graph-builder/app-graph-builder.ts +201 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -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 +97 -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 +33 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +7 -3
- package/src/components/Call/Toolbar.tsx +28 -20
- package/src/components/CallSidebar.tsx +4 -2
- package/src/components/ChannelContainer.stories.tsx +10 -8
- package/src/components/ChannelContainer.tsx +18 -16
- package/src/components/Chat.stories.tsx +6 -6
- package/src/components/ChatContainer.tsx +7 -7
- package/src/components/Comments.stories.tsx +21 -18
- package/src/components/CommentsThreadContainer.tsx +9 -9
- package/src/components/Lobby/Lobby.tsx +8 -6
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +53 -24
- package/src/components/Participant/Participant.tsx +31 -18
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
- package/src/components/ThreadCompanion.tsx +69 -64
- package/src/components/ThreadSettings.tsx +6 -1
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +2 -5
- package/src/extensions/threads.ts +75 -41
- package/src/functions/create-proposals.ts +5 -4
- package/src/hooks/analytics.ts +23 -20
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +15 -11
- package/src/types/Channel.ts +9 -5
- 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-L7MKV7DS.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-TQ4JFMZZ.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-ALZKJOZK.mjs +0 -989
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-ANTFU4JB.mjs +0 -25
- package/dist/lib/browser/chunk-ANTFU4JB.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-NPT5S6N4.mjs +0 -611
- package/dist/lib/browser/chunk-NPT5S6N4.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-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-WFZFYJBQ.mjs +0 -172
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +0 -7
- package/dist/lib/browser/react-root-ED7PHA44.mjs +0 -29
- package/dist/lib/browser/react-root-ED7PHA44.mjs.map +0 -7
- package/dist/lib/browser/react-surface-AUQQSQQC.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-FYONOOZ6.mjs +0 -18
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.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-TSX5HHW7.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-ATNY37UV.mjs +0 -27
- package/dist/lib/node-esm/chunk-ATNY37UV.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-FF3QVPY4.mjs +0 -612
- package/dist/lib/node-esm/chunk-FF3QVPY4.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-RT6NRL2I.mjs +0 -19
- package/dist/lib/node-esm/chunk-RT6NRL2I.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-CSR5MAPZ.mjs +0 -173
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-DZN324JA.mjs +0 -30
- package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AMVESEF4.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-L7MKV7DS.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{browser/ChatContainer-KPY4BAUE.mjs.map → node-esm/blueprints/index.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-thread",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.937b3ca",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
11
15
|
"exports": {
|
|
12
16
|
".": {
|
|
13
|
-
"source": "./src/index.ts",
|
|
14
|
-
"types": "./dist/types/src/index.d.ts",
|
|
15
17
|
"browser": "./dist/lib/browser/index.mjs",
|
|
16
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
18
|
+
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
+
"source": "./src/index.ts",
|
|
20
|
+
"types": "./dist/types/src/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./blueprints": {
|
|
23
|
+
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
24
|
+
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
25
|
+
"source": "./src/blueprints/index.ts",
|
|
26
|
+
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
17
27
|
},
|
|
18
28
|
"./types": {
|
|
19
|
-
"source": "./src/types/index.ts",
|
|
20
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
21
29
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
22
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
30
|
+
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
31
|
+
"source": "./src/types/index.ts",
|
|
32
|
+
"types": "./dist/types/src/types/index.d.ts"
|
|
23
33
|
}
|
|
24
34
|
},
|
|
25
35
|
"types": "dist/types/src/index.d.ts",
|
|
26
36
|
"typesVersions": {
|
|
27
37
|
"*": {
|
|
38
|
+
"blueprints": [
|
|
39
|
+
"dist/types/src/blueprints/index.d.ts"
|
|
40
|
+
],
|
|
28
41
|
"types": [
|
|
29
42
|
"dist/types/src/types/index.d.ts"
|
|
30
43
|
]
|
|
@@ -38,80 +51,84 @@
|
|
|
38
51
|
"@codemirror/language": "^6.11.3",
|
|
39
52
|
"@codemirror/state": "^6.5.2",
|
|
40
53
|
"@codemirror/view": "^6.38.4",
|
|
41
|
-
"@effect/
|
|
42
|
-
"@effect/
|
|
54
|
+
"@effect-atom/atom": "^0.4.13",
|
|
55
|
+
"@effect-atom/atom-react": "^0.4.6",
|
|
56
|
+
"@effect/ai": "0.32.1",
|
|
57
|
+
"@effect/experimental": "0.57.11",
|
|
43
58
|
"@peermetrics/webrtc-stats": "5.7.1",
|
|
44
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
45
|
-
"@preact/signals-core": "^1.12.1",
|
|
46
59
|
"date-fns": "^3.3.1",
|
|
47
60
|
"extendable-media-recorder": "^9.2.19",
|
|
48
61
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
49
62
|
"md5-hex": "5.0.0",
|
|
50
63
|
"react-resize-detector": "^11.0.1",
|
|
51
64
|
"wavefile": "^11.0.0",
|
|
52
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
53
|
-
"@dxos/assistant": "0.8.4-main.
|
|
54
|
-
"@dxos/blueprints": "0.8.4-main.
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/context": "0.8.4-main.
|
|
58
|
-
"@dxos/devtools": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/echo-
|
|
62
|
-
"@dxos/echo": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
71
|
-
"@dxos/plugin-deck": "0.8.4-main.
|
|
72
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
73
|
-
"@dxos/plugin-
|
|
74
|
-
"@dxos/plugin-
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/react-
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-
|
|
80
|
-
"@dxos/react-ui-
|
|
81
|
-
"@dxos/react-ui-
|
|
82
|
-
"@dxos/react-ui-
|
|
83
|
-
"@dxos/react-ui-
|
|
84
|
-
"@dxos/react-ui-
|
|
85
|
-
"@dxos/react-ui-
|
|
86
|
-
"@dxos/react-ui-
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
65
|
+
"@dxos/app-framework": "0.8.4-main.937b3ca",
|
|
66
|
+
"@dxos/assistant": "0.8.4-main.937b3ca",
|
|
67
|
+
"@dxos/blueprints": "0.8.4-main.937b3ca",
|
|
68
|
+
"@dxos/async": "0.8.4-main.937b3ca",
|
|
69
|
+
"@dxos/codec-protobuf": "0.8.4-main.937b3ca",
|
|
70
|
+
"@dxos/context": "0.8.4-main.937b3ca",
|
|
71
|
+
"@dxos/devtools": "0.8.4-main.937b3ca",
|
|
72
|
+
"@dxos/debug": "0.8.4-main.937b3ca",
|
|
73
|
+
"@dxos/display-name": "0.8.4-main.937b3ca",
|
|
74
|
+
"@dxos/echo-react": "0.8.4-main.937b3ca",
|
|
75
|
+
"@dxos/echo": "0.8.4-main.937b3ca",
|
|
76
|
+
"@dxos/echo-db": "0.8.4-main.937b3ca",
|
|
77
|
+
"@dxos/effect": "0.8.4-main.937b3ca",
|
|
78
|
+
"@dxos/functions": "0.8.4-main.937b3ca",
|
|
79
|
+
"@dxos/invariant": "0.8.4-main.937b3ca",
|
|
80
|
+
"@dxos/keys": "0.8.4-main.937b3ca",
|
|
81
|
+
"@dxos/plugin-attention": "0.8.4-main.937b3ca",
|
|
82
|
+
"@dxos/operation": "0.8.4-main.937b3ca",
|
|
83
|
+
"@dxos/plugin-client": "0.8.4-main.937b3ca",
|
|
84
|
+
"@dxos/plugin-deck": "0.8.4-main.937b3ca",
|
|
85
|
+
"@dxos/plugin-graph": "0.8.4-main.937b3ca",
|
|
86
|
+
"@dxos/plugin-observability": "0.8.4-main.937b3ca",
|
|
87
|
+
"@dxos/plugin-markdown": "0.8.4-main.937b3ca",
|
|
88
|
+
"@dxos/protocols": "0.8.4-main.937b3ca",
|
|
89
|
+
"@dxos/plugin-space": "0.8.4-main.937b3ca",
|
|
90
|
+
"@dxos/react-client": "0.8.4-main.937b3ca",
|
|
91
|
+
"@dxos/react-ui-attention": "0.8.4-main.937b3ca",
|
|
92
|
+
"@dxos/react-ui-dnd": "0.8.4-main.937b3ca",
|
|
93
|
+
"@dxos/react-ui-editor": "0.8.4-main.937b3ca",
|
|
94
|
+
"@dxos/react-ui-menu": "0.8.4-main.937b3ca",
|
|
95
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.937b3ca",
|
|
96
|
+
"@dxos/react-ui-sfx": "0.8.4-main.937b3ca",
|
|
97
|
+
"@dxos/react-ui-stack": "0.8.4-main.937b3ca",
|
|
98
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.937b3ca",
|
|
99
|
+
"@dxos/react-ui-form": "0.8.4-main.937b3ca",
|
|
100
|
+
"@dxos/react-ui-tabs": "0.8.4-main.937b3ca",
|
|
101
|
+
"@dxos/schema": "0.8.4-main.937b3ca",
|
|
102
|
+
"@dxos/react-ui-thread": "0.8.4-main.937b3ca",
|
|
103
|
+
"@dxos/types": "0.8.4-main.937b3ca",
|
|
104
|
+
"@dxos/util": "0.8.4-main.937b3ca",
|
|
105
|
+
"@dxos/ui-editor": "0.8.4-main.937b3ca",
|
|
106
|
+
"@dxos/log": "0.8.4-main.937b3ca"
|
|
91
107
|
},
|
|
92
108
|
"devDependencies": {
|
|
93
|
-
"@effect-atom/atom-react": "^0.
|
|
94
|
-
"@effect/platform": "0.
|
|
95
|
-
"@types/react": "~19.2.
|
|
96
|
-
"@types/react-dom": "~19.2.
|
|
97
|
-
"effect": "3.
|
|
98
|
-
"react": "~19.2.
|
|
99
|
-
"react-dom": "~19.2.
|
|
109
|
+
"@effect-atom/atom-react": "^0.4.6",
|
|
110
|
+
"@effect/platform": "0.93.6",
|
|
111
|
+
"@types/react": "~19.2.7",
|
|
112
|
+
"@types/react-dom": "~19.2.3",
|
|
113
|
+
"effect": "3.19.11",
|
|
114
|
+
"react": "~19.2.3",
|
|
115
|
+
"react-dom": "~19.2.3",
|
|
100
116
|
"vite": "7.1.9",
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
117
|
+
"@dxos/plugin-testing": "0.8.4-main.937b3ca",
|
|
118
|
+
"@dxos/plugin-theme": "0.8.4-main.937b3ca",
|
|
119
|
+
"@dxos/random": "0.8.4-main.937b3ca",
|
|
120
|
+
"@dxos/react-ui": "0.8.4-main.937b3ca",
|
|
121
|
+
"@dxos/ui-theme": "0.8.4-main.937b3ca",
|
|
122
|
+
"@dxos/storybook-utils": "0.8.4-main.937b3ca"
|
|
106
123
|
},
|
|
107
124
|
"peerDependencies": {
|
|
108
|
-
"@effect-atom/atom-react": "^0.
|
|
109
|
-
"@effect/platform": "
|
|
110
|
-
"effect": "
|
|
111
|
-
"react": "
|
|
112
|
-
"react-dom": "
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
125
|
+
"@effect-atom/atom-react": "^0.4.6",
|
|
126
|
+
"@effect/platform": "0.93.6",
|
|
127
|
+
"effect": "3.19.11",
|
|
128
|
+
"react": "~19.2.3",
|
|
129
|
+
"react-dom": "~19.2.3",
|
|
130
|
+
"@dxos/ui-theme": "0.8.4-main.937b3ca",
|
|
131
|
+
"@dxos/react-ui": "0.8.4-main.937b3ca"
|
|
115
132
|
},
|
|
116
133
|
"publishConfig": {
|
|
117
134
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability, Common, Plugin } from '@dxos/app-framework';
|
|
6
8
|
import { Ref, Type } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
7
10
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
11
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
9
12
|
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
10
|
-
import { type
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
14
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
15
|
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
13
16
|
|
|
@@ -15,8 +18,8 @@ import {
|
|
|
15
18
|
AppGraphBuilder,
|
|
16
19
|
BlueprintDefinition,
|
|
17
20
|
CallManager,
|
|
18
|
-
IntentResolver,
|
|
19
21
|
Markdown,
|
|
22
|
+
OperationResolver,
|
|
20
23
|
ReactRoot,
|
|
21
24
|
ReactSurface,
|
|
22
25
|
Repair,
|
|
@@ -24,68 +27,59 @@ import {
|
|
|
24
27
|
} from './capabilities';
|
|
25
28
|
import { THREAD_ITEM, meta } from './meta';
|
|
26
29
|
import { translations } from './translations';
|
|
27
|
-
import { Channel,
|
|
30
|
+
import { Channel, ThreadOperation } from './types';
|
|
28
31
|
|
|
29
32
|
// TODO(Zan): Every instance of `cursor` should be replaced with `anchor`.
|
|
30
33
|
// NOTE(burdon): Review/discuss CursorConverter semantics.
|
|
31
34
|
|
|
32
35
|
// TODO(wittjosiah): Rename to ChatPlugin.
|
|
33
36
|
// TODO(wittjosiah): Enabling comments should likely be factored out of this plugin but depend on it's capabilities.
|
|
34
|
-
export const ThreadPlugin =
|
|
35
|
-
|
|
36
|
-
id:
|
|
37
|
+
export const ThreadPlugin = Plugin.define(meta).pipe(
|
|
38
|
+
Plugin.addModule({
|
|
39
|
+
id: 'call-manager',
|
|
37
40
|
activatesOn: ClientEvents.ClientReady,
|
|
38
41
|
activate: CallManager,
|
|
39
42
|
}),
|
|
40
43
|
// TODO(wittjosiah): Currently not used but leaving because there will likely be settings for threads again.
|
|
41
|
-
//
|
|
42
|
-
// id:
|
|
44
|
+
// Plugin.addModule({
|
|
45
|
+
// id: 'settings',
|
|
43
46
|
// activatesOn: Events.SetupSettings,
|
|
44
47
|
// activate: ThreadSettings,
|
|
45
48
|
// }),
|
|
46
|
-
|
|
47
|
-
id:
|
|
49
|
+
Plugin.addModule({
|
|
50
|
+
id: 'state',
|
|
48
51
|
// TODO(wittjosiah): Does not integrate with settings store.
|
|
49
52
|
// Should this be a different event?
|
|
50
53
|
// Should settings store be renamed to be more generic?
|
|
51
|
-
activatesOn:
|
|
54
|
+
activatesOn: Common.ActivationEvent.SetupSettings,
|
|
52
55
|
activate: ThreadState,
|
|
53
56
|
}),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}),
|
|
59
|
-
defineModule({
|
|
60
|
-
id: `${meta.id}/module/metadata`,
|
|
61
|
-
activatesOn: Events.SetupMetadata,
|
|
62
|
-
activate: () => [
|
|
63
|
-
contributes(Capabilities.Metadata, {
|
|
57
|
+
Common.Plugin.addTranslationsModule({ translations: [...translations, ...threadTranslations] }),
|
|
58
|
+
Common.Plugin.addMetadataModule({
|
|
59
|
+
metadata: [
|
|
60
|
+
{
|
|
64
61
|
id: Type.getTypename(Channel.Channel),
|
|
65
62
|
metadata: {
|
|
66
63
|
icon: 'ph--hash--regular',
|
|
67
64
|
iconHue: 'rose',
|
|
68
|
-
|
|
69
|
-
createIntent(ThreadAction.CreateChannel, {
|
|
70
|
-
spaceId: options.space.id,
|
|
71
|
-
})) satisfies CreateObjectIntent,
|
|
65
|
+
createObject: ((props) => Effect.sync(() => Channel.make(props))) satisfies CreateObject,
|
|
72
66
|
},
|
|
73
|
-
}
|
|
74
|
-
|
|
67
|
+
},
|
|
68
|
+
{
|
|
75
69
|
id: Type.getTypename(Thread.Thread),
|
|
76
70
|
metadata: {
|
|
77
71
|
// TODO(wittjosiah): Move out of metadata.
|
|
78
72
|
loadReferences: async (thread: Thread.Thread) => await Ref.Array.loadAll(thread.messages ?? []),
|
|
79
73
|
},
|
|
80
|
-
}
|
|
81
|
-
|
|
74
|
+
},
|
|
75
|
+
{
|
|
82
76
|
id: Message.Message.typename,
|
|
83
77
|
metadata: {
|
|
84
78
|
// TODO(wittjosiah): Move out of metadata.
|
|
85
79
|
loadReferences: () => [], // loadObjectReferences(message, (message) => [...message.parts, message.context]),
|
|
86
80
|
},
|
|
87
|
-
}
|
|
88
|
-
|
|
81
|
+
},
|
|
82
|
+
{
|
|
89
83
|
id: THREAD_ITEM,
|
|
90
84
|
metadata: {
|
|
91
85
|
parse: (item: Thread.Thread, type: string) => {
|
|
@@ -99,65 +93,41 @@ export const ThreadPlugin = definePlugin(meta, () => [
|
|
|
99
93
|
}
|
|
100
94
|
},
|
|
101
95
|
},
|
|
102
|
-
}
|
|
96
|
+
},
|
|
103
97
|
],
|
|
104
98
|
}),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
108
|
-
activate: () =>
|
|
109
|
-
contributes(ClientCapabilities.Schema, [
|
|
110
|
-
AnchoredTo.AnchoredTo,
|
|
111
|
-
Channel.Channel,
|
|
112
|
-
Message.Message,
|
|
113
|
-
Message.MessageV1,
|
|
114
|
-
Thread.Thread,
|
|
115
|
-
]),
|
|
99
|
+
Common.Plugin.addSchemaModule({
|
|
100
|
+
schema: [AnchoredTo.AnchoredTo, Channel.Channel, Message.Message, Message.MessageV1, Thread.Thread],
|
|
116
101
|
}),
|
|
117
|
-
|
|
118
|
-
id:
|
|
102
|
+
Plugin.addModule({
|
|
103
|
+
id: 'migration',
|
|
119
104
|
activatesOn: ClientEvents.SetupMigration,
|
|
120
|
-
activate: () => contributes(ClientCapabilities.Migration, [Message.MessageV1ToV2]),
|
|
105
|
+
activate: () => Effect.succeed(Capability.contributes(ClientCapabilities.Migration, [Message.MessageV1ToV2])),
|
|
121
106
|
}),
|
|
122
|
-
|
|
123
|
-
id:
|
|
107
|
+
Plugin.addModule({
|
|
108
|
+
id: 'on-space-created',
|
|
124
109
|
activatesOn: SpaceEvents.SpaceCreated,
|
|
125
110
|
activate: () =>
|
|
126
|
-
|
|
111
|
+
Effect.succeed(
|
|
112
|
+
Capability.contributes(SpaceCapabilities.OnCreateSpace, (params) =>
|
|
113
|
+
Operation.invoke(ThreadOperation.OnCreateSpace, params),
|
|
114
|
+
),
|
|
115
|
+
),
|
|
127
116
|
}),
|
|
128
|
-
|
|
129
|
-
id:
|
|
117
|
+
Plugin.addModule({
|
|
118
|
+
id: 'repair',
|
|
130
119
|
activatesOn: ClientEvents.SpacesReady,
|
|
131
120
|
activate: Repair,
|
|
132
121
|
}),
|
|
133
|
-
|
|
134
|
-
id:
|
|
122
|
+
Plugin.addModule({
|
|
123
|
+
id: 'markdown',
|
|
135
124
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
136
125
|
activate: Markdown,
|
|
137
126
|
}),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
activatesOn: Events.SetupReactSurface,
|
|
146
|
-
activate: ReactSurface,
|
|
147
|
-
}),
|
|
148
|
-
defineModule({
|
|
149
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
150
|
-
activatesOn: Events.SetupIntentResolver,
|
|
151
|
-
activate: IntentResolver,
|
|
152
|
-
}),
|
|
153
|
-
defineModule({
|
|
154
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
155
|
-
activatesOn: Events.SetupAppGraph,
|
|
156
|
-
activate: AppGraphBuilder,
|
|
157
|
-
}),
|
|
158
|
-
defineModule({
|
|
159
|
-
id: `${meta.id}/module/blueprint`,
|
|
160
|
-
activatesOn: Events.SetupArtifactDefinition,
|
|
161
|
-
activate: BlueprintDefinition,
|
|
162
|
-
}),
|
|
163
|
-
]);
|
|
127
|
+
Common.Plugin.addReactRootModule({ activate: ReactRoot }),
|
|
128
|
+
Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
|
|
129
|
+
Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
130
|
+
Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
131
|
+
Common.Plugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
132
|
+
Plugin.make,
|
|
133
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
7
|
+
import { trim } from '@dxos/util';
|
|
8
|
+
|
|
9
|
+
import { createProposals } from '../functions';
|
|
10
|
+
|
|
11
|
+
export const functions: FunctionDefinition[] = [createProposals];
|
|
12
|
+
|
|
13
|
+
export const Key = 'dxos.org/blueprint/thread';
|
|
14
|
+
|
|
15
|
+
export const make = () =>
|
|
16
|
+
Blueprint.make({
|
|
17
|
+
key: Key,
|
|
18
|
+
name: 'Thread',
|
|
19
|
+
tools: Blueprint.toolDefinitions({ functions }),
|
|
20
|
+
instructions: Template.make({
|
|
21
|
+
// TODO(wittjosiah): Move example to function input schema annotation.
|
|
22
|
+
source: trim`
|
|
23
|
+
You can update markdown documents via proposals.
|
|
24
|
+
For each diff, respond with the smallest possible matching span.
|
|
25
|
+
For example:
|
|
26
|
+
- "There is a tyop in this sentence."
|
|
27
|
+
+ "There is a typo in this sentence."
|
|
28
|
+
- "This id goof."
|
|
29
|
+
+ "This is good."
|
|
30
|
+
`,
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
@@ -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
|
}
|