@dxos/plugin-thread 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/LICENSE +102 -5
- package/PLUGIN.mdl +271 -0
- package/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-UJHPOUWA.mjs +28 -0
- package/dist/lib/neutral/ChannelArticle-UJHPOUWA.mjs.map +7 -0
- package/dist/lib/neutral/ChannelChat-LZEDFJVD.mjs +10 -0
- package/dist/lib/{browser/ThreadCompanion-2CMLJH76.mjs → neutral/CommentsCompanion-FOUIGCEK.mjs} +59 -55
- package/dist/lib/neutral/CommentsCompanion-FOUIGCEK.mjs.map +7 -0
- package/dist/lib/neutral/ThreadContainer-QWB6WRMI.mjs +61 -0
- package/dist/lib/neutral/ThreadContainer-QWB6WRMI.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +109 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +40 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +24 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs +15 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
- package/dist/lib/neutral/add-message-RDIABSIX.mjs +122 -0
- package/dist/lib/neutral/add-message-RDIABSIX.mjs.map +7 -0
- package/dist/lib/neutral/agent-runner-RB7N5HLD.mjs +244 -0
- package/dist/lib/neutral/agent-runner-RB7N5HLD.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-PDLRFYSI.mjs +120 -0
- package/dist/lib/neutral/app-graph-builder-PDLRFYSI.mjs.map +7 -0
- package/dist/lib/neutral/append-channel-message-TBBQUVMH.mjs +40 -0
- package/dist/lib/neutral/append-channel-message-TBBQUVMH.mjs.map +7 -0
- package/dist/lib/{browser/blueprint-definition-42M2EJ2Y.mjs → neutral/blueprint-definition-S3EBOH4R.mjs} +4 -6
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +27 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-35GUWXBB.mjs +48 -0
- package/dist/lib/neutral/chunk-35GUWXBB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs +36 -0
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BHEZLLXG.mjs +55 -0
- package/dist/lib/neutral/chunk-BHEZLLXG.mjs.map +7 -0
- package/dist/lib/{browser/markdown-GRRPCZHJ.mjs → neutral/chunk-HQZWTDJC.mjs} +48 -94
- package/dist/lib/neutral/chunk-HQZWTDJC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IQBZZAMX.mjs +335 -0
- package/dist/lib/neutral/chunk-IQBZZAMX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JJETHBAZ.mjs +8 -0
- package/dist/lib/neutral/chunk-JJETHBAZ.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-ABUFOZVX.mjs → neutral/chunk-JLY4NVTA.mjs} +12 -7
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs +69 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +541 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-VXM6HJMN.mjs +61 -0
- package/dist/lib/neutral/create-VXM6HJMN.mjs.map +7 -0
- package/dist/lib/neutral/create-channel-FSJOMRHF.mjs +19 -0
- package/dist/lib/neutral/create-channel-FSJOMRHF.mjs.map +7 -0
- package/dist/lib/neutral/create-object-D5XEG7MQ.mjs +28 -0
- package/dist/lib/neutral/create-object-D5XEG7MQ.mjs.map +7 -0
- package/dist/lib/neutral/create-proposals-ILYIYJEN.mjs +56 -0
- package/dist/lib/neutral/create-proposals-ILYIYJEN.mjs.map +7 -0
- package/dist/lib/neutral/delete-6KZERY6K.mjs +57 -0
- package/dist/lib/neutral/delete-6KZERY6K.mjs.map +7 -0
- package/dist/lib/neutral/delete-message-PATSHW36.mjs +54 -0
- package/dist/lib/neutral/delete-message-PATSHW36.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +10 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/markdown-5UHAAC5Z.mjs +83 -0
- package/dist/lib/neutral/markdown-5UHAAC5Z.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/on-create-space-6NLTBGGD.mjs +23 -0
- package/dist/lib/neutral/on-create-space-6NLTBGGD.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-TUMXARMI.mjs +76 -0
- package/dist/lib/neutral/react-surface-TUMXARMI.mjs.map +7 -0
- package/dist/lib/neutral/respond-to-thread-ROQA3B6U.mjs +32 -0
- package/dist/lib/neutral/respond-to-thread-ROQA3B6U.mjs.map +7 -0
- package/dist/lib/neutral/restore-SP4HADCE.mjs +32 -0
- package/dist/lib/neutral/restore-SP4HADCE.mjs.map +7 -0
- package/dist/lib/neutral/restore-message-TVIC66VL.mjs +33 -0
- package/dist/lib/neutral/restore-message-TVIC66VL.mjs.map +7 -0
- package/dist/lib/neutral/select-DLHPEKEA.mjs +24 -0
- package/dist/lib/neutral/select-DLHPEKEA.mjs.map +7 -0
- package/dist/lib/neutral/set-agent-config-7GEYCG7Y.mjs +20 -0
- package/dist/lib/neutral/set-agent-config-7GEYCG7Y.mjs.map +7 -0
- package/dist/lib/{browser/settings-Y75FG6XR.mjs → neutral/settings-HK4EB6TF.mjs} +6 -11
- package/dist/lib/neutral/settings-HK4EB6TF.mjs.map +7 -0
- package/dist/lib/{browser/state-OBTMMEUZ.mjs → neutral/state-UU7VEAKV.mjs} +3 -6
- package/dist/lib/neutral/state-UU7VEAKV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +58 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/toggle-resolved-GMAD3SZ2.mjs +36 -0
- package/dist/lib/neutral/toggle-resolved-GMAD3SZ2.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +16 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs +54 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts +1 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
- package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/agent-runner.d.ts +22 -0
- package/dist/types/src/capabilities/agent-runner.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +17 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +51 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +2 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +13 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +160 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/{CommentsThreadContainer.d.ts → CommentsPanel/CommentsThread.d.ts} +3 -3
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts +3 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/{MessageContainer.d.ts → MessagePanel/MessagePanel.d.ts} +3 -3
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -0
- package/dist/types/src/components/MessagePanel/index.d.ts +2 -0
- package/dist/types/src/components/MessagePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts +6 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +161 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts +2 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +5 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +13 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +162 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +20 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts +4 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.d.ts +11 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.stories.d.ts +198 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/CommentsCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts +20 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts +162 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts +4 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -6
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/{components/command-extension.d.ts → extensions/command.d.ts} +1 -1
- package/dist/types/src/extensions/command.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +1 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +4 -4
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +5 -0
- package/dist/types/src/operations/add-message.d.ts.map +1 -0
- package/dist/types/src/operations/append-channel-message.d.ts +5 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +5 -0
- package/dist/types/src/operations/create-channel.d.ts.map +1 -0
- package/dist/types/src/operations/create-proposals.d.ts +5 -0
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/delete-message.d.ts +5 -0
- package/dist/types/src/operations/delete-message.d.ts.map +1 -0
- package/dist/types/src/operations/delete.d.ts +5 -0
- package/dist/types/src/operations/delete.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/respond-to-thread.d.ts +5 -0
- package/dist/types/src/operations/respond-to-thread.d.ts.map +1 -0
- package/dist/types/src/operations/restore-message.d.ts +5 -0
- package/dist/types/src/operations/restore-message.d.ts.map +1 -0
- package/dist/types/src/operations/restore.d.ts +5 -0
- package/dist/types/src/operations/restore.d.ts.map +1 -0
- package/dist/types/src/operations/select.d.ts +5 -0
- package/dist/types/src/operations/select.d.ts.map +1 -0
- package/dist/types/src/operations/set-agent-config.d.ts +5 -0
- package/dist/types/src/operations/set-agent-config.d.ts.map +1 -0
- package/dist/types/src/operations/toggle-resolved.d.ts +5 -0
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/should-trigger-agent.d.ts +22 -0
- package/dist/types/src/should-trigger-agent.d.ts.map +1 -0
- package/dist/types/src/should-trigger-agent.test.d.ts +2 -0
- package/dist/types/src/should-trigger-agent.test.d.ts.map +1 -0
- package/dist/types/src/{components/testing.d.ts → testing/data.d.ts} +1 -1
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +140 -142
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AgentIdentity.d.ts +27 -0
- package/dist/types/src/types/AgentIdentity.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +5 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts +34 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ThreadOperation.d.ts +2745 -0
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -3303
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +6 -3
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +136 -92
- package/src/ThreadPlugin.node.ts +39 -0
- package/src/ThreadPlugin.test.ts +37 -0
- package/src/ThreadPlugin.tsx +40 -61
- package/src/ThreadPlugin.workerd.ts +20 -0
- package/src/blueprints/thread-blueprint.ts +5 -9
- package/src/capabilities/agent-runner.ts +291 -0
- package/src/capabilities/app-graph-builder.ts +143 -0
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +17 -10
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +16 -12
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +75 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/{state/state.ts → state.ts} +1 -1
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Chat/Chat.tsx +259 -0
- package/src/components/Chat/index.ts +5 -0
- package/src/components/{Comments.stories.tsx → CommentsPanel/CommentsPanel.stories.tsx} +17 -17
- package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +11 -11
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +32 -28
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +24 -19
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +32 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +19 -0
- package/src/components/ThreadSettings/index.ts +5 -0
- package/src/components/index.ts +7 -4
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +105 -0
- package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelChat/ChannelChat.tsx +75 -0
- package/src/containers/ChannelChat/index.ts +8 -0
- package/src/containers/CommentsCompanion/CommentsCompanion.stories.tsx +355 -0
- package/src/containers/{ThreadCompanion/ThreadCompanion.tsx → CommentsCompanion/CommentsCompanion.tsx} +63 -44
- package/src/containers/CommentsCompanion/index.ts +5 -0
- package/src/containers/{ChatContainer/ChatContainer.stories.tsx → ThreadContainer/ThreadContainer.stories.tsx} +17 -19
- package/src/containers/ThreadContainer/ThreadContainer.tsx +75 -0
- package/src/containers/ThreadContainer/index.ts +8 -0
- package/src/containers/index.ts +4 -6
- package/src/{components/command-extension.ts → extensions/command.ts} +1 -1
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +20 -19
- package/src/hooks/analytics.ts +1 -1
- package/src/hooks/index.ts +0 -5
- package/src/index.ts +4 -4
- package/src/meta.ts +35 -9
- package/src/operations/add-message.ts +94 -0
- package/src/operations/append-channel-message.ts +37 -0
- package/src/operations/create-channel.ts +20 -0
- package/src/operations/create-proposals.ts +49 -0
- package/src/operations/create.ts +63 -0
- package/src/operations/delete-message.ts +53 -0
- package/src/operations/delete.ts +63 -0
- package/src/operations/index.ts +22 -0
- package/src/operations/on-create-space.ts +27 -0
- package/src/operations/respond-to-thread.ts +32 -0
- package/src/operations/restore-message.ts +38 -0
- package/src/operations/restore.ts +38 -0
- package/src/operations/select.ts +24 -0
- package/src/operations/set-agent-config.ts +24 -0
- package/src/operations/toggle-resolved.ts +41 -0
- package/src/plugin.ts +11 -0
- package/src/should-trigger-agent.test.ts +72 -0
- package/src/should-trigger-agent.ts +50 -0
- package/src/{components/testing.ts → testing/data.ts} +7 -7
- package/src/testing/index.ts +1 -1
- package/src/translations.ts +73 -76
- package/src/types/AgentIdentity.ts +35 -0
- package/src/types/Settings.ts +10 -0
- package/src/types/ThreadCapabilities.ts +46 -0
- package/src/types/ThreadOperation.ts +225 -0
- package/src/types/index.ts +5 -2
- package/src/types/types.ts +1 -185
- package/src/util.ts +37 -5
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs +0 -182
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs.map +0 -7
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs +0 -33
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs.map +0 -7
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs +0 -15
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs +0 -14
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs.map +0 -7
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs +0 -20
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs +0 -191
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs.map +0 -7
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs +0 -27
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-CP7E2HRE.mjs +0 -31
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERK254BS.mjs +0 -1810
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +0 -7
- package/dist/lib/browser/chunk-G6FJBSXX.mjs +0 -1123
- package/dist/lib/browser/chunk-G6FJBSXX.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDLDMR54.mjs +0 -184
- package/dist/lib/browser/chunk-HDLDMR54.mjs.map +0 -7
- package/dist/lib/browser/chunk-ISCHODBV.mjs +0 -106
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-LUK4UNFA.mjs +0 -20
- package/dist/lib/browser/chunk-LUK4UNFA.mjs.map +0 -7
- package/dist/lib/browser/chunk-PDHCY236.mjs +0 -223
- package/dist/lib/browser/chunk-PDHCY236.mjs.map +0 -7
- package/dist/lib/browser/chunk-PL5LIVP4.mjs +0 -105
- package/dist/lib/browser/chunk-PL5LIVP4.mjs.map +0 -7
- package/dist/lib/browser/chunk-U32R23JO.mjs +0 -277
- package/dist/lib/browser/chunk-U32R23JO.mjs.map +0 -7
- package/dist/lib/browser/chunk-UVUCB7QO.mjs +0 -125
- package/dist/lib/browser/chunk-UVUCB7QO.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -308
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs +0 -442
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs.map +0 -7
- package/dist/lib/browser/react-root-7UFFPPRD.mjs +0 -26
- package/dist/lib/browser/react-root-7UFFPPRD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs +0 -113
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs.map +0 -7
- package/dist/lib/browser/repair-TBU45SBG.mjs +0 -40
- package/dist/lib/browser/repair-TBU45SBG.mjs.map +0 -7
- package/dist/lib/browser/settings-Y75FG6XR.mjs.map +0 -7
- package/dist/lib/browser/state-OBTMMEUZ.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -15
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs +0 -183
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs.map +0 -7
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs +0 -34
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs +0 -16
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs +0 -15
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs +0 -205
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs +0 -21
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs +0 -192
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs +0 -28
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs +0 -107
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs +0 -224
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs +0 -22
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs +0 -1124
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs +0 -1811
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs +0 -278
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs +0 -126
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs +0 -108
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs +0 -185
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -309
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs +0 -211
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs +0 -443
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs +0 -27
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs +0 -114
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs.map +0 -7
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs +0 -41
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs +0 -36
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs.map +0 -7
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs +0 -26
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -16
- package/dist/types/src/calls/call-manager.d.ts +0 -87
- package/dist/types/src/calls/call-manager.d.ts.map +0 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
- package/dist/types/src/calls/index.d.ts +0 -7
- package/dist/types/src/calls/index.d.ts.map +0 -1
- package/dist/types/src/calls/media-manager.d.ts +0 -60
- package/dist/types/src/calls/media-manager.d.ts.map +0 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -24
- package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
- package/dist/types/src/calls/types.d.ts +0 -45
- package/dist/types/src/calls/types.d.ts.map +0 -1
- package/dist/types/src/calls/util/audio.d.ts +0 -6
- package/dist/types/src/calls/util/audio.d.ts.map +0 -1
- package/dist/types/src/calls/util/calls-service.d.ts +0 -77
- package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
- package/dist/types/src/calls/util/history-cache.d.ts +0 -11
- package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
- package/dist/types/src/calls/util/index.d.ts +0 -5
- package/dist/types/src/calls/util/index.d.ts.map +0 -1
- package/dist/types/src/calls/util/media.d.ts +0 -6
- package/dist/types/src/calls/util/media.d.ts.map +0 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
- package/dist/types/src/calls-service.stories.d.ts +0 -23
- package/dist/types/src/calls-service.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts +0 -6
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/index.d.ts +0 -3
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
- package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts +0 -9
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -17
- package/dist/types/src/components/Call/Call.d.ts.map +0 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
- package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Call/index.d.ts +0 -3
- package/dist/types/src/components/Call/index.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -162
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/index.d.ts +0 -2
- package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
- package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
- package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
- package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -22
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
- package/dist/types/src/components/Media/index.d.ts +0 -3
- package/dist/types/src/components/Media/index.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/Participant/Participant.d.ts +0 -6
- package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
- package/dist/types/src/components/Participant/index.d.ts +0 -3
- package/dist/types/src/components/Participant/index.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -166
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -180
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- package/dist/types/src/components/command-extension.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +0 -15
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +0 -3
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts +0 -3
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +0 -3
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +0 -12
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +0 -164
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +0 -3
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +0 -17
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts +0 -164
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +0 -3
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +0 -5
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +0 -3
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts +0 -8
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ThreadSettings/index.d.ts.map +0 -1
- package/dist/types/src/functions/create-proposals.d.ts +0 -13
- package/dist/types/src/functions/create-proposals.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -14
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
- package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -3
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/dist/types/src/types/Channel.d.ts +0 -711
- package/dist/types/src/types/Channel.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -23
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/calls/call-manager.ts +0 -270
- package/src/calls/call-swarm-synchronizer.ts +0 -350
- package/src/calls/index.ts +0 -10
- package/src/calls/media-manager.ts +0 -378
- package/src/calls/speaking-monitor.ts +0 -85
- package/src/calls/types.ts +0 -74
- package/src/calls/util/audio.ts +0 -58
- package/src/calls/util/calls-service.ts +0 -581
- package/src/calls/util/history-cache.ts +0 -27
- package/src/calls/util/index.ts +0 -8
- package/src/calls/util/media.ts +0 -52
- package/src/calls/util/stub-media-streams.ts +0 -127
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -229
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -202
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/call-manager/call-manager.ts +0 -26
- package/src/capabilities/call-manager/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -399
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-root/react-root.tsx +0 -20
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -98
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -55
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/Call/Call.tsx +0 -93
- package/src/components/Call/Toolbar.tsx +0 -189
- package/src/components/Call/index.ts +0 -6
- package/src/components/Lobby/Lobby.tsx +0 -121
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -60
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/Participant/Participant.tsx +0 -76
- package/src/components/Participant/ParticipantGrid.tsx +0 -89
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +0 -54
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +0 -31
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -158
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -134
- package/src/components/ResponsiveGrid/index.ts +0 -7
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +0 -172
- package/src/containers/CallDebugPanel/index.ts +0 -7
- package/src/containers/CallSidebar/CallSidebar.tsx +0 -17
- package/src/containers/CallSidebar/index.ts +0 -7
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +0 -60
- package/src/containers/ChannelContainer/ChannelContainer.tsx +0 -217
- package/src/containers/ChannelContainer/index.ts +0 -7
- package/src/containers/ChatContainer/ChatContainer.tsx +0 -149
- package/src/containers/ChatContainer/index.ts +0 -7
- package/src/containers/ThreadCompanion/index.ts +0 -7
- package/src/containers/ThreadSettings/ThreadSettings.tsx +0 -22
- package/src/containers/ThreadSettings/index.ts +0 -7
- package/src/functions/create-proposals.ts +0 -57
- package/src/functions/index.ts +0 -9
- package/src/hooks/useBlackCanvasStreamTrack.tsx +0 -27
- package/src/hooks/useDebugMode.ts +0 -25
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
- package/src/hooks/useVideoStreamTrack.tsx +0 -36
- package/src/testing/stories.ts +0 -56
- package/src/types/Channel.ts +0 -30
- package/src/types/capabilities.ts +0 -34
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/ChannelContainer-EPYG4QAC.mjs.map → neutral/ChannelChat-LZEDFJVD.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/blueprints → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser/ChatContainer-2243UD2M.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-NU4LSLB4.mjs.map → neutral/types/index.mjs.map} +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{markdown/markdown.d.ts → markdown.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as LanguageModel from '@effect/ai/LanguageModel';
|
|
6
|
+
import * as Tool from '@effect/ai/Tool';
|
|
7
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Layer from 'effect/Layer';
|
|
10
|
+
import * as Schema from 'effect/Schema';
|
|
11
|
+
|
|
12
|
+
import { AiPreprocessor, AiService } from '@dxos/ai';
|
|
13
|
+
import { Capability } from '@dxos/app-framework';
|
|
14
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
15
|
+
import { Filter, Obj, Ref, Relation } from '@dxos/echo';
|
|
16
|
+
import { createDocAccessor, getRangeFromCursor, toCursorRange, updateText } from '@dxos/echo-db';
|
|
17
|
+
import { log } from '@dxos/log';
|
|
18
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
19
|
+
import { AnchoredTo, Message } from '@dxos/types';
|
|
20
|
+
import { trim } from '@dxos/util';
|
|
21
|
+
|
|
22
|
+
import { AgentIdentity, ThreadCapabilities } from '../types';
|
|
23
|
+
|
|
24
|
+
const DEFAULT_MODEL = '@anthropic/claude-sonnet-4-5';
|
|
25
|
+
|
|
26
|
+
const baseInstructions = trim`
|
|
27
|
+
You are a helpful assistant participating in a comment thread on a document.
|
|
28
|
+
Read the document and the conversation history; the user's requests usually
|
|
29
|
+
refer to the document content.
|
|
30
|
+
|
|
31
|
+
When the user asks you to MODIFY the document (translate, rewrite, edit, fix,
|
|
32
|
+
refactor, etc.) call ONE of the edit tools. Do NOT paste the new content into
|
|
33
|
+
chat — always use the tool.
|
|
34
|
+
|
|
35
|
+
- If the thread has an anchored selection (shown in <selection>...</selection>
|
|
36
|
+
below), use \`editAnchoredRange\` with ONLY the replacement text for that
|
|
37
|
+
span. Leave the rest of the document untouched.
|
|
38
|
+
- If there is no anchored selection, use \`updateDocument\` with the FULL new
|
|
39
|
+
markdown content.
|
|
40
|
+
|
|
41
|
+
AFTER calling an edit tool you MUST also produce a chat reply that:
|
|
42
|
+
1. States in one line what you changed (e.g. "Translated the selection to
|
|
43
|
+
Japanese.");
|
|
44
|
+
2. Optionally adds one or two sentences explaining notable choices,
|
|
45
|
+
caveats, or suggesting a follow-up. Keep the whole reply under 60 words.
|
|
46
|
+
3. Does NOT repeat the new document content — it's already shown in the
|
|
47
|
+
editor on the left.
|
|
48
|
+
|
|
49
|
+
When the user asks a QUESTION (or just chats), reply in plain text under
|
|
50
|
+
80 words and do not call any edit tool.
|
|
51
|
+
|
|
52
|
+
Do not address the user as 'user'; use their name if known. Never call yourself.
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
const EditAnchoredRangeTool = Tool.make('editAnchoredRange', {
|
|
56
|
+
description:
|
|
57
|
+
'Replace the text of the anchored selection in the markdown document. Call this for in-place edits when a <selection> is provided.',
|
|
58
|
+
parameters: {
|
|
59
|
+
replacement: Schema.String.annotations({
|
|
60
|
+
description: 'The new text for the anchored range. Only this span will be replaced.',
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
success: Schema.String,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const UpdateDocumentTool = Tool.make('updateDocument', {
|
|
67
|
+
description:
|
|
68
|
+
'Replace the entire markdown content of the document. Call this for in-place edits when there is no anchored selection.',
|
|
69
|
+
parameters: {
|
|
70
|
+
content: Schema.String.annotations({
|
|
71
|
+
description: 'The full new markdown content of the document.',
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
success: Schema.String,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
type EditTarget =
|
|
78
|
+
| {
|
|
79
|
+
kind: 'anchored';
|
|
80
|
+
text: Obj.Any;
|
|
81
|
+
snippet: string;
|
|
82
|
+
from: number;
|
|
83
|
+
to: number;
|
|
84
|
+
relation: AnchoredTo.AnchoredTo;
|
|
85
|
+
}
|
|
86
|
+
| { kind: 'document'; text: Obj.Any }
|
|
87
|
+
| { kind: 'none' };
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Resolve the agent's edit target for this turn:
|
|
91
|
+
* - 'anchored' when the thread is anchored to a span of the doc — agent edits
|
|
92
|
+
* only that span via `editAnchoredRange`.
|
|
93
|
+
* - 'document' when the subject is a Markdown.Document but the thread has no
|
|
94
|
+
* anchor — agent may replace the whole doc via `updateDocument`.
|
|
95
|
+
* - 'none' when the subject isn't editable text — no edit tools wired.
|
|
96
|
+
*/
|
|
97
|
+
const resolveEditTarget = (thread: Obj.Any, subject: Obj.Any): EditTarget => {
|
|
98
|
+
if (!Obj.instanceOf(Markdown.Document, subject)) {
|
|
99
|
+
return { kind: 'none' };
|
|
100
|
+
}
|
|
101
|
+
const text = subject.content?.target;
|
|
102
|
+
if (!text) {
|
|
103
|
+
return { kind: 'none' };
|
|
104
|
+
}
|
|
105
|
+
const db = Obj.getDatabase(thread);
|
|
106
|
+
if (!db) {
|
|
107
|
+
return { kind: 'document', text };
|
|
108
|
+
}
|
|
109
|
+
const relations = db.query(Filter.type(AnchoredTo.AnchoredTo)).runSync();
|
|
110
|
+
const ours = relations.find(
|
|
111
|
+
(relation: AnchoredTo.AnchoredTo) =>
|
|
112
|
+
Relation.getSource(relation) === thread && Relation.getTarget(relation) === subject,
|
|
113
|
+
);
|
|
114
|
+
if (!ours?.anchor) {
|
|
115
|
+
return { kind: 'document', text };
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
const accessor = createDocAccessor(text, ['content']);
|
|
119
|
+
const range = getRangeFromCursor(accessor, ours.anchor);
|
|
120
|
+
if (!range || range.start === range.end) {
|
|
121
|
+
return { kind: 'document', text };
|
|
122
|
+
}
|
|
123
|
+
const content = (text as unknown as { content: string }).content ?? '';
|
|
124
|
+
return {
|
|
125
|
+
kind: 'anchored',
|
|
126
|
+
text,
|
|
127
|
+
from: range.start,
|
|
128
|
+
to: range.end,
|
|
129
|
+
snippet: content.slice(range.start, range.end),
|
|
130
|
+
relation: ours,
|
|
131
|
+
};
|
|
132
|
+
} catch (err) {
|
|
133
|
+
log.warn('failed to resolve anchored range; falling back to whole-document edit', { error: err });
|
|
134
|
+
return { kind: 'document', text };
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Build the system prompt for a turn. Inlines the doc content and, when the
|
|
140
|
+
* thread is anchored, the highlighted snippet so the agent can target just
|
|
141
|
+
* that span.
|
|
142
|
+
*/
|
|
143
|
+
const buildInstructions = (subject: Obj.Any, target: EditTarget): string => {
|
|
144
|
+
if (!Obj.instanceOf(Markdown.Document, subject)) {
|
|
145
|
+
return baseInstructions;
|
|
146
|
+
}
|
|
147
|
+
const content = subject.content?.target?.content ?? '';
|
|
148
|
+
if (!content) {
|
|
149
|
+
return baseInstructions;
|
|
150
|
+
}
|
|
151
|
+
const selectionBlock = target.kind === 'anchored' ? `\n\n<selection>\n${target.snippet}\n</selection>` : '';
|
|
152
|
+
return trim`
|
|
153
|
+
${baseInstructions}
|
|
154
|
+
|
|
155
|
+
<document name="${subject.name ?? 'untitled'}">
|
|
156
|
+
${content}
|
|
157
|
+
</document>${selectionBlock}
|
|
158
|
+
`;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Normalises messages for the LLM prompt: user-authored messages in comment
|
|
163
|
+
* threads carry no explicit role (only assistant messages do), but the prompt
|
|
164
|
+
* preprocessor switches on `role` and drops anything that isn't 'user' or
|
|
165
|
+
* 'assistant'. Stamp `role: 'user'` on every non-assistant turn before
|
|
166
|
+
* preprocessing.
|
|
167
|
+
*/
|
|
168
|
+
const normalizeRoles = (messages: readonly Message.Message[]): Message.Message[] =>
|
|
169
|
+
messages.map((message) =>
|
|
170
|
+
message.sender.role === 'assistant'
|
|
171
|
+
? message
|
|
172
|
+
: { ...message, sender: { ...message.sender, role: 'user' as const } },
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Default AgentRunner implementation. One-shot LLM call per scheduled turn —
|
|
177
|
+
* loads the thread, builds a prompt from the message history, generates a
|
|
178
|
+
* reply via `LanguageModel.generateText`, and appends the response as an
|
|
179
|
+
* assistant message on the same thread.
|
|
180
|
+
*
|
|
181
|
+
* Edit tools (`editAnchoredRange`, `updateDocument`) are wired per turn based
|
|
182
|
+
* on whether the thread has an anchored range. Splicing uses `updateText`
|
|
183
|
+
* (Automerge-diff based) so cursors on other comment threads stay valid.
|
|
184
|
+
*
|
|
185
|
+
* The `AiServiceLayer` capability is resolved per turn (not at module
|
|
186
|
+
* activation) so plugin order doesn't matter for live wiring. When no host
|
|
187
|
+
* has contributed an `AppCapabilities.AiServiceLayer`, the runner logs a
|
|
188
|
+
* warning and returns; storybook stub paths contribute their own
|
|
189
|
+
* `AgentRunner` earlier in plugin order to short-circuit this module entirely.
|
|
190
|
+
*/
|
|
191
|
+
export default Capability.makeModule(
|
|
192
|
+
Effect.fnUntraced(function* () {
|
|
193
|
+
const runner: ThreadCapabilities.AgentRunner = {
|
|
194
|
+
run: ({ thread, subject }) =>
|
|
195
|
+
Effect.gen(function* () {
|
|
196
|
+
const aiServiceLayers = yield* Capability.getAll(AppCapabilities.AiServiceLayer);
|
|
197
|
+
const aiServiceLayer = aiServiceLayers[0];
|
|
198
|
+
if (!aiServiceLayer) {
|
|
199
|
+
log.warn('comment-thread agent runner: no AiServiceLayer contributed; skipping turn');
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const identity = yield* Capability.get(AgentIdentity);
|
|
203
|
+
|
|
204
|
+
// Load every referenced message into a plain Message.Message[].
|
|
205
|
+
const loaded = yield* Effect.forEach(
|
|
206
|
+
thread.messages,
|
|
207
|
+
(messageRef) => Effect.promise(() => messageRef.load()),
|
|
208
|
+
{ concurrency: 'unbounded' },
|
|
209
|
+
);
|
|
210
|
+
const history = normalizeRoles(loaded);
|
|
211
|
+
|
|
212
|
+
const target = resolveEditTarget(thread, subject);
|
|
213
|
+
const prompt = yield* AiPreprocessor.preprocessPrompt(history, {
|
|
214
|
+
system: buildInstructions(subject, target),
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
// Capture which edit tool fired so we can synthesize a fallback chat
|
|
218
|
+
// ack when the model elides the post-tool message.
|
|
219
|
+
let editOutcome: 'anchored' | 'document' | undefined;
|
|
220
|
+
|
|
221
|
+
const toolkit = Toolkit.make(EditAnchoredRangeTool, UpdateDocumentTool);
|
|
222
|
+
const toolkitLayer = toolkit.toLayer({
|
|
223
|
+
editAnchoredRange: ({ replacement }) =>
|
|
224
|
+
Effect.sync(() => {
|
|
225
|
+
if (target.kind !== 'anchored') {
|
|
226
|
+
return 'No anchored selection on this thread; use updateDocument instead.';
|
|
227
|
+
}
|
|
228
|
+
const original = (target.text as unknown as { content: string }).content ?? '';
|
|
229
|
+
const next = original.slice(0, target.from) + replacement + original.slice(target.to);
|
|
230
|
+
updateText(target.text, ['content'], next);
|
|
231
|
+
|
|
232
|
+
// Cursor at `to` (left-associated) can collapse to `from` after a
|
|
233
|
+
// delete-and-insert at that range, leaving the comment's anchor
|
|
234
|
+
// pointing at a zero-width span. Rewrite AnchoredTo.anchor to
|
|
235
|
+
// span the newly-inserted text so the editor marker continues
|
|
236
|
+
// to highlight the replaced range.
|
|
237
|
+
const newTo = target.from + replacement.length;
|
|
238
|
+
const accessor = createDocAccessor(target.text, ['content']);
|
|
239
|
+
const newAnchor = toCursorRange(accessor, target.from, newTo);
|
|
240
|
+
Relation.update(target.relation, (relation) => {
|
|
241
|
+
(relation as Relation.Mutable<AnchoredTo.AnchoredTo>).anchor = newAnchor;
|
|
242
|
+
});
|
|
243
|
+
editOutcome = 'anchored';
|
|
244
|
+
return 'Anchored range replaced.';
|
|
245
|
+
}),
|
|
246
|
+
updateDocument: ({ content }) =>
|
|
247
|
+
Effect.sync(() => {
|
|
248
|
+
if (target.kind === 'none') {
|
|
249
|
+
return 'No editable document in scope.';
|
|
250
|
+
}
|
|
251
|
+
updateText(target.text, ['content'], content);
|
|
252
|
+
editOutcome = 'document';
|
|
253
|
+
return 'Document updated.';
|
|
254
|
+
}),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const response = yield* LanguageModel.generateText({ prompt, toolkit }).pipe(
|
|
258
|
+
Effect.scoped,
|
|
259
|
+
Effect.provide(AiService.model(DEFAULT_MODEL).pipe(Layer.provide(aiServiceLayer))),
|
|
260
|
+
Effect.provide(toolkitLayer),
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
// The chat message defaults to whatever the model returned, but when
|
|
264
|
+
// the model elided its post-tool reply (some providers do) fall back
|
|
265
|
+
// to a synthesized ack so the thread always reflects that something
|
|
266
|
+
// happened.
|
|
267
|
+
const fallbackByOutcome: Record<'anchored' | 'document', string> = {
|
|
268
|
+
anchored: 'Updated the highlighted selection.',
|
|
269
|
+
document: 'Updated the document.',
|
|
270
|
+
};
|
|
271
|
+
const text =
|
|
272
|
+
response.text.trim().length > 0 ? response.text : editOutcome ? fallbackByOutcome[editOutcome] : '';
|
|
273
|
+
if (text.length === 0) {
|
|
274
|
+
// Nothing to say and nothing was edited — don't post a hollow bubble.
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const reply = Obj.make(Message.Message, {
|
|
279
|
+
created: new Date().toISOString(),
|
|
280
|
+
sender: { role: 'assistant', name: identity.name, identityDid: identity.identityDid },
|
|
281
|
+
blocks: [{ _tag: 'text', text }],
|
|
282
|
+
});
|
|
283
|
+
Obj.update(thread, (thread) => {
|
|
284
|
+
(thread.messages as Ref.Ref<Message.Message>[]).push(Ref.make(reply));
|
|
285
|
+
});
|
|
286
|
+
}),
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
return Capability.contributes(ThreadCapabilities.AgentRunner, runner);
|
|
290
|
+
}),
|
|
291
|
+
);
|
|
@@ -0,0 +1,143 @@
|
|
|
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, AppNode } from '@dxos/app-toolkit';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Obj } from '@dxos/echo';
|
|
13
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
14
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
15
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
16
|
+
import { type SelectionManager, type SelectionMode, defaultSelection } from '@dxos/react-ui-attention';
|
|
17
|
+
import { Channel } from '@dxos/types';
|
|
18
|
+
|
|
19
|
+
import { meta } from '#meta';
|
|
20
|
+
import { ThreadOperation } from '#types';
|
|
21
|
+
import { ThreadCapabilities, type ThreadState } from '#types';
|
|
22
|
+
|
|
23
|
+
import { getAnchor } from '../util';
|
|
24
|
+
|
|
25
|
+
type CommentDisabledParams = {
|
|
26
|
+
stateAtom: Atom.Atom<Atom.Writable<ThreadState>[]>;
|
|
27
|
+
selectionManager: SelectionManager;
|
|
28
|
+
objectId: string;
|
|
29
|
+
commentsType: string;
|
|
30
|
+
selectionMode: SelectionMode | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Atom family to derive whether the comment button should be disabled.
|
|
35
|
+
* Uses a composite key to ensure proper caching.
|
|
36
|
+
*/
|
|
37
|
+
const commentDisabledFamily = Atom.family(
|
|
38
|
+
({ stateAtom, selectionManager, objectId, commentsType, selectionMode }: CommentDisabledParams) =>
|
|
39
|
+
Atom.make((get) => {
|
|
40
|
+
const stateAtoms = get(stateAtom);
|
|
41
|
+
const state = stateAtoms[0] ? get(stateAtoms[0]) : undefined;
|
|
42
|
+
const toolbar = state?.toolbar ?? {};
|
|
43
|
+
const selectionState = get(selectionManager.state);
|
|
44
|
+
const selection =
|
|
45
|
+
selectionState.selections[objectId] ?? (selectionMode ? defaultSelection(selectionMode) : undefined);
|
|
46
|
+
const anchor = getAnchor(selection);
|
|
47
|
+
const invalidSelection = !anchor;
|
|
48
|
+
const overlappingComment = toolbar[objectId];
|
|
49
|
+
return (commentsType === 'anchored' && invalidSelection) || overlappingComment;
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
/** Match ECHO objects that are NOT Channels (i.e. objects that can have comments). */
|
|
54
|
+
const whenCommentableObject = NodeMatcher.whenAll(
|
|
55
|
+
NodeMatcher.whenEchoObjectMatches,
|
|
56
|
+
NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Channel.Channel)),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export default Capability.makeModule(
|
|
60
|
+
Effect.fnUntraced(function* () {
|
|
61
|
+
const capabilities = yield* Capability.Service;
|
|
62
|
+
|
|
63
|
+
const getCommentConfig = (typename: string) =>
|
|
64
|
+
capabilities.getAll(AppCapabilities.CommentConfig).find(({ id }) => id === typename);
|
|
65
|
+
|
|
66
|
+
const extensions = yield* Effect.all([
|
|
67
|
+
GraphBuilder.createExtension({
|
|
68
|
+
id: 'commentsCompanion',
|
|
69
|
+
match: (node) => {
|
|
70
|
+
if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
|
|
71
|
+
return Option.none();
|
|
72
|
+
}
|
|
73
|
+
const commentConfig = getCommentConfig(Obj.getTypename(node.data)!);
|
|
74
|
+
return commentConfig ? Option.some(node) : Option.none();
|
|
75
|
+
},
|
|
76
|
+
connector: () =>
|
|
77
|
+
Effect.succeed([
|
|
78
|
+
AppNode.makeCompanion({
|
|
79
|
+
id: linkedSegment('comments'),
|
|
80
|
+
label: ['comments.label', { ns: meta.id }],
|
|
81
|
+
icon: 'ph--chat-text--regular',
|
|
82
|
+
data: 'comments',
|
|
83
|
+
position: 'first',
|
|
84
|
+
}),
|
|
85
|
+
]),
|
|
86
|
+
}),
|
|
87
|
+
GraphBuilder.createExtension({
|
|
88
|
+
id: 'commentToolbar',
|
|
89
|
+
match: (node) => {
|
|
90
|
+
if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
|
|
91
|
+
return Option.none();
|
|
92
|
+
}
|
|
93
|
+
const commentConfig = getCommentConfig(Obj.getTypename(node.data)!);
|
|
94
|
+
return commentConfig ? Option.some(node) : Option.none();
|
|
95
|
+
},
|
|
96
|
+
actions: (matched, get) => {
|
|
97
|
+
const object = matched.data;
|
|
98
|
+
const objectUri = Obj.getURI(object);
|
|
99
|
+
const stateAtom = capabilities.atom(ThreadCapabilities.State);
|
|
100
|
+
const selectionManager = capabilities.get(AttentionCapabilities.Selection);
|
|
101
|
+
const commentConfig = getCommentConfig(Obj.getTypename(object)!)!;
|
|
102
|
+
|
|
103
|
+
const disabled = get(
|
|
104
|
+
commentDisabledFamily({
|
|
105
|
+
stateAtom,
|
|
106
|
+
selectionManager,
|
|
107
|
+
objectId: objectUri,
|
|
108
|
+
commentsType: commentConfig.comments,
|
|
109
|
+
selectionMode: commentConfig.selectionMode as SelectionMode | undefined,
|
|
110
|
+
}),
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return Effect.succeed([
|
|
114
|
+
{
|
|
115
|
+
id: 'comment',
|
|
116
|
+
data: Effect.fnUntraced(function* () {
|
|
117
|
+
const config = getCommentConfig(Obj.getTypename(object)!)!;
|
|
118
|
+
const selection = selectionManager.getSelection(objectUri);
|
|
119
|
+
const anchor =
|
|
120
|
+
(config.comments === 'anchored' ? getAnchor(selection) : undefined) ?? Date.now().toString();
|
|
121
|
+
const name = config.getAnchorLabel?.(object, anchor);
|
|
122
|
+
yield* Operation.invoke(ThreadOperation.Create, {
|
|
123
|
+
anchor,
|
|
124
|
+
name,
|
|
125
|
+
subject: object,
|
|
126
|
+
});
|
|
127
|
+
}),
|
|
128
|
+
properties: {
|
|
129
|
+
label: ['add-comment.label', { ns: meta.id }],
|
|
130
|
+
icon: 'ph--chat-text--regular',
|
|
131
|
+
disposition: 'toolbar',
|
|
132
|
+
disabled,
|
|
133
|
+
testId: 'thread.comment.add',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
]);
|
|
137
|
+
},
|
|
138
|
+
}),
|
|
139
|
+
]);
|
|
140
|
+
|
|
141
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
142
|
+
}),
|
|
143
|
+
);
|
package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts}
RENAMED
|
@@ -6,8 +6,10 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
|
+
import type { Blueprint } from '@dxos/compute';
|
|
9
11
|
|
|
10
|
-
import { ThreadBlueprint } from '
|
|
12
|
+
import { ThreadBlueprint } from '#blueprints';
|
|
11
13
|
|
|
12
14
|
const blueprintDefinition = Capability.makeModule<
|
|
13
15
|
[],
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
11
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
12
|
+
import { Channel } from '@dxos/types';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
17
|
+
id: Type.getTypename(Channel.Channel),
|
|
18
|
+
createObject: (props, options) =>
|
|
19
|
+
Effect.gen(function* () {
|
|
20
|
+
const object = Channel.make(props);
|
|
21
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
22
|
+
object,
|
|
23
|
+
target: options.target,
|
|
24
|
+
hidden: true,
|
|
25
|
+
targetNodeId: options.targetNodeId,
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
export const AgentRunner = Capability.lazy('AgentRunner', () => import('./agent-runner'));
|
|
10
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
11
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
12
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
13
|
+
export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));
|
|
14
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
15
|
+
'OperationHandler',
|
|
16
|
+
() => import('./operation-handler'),
|
|
17
|
+
);
|
|
18
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
19
|
+
export const ThreadSettings = Capability.lazy('ThreadSettings', () => import('./settings'));
|
|
20
|
+
export const ThreadState = Capability.lazy('ThreadState', () => import('./state'));
|
|
21
|
+
export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
|
|
@@ -6,13 +6,14 @@ import { EditorView } from '@codemirror/view';
|
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
10
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
|
|
9
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
11
10
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
12
|
-
import {
|
|
11
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
12
|
+
import { type EditorState, commentClickedEffect, commentsState, documentId, overlap } from '@dxos/ui-editor';
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { ThreadCapabilities } from '#types';
|
|
15
|
+
|
|
16
|
+
import { threads } from '../extensions';
|
|
16
17
|
|
|
17
18
|
export default Capability.makeModule(
|
|
18
19
|
Effect.fnUntraced(function* () {
|
|
@@ -27,33 +28,36 @@ export default Capability.makeModule(
|
|
|
27
28
|
return threads({ registry, stateAtom }, doc, invokePromise);
|
|
28
29
|
},
|
|
29
30
|
({ document: doc }) => {
|
|
30
|
-
if (!doc)
|
|
31
|
+
if (!doc) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
31
34
|
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
32
35
|
const stateAtom = capabilities.get(ThreadCapabilities.State);
|
|
33
36
|
|
|
34
37
|
return EditorView.updateListener.of((update) => {
|
|
35
38
|
if (update.docChanged || update.selectionSet) {
|
|
36
|
-
const
|
|
39
|
+
const id = update.state.facet(documentId);
|
|
37
40
|
const overlaps = selectionOverlapsComment(update.state);
|
|
38
41
|
const current = registry.get(stateAtom);
|
|
39
42
|
registry.set(stateAtom, {
|
|
40
43
|
...current,
|
|
41
|
-
toolbar: { ...current.toolbar, [
|
|
44
|
+
toolbar: { ...current.toolbar, [id]: overlaps },
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
});
|
|
45
48
|
},
|
|
46
49
|
({ document: doc }) => {
|
|
47
|
-
if (!doc)
|
|
50
|
+
if (!doc) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
48
53
|
const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);
|
|
49
|
-
const id = Obj.getDXN(doc).toString();
|
|
50
54
|
|
|
51
55
|
return EditorView.updateListener.of((update) => {
|
|
52
56
|
update.transactions.forEach((transaction) => {
|
|
53
57
|
transaction.effects.forEach(async (effect) => {
|
|
54
58
|
if (effect.is(commentClickedEffect)) {
|
|
55
|
-
void invokePromise(
|
|
56
|
-
|
|
59
|
+
void invokePromise(LayoutOperation.UpdateCompanion, {
|
|
60
|
+
subject: linkedSegment('comments'),
|
|
57
61
|
});
|
|
58
62
|
}
|
|
59
63
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
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 type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { ThreadOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, ThreadOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
12
|
+
import { Channel, Thread } from '@dxos/types';
|
|
13
|
+
|
|
14
|
+
import { ThreadSettings } from '#components';
|
|
15
|
+
import { ChannelChat, ChannelArticle, CommentsCompanion, ThreadContainer } from '#containers';
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { type Settings } from '#types';
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(() =>
|
|
20
|
+
Effect.succeed(
|
|
21
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
22
|
+
Surface.create({
|
|
23
|
+
id: 'channel',
|
|
24
|
+
filter: AppSurface.object(AppSurface.Article, Channel.Channel),
|
|
25
|
+
component: ({ data: { subject, attendableId }, role }) => (
|
|
26
|
+
<ChannelArticle role={role} subject={subject} attendableId={attendableId} />
|
|
27
|
+
),
|
|
28
|
+
}),
|
|
29
|
+
Surface.create({
|
|
30
|
+
id: 'chatCompanion',
|
|
31
|
+
filter: AppSurface.allOf(
|
|
32
|
+
AppSurface.literal(AppSurface.Article, 'chat'),
|
|
33
|
+
AppSurface.companion(AppSurface.Article, Channel.Channel),
|
|
34
|
+
),
|
|
35
|
+
component: ({ data: { companionTo: channel } }) => {
|
|
36
|
+
const space = getSpace(channel);
|
|
37
|
+
if (!space) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return <ChannelChat channel={channel} space={space} />;
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
Surface.create({
|
|
45
|
+
id: 'thread',
|
|
46
|
+
filter: AppSurface.object(AppSurface.Article, Thread.Thread),
|
|
47
|
+
component: ({ data: { subject } }) => {
|
|
48
|
+
const space = getSpace(subject);
|
|
49
|
+
if (!space || !subject) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return <ThreadContainer thread={subject} space={space} />;
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
Surface.create({
|
|
57
|
+
id: 'comments',
|
|
58
|
+
filter: AppSurface.allOf(
|
|
59
|
+
AppSurface.literal(AppSurface.Article, 'comments'),
|
|
60
|
+
AppSurface.companion(AppSurface.Article),
|
|
61
|
+
),
|
|
62
|
+
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
63
|
+
component: ({ data }) => <CommentsCompanion attendableId={data.attendableId} subject={data.companionTo} />,
|
|
64
|
+
}),
|
|
65
|
+
Surface.create({
|
|
66
|
+
id: 'pluginSettings',
|
|
67
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
68
|
+
component: ({ data: { subject } }) => {
|
|
69
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
70
|
+
return <ThreadSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
]),
|
|
74
|
+
),
|
|
75
|
+
);
|