@dxos/plugin-transcription 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +27 -5
  2. package/dist/lib/browser/blueprints/index.mjs.map +4 -4
  3. package/dist/lib/browser/chunk-3L623EVL.mjs +17 -0
  4. package/dist/lib/browser/chunk-3L623EVL.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-HOOPZ7EM.mjs → chunk-KAEXRX3Y.mjs} +1 -1
  6. package/dist/lib/browser/chunk-L4HW35L6.mjs +111 -0
  7. package/dist/lib/browser/chunk-L4HW35L6.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-MLRJWAQH.mjs +179 -0
  9. package/dist/lib/browser/chunk-MLRJWAQH.mjs.map +7 -0
  10. package/dist/lib/browser/chunk-NQQK7UZQ.mjs +244 -0
  11. package/dist/lib/browser/chunk-NQQK7UZQ.mjs.map +7 -0
  12. package/dist/lib/browser/components/index.mjs +207 -0
  13. package/dist/lib/browser/components/index.mjs.map +7 -0
  14. package/dist/lib/browser/create-ULR5DPJZ.mjs +21 -0
  15. package/dist/lib/browser/create-ULR5DPJZ.mjs.map +7 -0
  16. package/dist/lib/browser/hooks/index.mjs +17 -0
  17. package/dist/lib/browser/index.mjs +439 -83
  18. package/dist/lib/browser/index.mjs.map +4 -4
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/open-SFMPLZVW.mjs +27 -0
  21. package/dist/lib/browser/open-SFMPLZVW.mjs.map +7 -0
  22. package/dist/lib/browser/operations/index.mjs +13 -0
  23. package/dist/lib/browser/operations/index.mjs.map +7 -0
  24. package/dist/lib/browser/summarize-BDFX4APN.mjs +78 -0
  25. package/dist/lib/browser/summarize-BDFX4APN.mjs.map +7 -0
  26. package/dist/lib/browser/types/index.mjs +1 -5
  27. package/dist/lib/node-esm/blueprints/index.mjs +27 -5
  28. package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
  29. package/dist/lib/node-esm/chunk-7UIZWCD4.mjs +112 -0
  30. package/dist/lib/node-esm/chunk-7UIZWCD4.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs +181 -0
  32. package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs.map +7 -0
  33. package/dist/lib/node-esm/chunk-KO3IOD2O.mjs +19 -0
  34. package/dist/lib/node-esm/chunk-KO3IOD2O.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-MQK4R6GT.mjs +245 -0
  36. package/dist/lib/node-esm/chunk-MQK4R6GT.mjs.map +7 -0
  37. package/dist/lib/node-esm/{chunk-NVM2QUMX.mjs → chunk-O533NBMK.mjs} +1 -1
  38. package/dist/lib/node-esm/components/index.mjs +208 -0
  39. package/dist/lib/node-esm/components/index.mjs.map +7 -0
  40. package/dist/lib/node-esm/create-A5QHNWRF.mjs +22 -0
  41. package/dist/lib/node-esm/create-A5QHNWRF.mjs.map +7 -0
  42. package/dist/lib/node-esm/hooks/index.mjs +18 -0
  43. package/dist/lib/node-esm/index.mjs +439 -83
  44. package/dist/lib/node-esm/index.mjs.map +4 -4
  45. package/dist/lib/node-esm/meta.json +1 -1
  46. package/dist/lib/node-esm/open-OI24QNTO.mjs +28 -0
  47. package/dist/lib/node-esm/open-OI24QNTO.mjs.map +7 -0
  48. package/dist/lib/node-esm/operations/index.mjs +14 -0
  49. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  50. package/dist/lib/node-esm/summarize-3UNN24I2.mjs +79 -0
  51. package/dist/lib/node-esm/summarize-3UNN24I2.mjs.map +7 -0
  52. package/dist/lib/node-esm/types/index.mjs +1 -5
  53. package/dist/types/src/TranscriptionPlugin.d.ts +1 -0
  54. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  55. package/dist/types/src/TranscriptionPlugin.node.d.ts +4 -0
  56. package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -0
  57. package/dist/types/src/TranscriptionPlugin.test.d.ts +2 -0
  58. package/dist/types/src/TranscriptionPlugin.test.d.ts.map +1 -0
  59. package/dist/types/src/blueprints/index.d.ts +1 -1
  60. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  61. package/dist/types/src/blueprints/transcription-blueprint.d.ts +3 -20
  62. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  64. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/index.d.ts +6 -4
  66. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  67. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  68. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  69. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  70. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/transcriber.d.ts +9 -0
  72. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -0
  73. package/dist/types/src/components/{Transcript/Transcript.d.ts → Transcription/Transcription.d.ts} +6 -5
  74. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
  75. package/dist/types/src/components/{Transcript/Transcript.stories.d.ts → Transcription/Transcription.stories.d.ts} +13 -13
  76. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
  77. package/dist/types/src/components/Transcription/index.d.ts +2 -0
  78. package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
  79. package/dist/types/src/components/{Transcript/transcript-extension.d.ts → Transcription/transcription-extension.d.ts} +3 -3
  80. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
  81. package/dist/types/src/components/index.d.ts +1 -3
  82. package/dist/types/src/components/index.d.ts.map +1 -1
  83. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
  84. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
  85. package/dist/types/src/containers/TranscriptionContainer/index.d.ts +2 -0
  86. package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
  87. package/dist/types/src/containers/index.d.ts +3 -0
  88. package/dist/types/src/containers/index.d.ts.map +1 -0
  89. package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
  90. package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
  91. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
  92. package/dist/types/src/hooks/useTranscriber.d.ts +2 -2
  93. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  94. package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
  95. package/dist/types/src/index.d.ts +3 -3
  96. package/dist/types/src/index.d.ts.map +1 -1
  97. package/dist/types/src/model/model.d.ts +2 -2
  98. package/dist/types/src/model/model.d.ts.map +1 -1
  99. package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
  100. package/dist/types/src/normalization/index.d.ts.map +1 -0
  101. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
  102. package/dist/types/src/{segments-normalization → normalization}/normalization.d.ts +182 -339
  103. package/dist/types/src/normalization/normalization.d.ts.map +1 -0
  104. package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
  105. package/dist/types/src/normalization/utils.d.ts.map +1 -0
  106. package/dist/types/src/operations/create.d.ts +5 -0
  107. package/dist/types/src/operations/create.d.ts.map +1 -0
  108. package/dist/types/src/operations/definitions.d.ts +917 -0
  109. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  110. package/dist/types/src/operations/index.d.ts +4 -0
  111. package/dist/types/src/operations/index.d.ts.map +1 -0
  112. package/dist/types/src/operations/open.d.ts +5 -0
  113. package/dist/types/src/operations/open.d.ts.map +1 -0
  114. package/dist/types/src/operations/summarize.d.ts +8 -0
  115. package/dist/types/src/operations/summarize.d.ts.map +1 -0
  116. package/dist/types/src/{components/stories → stories}/FileTranscription.stories.d.ts +3 -3
  117. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
  118. package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +2 -2
  119. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
  120. package/dist/types/src/{components/stories → stories}/MicrophoneTranscription.stories.d.ts +3 -3
  121. package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +1 -0
  122. package/dist/types/src/stories/TranscriptionStory.d.ts +23 -0
  123. package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
  124. package/dist/types/src/stories/useIsSpeaking.d.ts.map +1 -0
  125. package/dist/types/src/testing/testing.d.ts.map +1 -1
  126. package/dist/types/src/transcriber/index.d.ts +1 -1
  127. package/dist/types/src/transcriber/index.d.ts.map +1 -1
  128. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
  129. package/dist/types/src/transcriber/transcriber.d.ts +57 -2
  130. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  131. package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
  132. package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
  133. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  134. package/dist/types/src/translations.d.ts +7 -8
  135. package/dist/types/src/translations.d.ts.map +1 -1
  136. package/dist/types/src/types/capabilities.d.ts +2 -1
  137. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  138. package/dist/types/src/types/{types.d.ts → defs.d.ts} +1 -1
  139. package/dist/types/src/types/defs.d.ts.map +1 -0
  140. package/dist/types/src/types/index.d.ts +1 -3
  141. package/dist/types/src/types/index.d.ts.map +1 -1
  142. package/dist/types/src/util/array.d.ts.map +1 -1
  143. package/dist/types/src/util/get-time-str.d.ts.map +1 -1
  144. package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
  145. package/dist/types/src/util/render-byline.d.ts.map +1 -1
  146. package/dist/types/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +105 -75
  148. package/src/TranscriptionPlugin.node.ts +48 -0
  149. package/src/TranscriptionPlugin.test.ts +31 -0
  150. package/src/TranscriptionPlugin.tsx +23 -15
  151. package/src/blueprints/index.ts +1 -1
  152. package/src/blueprints/transcription-blueprint.ts +13 -9
  153. package/src/capabilities/blueprint-definition.ts +19 -0
  154. package/src/capabilities/index.ts +11 -4
  155. package/src/capabilities/operation-handler.ts +16 -0
  156. package/src/capabilities/react-surface.tsx +31 -0
  157. package/src/capabilities/{transcriber/transcriber.ts → transcriber.ts} +9 -6
  158. package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +27 -26
  159. package/src/components/Transcription/Transcription.tsx +64 -0
  160. package/src/components/{Transcript → Transcription}/index.ts +1 -1
  161. package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +4 -4
  162. package/src/components/index.ts +1 -6
  163. package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +35 -0
  164. package/src/containers/TranscriptionContainer/index.ts +5 -0
  165. package/src/containers/index.ts +7 -0
  166. package/src/hooks/useTranscriber.ts +6 -3
  167. package/src/hooks/useVoiceInput.ts +0 -1
  168. package/src/index.ts +9 -4
  169. package/src/meta.ts +1 -1
  170. package/src/model/model.test.ts +6 -6
  171. package/src/model/model.ts +3 -3
  172. package/src/{segments-normalization → normalization}/message-normalizer.ts +1 -5
  173. package/src/{segments-normalization → normalization}/normalization.test.ts +2 -2
  174. package/src/normalization/normalization.ts +77 -0
  175. package/src/operations/create.ts +24 -0
  176. package/src/operations/definitions.ts +101 -0
  177. package/src/operations/index.ts +13 -0
  178. package/src/operations/open.ts +28 -0
  179. package/src/{functions → operations}/summarize.ts +46 -48
  180. package/src/{components/stories → stories}/FileTranscription.stories.tsx +34 -17
  181. package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +34 -32
  182. package/src/{components/stories → stories}/MicrophoneTranscription.stories.tsx +19 -37
  183. package/src/stories/TranscriptionStory.tsx +93 -0
  184. package/src/testing/testing.ts +8 -18
  185. package/src/transcriber/index.ts +1 -1
  186. package/src/transcriber/transcriber.browser.test.ts +0 -1
  187. package/src/transcriber/transcriber.test.ts +104 -0
  188. package/src/transcriber/transcriber.ts +94 -53
  189. package/src/translations.ts +7 -7
  190. package/src/types/capabilities.ts +9 -3
  191. package/src/types/index.ts +1 -3
  192. package/dist/lib/browser/TranscriptContainer-6EHKWVS4.mjs +0 -12
  193. package/dist/lib/browser/blueprint-definition-FTRNMLJZ.mjs +0 -18
  194. package/dist/lib/browser/blueprint-definition-FTRNMLJZ.mjs.map +0 -7
  195. package/dist/lib/browser/chunk-ICM7JRCO.mjs +0 -698
  196. package/dist/lib/browser/chunk-ICM7JRCO.mjs.map +0 -7
  197. package/dist/lib/browser/chunk-Q5OC3WVG.mjs +0 -72
  198. package/dist/lib/browser/chunk-Q5OC3WVG.mjs.map +0 -7
  199. package/dist/lib/browser/chunk-SYGEFDWO.mjs +0 -8
  200. package/dist/lib/browser/chunk-SYGEFDWO.mjs.map +0 -7
  201. package/dist/lib/browser/chunk-TKFU53OZ.mjs +0 -460
  202. package/dist/lib/browser/chunk-TKFU53OZ.mjs.map +0 -7
  203. package/dist/lib/browser/chunk-ZZF7ICVM.mjs +0 -150
  204. package/dist/lib/browser/chunk-ZZF7ICVM.mjs.map +0 -7
  205. package/dist/lib/browser/operation-resolver-ZUWTU7C5.mjs +0 -22
  206. package/dist/lib/browser/operation-resolver-ZUWTU7C5.mjs.map +0 -7
  207. package/dist/lib/browser/react-surface-ZXH5267I.mjs +0 -34
  208. package/dist/lib/browser/react-surface-ZXH5267I.mjs.map +0 -7
  209. package/dist/lib/browser/transcriber-EZZTUCPE.mjs +0 -60
  210. package/dist/lib/browser/transcriber-EZZTUCPE.mjs.map +0 -7
  211. package/dist/lib/node-esm/TranscriptContainer-5YT5W73I.mjs +0 -13
  212. package/dist/lib/node-esm/blueprint-definition-IOX35YUX.mjs +0 -19
  213. package/dist/lib/node-esm/blueprint-definition-IOX35YUX.mjs.map +0 -7
  214. package/dist/lib/node-esm/chunk-4BFY6P2D.mjs +0 -73
  215. package/dist/lib/node-esm/chunk-4BFY6P2D.mjs.map +0 -7
  216. package/dist/lib/node-esm/chunk-BX2AB7S7.mjs +0 -699
  217. package/dist/lib/node-esm/chunk-BX2AB7S7.mjs.map +0 -7
  218. package/dist/lib/node-esm/chunk-CWP22IHV.mjs +0 -151
  219. package/dist/lib/node-esm/chunk-CWP22IHV.mjs.map +0 -7
  220. package/dist/lib/node-esm/chunk-EPC27WWV.mjs +0 -461
  221. package/dist/lib/node-esm/chunk-EPC27WWV.mjs.map +0 -7
  222. package/dist/lib/node-esm/chunk-GVAVEVZ6.mjs +0 -10
  223. package/dist/lib/node-esm/chunk-GVAVEVZ6.mjs.map +0 -7
  224. package/dist/lib/node-esm/operation-resolver-Z72B4H2Q.mjs +0 -23
  225. package/dist/lib/node-esm/operation-resolver-Z72B4H2Q.mjs.map +0 -7
  226. package/dist/lib/node-esm/react-surface-6GUBZX2V.mjs +0 -35
  227. package/dist/lib/node-esm/react-surface-6GUBZX2V.mjs.map +0 -7
  228. package/dist/lib/node-esm/transcriber-RGW3YYT4.mjs +0 -61
  229. package/dist/lib/node-esm/transcriber-RGW3YYT4.mjs.map +0 -7
  230. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -9
  231. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  232. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  233. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  234. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -3
  235. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  236. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +0 -5
  237. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  238. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  239. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  240. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  241. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  242. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  243. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  244. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  245. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  246. package/dist/types/src/capabilities/transcriber/index.d.ts +0 -3
  247. package/dist/types/src/capabilities/transcriber/index.d.ts.map +0 -1
  248. package/dist/types/src/capabilities/transcriber/transcriber.d.ts +0 -9
  249. package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +0 -1
  250. package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
  251. package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
  252. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
  253. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
  254. package/dist/types/src/components/Transcript/index.d.ts +0 -2
  255. package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
  256. package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
  257. package/dist/types/src/components/TranscriptContainer.d.ts +0 -7
  258. package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
  259. package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
  260. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
  261. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
  262. package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -12
  263. package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
  264. package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
  265. package/dist/types/src/functions/index.d.ts +0 -3
  266. package/dist/types/src/functions/index.d.ts.map +0 -1
  267. package/dist/types/src/functions/open.d.ts +0 -7
  268. package/dist/types/src/functions/open.d.ts.map +0 -1
  269. package/dist/types/src/functions/summarize.d.ts +0 -11
  270. package/dist/types/src/functions/summarize.d.ts.map +0 -1
  271. package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
  272. package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
  273. package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
  274. package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
  275. package/dist/types/src/segments-normalization/utils.d.ts.map +0 -1
  276. package/dist/types/src/types/TranscriptAction.d.ts +0 -25
  277. package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
  278. package/dist/types/src/types/types.d.ts.map +0 -1
  279. package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -23
  280. package/src/capabilities/blueprint-definition/index.ts +0 -7
  281. package/src/capabilities/operation-handler/index.ts +0 -7
  282. package/src/capabilities/operation-handler/operation-handler.ts +0 -25
  283. package/src/capabilities/operation-resolver/index.ts +0 -7
  284. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -25
  285. package/src/capabilities/react-surface/index.ts +0 -7
  286. package/src/capabilities/react-surface/react-surface.tsx +0 -27
  287. package/src/capabilities/transcriber/index.ts +0 -7
  288. package/src/components/Transcript/Transcript.tsx +0 -66
  289. package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
  290. package/src/components/TranscriptContainer.tsx +0 -34
  291. package/src/components/stories/TranscriptionStory.tsx +0 -41
  292. package/src/functions/index.ts +0 -6
  293. package/src/functions/open.ts +0 -39
  294. package/src/segments-normalization/normalization.ts +0 -115
  295. package/src/types/TranscriptAction.ts +0 -32
  296. package/dist/lib/browser/{chunk-HOOPZ7EM.mjs.map → chunk-KAEXRX3Y.mjs.map} +0 -0
  297. package/dist/lib/browser/{TranscriptContainer-6EHKWVS4.mjs.map → hooks/index.mjs.map} +0 -0
  298. package/dist/lib/node-esm/{chunk-NVM2QUMX.mjs.map → chunk-O533NBMK.mjs.map} +0 -0
  299. package/dist/lib/node-esm/{TranscriptContainer-5YT5W73I.mjs.map → hooks/index.mjs.map} +0 -0
  300. package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +0 -0
  301. package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
  302. package/dist/types/src/{segments-normalization → normalization}/utils.d.ts +0 -0
  303. package/dist/types/src/{components/stories → stories}/useIsSpeaking.d.ts +0 -0
  304. package/src/{segments-normalization → normalization}/index.ts +1 -1
  305. /package/src/{segments-normalization → normalization}/utils.ts +0 -0
  306. /package/src/{components/stories → stories}/useIsSpeaking.tsx +0 -0
  307. /package/src/types/{types.ts → defs.ts} +0 -0
@@ -10,36 +10,37 @@ import React, { type FC, useEffect, useMemo, useState } from 'react';
10
10
  import { withPluginManager } from '@dxos/app-framework/testing';
11
11
  import { Key } from '@dxos/echo';
12
12
  import { ClientPlugin } from '@dxos/plugin-client';
13
+ import { initializeIdentity } from '@dxos/plugin-client/testing';
13
14
  import { PreviewPlugin } from '@dxos/plugin-preview';
14
15
  import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
15
- import { faker } from '@dxos/random';
16
- import { useMembers, useSpace } from '@dxos/react-client/echo';
16
+ import { random } from '@dxos/random';
17
+ import { useMembers, useSpaces } from '@dxos/react-client/echo';
17
18
  import { IconButton, Toolbar } from '@dxos/react-ui';
18
- import { withTheme } from '@dxos/react-ui/testing';
19
- import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
19
+ import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
20
+ import { withLayout } from '@dxos/react-ui/testing';
20
21
  import { TestSchema } from '@dxos/schema/testing';
21
22
  import { type ContentBlock, type Message, Organization, Person } from '@dxos/types';
22
23
 
23
- import { useQueueModelAdapter } from '../../hooks';
24
- import { SerializationModel } from '../../model';
24
+ import { useQueueModelAdapter } from '#hooks';
25
25
  import {
26
26
  MessageBuilder,
27
27
  TestItem,
28
28
  useTestTranscriptionQueue,
29
29
  useTestTranscriptionQueueWithEntityExtraction,
30
- } from '../../testing';
31
- import { translations } from '../../translations';
32
- import { renderByline } from '../../util';
30
+ } from '#testing';
31
+ import { translations } from '#translations';
33
32
 
34
- import { TranscriptView, type TranscriptViewProps } from './Transcript';
33
+ import { SerializationModel } from '../../model';
34
+ import { renderByline } from '../../util';
35
+ import { Transcription, type TranscriptionProps } from './Transcription';
35
36
 
36
- faker.seed(1);
37
+ random.seed(1);
37
38
 
38
39
  /**
39
40
  * Story wrapper with test controls.
40
41
  */
41
42
  const TranscriptContainer: FC<
42
- TranscriptViewProps & {
43
+ TranscriptionProps & {
43
44
  running: boolean;
44
45
  onRunningChange: (running: boolean) => void;
45
46
  onReset?: () => void;
@@ -47,12 +48,10 @@ const TranscriptContainer: FC<
47
48
  > = ({ model, running, onRunningChange, onReset }) => {
48
49
  return (
49
50
  <div className='grid grid-rows-[1fr_40px] grow divide-y divide-separator'>
50
- <TranscriptView model={model} />
51
+ <Transcription model={model} />
51
52
  <div className='grid grid-cols-[1fr_16rem] overflow-hidden'>
52
53
  <div className='flex items-center'>
53
- <SyntaxHighlighter language='json' className='text-sm'>
54
- {JSON.stringify(model.toJSON())}
55
- </SyntaxHighlighter>
54
+ <JsonHighlighter data={model.toJSON()} indent={0} classNames='text-sm' />
56
55
  </div>
57
56
  <Toolbar.Root classNames='justify-end'>
58
57
  <IconButton
@@ -67,12 +66,15 @@ const TranscriptContainer: FC<
67
66
  );
68
67
  };
69
68
 
70
- type StoryProps = { messages?: Message.Message[] } & Pick<TranscriptViewProps, 'ignoreAttention' | 'attendableId'>;
69
+ type DefaultStoryProps = { messages?: Message.Message[] } & Pick<
70
+ TranscriptionProps,
71
+ 'ignoreAttention' | 'attendableId'
72
+ >;
71
73
 
72
74
  /**
73
75
  * Basic story mutates array of messages.
74
76
  */
75
- const BasicStory = ({ messages: initialMessages = [], ...props }: StoryProps) => {
77
+ const BasicStory = ({ messages: initialMessages = [], ...props }: DefaultStoryProps) => {
76
78
  const [reset, setReset] = useState({});
77
79
  const builder = useMemo(() => new MessageBuilder(), []);
78
80
  const model = useMemo(
@@ -134,9 +136,9 @@ const QueueStory = ({
134
136
  queueId,
135
137
  onReset,
136
138
  ...props
137
- }: StoryProps & { queueId: Key.ObjectId; onReset: () => void }) => {
139
+ }: DefaultStoryProps & { queueId: Key.ObjectId; onReset: () => void }) => {
138
140
  const [running, setRunning] = useState(true);
139
- const space = useSpace();
141
+ const [space] = useSpaces();
140
142
  const members = useMembers(space?.id).map((member) => member.identity);
141
143
  const queue = useTestTranscriptionQueue(space, queueId, running, 2_000);
142
144
  const model = useQueueModelAdapter(renderByline(members), queue, initialMessages);
@@ -149,7 +151,7 @@ const QueueStory = ({
149
151
  // TODO(burdon): Reconcile with QueueStory.
150
152
  const EntityExtractionQueueStory = () => {
151
153
  const [running, setRunning] = useState(true);
152
- const space = useSpace();
154
+ const [space] = useSpaces();
153
155
  const members = useMembers(space?.key).map((member) => member.identity);
154
156
  const queue = useTestTranscriptionQueueWithEntityExtraction(space, undefined, running, 2_000);
155
157
  const model = useQueueModelAdapter(renderByline(members), queue, []);
@@ -171,9 +173,9 @@ const QueueStoryWrapper = () => {
171
173
  };
172
174
 
173
175
  const meta = {
174
- title: 'plugins/plugin-transcription/Transcript',
176
+ title: 'plugins/plugin-transcription/components/Transcription',
175
177
  decorators: [
176
- withTheme,
178
+ withLayout({ layout: 'fullscreen' }),
177
179
  withPluginManager({
178
180
  plugins: [
179
181
  ...corePlugins(),
@@ -182,7 +184,7 @@ const meta = {
182
184
  types: [TestItem, TestSchema.DocumentType, Person.Person, Organization.Organization],
183
185
  onClientInitialized: ({ client }) =>
184
186
  Effect.gen(function* () {
185
- yield* Effect.promise(() => client.halo.createIdentity());
187
+ yield* initializeIdentity(client);
186
188
  }),
187
189
  }),
188
190
 
@@ -198,8 +200,7 @@ const meta = {
198
200
 
199
201
  export default meta;
200
202
 
201
- // TODO(wittjosiah): ECHO objects don't work when passed via Storybook args.
202
- const DefaultStory = (props: StoryProps) => {
203
+ const DefaultStory = (props: DefaultStoryProps) => {
203
204
  const [messages, setMessages] = useState<Message.Message[]>([]);
204
205
  useEffect(() => {
205
206
  void Promise.all(Array.from({ length: 10 }, () => MessageBuilder.singleton.createMessage())).then(setMessages);
@@ -0,0 +1,64 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { useThemeContext } from '@dxos/react-ui';
8
+ import { useTextEditor } from '@dxos/react-ui-editor';
9
+ import { type Message, type Transcript } from '@dxos/types';
10
+ import {
11
+ autoScroll,
12
+ createBasicExtensions,
13
+ createMarkdownExtensions,
14
+ createThemeExtensions,
15
+ decorateMarkdown,
16
+ documentSlots,
17
+ preview,
18
+ } from '@dxos/ui-editor';
19
+ import { composable, composableProps } from '@dxos/ui-theme';
20
+ import { isTruthy } from '@dxos/util';
21
+
22
+ import { type SerializationModel } from '../../model';
23
+ import { renderByline } from '../../util';
24
+ import { transcription } from './transcription-extension';
25
+
26
+ export { renderByline };
27
+
28
+ export type TranscriptionProps = {
29
+ transcript?: Transcript.Transcript;
30
+ model: SerializationModel<Message.Message>;
31
+ // TODO(burdon): Are these still in use?
32
+ attendableId?: string;
33
+ ignoreAttention?: boolean;
34
+ };
35
+
36
+ /**
37
+ * Transcript component implemented using the editor.
38
+ */
39
+ export const Transcription = composable<HTMLDivElement, TranscriptionProps>(
40
+ ({ transcript: object, model, children, ...props }, forwardedRef) => {
41
+ const { themeMode } = useThemeContext();
42
+ const { parentRef } = useTextEditor(() => {
43
+ return {
44
+ extensions: [
45
+ createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
46
+ createMarkdownExtensions(),
47
+ createThemeExtensions({ themeMode, slots: documentSlots }),
48
+ decorateMarkdown(),
49
+ preview(),
50
+ transcription({ model, started: object?.started ? new Date(object.started) : undefined }),
51
+ autoScroll(),
52
+ ].filter(isTruthy),
53
+ };
54
+ }, [model]);
55
+
56
+ return (
57
+ <div
58
+ {...composableProps(props, { classNames: 'dx-container' })}
59
+ ref={parentRef}
60
+ data-popover-collision-boundary={true /* TODO(thure): Make this a constant and document it. */}
61
+ />
62
+ );
63
+ },
64
+ );
@@ -2,4 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './Transcript';
5
+ export * from './Transcription';
@@ -15,7 +15,7 @@ import { DocumentAdapter, type SerializationModel } from '../../model';
15
15
  /**
16
16
  * Data structure that maps Chunks queue to lines with transcript state.
17
17
  */
18
- export type TranscriptOptions = {
18
+ export type TranscriptionOptions = {
19
19
  model: SerializationModel<Message.Message>;
20
20
  started?: Date;
21
21
  };
@@ -23,7 +23,7 @@ export type TranscriptOptions = {
23
23
  /**
24
24
  * Scrolling transcript with timestamps.
25
25
  */
26
- export const transcript = ({ model, started }: TranscriptOptions): Extension => {
26
+ export const transcription = ({ model, started }: TranscriptionOptions): Extension => {
27
27
  return [
28
28
  // Show timestamps in the gutter.
29
29
  gutter({
@@ -132,7 +132,7 @@ export const transcript = ({ model, started }: TranscriptOptions): Extension =>
132
132
 
133
133
  EditorView.theme({
134
134
  '.cm-gutters': {
135
- backgroundColor: 'var(--dx-baseSurface)',
135
+ backgroundColor: 'var(--color-base-surface)',
136
136
  },
137
137
  '.cm-timestamp-gutter': {
138
138
  width: '6rem',
@@ -166,7 +166,7 @@ class TimestampMarker extends GutterMarker {
166
166
 
167
167
  override toDOM(view: EditorView) {
168
168
  const el = document.createElement('div');
169
- el.className = 'text-sm text-subdued hover:bg-hoverSurface cursor-pointer';
169
+ el.className = 'text-sm text-subdued hover:bg-hover-surface cursor-pointer';
170
170
  el.textContent = formatTimestamp(this._timestamp, this._started);
171
171
  // TODO(burdon): Click to bookmark or copy hyperlink.
172
172
  el.onclick = () => {
@@ -2,9 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from 'react';
6
-
7
- export * from './Transcript';
8
- export * from './TranscriptContainer';
9
-
10
- export const TranscriptContainer = lazy(() => import('./TranscriptContainer'));
5
+ export * from './Transcription';
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
8
+ import { Feed, Obj } from '@dxos/echo';
9
+ import { useMembers, useQueue } from '@dxos/react-client/echo';
10
+ import { Panel } from '@dxos/react-ui';
11
+ import { type Message, type Transcript } from '@dxos/types';
12
+
13
+ import { Transcription } from '#components';
14
+ import { useQueueModelAdapter } from '#hooks';
15
+
16
+ import { renderByline } from '../../util';
17
+
18
+ export type TranscriptionContainerProps = AppSurface.ObjectArticleProps<Transcript.Transcript>;
19
+
20
+ export const TranscriptionContainer = ({ role, subject: transcript, attendableId }: TranscriptionContainerProps) => {
21
+ const db = Obj.getDatabase(transcript);
22
+ const members = useMembers(db?.spaceId).map((member) => member.identity);
23
+ const feed = transcript.feed.target;
24
+ const queueDxn = feed ? Feed.getQueueDxn(feed) : undefined;
25
+ const queue = useQueue<Message.Message>(queueDxn, { pollInterval: 1_000 });
26
+ const model = useQueueModelAdapter(renderByline(members), queue);
27
+
28
+ return (
29
+ <Panel.Root role={role}>
30
+ <Panel.Content asChild>
31
+ <Transcription attendableId={attendableId} model={model} transcript={transcript} />
32
+ </Panel.Content>
33
+ </Panel.Root>
34
+ );
35
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export { TranscriptionContainer as default } from './TranscriptionContainer';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type ComponentType, lazy } from 'react';
6
+
7
+ export const TranscriptionContainer: ComponentType<any> = lazy(() => import('./TranscriptionContainer'));
@@ -4,10 +4,11 @@
4
4
 
5
5
  import { useEffect, useMemo } from 'react';
6
6
 
7
- import { useCapabilities } from '@dxos/app-framework/react';
7
+ import { useCapabilities } from '@dxos/app-framework/ui';
8
+
9
+ import { TranscriptionCapabilities } from '#types';
8
10
 
9
11
  import { type Transcriber } from '../transcriber';
10
- import { TranscriptionCapabilities } from '../types';
11
12
 
12
13
  /**
13
14
  * Records audio while user is speaking and transcribes it after user is done speaking.
@@ -17,6 +18,7 @@ export const useTranscriber = ({
17
18
  recorderConfig,
18
19
  transcriberConfig,
19
20
  onSegments,
21
+ transcribe,
20
22
  }: Partial<TranscriptionCapabilities.GetTranscriberProps>) => {
21
23
  const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);
22
24
 
@@ -31,8 +33,9 @@ export const useTranscriber = ({
31
33
  recorderConfig,
32
34
  transcriberConfig,
33
35
  onSegments,
36
+ transcribe,
34
37
  });
35
- }, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments]);
38
+ }, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe]);
36
39
 
37
40
  useEffect(() => {
38
41
  return () => {
@@ -10,7 +10,6 @@ import { log } from '@dxos/log';
10
10
  import { useSoundEffect } from '@dxos/react-ui-sfx';
11
11
 
12
12
  import { type TranscriberProps } from '../transcriber';
13
-
14
13
  import { useAudioTrack } from './useAudioTrack';
15
14
  import { useTranscriber } from './useTranscriber';
16
15
 
package/src/index.ts CHANGED
@@ -2,11 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const TranscriptionPlugin = Plugin.lazy(meta, () => import('#plugin'));
10
+
5
11
  export { TranscriptionCapabilities } from './types';
6
12
 
7
- export * from './components';
8
- export * from './hooks';
13
+ // TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
14
+ // Either refactor callers to not need them or factor them out to a shared package.
9
15
  export * from './meta';
16
+ export * from './hooks';
10
17
  export * from './transcriber';
11
-
12
- export * from './TranscriptionPlugin';
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/transcription',
9
+ id: 'org.dxos.plugin.transcription',
10
10
  name: 'Transcription',
11
11
  description: trim`
12
12
  Real-time voice-to-text transcription service for capturing spoken content.
@@ -51,8 +51,8 @@ describe('SerializationModel', () => {
51
51
  }
52
52
 
53
53
  // Update message.
54
- Obj.change(message, (m) => {
55
- m.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
54
+ Obj.update(message, (message) => {
55
+ message.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
56
56
  });
57
57
  model.updateChunk(message);
58
58
  {
@@ -133,16 +133,16 @@ describe('SerializationModel', () => {
133
133
  expect(view.state.doc.toString()).to.eq('###### Alice\nHello world!\n\n');
134
134
 
135
135
  // Update message (add block).
136
- Obj.change(message, (m) => {
137
- m.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
136
+ Obj.update(message, (message) => {
137
+ message.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
138
138
  });
139
139
  model.updateChunk(message);
140
140
  model.sync(adapter);
141
141
  expect(view.state.doc.toString()).to.eq('###### Alice\nHello world!\nHello again!\n\n');
142
142
 
143
143
  // Update message (remove block).
144
- Obj.change(message, (m) => {
145
- m.blocks.splice(0, 1);
144
+ Obj.update(message, (message) => {
145
+ message.blocks.splice(0, 1);
146
146
  });
147
147
  model.updateChunk(message);
148
148
  model.sync(adapter);
@@ -80,6 +80,9 @@ type ChunkChange<T extends Chunk> =
80
80
  * Instead this model tracks changes and syncs them with the ChunkDocument.
81
81
  */
82
82
  export class SerializationModel<T extends Chunk> {
83
+ /** Emits when the document is updated. */
84
+ public readonly update = new Event<void>();
85
+
83
86
  /** Ordered set of chunks. */
84
87
  private readonly _chunks: T[] = [];
85
88
 
@@ -92,9 +95,6 @@ export class SerializationModel<T extends Chunk> {
92
95
  /** Track chunk changes since last sync. */
93
96
  private readonly _changes: Array<ChunkChange<T>> = [];
94
97
 
95
- /** Emits when the document is updated. */
96
- public readonly update = new Event<void>();
97
-
98
98
  constructor(
99
99
  private readonly _renderer: ChunkRenderer<T>,
100
100
  initialChunks: T[] = [],
@@ -2,10 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- //
6
- // Copyright 2025 DXOS.org
7
- //
8
-
9
5
  import { DeferredTask, asyncTimeout } from '@dxos/async';
10
6
  import { LifecycleState, Resource } from '@dxos/context';
11
7
  import { type Queue } from '@dxos/echo-db';
@@ -31,9 +27,9 @@ export type QueueCursor = {
31
27
  timestamp: string;
32
28
  };
33
29
 
34
- // TODO(mykola): .
35
30
  export class MessageNormalizer extends Resource {
36
31
  private readonly _functionExecutor: FunctionExecutor;
32
+
37
33
  private _queue: Queue<Message.Message>;
38
34
  private _cursor: QueueCursor;
39
35
  private _messagesToProcess: MessageWithRangeId[] = [];
@@ -7,8 +7,8 @@ import { describe, test } from 'vitest';
7
7
  import { scheduleTaskInterval } from '@dxos/async';
8
8
  import { Context } from '@dxos/context';
9
9
  import { Obj } from '@dxos/echo';
10
- import { createQueueDXN } from '@dxos/echo/internal';
11
10
  import { MemoryQueue } from '@dxos/echo-db';
11
+ import { createQueueDXN } from '@dxos/echo/internal';
12
12
  import { FunctionExecutor, ServiceContainer } from '@dxos/functions-runtime';
13
13
  import { log } from '@dxos/log';
14
14
  import { type Actor, Message } from '@dxos/types';
@@ -98,7 +98,7 @@ describe.skip('SentenceNormalization', () => {
98
98
  }
99
99
 
100
100
  log.info('sentences', {
101
- originalMessages: JSON.stringify(messages, null, 2),
101
+ messages: JSON.stringify(messages, null, 2),
102
102
  sentences: JSON.stringify(sentences, null, 2),
103
103
  });
104
104
  throw new Error('test');
@@ -0,0 +1,77 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Schema from 'effect/Schema';
7
+
8
+ import { Operation } from '@dxos/compute';
9
+ import { log } from '@dxos/log';
10
+ import { trim } from '@dxos/util';
11
+
12
+ import {
13
+ SentenceNormalization,
14
+ SentenceNormalizationOutput,
15
+ type MessageWithRangeIdType,
16
+ type SentenceNormalizationInputType,
17
+ } from '../operations/definitions';
18
+
19
+ export type MessageWithRangeId = MessageWithRangeIdType;
20
+
21
+ /** @deprecated Use SentenceNormalizationInputType */
22
+ export type NormalizationInput = SentenceNormalizationInputType;
23
+
24
+ /** @deprecated Use SentenceNormalizationOutput */
25
+ export type NormalizationOutput = Schema.Schema.Type<typeof SentenceNormalizationOutput>;
26
+
27
+ /**
28
+ * Sentence normalization for transcription.
29
+ * TODO(dmaretskyi): Reimplement using AiRequest.run or LanguageModel.generateObject - runStructured was removed.
30
+ */
31
+ export const sentenceNormalization = SentenceNormalization.pipe(
32
+ Operation.withHandler(
33
+ Effect.fn(function* ({ messages }) {
34
+ log.info('input', { messages });
35
+ // TODO(dmaretskyi): runStructured was removed from AiRequest. Reimplement using new API.
36
+ return yield* Effect.die(
37
+ new Error(
38
+ 'Sentence normalization needs to be reimplemented - runStructured was removed from AiRequest. Use AiRequest.run or LanguageModel.generateObject.',
39
+ ),
40
+ );
41
+ }),
42
+ ),
43
+ );
44
+
45
+ const _unused = trim`
46
+ You are observing a real-time transcript of a single person speaking.
47
+ The transcription is delivered in chunks of 10 seconds or less. As a result, individual sentences may be split across multiple messages, or multiple sentences may appear within a single message. Additionally, because this is real-time transcription, punctuation and capitalization may be incorrect or missing.
48
+
49
+ # Task Description:
50
+ - Your task is to detect and reconstruct broken or incomplete sentences by merging segments into coherent, grammatically correct sentences where appropriate.
51
+
52
+ # Input Format:
53
+ - The input is an array of messages that contain transcription blocks.
54
+ - Each message is a Message.Message, as described in the output format.
55
+
56
+ # Output Format:
57
+ - You have been provided with the tool that defines the output format; make sure to query it.
58
+ - Do not output anything other than the expected format.
59
+
60
+ # Segment Handling Rules:
61
+ - Sort messages by timestamp.
62
+ - Leave ID of the first message in a sentence.
63
+ - Each divided sentence should be added to the output as a separate message or block within existing messages, preserving the original order.
64
+ - If one message contains multiple sentences, you should not split them.
65
+ - The last sentence may be incomplete; it should still be output as a separate block or message.
66
+ - Keep track of the original timestamps of the messages and blocks and, use the timestamp of the first message/block of a sentence as the 'started' field of the merged message.
67
+ - The 'rangeId' field of the merged message should include 'messageId'-s and 'rangeId'-s of all messages that have been used to construct this message.
68
+
69
+ # Punctuation and Capitalization:
70
+ - Do not rely on the original punctuation and capitalization—they may be incorrect.
71
+ - Use logical reasoning to apply appropriate punctuation (e.g., period, comma, question mark, exclamation mark) and capitalization.
72
+
73
+ # Restrictions:
74
+ - Do not alter the order of the original messages; maintain the natural flow of speech.
75
+ - Do not interpret or infer meaning beyond reconstructing sentences.
76
+ - Do not add or remove any words or phrases.
77
+ `;
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Feed, Ref } from '@dxos/echo';
9
+ import { Transcript } from '@dxos/types';
10
+
11
+ import { Create } from './definitions';
12
+
13
+ const handler: Operation.WithHandler<typeof Create> = Create.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ space }) {
16
+ const feed = space.db.add(Feed.make());
17
+ return {
18
+ object: Transcript.make(Ref.make(feed)),
19
+ };
20
+ }),
21
+ ),
22
+ );
23
+
24
+ export default handler;