@dxos/plugin-thread 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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-7C2QW32W.mjs +188 -0
- package/dist/lib/browser/app-graph-builder-7C2QW32W.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-4P536YNX.mjs +26 -0
- package/dist/lib/browser/call-manager-4P536YNX.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-HDEQRBOC.mjs → chunk-DLO2G3DM.mjs} +79 -76
- package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-US5ZQYC3.mjs → chunk-ERK254BS.mjs} +78 -61
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs → chunk-ISCHODBV.mjs} +1 -1
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs.map → chunk-ISCHODBV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs +1815 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs +106 -0
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +121 -114
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-QMJLRR6R.mjs +210 -0
- package/dist/lib/browser/markdown-QMJLRR6R.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs +441 -0
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs.map +7 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs +25 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-IC576W2W.mjs → react-surface-DMBHQOXJ.mjs} +43 -42
- package/dist/lib/browser/react-surface-DMBHQOXJ.mjs.map +7 -0
- package/dist/lib/browser/repair-6OZ75AUU.mjs +38 -0
- package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
- package/dist/lib/browser/settings-WZMJMML3.mjs +32 -0
- package/dist/lib/browser/settings-WZMJMML3.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 +7 -7
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs +189 -0
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.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-FMLRR5S5.mjs +27 -0
- package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs +1816 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs +107 -0
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/{chunk-2MMJF7DW.mjs → chunk-KRBZBJRI.mjs} +79 -76
- package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KGYDYYKJ.mjs → chunk-QP3KQOPQ.mjs} +78 -61
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs → chunk-VBI32FGI.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs.map → chunk-VBI32FGI.mjs.map} +2 -2
- 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 +121 -114
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs +211 -0
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs +442 -0
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs +26 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-O4LGTAZ3.mjs → react-surface-ELDSTUA3.mjs} +43 -42
- package/dist/lib/node-esm/react-surface-ELDSTUA3.mjs.map +7 -0
- package/dist/lib/node-esm/repair-6777EPOM.mjs +39 -0
- package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-37CO3SNR.mjs +33 -0
- package/dist/lib/node-esm/settings-37CO3SNR.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 +7 -7
- 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 -16
- 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/CallDebugPanel.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 +6 -2
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +5 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +2 -2
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +5 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +2 -2
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +8 -8
- 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 +4 -3
- 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/ResponsiveGrid/ResponsiveContainer.stories.d.ts +5 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +5 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/ThreadCompanion.d.ts +5 -0
- package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -0
- 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 +3 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +1 -1
- package/dist/types/src/components/testing.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 +6 -0
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -3
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.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/translations.d.ts +5 -1
- package/dist/types/src/translations.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 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3216 -430
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -65
- package/src/ThreadPlugin.tsx +56 -88
- 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 +10 -7
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/stub-media-streams.ts +2 -2
- 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 -13
- 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/repair.ts +51 -0
- 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 +8 -4
- package/src/components/Call/Toolbar.tsx +31 -23
- package/src/components/CallDebugPanel.tsx +12 -14
- package/src/components/CallSidebar.tsx +5 -3
- package/src/components/ChannelContainer.stories.tsx +12 -10
- package/src/components/ChannelContainer.tsx +22 -19
- package/src/components/Chat.stories.tsx +9 -9
- package/src/components/ChatContainer.tsx +22 -21
- package/src/components/Comments.stories.tsx +25 -23
- package/src/components/CommentsContainer.tsx +4 -6
- package/src/components/CommentsThreadContainer.tsx +21 -22
- package/src/components/Lobby/Lobby.tsx +9 -7
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.tsx +2 -2
- package/src/components/MessageContainer.tsx +59 -28
- package/src/components/Participant/Participant.tsx +32 -19
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +3 -3
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +6 -6
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +6 -3
- package/src/components/{ThreadComplementary.tsx → ThreadCompanion.tsx} +79 -67
- package/src/components/ThreadSettings.tsx +6 -1
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +4 -7
- package/src/components/testing.ts +3 -5
- package/src/extensions/threads.ts +82 -38
- package/src/functions/create-proposals.ts +57 -0
- package/src/functions/index.ts +5 -0
- package/src/hooks/analytics.ts +21 -21
- package/src/hooks/index.ts +3 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +15 -11
- package/src/translations.ts +3 -1
- package/src/types/Channel.ts +13 -10
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.ts +163 -85
- package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +0 -16
- package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +0 -7
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs +0 -24
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +0 -7
- package/dist/lib/browser/chunk-6CUDBEYP.mjs +0 -377
- package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +0 -7
- package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
- package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-DJOUMWEL.mjs +0 -988
- package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQSXEHOW.mjs +0 -618
- package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs +0 -27
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-L6F2AG6W.mjs +0 -23
- package/dist/lib/browser/chunk-L6F2AG6W.mjs.map +0 -7
- package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +0 -7
- package/dist/lib/browser/chunk-UTSLSZED.mjs +0 -178
- package/dist/lib/browser/chunk-UTSLSZED.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs +0 -419
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +0 -7
- package/dist/lib/browser/markdown-L7LDNF56.mjs +0 -169
- package/dist/lib/browser/markdown-L7LDNF56.mjs.map +0 -7
- package/dist/lib/browser/react-root-RCJLK4EP.mjs +0 -28
- package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IC576W2W.mjs.map +0 -7
- package/dist/lib/browser/settings-5FYGBOGI.mjs +0 -22
- package/dist/lib/browser/settings-5FYGBOGI.mjs.map +0 -7
- package/dist/lib/browser/state-36REWXO5.mjs +0 -34
- package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs +0 -74
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs +0 -25
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +0 -25
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +0 -378
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +0 -619
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs +0 -989
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs +0 -179
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs +0 -420
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs +0 -170
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +0 -29
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs +0 -23
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs.map +0 -7
- package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
- package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +0 -75
- package/dist/lib/node-esm/toolkit-X2KA4FNC.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/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/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/dist/types/src/capabilities/toolkit.d.ts +0 -24
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- package/dist/types/src/types/Thread.d.ts +0 -167
- package/dist/types/src/types/Thread.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -186
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -344
- package/src/capabilities/markdown.ts +0 -69
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -89
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- package/src/capabilities/toolkit.ts +0 -85
- package/src/types/Thread.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-SVV4ZX5T.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-ALFWQ65B.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-63GMQ753.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-MFKPXMIK.mjs.map → chunk-HSLMI22Q.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.bc674ce",
|
|
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,76 +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/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/echo": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/react-
|
|
78
|
-
"@dxos/
|
|
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/
|
|
86
|
-
"@dxos/
|
|
65
|
+
"@dxos/app-framework": "0.8.4-main.bc674ce",
|
|
66
|
+
"@dxos/assistant": "0.8.4-main.bc674ce",
|
|
67
|
+
"@dxos/codec-protobuf": "0.8.4-main.bc674ce",
|
|
68
|
+
"@dxos/async": "0.8.4-main.bc674ce",
|
|
69
|
+
"@dxos/blueprints": "0.8.4-main.bc674ce",
|
|
70
|
+
"@dxos/debug": "0.8.4-main.bc674ce",
|
|
71
|
+
"@dxos/context": "0.8.4-main.bc674ce",
|
|
72
|
+
"@dxos/devtools": "0.8.4-main.bc674ce",
|
|
73
|
+
"@dxos/display-name": "0.8.4-main.bc674ce",
|
|
74
|
+
"@dxos/echo": "0.8.4-main.bc674ce",
|
|
75
|
+
"@dxos/echo-react": "0.8.4-main.bc674ce",
|
|
76
|
+
"@dxos/echo-db": "0.8.4-main.bc674ce",
|
|
77
|
+
"@dxos/effect": "0.8.4-main.bc674ce",
|
|
78
|
+
"@dxos/keys": "0.8.4-main.bc674ce",
|
|
79
|
+
"@dxos/functions": "0.8.4-main.bc674ce",
|
|
80
|
+
"@dxos/log": "0.8.4-main.bc674ce",
|
|
81
|
+
"@dxos/plugin-attention": "0.8.4-main.bc674ce",
|
|
82
|
+
"@dxos/invariant": "0.8.4-main.bc674ce",
|
|
83
|
+
"@dxos/operation": "0.8.4-main.bc674ce",
|
|
84
|
+
"@dxos/plugin-client": "0.8.4-main.bc674ce",
|
|
85
|
+
"@dxos/plugin-deck": "0.8.4-main.bc674ce",
|
|
86
|
+
"@dxos/plugin-markdown": "0.8.4-main.bc674ce",
|
|
87
|
+
"@dxos/plugin-graph": "0.8.4-main.bc674ce",
|
|
88
|
+
"@dxos/plugin-space": "0.8.4-main.bc674ce",
|
|
89
|
+
"@dxos/protocols": "0.8.4-main.bc674ce",
|
|
90
|
+
"@dxos/react-client": "0.8.4-main.bc674ce",
|
|
91
|
+
"@dxos/plugin-observability": "0.8.4-main.bc674ce",
|
|
92
|
+
"@dxos/react-ui-attention": "0.8.4-main.bc674ce",
|
|
93
|
+
"@dxos/react-ui-dnd": "0.8.4-main.bc674ce",
|
|
94
|
+
"@dxos/react-ui-editor": "0.8.4-main.bc674ce",
|
|
95
|
+
"@dxos/react-ui-form": "0.8.4-main.bc674ce",
|
|
96
|
+
"@dxos/react-ui-menu": "0.8.4-main.bc674ce",
|
|
97
|
+
"@dxos/react-ui-sfx": "0.8.4-main.bc674ce",
|
|
98
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bc674ce",
|
|
99
|
+
"@dxos/react-ui-tabs": "0.8.4-main.bc674ce",
|
|
100
|
+
"@dxos/react-ui-stack": "0.8.4-main.bc674ce",
|
|
101
|
+
"@dxos/react-ui-thread": "0.8.4-main.bc674ce",
|
|
102
|
+
"@dxos/schema": "0.8.4-main.bc674ce",
|
|
103
|
+
"@dxos/ui-editor": "0.8.4-main.bc674ce",
|
|
104
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.bc674ce",
|
|
105
|
+
"@dxos/util": "0.8.4-main.bc674ce",
|
|
106
|
+
"@dxos/types": "0.8.4-main.bc674ce"
|
|
87
107
|
},
|
|
88
108
|
"devDependencies": {
|
|
89
|
-
"@effect-
|
|
90
|
-
"@effect/platform": "0.
|
|
91
|
-
"@types/react": "~19.2.
|
|
92
|
-
"@types/react-dom": "~19.2.
|
|
93
|
-
"effect": "3.
|
|
94
|
-
"react": "~19.2.
|
|
95
|
-
"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",
|
|
96
116
|
"vite": "7.1.9",
|
|
97
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
98
|
-
"@dxos/random": "0.8.4-main.
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/react-ui
|
|
101
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
117
|
+
"@dxos/plugin-theme": "0.8.4-main.bc674ce",
|
|
118
|
+
"@dxos/random": "0.8.4-main.bc674ce",
|
|
119
|
+
"@dxos/plugin-testing": "0.8.4-main.bc674ce",
|
|
120
|
+
"@dxos/react-ui": "0.8.4-main.bc674ce",
|
|
121
|
+
"@dxos/storybook-utils": "0.8.4-main.bc674ce",
|
|
122
|
+
"@dxos/ui-theme": "0.8.4-main.bc674ce"
|
|
102
123
|
},
|
|
103
124
|
"peerDependencies": {
|
|
104
|
-
"@effect-
|
|
105
|
-
"@effect/platform": "
|
|
106
|
-
"effect": "
|
|
107
|
-
"react": "
|
|
108
|
-
"react-dom": "
|
|
109
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
110
|
-
"@dxos/
|
|
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/react-ui": "0.8.4-main.bc674ce",
|
|
131
|
+
"@dxos/ui-theme": "0.8.4-main.bc674ce"
|
|
111
132
|
},
|
|
112
133
|
"publishConfig": {
|
|
113
134
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -2,85 +2,84 @@
|
|
|
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 {
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
14
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
|
-
import { AnchoredTo,
|
|
15
|
+
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
13
16
|
|
|
14
17
|
import {
|
|
15
18
|
AppGraphBuilder,
|
|
19
|
+
BlueprintDefinition,
|
|
16
20
|
CallManager,
|
|
17
|
-
IntentResolver,
|
|
18
21
|
Markdown,
|
|
22
|
+
OperationResolver,
|
|
19
23
|
ReactRoot,
|
|
20
24
|
ReactSurface,
|
|
25
|
+
Repair,
|
|
21
26
|
ThreadState,
|
|
22
|
-
Toolkit,
|
|
23
27
|
} from './capabilities';
|
|
24
28
|
import { THREAD_ITEM, meta } from './meta';
|
|
25
29
|
import { translations } from './translations';
|
|
26
|
-
import { Channel,
|
|
30
|
+
import { Channel, ThreadOperation } from './types';
|
|
27
31
|
|
|
28
32
|
// TODO(Zan): Every instance of `cursor` should be replaced with `anchor`.
|
|
29
33
|
// NOTE(burdon): Review/discuss CursorConverter semantics.
|
|
30
34
|
|
|
31
35
|
// TODO(wittjosiah): Rename to ChatPlugin.
|
|
32
36
|
// TODO(wittjosiah): Enabling comments should likely be factored out of this plugin but depend on it's capabilities.
|
|
33
|
-
export const ThreadPlugin =
|
|
34
|
-
|
|
35
|
-
id:
|
|
37
|
+
export const ThreadPlugin = Plugin.define(meta).pipe(
|
|
38
|
+
Plugin.addModule({
|
|
39
|
+
id: 'call-manager',
|
|
36
40
|
activatesOn: ClientEvents.ClientReady,
|
|
37
41
|
activate: CallManager,
|
|
38
42
|
}),
|
|
39
43
|
// TODO(wittjosiah): Currently not used but leaving because there will likely be settings for threads again.
|
|
40
|
-
//
|
|
41
|
-
// id:
|
|
44
|
+
// Plugin.addModule({
|
|
45
|
+
// id: 'settings',
|
|
42
46
|
// activatesOn: Events.SetupSettings,
|
|
43
47
|
// activate: ThreadSettings,
|
|
44
48
|
// }),
|
|
45
|
-
|
|
46
|
-
id:
|
|
49
|
+
Plugin.addModule({
|
|
50
|
+
id: 'state',
|
|
47
51
|
// TODO(wittjosiah): Does not integrate with settings store.
|
|
48
52
|
// Should this be a different event?
|
|
49
53
|
// Should settings store be renamed to be more generic?
|
|
50
|
-
activatesOn:
|
|
54
|
+
activatesOn: Common.ActivationEvent.SetupSettings,
|
|
51
55
|
activate: ThreadState,
|
|
52
56
|
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}),
|
|
58
|
-
defineModule({
|
|
59
|
-
id: `${meta.id}/module/metadata`,
|
|
60
|
-
activatesOn: Events.SetupMetadata,
|
|
61
|
-
activate: () => [
|
|
62
|
-
contributes(Capabilities.Metadata, {
|
|
57
|
+
Common.Plugin.addTranslationsModule({ translations: [...translations, ...threadTranslations] }),
|
|
58
|
+
Common.Plugin.addMetadataModule({
|
|
59
|
+
metadata: [
|
|
60
|
+
{
|
|
63
61
|
id: Type.getTypename(Channel.Channel),
|
|
64
62
|
metadata: {
|
|
65
63
|
icon: 'ph--hash--regular',
|
|
66
64
|
iconHue: 'rose',
|
|
65
|
+
createObject: ((props) => Effect.sync(() => Channel.make(props))) satisfies CreateObject,
|
|
67
66
|
},
|
|
68
|
-
}
|
|
69
|
-
|
|
67
|
+
},
|
|
68
|
+
{
|
|
70
69
|
id: Type.getTypename(Thread.Thread),
|
|
71
70
|
metadata: {
|
|
72
71
|
// TODO(wittjosiah): Move out of metadata.
|
|
73
72
|
loadReferences: async (thread: Thread.Thread) => await Ref.Array.loadAll(thread.messages ?? []),
|
|
74
73
|
},
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
id:
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: Message.Message.typename,
|
|
78
77
|
metadata: {
|
|
79
78
|
// TODO(wittjosiah): Move out of metadata.
|
|
80
79
|
loadReferences: () => [], // loadObjectReferences(message, (message) => [...message.parts, message.context]),
|
|
81
80
|
},
|
|
82
|
-
}
|
|
83
|
-
|
|
81
|
+
},
|
|
82
|
+
{
|
|
84
83
|
id: THREAD_ITEM,
|
|
85
84
|
metadata: {
|
|
86
85
|
parse: (item: Thread.Thread, type: string) => {
|
|
@@ -94,72 +93,41 @@ export const ThreadPlugin = definePlugin(meta, () => [
|
|
|
94
93
|
}
|
|
95
94
|
},
|
|
96
95
|
},
|
|
97
|
-
}
|
|
96
|
+
},
|
|
98
97
|
],
|
|
99
98
|
}),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
103
|
-
activate: () =>
|
|
104
|
-
contributes(
|
|
105
|
-
SpaceCapabilities.ObjectForm,
|
|
106
|
-
defineObjectForm({
|
|
107
|
-
objectSchema: Channel.Channel,
|
|
108
|
-
getIntent: (_, options) =>
|
|
109
|
-
createIntent(ThreadAction.CreateChannel, {
|
|
110
|
-
spaceId: options.space.id,
|
|
111
|
-
}),
|
|
112
|
-
}),
|
|
113
|
-
),
|
|
114
|
-
}),
|
|
115
|
-
defineModule({
|
|
116
|
-
id: `${meta.id}/module/schema`,
|
|
117
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
118
|
-
activate: () =>
|
|
119
|
-
contributes(ClientCapabilities.Schema, [AnchoredTo, Thread.Thread, DataType.Message, DataType.MessageV1]),
|
|
99
|
+
Common.Plugin.addSchemaModule({
|
|
100
|
+
schema: [AnchoredTo.AnchoredTo, Channel.Channel, Message.Message, Message.MessageV1, Thread.Thread],
|
|
120
101
|
}),
|
|
121
|
-
|
|
122
|
-
id:
|
|
102
|
+
Plugin.addModule({
|
|
103
|
+
id: 'migration',
|
|
123
104
|
activatesOn: ClientEvents.SetupMigration,
|
|
124
|
-
activate: () => contributes(ClientCapabilities.Migration, [
|
|
105
|
+
activate: () => Effect.succeed(Capability.contributes(ClientCapabilities.Migration, [Message.MessageV1ToV2])),
|
|
125
106
|
}),
|
|
126
|
-
|
|
127
|
-
id:
|
|
107
|
+
Plugin.addModule({
|
|
108
|
+
id: 'on-space-created',
|
|
128
109
|
activatesOn: SpaceEvents.SpaceCreated,
|
|
129
110
|
activate: () =>
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
Effect.succeed(
|
|
112
|
+
Capability.contributes(SpaceCapabilities.OnCreateSpace, (params) =>
|
|
113
|
+
Operation.invoke(ThreadOperation.OnCreateSpace, params),
|
|
114
|
+
),
|
|
132
115
|
),
|
|
133
116
|
}),
|
|
134
|
-
|
|
135
|
-
id:
|
|
117
|
+
Plugin.addModule({
|
|
118
|
+
id: 'repair',
|
|
119
|
+
activatesOn: ClientEvents.SpacesReady,
|
|
120
|
+
activate: Repair,
|
|
121
|
+
}),
|
|
122
|
+
Plugin.addModule({
|
|
123
|
+
id: 'markdown',
|
|
136
124
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
137
125
|
activate: Markdown,
|
|
138
126
|
}),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
activatesOn: Events.SetupReactSurface,
|
|
147
|
-
activate: ReactSurface,
|
|
148
|
-
}),
|
|
149
|
-
defineModule({
|
|
150
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
151
|
-
activatesOn: Events.SetupIntentResolver,
|
|
152
|
-
activate: IntentResolver,
|
|
153
|
-
}),
|
|
154
|
-
defineModule({
|
|
155
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
156
|
-
activatesOn: Events.SetupAppGraph,
|
|
157
|
-
activate: AppGraphBuilder,
|
|
158
|
-
}),
|
|
159
|
-
defineModule({
|
|
160
|
-
id: `${meta.id}/module/toolkit`,
|
|
161
|
-
// TODO(wittjosiah): Shouldn't use the startup event.
|
|
162
|
-
activatesOn: Events.Startup,
|
|
163
|
-
activate: Toolkit,
|
|
164
|
-
}),
|
|
165
|
-
]);
|
|
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
|
}
|