@dxos/plugin-transcription 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc

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 (375) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs +54 -0
  4. package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs.map +7 -0
  5. package/dist/lib/neutral/TranscriptionPlugin.mjs +34 -0
  6. package/dist/lib/neutral/TranscriptionPlugin.mjs.map +7 -0
  7. package/dist/lib/neutral/TranscriptionPlugin.node.mjs +25 -0
  8. package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +7 -0
  9. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +21 -0
  10. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +7 -0
  11. package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs +15 -0
  12. package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs.map +7 -0
  13. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  14. package/dist/lib/neutral/capabilities/index.mjs +17 -0
  15. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-2O3ONPRZ.mjs +298 -0
  17. package/dist/lib/neutral/chunk-2O3ONPRZ.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-5FXU36PN.mjs +120 -0
  19. package/dist/lib/neutral/chunk-5FXU36PN.mjs.map +7 -0
  20. package/dist/lib/{browser/chunk-VBUIO677.mjs → neutral/chunk-GL4RS533.mjs} +2 -9
  21. package/dist/lib/neutral/chunk-GL4RS533.mjs.map +7 -0
  22. package/dist/lib/{browser/chunk-WH36ENNE.mjs → neutral/chunk-ILSA3DU7.mjs} +102 -133
  23. package/dist/lib/neutral/chunk-ILSA3DU7.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  25. package/dist/lib/neutral/chunk-KAEXRX3Y.mjs +35 -0
  26. package/dist/lib/neutral/chunk-KAEXRX3Y.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-MLRJWAQH.mjs +179 -0
  28. package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-Y5EQAFFR.mjs +8 -0
  30. package/dist/lib/neutral/chunk-Y5EQAFFR.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +30 -0
  32. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
  33. package/dist/lib/neutral/components/index.mjs +272 -0
  34. package/dist/lib/neutral/components/index.mjs.map +7 -0
  35. package/dist/lib/neutral/containers/index.mjs +9 -0
  36. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  37. package/dist/lib/neutral/create-RRWRIUSR.mjs +21 -0
  38. package/dist/lib/neutral/create-RRWRIUSR.mjs.map +7 -0
  39. package/dist/lib/neutral/hooks/index.mjs +19 -0
  40. package/dist/lib/neutral/index.mjs +44 -0
  41. package/dist/lib/neutral/meta.json +1 -0
  42. package/dist/lib/neutral/meta.mjs +8 -0
  43. package/dist/lib/neutral/meta.mjs.map +7 -0
  44. package/dist/lib/neutral/open-CVMX5KXZ.mjs +27 -0
  45. package/dist/lib/neutral/open-CVMX5KXZ.mjs.map +7 -0
  46. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
  47. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
  48. package/dist/lib/neutral/operations/index.mjs +8 -0
  49. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  50. package/dist/lib/neutral/plugin.mjs +16 -0
  51. package/dist/lib/neutral/plugin.mjs.map +7 -0
  52. package/dist/lib/neutral/react-surface-YMZRO242.mjs +26 -0
  53. package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +7 -0
  54. package/dist/lib/neutral/summarize-LA7TRW7A.mjs +78 -0
  55. package/dist/lib/neutral/summarize-LA7TRW7A.mjs.map +7 -0
  56. package/dist/lib/neutral/text-content-F4ASMITB.mjs +30 -0
  57. package/dist/lib/neutral/text-content-F4ASMITB.mjs.map +7 -0
  58. package/dist/lib/{node-esm/transcriber-UGB7ECX6.mjs → neutral/transcriber-ABHATBVH.mjs} +20 -18
  59. package/dist/lib/neutral/transcriber-ABHATBVH.mjs.map +7 -0
  60. package/dist/lib/neutral/translations.mjs +24 -0
  61. package/dist/lib/neutral/translations.mjs.map +7 -0
  62. package/dist/lib/neutral/types/index.mjs +10 -0
  63. package/dist/lib/neutral/types/index.mjs.map +7 -0
  64. package/dist/types/src/TranscriptionPlugin.d.ts +3 -1
  65. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  66. package/dist/types/src/TranscriptionPlugin.node.d.ts +4 -0
  67. package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -0
  68. package/dist/types/src/TranscriptionPlugin.test.d.ts +2 -0
  69. package/dist/types/src/TranscriptionPlugin.test.d.ts.map +1 -0
  70. package/dist/types/src/TranscriptionPlugin.workerd.d.ts +4 -0
  71. package/dist/types/src/TranscriptionPlugin.workerd.d.ts.map +1 -0
  72. package/dist/types/src/blueprints/index.d.ts +2 -0
  73. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  74. package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
  75. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -4
  77. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/index.d.ts +10 -5
  79. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  80. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  81. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  82. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  83. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  84. package/dist/types/src/capabilities/text-content.d.ts +8 -0
  85. package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
  86. package/dist/types/src/capabilities/transcriber.d.ts +4 -3
  87. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
  88. package/dist/types/src/components/Oracle/Oracle.d.ts +24 -0
  89. package/dist/types/src/components/Oracle/Oracle.d.ts.map +1 -0
  90. package/dist/types/src/components/Oracle/Oracle.stories.d.ts +32 -0
  91. package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +1 -0
  92. package/dist/types/src/components/Oracle/index.d.ts +2 -0
  93. package/dist/types/src/components/Oracle/index.d.ts.map +1 -0
  94. package/dist/types/src/components/Transcription/Transcription.d.ts +13 -0
  95. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
  96. package/dist/types/src/components/Transcription/Transcription.stories.d.ts +37 -0
  97. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
  98. package/dist/types/src/components/Transcription/index.d.ts +2 -0
  99. package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
  100. package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
  101. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
  102. package/dist/types/src/components/index.d.ts +2 -3
  103. package/dist/types/src/components/index.d.ts.map +1 -1
  104. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +6 -0
  105. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -0
  106. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +28 -0
  107. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -0
  108. package/dist/types/src/containers/TranscriptionArticle/index.d.ts +2 -0
  109. package/dist/types/src/containers/TranscriptionArticle/index.d.ts.map +1 -0
  110. package/dist/types/src/containers/index.d.ts +3 -0
  111. package/dist/types/src/containers/index.d.ts.map +1 -0
  112. package/dist/types/src/enrichment/conversation.test.d.ts +2 -0
  113. package/dist/types/src/enrichment/conversation.test.d.ts.map +1 -0
  114. package/dist/types/src/enrichment/operations.d.ts +200 -0
  115. package/dist/types/src/enrichment/operations.d.ts.map +1 -0
  116. package/dist/types/src/enrichment/parser.d.ts +26 -0
  117. package/dist/types/src/enrichment/parser.d.ts.map +1 -0
  118. package/dist/types/src/enrichment/stream-simulator.d.ts +38 -0
  119. package/dist/types/src/enrichment/stream-simulator.d.ts.map +1 -0
  120. package/dist/types/src/hooks/index.d.ts +2 -1
  121. package/dist/types/src/hooks/index.d.ts.map +1 -1
  122. package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
  123. package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
  124. package/dist/types/src/hooks/useFeedModelAdapter.d.ts +12 -0
  125. package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +1 -0
  126. package/dist/types/src/hooks/useTranscriber.d.ts +2 -2
  127. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  128. package/dist/types/src/hooks/useTranscriptionRecording.d.ts +12 -0
  129. package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -0
  130. package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
  131. package/dist/types/src/index.d.ts +2 -3
  132. package/dist/types/src/index.d.ts.map +1 -1
  133. package/dist/types/src/meta.d.ts +2 -2
  134. package/dist/types/src/meta.d.ts.map +1 -1
  135. package/dist/types/src/model/model.d.ts +2 -2
  136. package/dist/types/src/model/model.d.ts.map +1 -1
  137. package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
  138. package/dist/types/src/normalization/index.d.ts.map +1 -0
  139. package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +9 -7
  140. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
  141. package/dist/types/src/normalization/normalization.d.ts +543 -0
  142. package/dist/types/src/normalization/normalization.d.ts.map +1 -0
  143. package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
  144. package/dist/types/src/normalization/utils.d.ts +3 -0
  145. package/dist/types/src/normalization/utils.d.ts.map +1 -0
  146. package/dist/types/src/operations/create.d.ts +5 -0
  147. package/dist/types/src/operations/create.d.ts.map +1 -0
  148. package/dist/types/src/operations/index.d.ts +3 -0
  149. package/dist/types/src/operations/index.d.ts.map +1 -0
  150. package/dist/types/src/operations/open.d.ts +5 -0
  151. package/dist/types/src/operations/open.d.ts.map +1 -0
  152. package/dist/types/src/operations/summarize.d.ts +8 -0
  153. package/dist/types/src/operations/summarize.d.ts.map +1 -0
  154. package/dist/types/src/plugin.d.ts +4 -0
  155. package/dist/types/src/plugin.d.ts.map +1 -0
  156. package/dist/types/src/stories/FileTranscription.stories.d.ts +20 -0
  157. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
  158. package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +2 -2
  159. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
  160. package/dist/types/src/{components/stories/MicrophoneTranscription.stories.d.ts → stories/LiveTranscription.stories.d.ts} +7 -7
  161. package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +1 -0
  162. package/dist/types/src/stories/TranscriptionStory.d.ts +21 -0
  163. package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
  164. package/dist/types/src/stories/common.d.ts +46 -0
  165. package/dist/types/src/stories/common.d.ts.map +1 -0
  166. package/dist/types/src/testing/testing.d.ts +13 -14
  167. package/dist/types/src/testing/testing.d.ts.map +1 -1
  168. package/dist/types/src/transcriber/index.d.ts +1 -1
  169. package/dist/types/src/transcriber/index.d.ts.map +1 -1
  170. package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
  171. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
  172. package/dist/types/src/transcriber/transcriber.d.ts +61 -6
  173. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  174. package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
  175. package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
  176. package/dist/types/src/transcriber/transcription-manager.d.ts +14 -9
  177. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  178. package/dist/types/src/translations.d.ts +9 -8
  179. package/dist/types/src/translations.d.ts.map +1 -1
  180. package/dist/types/src/types/TranscriptOperation.d.ts +917 -0
  181. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
  182. package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
  183. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
  184. package/dist/types/src/types/index.d.ts +2 -3
  185. package/dist/types/src/types/index.d.ts.map +1 -1
  186. package/dist/types/src/util/array.d.ts.map +1 -1
  187. package/dist/types/src/util/get-time-str.d.ts.map +1 -1
  188. package/dist/types/src/util/index.d.ts +1 -0
  189. package/dist/types/src/util/index.d.ts.map +1 -1
  190. package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
  191. package/dist/types/src/util/render-byline.d.ts +4 -0
  192. package/dist/types/src/util/render-byline.d.ts.map +1 -0
  193. package/dist/types/tsconfig.tsbuildinfo +1 -1
  194. package/package.json +157 -82
  195. package/src/TranscriptionPlugin.node.ts +20 -0
  196. package/src/TranscriptionPlugin.test.ts +31 -0
  197. package/src/TranscriptionPlugin.tsx +20 -64
  198. package/src/TranscriptionPlugin.workerd.ts +18 -0
  199. package/src/blueprints/index.ts +5 -0
  200. package/src/blueprints/transcription-blueprint.ts +29 -0
  201. package/src/capabilities/blueprint-definition.ts +12 -24
  202. package/src/capabilities/index.ts +11 -7
  203. package/src/capabilities/operation-handler.ts +16 -0
  204. package/src/capabilities/react-surface.tsx +23 -14
  205. package/src/capabilities/text-content.ts +33 -0
  206. package/src/capabilities/transcriber.ts +53 -42
  207. package/src/components/Oracle/Oracle.stories.tsx +147 -0
  208. package/src/components/Oracle/Oracle.tsx +141 -0
  209. package/src/components/Oracle/index.ts +5 -0
  210. package/src/components/Transcription/Transcription.stories.tsx +213 -0
  211. package/src/components/Transcription/Transcription.tsx +58 -0
  212. package/src/components/{Transcript → Transcription}/index.ts +1 -1
  213. package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -9
  214. package/src/components/index.ts +2 -6
  215. package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +61 -0
  216. package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +62 -0
  217. package/src/containers/TranscriptionArticle/index.ts +5 -0
  218. package/src/containers/index.ts +7 -0
  219. package/src/enrichment/conversation.test.ts +162 -0
  220. package/src/enrichment/conversation.txt +23 -0
  221. package/src/enrichment/operations.ts +268 -0
  222. package/src/enrichment/parser.ts +101 -0
  223. package/src/enrichment/stream-simulator.ts +125 -0
  224. package/src/hooks/index.ts +2 -1
  225. package/src/hooks/useFeedModelAdapter.ts +46 -0
  226. package/src/hooks/useTranscriber.ts +12 -4
  227. package/src/hooks/useTranscriptionRecording.ts +87 -0
  228. package/src/hooks/useVoiceInput.ts +2 -3
  229. package/src/index.ts +4 -5
  230. package/src/meta.ts +3 -3
  231. package/src/model/model.test.ts +20 -14
  232. package/src/model/model.ts +3 -3
  233. package/src/{segments-normalization → normalization}/message-normalizer.ts +37 -24
  234. package/src/{segments-normalization → normalization}/normalization.test.ts +8 -47
  235. package/src/normalization/normalization.ts +76 -0
  236. package/src/{segments-normalization → normalization}/utils.ts +2 -2
  237. package/src/operations/create.ts +24 -0
  238. package/src/operations/index.ts +11 -0
  239. package/src/operations/open.ts +28 -0
  240. package/src/operations/summarize.ts +101 -0
  241. package/src/plugin.ts +11 -0
  242. package/src/stories/FileTranscription.stories.tsx +143 -0
  243. package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +40 -40
  244. package/src/stories/LiveTranscription.stories.tsx +153 -0
  245. package/src/stories/TranscriptionStory.tsx +101 -0
  246. package/src/stories/common.ts +233 -0
  247. package/src/testing/testing.ts +49 -56
  248. package/src/transcriber/index.ts +1 -1
  249. package/src/transcriber/media-stream-recorder.ts +3 -3
  250. package/src/transcriber/transcriber.browser.test.ts +4 -5
  251. package/src/transcriber/transcriber.test.ts +104 -0
  252. package/src/transcriber/transcriber.ts +105 -60
  253. package/src/transcriber/transcription-manager.ts +33 -22
  254. package/src/translations.ts +10 -7
  255. package/src/types/TranscriptOperation.ts +103 -0
  256. package/src/types/TranscriptionCapabilities.ts +39 -0
  257. package/src/types/index.ts +2 -3
  258. package/src/util/index.ts +1 -0
  259. package/src/util/render-byline.ts +33 -0
  260. package/dist/lib/browser/TranscriptContainer-2GSL2XB5.mjs +0 -11
  261. package/dist/lib/browser/blueprint-definition-UAAJYVLZ.mjs +0 -150
  262. package/dist/lib/browser/blueprint-definition-UAAJYVLZ.mjs.map +0 -7
  263. package/dist/lib/browser/chunk-3MKZ2MNQ.mjs +0 -16
  264. package/dist/lib/browser/chunk-3MKZ2MNQ.mjs.map +0 -7
  265. package/dist/lib/browser/chunk-535OJKFO.mjs +0 -8
  266. package/dist/lib/browser/chunk-535OJKFO.mjs.map +0 -7
  267. package/dist/lib/browser/chunk-7DR6HZEF.mjs +0 -732
  268. package/dist/lib/browser/chunk-7DR6HZEF.mjs.map +0 -7
  269. package/dist/lib/browser/chunk-VBUIO677.mjs.map +0 -7
  270. package/dist/lib/browser/chunk-W7WKZTM4.mjs +0 -63
  271. package/dist/lib/browser/chunk-W7WKZTM4.mjs.map +0 -7
  272. package/dist/lib/browser/chunk-WH36ENNE.mjs.map +0 -7
  273. package/dist/lib/browser/index.mjs +0 -130
  274. package/dist/lib/browser/index.mjs.map +0 -7
  275. package/dist/lib/browser/intent-resolver-ZTKTEAQX.mjs +0 -25
  276. package/dist/lib/browser/intent-resolver-ZTKTEAQX.mjs.map +0 -7
  277. package/dist/lib/browser/meta.json +0 -1
  278. package/dist/lib/browser/react-surface-KA32A72I.mjs +0 -34
  279. package/dist/lib/browser/react-surface-KA32A72I.mjs.map +0 -7
  280. package/dist/lib/browser/transcriber-LWOLYQHC.mjs +0 -56
  281. package/dist/lib/browser/transcriber-LWOLYQHC.mjs.map +0 -7
  282. package/dist/lib/browser/types/index.mjs +0 -12
  283. package/dist/lib/node-esm/TranscriptContainer-GRLDCESB.mjs +0 -12
  284. package/dist/lib/node-esm/blueprint-definition-Z3LTZ3ID.mjs +0 -151
  285. package/dist/lib/node-esm/blueprint-definition-Z3LTZ3ID.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-K4AZOB5Y.mjs +0 -733
  287. package/dist/lib/node-esm/chunk-K4AZOB5Y.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-OLMSTF3M.mjs +0 -64
  289. package/dist/lib/node-esm/chunk-OLMSTF3M.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-Q6WD7L2J.mjs +0 -10
  291. package/dist/lib/node-esm/chunk-Q6WD7L2J.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-SWUVPFKR.mjs +0 -17
  293. package/dist/lib/node-esm/chunk-SWUVPFKR.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-YFN4FJFK.mjs +0 -467
  295. package/dist/lib/node-esm/chunk-YFN4FJFK.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-YVNQN2J6.mjs +0 -30
  297. package/dist/lib/node-esm/chunk-YVNQN2J6.mjs.map +0 -7
  298. package/dist/lib/node-esm/index.mjs +0 -131
  299. package/dist/lib/node-esm/index.mjs.map +0 -7
  300. package/dist/lib/node-esm/intent-resolver-55WH2GY6.mjs +0 -26
  301. package/dist/lib/node-esm/intent-resolver-55WH2GY6.mjs.map +0 -7
  302. package/dist/lib/node-esm/meta.json +0 -1
  303. package/dist/lib/node-esm/react-surface-GU7LW2JO.mjs +0 -35
  304. package/dist/lib/node-esm/react-surface-GU7LW2JO.mjs.map +0 -7
  305. package/dist/lib/node-esm/transcriber-UGB7ECX6.mjs.map +0 -7
  306. package/dist/lib/node-esm/types/index.mjs +0 -13
  307. package/dist/types/src/capabilities/capabilities.d.ts +0 -17
  308. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  309. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  310. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  311. package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
  312. package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
  313. package/dist/types/src/components/Transcript/Transcript.stories.d.ts +0 -39
  314. package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
  315. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
  316. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
  317. package/dist/types/src/components/Transcript/index.d.ts +0 -2
  318. package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
  319. package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -15
  320. package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
  321. package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
  322. package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
  323. package/dist/types/src/components/stories/FileTranscription.stories.d.ts +0 -18
  324. package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
  325. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
  326. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
  327. package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -12
  328. package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
  329. package/dist/types/src/components/stories/useIsSpeaking.d.ts +0 -3
  330. package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
  331. package/dist/types/src/functions/index.d.ts +0 -3
  332. package/dist/types/src/functions/index.d.ts.map +0 -1
  333. package/dist/types/src/functions/open.d.ts +0 -7
  334. package/dist/types/src/functions/open.d.ts.map +0 -1
  335. package/dist/types/src/functions/summarize.d.ts +0 -11
  336. package/dist/types/src/functions/summarize.d.ts.map +0 -1
  337. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -8
  338. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +0 -1
  339. package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
  340. package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
  341. package/dist/types/src/segments-normalization/normalization.d.ts +0 -476
  342. package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
  343. package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
  344. package/dist/types/src/segments-normalization/utils.d.ts +0 -3
  345. package/dist/types/src/segments-normalization/utils.d.ts.map +0 -1
  346. package/dist/types/src/types/Transcript.d.ts +0 -30
  347. package/dist/types/src/types/Transcript.d.ts.map +0 -1
  348. package/dist/types/src/types/TranscriptAction.d.ts +0 -23
  349. package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
  350. package/dist/types/src/types/types.d.ts +0 -5
  351. package/dist/types/src/types/types.d.ts.map +0 -1
  352. package/src/capabilities/capabilities.ts +0 -33
  353. package/src/capabilities/intent-resolver.ts +0 -18
  354. package/src/components/Transcript/Transcript.stories.tsx +0 -245
  355. package/src/components/Transcript/Transcript.tsx +0 -93
  356. package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
  357. package/src/components/TranscriptContainer.tsx +0 -36
  358. package/src/components/stories/FileTranscription.stories.tsx +0 -256
  359. package/src/components/stories/MicrophoneTranscription.stories.tsx +0 -285
  360. package/src/components/stories/TranscriptionStory.tsx +0 -45
  361. package/src/components/stories/useIsSpeaking.tsx +0 -40
  362. package/src/functions/index.ts +0 -6
  363. package/src/functions/open.ts +0 -39
  364. package/src/functions/summarize.ts +0 -103
  365. package/src/hooks/useQueueModelAdapter.ts +0 -66
  366. package/src/segments-normalization/normalization.ts +0 -115
  367. package/src/types/Transcript.ts +0 -44
  368. package/src/types/TranscriptAction.ts +0 -24
  369. package/src/types/types.ts +0 -9
  370. package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
  371. package/dist/lib/{browser/TranscriptContainer-2GSL2XB5.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  372. package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
  373. package/dist/lib/{node-esm/TranscriptContainer-GRLDCESB.mjs.map → neutral/index.mjs.map} +0 -0
  374. package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
  375. package/src/{segments-normalization → normalization}/index.ts +1 -1
@@ -1,103 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Array from 'effect/Array';
6
- import * as Effect from 'effect/Effect';
7
- import * as Function from 'effect/Function';
8
- import * as Layer from 'effect/Layer';
9
- import * as Option from 'effect/Option';
10
- import * as Schema from 'effect/Schema';
11
-
12
- import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
13
- import { AiSession, GenerationObserver } from '@dxos/assistant';
14
- import { TracingService, defineFunction } from '@dxos/functions';
15
- import { trim } from '@dxos/util';
16
-
17
- /**
18
- * Summarize a transcript of a meeting.
19
- */
20
- export default defineFunction({
21
- key: 'dxos.org/function/transcription/summarize',
22
- name: 'Summarize',
23
- description: 'Summarize a transcript of a meeting.',
24
- inputSchema: Schema.Struct({
25
- transcript: Schema.String.annotations({
26
- description: 'The transcript of the meeting.',
27
- }),
28
- notes: Schema.optional(Schema.String).annotations({
29
- description: 'Additional notes from the participants.',
30
- }),
31
- }),
32
- outputSchema: Schema.Struct({
33
- summary: Schema.String.annotations({
34
- description: 'The summary of the transcript.',
35
- }),
36
- }),
37
- handler: Effect.fnUntraced(
38
- function* ({ data: { transcript, notes } }) {
39
- const result = yield* new AiSession().run({
40
- prompt: `Transcript: ${transcript}\n\nNotes: ${notes}`,
41
- history: [],
42
- system: systemPrompt,
43
- observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'summarize' })),
44
- });
45
-
46
- const summary = Function.pipe(
47
- result,
48
- Array.findLast((msg) => msg.sender.role === 'assistant' && msg.blocks.some((block) => block._tag === 'text')),
49
- Option.flatMap((msg) =>
50
- Function.pipe(
51
- msg.blocks,
52
- Array.findLast((block) => block._tag === 'text'),
53
- Option.map((block) => block.text),
54
- ),
55
- ),
56
- Option.getOrThrowWith(() => new Error('No summary found')),
57
- );
58
-
59
- return { summary };
60
- },
61
- Effect.provide(
62
- Layer.mergeAll(
63
- AiService.model('@anthropic/claude-sonnet-4-0'),
64
- ToolResolverService.layerEmpty,
65
- ToolExecutionService.layerEmpty,
66
- TracingService.layerNoop,
67
- ),
68
- ),
69
- ),
70
- });
71
-
72
- const systemPrompt = trim`
73
- You are a helpful assistant that summarizes transcripts of meetings.
74
-
75
- # Goal
76
- Create a markdown summary of the meeting transcript with text notes provided.
77
- Notes are very important so make sure to include them in the summary if they contain meaningful information.
78
-
79
- # Formatting
80
- - Format the summary as a markdown document without extra comments like "Here is the summary of the transcript:".
81
- - Use markdown formatting for headings and bullet points.
82
- - Format the summary as a list of key points and takeaways.
83
- - All names of people should be in bold.
84
-
85
- # Note Taking
86
- - Correlate items in the summary with the person of origin to build a coherent narrative.
87
- - Include short quotes verbatim where appropriate. Especially when concerned with design decisions and problem descriptions.
88
-
89
- # Tasks
90
- At the end of the summary include tasks.
91
- Extract only the tasks that are:
92
- - Directly actionable.
93
- - Clearly assigned to a person or team (or can easily be inferred).
94
- - Strongly implied by the conversation and/or user note (no speculative tasks).
95
- - Specific enough that someone reading them would know exactly what to do next.
96
-
97
- Format all tasks as markdown checkboxes using the syntax:
98
- - [ ] Task description.
99
-
100
- Additional information can be included (indented).
101
-
102
- If no actionable tasks are found, omit this tasks section.
103
- `;
@@ -1,66 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { useEffect, useMemo, useState } from 'react';
6
-
7
- import type { Obj } from '@dxos/echo';
8
- import { type Queue } from '@dxos/react-client/echo';
9
-
10
- import { type ChunkRenderer, SerializationModel } from '../model';
11
-
12
- /**
13
- * Model adapter for a queue.
14
- */
15
- export const useQueueModelAdapter = <T extends Obj.Any>(
16
- renderer: ChunkRenderer<T>,
17
- queue: Queue<T> | undefined,
18
- initialChunks: T[] = [],
19
- ): SerializationModel<T> => {
20
- const model = useMemo(() => new SerializationModel<T>(renderer, initialChunks), [queue]);
21
- const [loaded, setLoaded] = useState(false);
22
-
23
- // Set initial blocks.
24
- useEffect(() => {
25
- if (!queue) {
26
- return;
27
- }
28
-
29
- const update = () => {
30
- for (const block of queue?.objects ?? []) {
31
- model.appendChunk(block);
32
- }
33
-
34
- setLoaded(true);
35
- };
36
-
37
- // TODO(burdon): This is a hack to ensure the queue is loaded.
38
- let i: NodeJS.Timeout | undefined;
39
- if (queue.isLoading) {
40
- i = setInterval(() => {
41
- if (!queue?.isLoading) {
42
- clearInterval(i);
43
- update();
44
- }
45
- }, 1_000);
46
- } else {
47
- update();
48
- }
49
-
50
- return () => clearTimeout(i);
51
- }, [model, queue]);
52
-
53
- // TODO(burdon): Can we listen for queue events?
54
- useEffect(() => {
55
- if (!loaded || !queue || model.chunks.length === queue.objects.length) {
56
- return;
57
- }
58
-
59
- const chunk = queue.objects.at(-1);
60
- if (chunk) {
61
- model.appendChunk(chunk);
62
- }
63
- }, [model, loaded, queue?.objects.length]);
64
-
65
- return model;
66
- };
@@ -1,115 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- // ISSUE(burdon): defineFunction
6
- // @ts-nocheck
7
-
8
- import * as Schema from 'effect/Schema';
9
-
10
- import { AiService, DEFAULT_EDGE_MODEL } from '@dxos/ai';
11
- import { AiSession } from '@dxos/assistant';
12
- import { Obj } from '@dxos/echo';
13
- import { defineFunction } from '@dxos/functions';
14
- import { ObjectId } from '@dxos/keys';
15
- import { log } from '@dxos/log';
16
- import { DataType } from '@dxos/schema';
17
- import { trim } from '@dxos/util';
18
-
19
- const MessageWithRangeId = Schema.extend(
20
- DataType.Message,
21
- Schema.Struct({
22
- // TODO(mykola): Move to meta in DataType.Message. Use `DataType.Message` instead.
23
- rangeId: Schema.optional(Schema.Array(Schema.String)).annotations({
24
- description: 'The IDs of the messages that contain the sentences.',
25
- }),
26
- }),
27
- );
28
-
29
- export interface MessageWithRangeId extends Schema.Schema.Type<typeof MessageWithRangeId> {}
30
-
31
- export const NormalizationInput = Schema.Struct({
32
- // TODO(mykola): Move to meta in DataType.Message. Use `DataType.Message` instead.
33
- messages: Schema.Array(MessageWithRangeId).annotations({
34
- description: 'Messages to normalize into sentences.',
35
- }),
36
- });
37
- export interface NormalizationInput extends Schema.Schema.Type<typeof NormalizationInput> {}
38
-
39
- export const NormalizationOutput = Schema.Struct({
40
- sentences: Schema.Array(MessageWithRangeId.pipe(Schema.mutable)).pipe(Schema.mutable).annotations({
41
- description: 'The sentences of the transcript.',
42
- }),
43
- });
44
- export interface NormalizationOutput extends Schema.Schema.Type<typeof NormalizationOutput> {}
45
-
46
- export const sentenceNormalization = defineFunction<NormalizationInput, NormalizationOutput>({
47
- description: 'Post process of transcription for sentence normalization',
48
- inputSchema: NormalizationInput,
49
- outputSchema: NormalizationOutput,
50
- handler: async ({ data: { messages }, context }) => {
51
- log.info('input', { messages });
52
- const ai = context.getService(AiService);
53
- const session = new AiSession({ operationModel: 'configured' });
54
-
55
- // TODO(dmaretskyi): This got broken after effect-ai transition.
56
- const response = session.runStructured(NormalizationOutput, {
57
- generationOptions: {
58
- model: DEFAULT_EDGE_MODEL,
59
- },
60
- client: ai.client,
61
- tools: [],
62
- artifacts: [],
63
- history: [
64
- Obj.make(DataType.Message, {
65
- created: new Date().toISOString(),
66
- sender: {
67
- role: 'user',
68
- },
69
- blocks: messages.map((message) => ({ _tag: 'text', text: JSON.stringify(message) }) as const),
70
- }),
71
- ],
72
- prompt,
73
- }) as any;
74
-
75
- response.sentences.forEach((sentence) => {
76
- sentence.id = ObjectId.random();
77
- });
78
- log.info('response', { response });
79
- return response;
80
- },
81
- });
82
-
83
- const prompt = trim`
84
- You are observing a real-time transcript of a single person speaking.
85
- 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.
86
-
87
- # Task Description:
88
- - Your task is to detect and reconstruct broken or incomplete sentences by merging segments into coherent, grammatically correct sentences where appropriate.
89
-
90
- # Input Format:
91
- - The input is an array of messages that contain transcription blocks.
92
- - Each message is a DataType.Message, as described in the output format.
93
-
94
- # Output Format:
95
- - You have been provided with the tool that defines the output format; make sure to query it.
96
- - Do not output anything other than the expected format.
97
-
98
- # Segment Handling Rules:
99
- - Sort messages by timestamp.
100
- - Leave ID of the first message in a sentence.
101
- - Each divided sentence should be added to the output as a separate message or block within existing messages, preserving the original order.
102
- - If one message contains multiple sentences, you should not split them.
103
- - The last sentence may be incomplete; it should still be output as a separate block or message.
104
- - 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.
105
- - 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.
106
-
107
- # Punctuation and Capitalization:
108
- - Do not rely on the original punctuation and capitalization—they may be incorrect.
109
- - Use logical reasoning to apply appropriate punctuation (e.g., period, comma, question mark, exclamation mark) and capitalization.
110
-
111
- # Restrictions:
112
- - Do not alter the order of the original messages; maintain the natural flow of speech.
113
- - Do not interpret or infer meaning beyond reconstructing sentences.
114
- - Do not add or remove any words or phrases.
115
- `;
@@ -1,44 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Schema from 'effect/Schema';
6
-
7
- import { Queue } from '@dxos/client/echo';
8
- import { type DXN, Obj, Ref, Type } from '@dxos/echo';
9
-
10
- /**
11
- * Root transcript object created when the user starts a transcription.
12
- */
13
- export const Transcript = Schema.Struct({
14
- // TODO(wittjosiah): Remove?
15
- // TODO(burdon): Use Date or string?
16
- started: Schema.optional(Schema.String),
17
- ended: Schema.optional(Schema.String),
18
-
19
- /**
20
- * Queue containing TranscriptBlock objects.
21
- */
22
- queue: Type.Ref(Queue),
23
- }).pipe(
24
- Type.Obj({
25
- typename: 'dxos.org/type/Transcript',
26
- version: '0.1.0',
27
- }),
28
- );
29
-
30
- export type Transcript = Schema.Schema.Type<typeof Transcript>;
31
-
32
- // TODO(burdon): Do these need to be kept in sync with EDGE?
33
-
34
- /**
35
- * First message in queue.
36
- * Contains metadata for the recording and transcript.
37
- */
38
- const TranscriptHeader = Schema.Struct({
39
- started: Schema.optional(Schema.String),
40
- });
41
-
42
- export type TranscriptHeader = Schema.Schema.Type<typeof TranscriptHeader>;
43
-
44
- export const makeTranscript = (queueDxn: DXN) => Obj.make(Transcript, { queue: Ref.fromDXN(queueDxn) });
@@ -1,24 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Schema from 'effect/Schema';
6
-
7
- import { SpaceSchema } from '@dxos/client/echo';
8
-
9
- import { meta } from '../meta';
10
-
11
- import { Transcript } from './Transcript';
12
-
13
- /**
14
- * Endpoint to the calls service.
15
- */
16
- export class Create extends Schema.TaggedClass<Create>()(`${meta.id}/action/create`, {
17
- input: Schema.Struct({
18
- name: Schema.optional(Schema.String),
19
- space: SpaceSchema,
20
- }),
21
- output: Schema.Struct({
22
- object: Transcript,
23
- }),
24
- }) {}
@@ -1,9 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- /**
6
- * Endpoint to the calls service.
7
- */
8
- // TODO(burdon): Reconfigure/move.
9
- export const TRANSCRIPTION_URL = 'https://calls-service.dxos.workers.dev';
@@ -2,6 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './normalization';
6
5
  export * from './message-normalizer';
6
+ export * from './normalization';
7
7
  export * from './utils';