@dxos/plugin-transcription 0.9.1-main.c7dcc2e112 → 0.10.0

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 (309) hide show
  1. package/PLUGIN.mdl +5 -5
  2. package/dist/lib/neutral/{TranscriptionArticle-S56VVOSF.mjs → TranscriptionArticle-FEWCWG4A.mjs} +3 -6
  3. package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs.map +7 -0
  4. package/dist/lib/neutral/TranscriptionPlugin.mjs +25 -4
  5. package/dist/lib/neutral/TranscriptionPlugin.mjs.map +3 -3
  6. package/dist/lib/neutral/TranscriptionPlugin.node.mjs +3 -3
  7. package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +3 -3
  8. package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs +48 -0
  9. package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs.map +7 -0
  10. package/dist/lib/neutral/capabilities/index.mjs +17 -5
  11. package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
  12. package/dist/lib/neutral/{chunk-XZVDAYM6.mjs → chunk-5BVHY75B.mjs} +2 -2
  13. package/dist/lib/neutral/{chunk-XZVDAYM6.mjs.map → chunk-5BVHY75B.mjs.map} +1 -1
  14. package/dist/lib/neutral/chunk-HNXSU7HJ.mjs +8 -0
  15. package/dist/lib/neutral/chunk-KOXLGGSL.mjs +30 -0
  16. package/dist/lib/neutral/chunk-KOXLGGSL.mjs.map +7 -0
  17. package/dist/lib/neutral/{chunk-2URVUJT4.mjs → chunk-MDV7NBFJ.mjs} +31 -8
  18. package/dist/lib/neutral/chunk-MDV7NBFJ.mjs.map +7 -0
  19. package/dist/lib/neutral/components/index.mjs +114 -258
  20. package/dist/lib/neutral/components/index.mjs.map +4 -4
  21. package/dist/lib/neutral/containers/index.mjs +1 -1
  22. package/dist/lib/neutral/{create-7NGOP7JP.mjs → create-HNHGCKZ4.mjs} +2 -2
  23. package/dist/lib/neutral/{enrich-message-F2AOM53F.mjs → enrich-message-DSJU4TXC.mjs} +2 -2
  24. package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs +25 -0
  25. package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs.map +7 -0
  26. package/dist/lib/neutral/hooks/index.mjs +93 -15
  27. package/dist/lib/neutral/hooks/index.mjs.map +4 -4
  28. package/dist/lib/neutral/index.mjs +6 -32
  29. package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs +16 -0
  30. package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs.map +7 -0
  31. package/dist/lib/neutral/meta.json +1 -1
  32. package/dist/lib/neutral/meta.mjs +1 -1
  33. package/dist/lib/neutral/{open-42H72C4G.mjs → open-SNMZXXYO.mjs} +4 -6
  34. package/dist/lib/neutral/open-SNMZXXYO.mjs.map +7 -0
  35. package/dist/lib/neutral/operations/index.mjs +1 -1
  36. package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs +17 -0
  37. package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs.map +7 -0
  38. package/dist/lib/neutral/plugin.mjs +2 -2
  39. package/dist/lib/neutral/recording-session-IADO7ATU.mjs +15 -0
  40. package/dist/lib/neutral/recording-session-IADO7ATU.mjs.map +7 -0
  41. package/dist/lib/neutral/{settings-DUS32HOM.mjs → settings-7KE4MABW.mjs} +3 -2
  42. package/dist/lib/neutral/{settings-DUS32HOM.mjs.map → settings-7KE4MABW.mjs.map} +3 -3
  43. package/dist/lib/neutral/skill-definition-DXNK324V.mjs +15 -0
  44. package/dist/lib/neutral/skill-definition-DXNK324V.mjs.map +7 -0
  45. package/dist/lib/neutral/skills/index.mjs +8 -0
  46. package/dist/lib/neutral/{summarize-45WVUPED.mjs → summarize-LBUZTOTH.mjs} +4 -4
  47. package/dist/lib/neutral/summarize-LBUZTOTH.mjs.map +7 -0
  48. package/dist/lib/neutral/{text-content-XZ3HK4OT.mjs → text-content-NOWR642C.mjs} +2 -4
  49. package/dist/lib/neutral/text-content-NOWR642C.mjs.map +7 -0
  50. package/dist/lib/neutral/transcriber-6XZHUUHK.mjs +174 -0
  51. package/dist/lib/neutral/transcriber-6XZHUUHK.mjs.map +7 -0
  52. package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs +207 -0
  53. package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs.map +7 -0
  54. package/dist/lib/neutral/translations.mjs +7 -0
  55. package/dist/lib/neutral/translations.mjs.map +2 -2
  56. package/dist/lib/neutral/types/index.mjs +1 -1
  57. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -0
  59. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  60. package/dist/types/src/capabilities/entity-lookup.d.ts +10 -0
  61. package/dist/types/src/capabilities/entity-lookup.d.ts.map +1 -0
  62. package/dist/types/src/capabilities/index.d.ts +7 -1
  63. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  64. package/dist/types/src/capabilities/markdown-extension.d.ts +5 -0
  65. package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
  66. package/dist/types/src/capabilities/pipeline-status.d.ts +9 -0
  67. package/dist/types/src/capabilities/pipeline-status.d.ts.map +1 -0
  68. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  69. package/dist/types/src/capabilities/recording-session.d.ts +5 -0
  70. package/dist/types/src/capabilities/recording-session.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/settings.d.ts +1 -3
  72. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
  74. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/text-content.d.ts +1 -4
  76. package/dist/types/src/capabilities/transcriber.d.ts +4 -3
  77. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/transcription-driver.d.ts +5 -0
  79. package/dist/types/src/capabilities/transcription-driver.d.ts.map +1 -0
  80. package/dist/types/src/components/Mic/Mic.d.ts +12 -0
  81. package/dist/types/src/components/Mic/Mic.d.ts.map +1 -0
  82. package/dist/types/src/components/{Oracle/Oracle.stories.d.ts → Mic/Mic.stories.d.ts} +9 -7
  83. package/dist/types/src/components/Mic/Mic.stories.d.ts.map +1 -0
  84. package/dist/types/src/components/Mic/index.d.ts +2 -0
  85. package/dist/types/src/components/Mic/index.d.ts.map +1 -0
  86. package/dist/types/src/components/index.d.ts +1 -2
  87. package/dist/types/src/components/index.d.ts.map +1 -1
  88. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -1
  89. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +7 -0
  90. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -1
  91. package/dist/types/src/hooks/index.d.ts +0 -5
  92. package/dist/types/src/hooks/index.d.ts.map +1 -1
  93. package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -1
  94. package/dist/types/src/index.d.ts +1 -3
  95. package/dist/types/src/index.d.ts.map +1 -1
  96. package/dist/types/src/meta.d.ts +4 -0
  97. package/dist/types/src/meta.d.ts.map +1 -1
  98. package/dist/types/src/normalization/message-normalizer.d.ts +2 -2
  99. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
  100. package/dist/types/src/normalization/normalization.d.ts +98 -733
  101. package/dist/types/src/normalization/normalization.d.ts.map +1 -1
  102. package/dist/types/src/operations/open.d.ts.map +1 -1
  103. package/dist/types/src/operations/summarize.d.ts.map +1 -1
  104. package/dist/types/src/skills/index.d.ts +2 -0
  105. package/dist/types/src/skills/index.d.ts.map +1 -0
  106. package/dist/types/src/skills/transcription-skill.d.ts +4 -0
  107. package/dist/types/src/skills/transcription-skill.d.ts.map +1 -0
  108. package/dist/types/src/stories/Keyword.stories.d.ts +51 -0
  109. package/dist/types/src/stories/Keyword.stories.d.ts.map +1 -0
  110. package/dist/types/src/stories/Pipeline.stories.d.ts +60 -0
  111. package/dist/types/src/stories/Pipeline.stories.d.ts.map +1 -0
  112. package/dist/types/src/stories/Transcription.stories.d.ts +23 -0
  113. package/dist/types/src/stories/Transcription.stories.d.ts.map +1 -0
  114. package/dist/types/src/testing/decorators.d.ts +21 -0
  115. package/dist/types/src/testing/decorators.d.ts.map +1 -0
  116. package/dist/types/src/testing/index.d.ts +1 -0
  117. package/dist/types/src/testing/index.d.ts.map +1 -1
  118. package/dist/types/src/testing/testing.d.ts +3 -9
  119. package/dist/types/src/testing/testing.d.ts.map +1 -1
  120. package/dist/types/src/{transcriber/transcription-manager.d.ts → transcription-manager.d.ts} +6 -5
  121. package/dist/types/src/transcription-manager.d.ts.map +1 -0
  122. package/dist/types/src/translations.d.ts +7 -0
  123. package/dist/types/src/translations.d.ts.map +1 -1
  124. package/dist/types/src/types/Settings.d.ts +6 -0
  125. package/dist/types/src/types/Settings.d.ts.map +1 -1
  126. package/dist/types/src/types/TranscriptOperation.d.ts +114 -1971
  127. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -1
  128. package/dist/types/src/types/TranscriptionCapabilities.d.ts +51 -13
  129. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -1
  130. package/dist/types/src/util/index.d.ts +0 -2
  131. package/dist/types/src/util/index.d.ts.map +1 -1
  132. package/dist/types/tsconfig.tsbuildinfo +1 -1
  133. package/dx.config.ts +1 -1
  134. package/package.json +68 -69
  135. package/src/TranscriptionPlugin.node.ts +2 -2
  136. package/src/TranscriptionPlugin.test.ts +1 -1
  137. package/src/TranscriptionPlugin.tsx +31 -2
  138. package/src/capabilities/app-graph-builder.tsx +49 -0
  139. package/src/capabilities/entity-lookup.ts +32 -0
  140. package/src/capabilities/index.ts +7 -1
  141. package/src/capabilities/markdown-extension.ts +17 -0
  142. package/src/capabilities/pipeline-status.ts +23 -0
  143. package/src/capabilities/recording-session.ts +17 -0
  144. package/src/capabilities/settings.ts +1 -0
  145. package/src/capabilities/skill-definition.ts +15 -0
  146. package/src/capabilities/text-content.ts +1 -2
  147. package/src/capabilities/transcriber.ts +5 -48
  148. package/src/capabilities/transcription-driver.tsx +263 -0
  149. package/src/components/Mic/Mic.stories.tsx +66 -0
  150. package/src/components/Mic/Mic.tsx +136 -0
  151. package/src/components/Mic/index.ts +5 -0
  152. package/src/components/index.ts +1 -2
  153. package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +4 -0
  154. package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +4 -5
  155. package/src/hooks/index.ts +0 -5
  156. package/src/hooks/useTranscriptionRecording.ts +4 -8
  157. package/src/index.ts +1 -5
  158. package/src/normalization/message-normalizer.ts +3 -3
  159. package/src/normalization/normalization.ts +3 -0
  160. package/src/operations/open.ts +2 -2
  161. package/src/operations/summarize.ts +2 -2
  162. package/src/skills/index.ts +5 -0
  163. package/src/skills/transcription-skill.ts +29 -0
  164. package/src/stories/Keyword.stories.tsx +98 -0
  165. package/src/stories/Pipeline.stories.tsx +361 -0
  166. package/src/stories/Transcription.stories.tsx +178 -0
  167. package/src/testing/decorators.ts +78 -0
  168. package/src/testing/index.ts +1 -0
  169. package/src/testing/testing.ts +13 -48
  170. package/src/{transcriber/transcription-manager.ts → transcription-manager.ts} +13 -12
  171. package/src/translations.ts +8 -0
  172. package/src/types/Settings.ts +38 -0
  173. package/src/types/TranscriptOperation.ts +6 -4
  174. package/src/types/TranscriptionCapabilities.ts +57 -21
  175. package/src/util/index.ts +0 -2
  176. package/dist/lib/neutral/TranscriptionArticle-S56VVOSF.mjs.map +0 -7
  177. package/dist/lib/neutral/blueprint-definition-DA4QFRYJ.mjs +0 -15
  178. package/dist/lib/neutral/blueprint-definition-DA4QFRYJ.mjs.map +0 -7
  179. package/dist/lib/neutral/blueprints/index.mjs +0 -8
  180. package/dist/lib/neutral/chunk-2URVUJT4.mjs.map +0 -7
  181. package/dist/lib/neutral/chunk-J4ONEYPJ.mjs +0 -8
  182. package/dist/lib/neutral/chunk-MLRJWAQH.mjs +0 -179
  183. package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +0 -7
  184. package/dist/lib/neutral/chunk-XMHH34NI.mjs +0 -318
  185. package/dist/lib/neutral/chunk-XMHH34NI.mjs.map +0 -7
  186. package/dist/lib/neutral/chunk-XOXHWMXR.mjs +0 -35
  187. package/dist/lib/neutral/chunk-XOXHWMXR.mjs.map +0 -7
  188. package/dist/lib/neutral/chunk-XWC5BBOY.mjs +0 -435
  189. package/dist/lib/neutral/chunk-XWC5BBOY.mjs.map +0 -7
  190. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +0 -30
  191. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +0 -7
  192. package/dist/lib/neutral/open-42H72C4G.mjs.map +0 -7
  193. package/dist/lib/neutral/summarize-45WVUPED.mjs.map +0 -7
  194. package/dist/lib/neutral/text-content-XZ3HK4OT.mjs.map +0 -7
  195. package/dist/lib/neutral/transcriber-KYV6NWI5.mjs +0 -59
  196. package/dist/lib/neutral/transcriber-KYV6NWI5.mjs.map +0 -7
  197. package/dist/types/src/blueprints/index.d.ts +0 -2
  198. package/dist/types/src/blueprints/index.d.ts.map +0 -1
  199. package/dist/types/src/blueprints/transcription-blueprint.d.ts +0 -4
  200. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +0 -1
  201. package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -6
  202. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
  203. package/dist/types/src/components/Oracle/Oracle.d.ts +0 -24
  204. package/dist/types/src/components/Oracle/Oracle.d.ts.map +0 -1
  205. package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +0 -1
  206. package/dist/types/src/components/Oracle/index.d.ts +0 -2
  207. package/dist/types/src/components/Oracle/index.d.ts.map +0 -1
  208. package/dist/types/src/components/Transcription/Transcription.d.ts +0 -11
  209. package/dist/types/src/components/Transcription/Transcription.d.ts.map +0 -1
  210. package/dist/types/src/components/Transcription/Transcription.stories.d.ts +0 -37
  211. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +0 -1
  212. package/dist/types/src/components/Transcription/index.d.ts +0 -2
  213. package/dist/types/src/components/Transcription/index.d.ts.map +0 -1
  214. package/dist/types/src/components/Transcription/transcription-extension.d.ts +0 -15
  215. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +0 -1
  216. package/dist/types/src/enrichment/conversation.test.d.ts +0 -2
  217. package/dist/types/src/enrichment/conversation.test.d.ts.map +0 -1
  218. package/dist/types/src/enrichment/operations.d.ts +0 -200
  219. package/dist/types/src/enrichment/operations.d.ts.map +0 -1
  220. package/dist/types/src/enrichment/parser.d.ts +0 -26
  221. package/dist/types/src/enrichment/parser.d.ts.map +0 -1
  222. package/dist/types/src/enrichment/stream-simulator.d.ts +0 -38
  223. package/dist/types/src/enrichment/stream-simulator.d.ts.map +0 -1
  224. package/dist/types/src/hooks/useAudioFile.d.ts +0 -7
  225. package/dist/types/src/hooks/useAudioFile.d.ts.map +0 -1
  226. package/dist/types/src/hooks/useAudioTrack.d.ts +0 -5
  227. package/dist/types/src/hooks/useAudioTrack.d.ts.map +0 -1
  228. package/dist/types/src/hooks/useFeedModelAdapter.d.ts +0 -12
  229. package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +0 -1
  230. package/dist/types/src/hooks/useTranscriber.d.ts +0 -7
  231. package/dist/types/src/hooks/useTranscriber.d.ts.map +0 -1
  232. package/dist/types/src/hooks/useVoiceInput.d.ts +0 -11
  233. package/dist/types/src/hooks/useVoiceInput.d.ts.map +0 -1
  234. package/dist/types/src/model/index.d.ts +0 -2
  235. package/dist/types/src/model/index.d.ts.map +0 -1
  236. package/dist/types/src/model/model.d.ts +0 -68
  237. package/dist/types/src/model/model.d.ts.map +0 -1
  238. package/dist/types/src/model/model.test.d.ts +0 -2
  239. package/dist/types/src/model/model.test.d.ts.map +0 -1
  240. package/dist/types/src/stories/FileTranscription.stories.d.ts +0 -20
  241. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +0 -1
  242. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts +0 -14
  243. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +0 -1
  244. package/dist/types/src/stories/LiveTranscription.stories.d.ts +0 -19
  245. package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +0 -1
  246. package/dist/types/src/stories/ProperNounExtraction.stories.d.ts +0 -13
  247. package/dist/types/src/stories/ProperNounExtraction.stories.d.ts.map +0 -1
  248. package/dist/types/src/stories/TranscriptionStory.d.ts +0 -21
  249. package/dist/types/src/stories/TranscriptionStory.d.ts.map +0 -1
  250. package/dist/types/src/stories/common.d.ts +0 -248
  251. package/dist/types/src/stories/common.d.ts.map +0 -1
  252. package/dist/types/src/transcriber/audio-recorder.d.ts +0 -47
  253. package/dist/types/src/transcriber/audio-recorder.d.ts.map +0 -1
  254. package/dist/types/src/transcriber/index.d.ts +0 -5
  255. package/dist/types/src/transcriber/index.d.ts.map +0 -1
  256. package/dist/types/src/transcriber/media-stream-recorder.d.ts +0 -30
  257. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +0 -1
  258. package/dist/types/src/transcriber/transcriber.browser.test.d.ts +0 -2
  259. package/dist/types/src/transcriber/transcriber.browser.test.d.ts.map +0 -1
  260. package/dist/types/src/transcriber/transcriber.d.ts +0 -105
  261. package/dist/types/src/transcriber/transcriber.d.ts.map +0 -1
  262. package/dist/types/src/transcriber/transcriber.test.d.ts +0 -2
  263. package/dist/types/src/transcriber/transcriber.test.d.ts.map +0 -1
  264. package/dist/types/src/transcriber/transcription-manager.d.ts.map +0 -1
  265. package/dist/types/src/util/array.d.ts +0 -2
  266. package/dist/types/src/util/array.d.ts.map +0 -1
  267. package/dist/types/src/util/render-byline.d.ts +0 -4
  268. package/dist/types/src/util/render-byline.d.ts.map +0 -1
  269. package/src/blueprints/index.ts +0 -5
  270. package/src/blueprints/transcription-blueprint.ts +0 -29
  271. package/src/capabilities/blueprint-definition.ts +0 -19
  272. package/src/components/Oracle/Oracle.stories.tsx +0 -147
  273. package/src/components/Oracle/Oracle.tsx +0 -142
  274. package/src/components/Oracle/index.ts +0 -5
  275. package/src/components/Transcription/Transcription.stories.tsx +0 -213
  276. package/src/components/Transcription/Transcription.tsx +0 -55
  277. package/src/components/Transcription/index.ts +0 -5
  278. package/src/components/Transcription/transcription-extension.ts +0 -203
  279. package/src/enrichment/conversation.test.ts +0 -162
  280. package/src/enrichment/conversation.txt +0 -23
  281. package/src/enrichment/operations.ts +0 -271
  282. package/src/enrichment/parser.ts +0 -101
  283. package/src/enrichment/stream-simulator.ts +0 -125
  284. package/src/hooks/useAudioFile.ts +0 -88
  285. package/src/hooks/useAudioTrack.ts +0 -35
  286. package/src/hooks/useFeedModelAdapter.ts +0 -46
  287. package/src/hooks/useTranscriber.ts +0 -47
  288. package/src/hooks/useVoiceInput.ts +0 -66
  289. package/src/model/index.ts +0 -5
  290. package/src/model/model.test.ts +0 -175
  291. package/src/model/model.ts +0 -229
  292. package/src/stories/FileTranscription.stories.tsx +0 -143
  293. package/src/stories/KeyWordRecognition.stories.tsx +0 -132
  294. package/src/stories/LiveTranscription.stories.tsx +0 -99
  295. package/src/stories/ProperNounExtraction.stories.tsx +0 -99
  296. package/src/stories/TranscriptionStory.tsx +0 -101
  297. package/src/stories/common.ts +0 -234
  298. package/src/transcriber/audio-recorder.ts +0 -56
  299. package/src/transcriber/index.ts +0 -8
  300. package/src/transcriber/media-stream-recorder.ts +0 -120
  301. package/src/transcriber/transcriber.browser.test.ts +0 -230
  302. package/src/transcriber/transcriber.test.ts +0 -104
  303. package/src/transcriber/transcriber.ts +0 -303
  304. package/src/util/array.ts +0 -14
  305. package/src/util/render-byline.ts +0 -33
  306. /package/dist/lib/neutral/{chunk-J4ONEYPJ.mjs.map → chunk-HNXSU7HJ.mjs.map} +0 -0
  307. /package/dist/lib/neutral/{create-7NGOP7JP.mjs.map → create-HNHGCKZ4.mjs.map} +0 -0
  308. /package/dist/lib/neutral/{enrich-message-F2AOM53F.mjs.map → enrich-message-DSJU4TXC.mjs.map} +0 -0
  309. /package/dist/lib/neutral/{blueprints → skills}/index.mjs.map +0 -0
@@ -0,0 +1,263 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { useAtomCapability, useAtomCapabilityState, useCapabilities } from '@dxos/app-framework/ui';
10
+ import { log } from '@dxos/log';
11
+ import { MarkdownCapabilities } from '@dxos/plugin-markdown/types';
12
+ import { useAudioTrack, useTranscriber } from '@dxos/react-ui-transcription';
13
+ import { linkEntities } from '@dxos/transcription-pipeline';
14
+ import { type ContentBlock } from '@dxos/types';
15
+ import { PendingTextStreamer, cancelPendingText, editorPendingTextSink, pendingTextState } from '@dxos/ui-editor';
16
+
17
+ import { meta } from '#meta';
18
+ import { TranscriptionCapabilities } from '#types';
19
+
20
+ // Recorder chunk interval; the transcriber's chunk threshold is derived from the buffering setting.
21
+ const RECORDER_INTERVAL_MS = 200;
22
+
23
+ /**
24
+ * Headless controller driving live transcription into a Markdown editor. Reads the active recording
25
+ * session, captures audio while recording, and dispatches the transcribed text into the target
26
+ * editor as pending-text effects. The user confirms or discards the pending text via the editor's
27
+ * inline affordances. Mounted once, app-wide, via `Capabilities.ReactContext`.
28
+ */
29
+ const TranscriptionDriver = () => {
30
+ const [session, setSession] = useAtomCapabilityState(TranscriptionCapabilities.RecordingSession);
31
+ // `useCapabilities` (not `useCapability`) so the driver does not throw when plugin-markdown is absent.
32
+ const [editorViews] = useCapabilities(MarkdownCapabilities.EditorViews);
33
+ // Injected entity resolver (full-text/vector/…); the driver stays decoupled from the database.
34
+ const [lookup] = useCapabilities(TranscriptionCapabilities.EntityLookup);
35
+ const settings = useAtomCapability(TranscriptionCapabilities.Settings);
36
+
37
+ const [, setStatus] = useAtomCapabilityState(TranscriptionCapabilities.PipelineStatus);
38
+
39
+ const recording = session?.recording ?? false;
40
+ const liveSessionId = session?.id;
41
+
42
+ // Only this driver's editor-backed sessions are captured here: if no editor view is registered for
43
+ // the session there is nowhere to stream transcription, so the driver stays idle and leaves the
44
+ // mic to whoever owns that session (e.g. a non-editor consumer running its own transcriber).
45
+ const hasEditorForSession = !!(liveSessionId && editorViews?.get(liveSessionId));
46
+
47
+ // Lifecycle phase. Driven from `recording` via an effect (not derived synchronously) so that when
48
+ // the mic switches off the phase is still 'recording' for that commit — nothing tears down until
49
+ // the drain finishes and sets 'idle'. This lets the final transcription + enrichment complete.
50
+ const [phase, setPhase] = useState<'idle' | 'recording' | 'draining'>('idle');
51
+ const active = phase !== 'idle';
52
+
53
+ // The toolbar clears the RecordingSession on stop, but the driver must keep targeting the same
54
+ // editor through the drain — capture the session id for the lifetime of the active phase (the
55
+ // editor stays open). Cleared once the phase returns to idle.
56
+ const [sessionId, setSessionId] = useState<string>();
57
+ useEffect(() => {
58
+ if (recording && liveSessionId && hasEditorForSession) {
59
+ setSessionId(liveSessionId);
60
+ }
61
+ }, [recording, liveSessionId, hasEditorForSession]);
62
+
63
+ useEffect(() => {
64
+ setPhase((current) =>
65
+ recording && hasEditorForSession ? 'recording' : current === 'recording' ? 'draining' : current,
66
+ );
67
+ }, [recording, hasEditorForSession]);
68
+
69
+ useEffect(() => {
70
+ if (phase === 'idle') {
71
+ setSessionId(undefined);
72
+ }
73
+ }, [phase]);
74
+
75
+ // Publish the phase so the toolbar / testbench can reflect mic + pipeline state in real time.
76
+ useEffect(() => {
77
+ setStatus(() => ({ phase }));
78
+ }, [phase, setStatus]);
79
+
80
+ // `ideal` (not `exact`) so an unavailable device falls back to the default rather than failing.
81
+ const audioConstraints = useMemo<MediaTrackConstraints | undefined>(
82
+ () => (settings?.audioDeviceId ? { deviceId: { ideal: settings.audioDeviceId } } : undefined),
83
+ [settings?.audioDeviceId],
84
+ );
85
+
86
+ // Keep the track (and thus the transcriber) alive across the whole active session — including the
87
+ // drain — so the transcriber can flush its buffered audio before teardown. Released at idle. The
88
+ // mic indicator therefore lingers for the brief drain after stop.
89
+ const track = useAudioTrack(active, audioConstraints);
90
+
91
+ // Refs so `handleSegments` stays stable (changing it would recreate the transcriber).
92
+ const sessionIdRef = useRef(sessionId);
93
+ sessionIdRef.current = sessionId;
94
+ const editorViewsRef = useRef(editorViews);
95
+ editorViewsRef.current = editorViews;
96
+
97
+ // The user cancelled (✕) if the pending decoration was cleared mid-session; guards against
98
+ // resurrecting it with late transcription / post-process writes during the drain.
99
+ const isCancelled = useCallback(() => {
100
+ const id = sessionIdRef.current;
101
+ const view = id ? editorViewsRef.current?.get(id)?.view : undefined;
102
+ return view ? view.state.field(pendingTextState, false) == null : false;
103
+ }, []);
104
+
105
+ // Streams transcribed text into the editor's pending-text block (buffering + word-by-word reveal).
106
+ // Kept alive across the whole session (incl. drain); disposed only when the phase returns to idle.
107
+ const streamerRef = useRef<PendingTextStreamer | null>(null);
108
+
109
+ useEffect(() => {
110
+ if (!active || !editorViews || !sessionId) {
111
+ return;
112
+ }
113
+ const entry = editorViews.get(sessionId);
114
+ if (!entry) {
115
+ return;
116
+ }
117
+
118
+ // Clicking the toolbar blurs the editor and hides the caret, so anchor + placeholder give
119
+ // immediate feedback while the first transcription is buffered.
120
+ // When entity extraction is enabled and a lookup is available, rewrite settled text with inline
121
+ // `[noun](echo:/<id>)` links — decorated as dx-anchors by the markdown editor's preview extension.
122
+ const entityExtraction = settings?.entityExtraction !== false;
123
+ const streamer = new PendingTextStreamer(editorPendingTextSink(entry.view), {
124
+ mode: settings?.streamMode ?? 'word',
125
+ wordIntervalMs: settings?.wordIntervalMs ?? 80,
126
+ postProcess: entityExtraction && lookup ? (text) => linkEntities(text, lookup) : undefined,
127
+ });
128
+ streamer.start({ anchor: entry.view.state.selection.main.head, placeholder: 'Recording…' });
129
+ streamerRef.current = streamer;
130
+
131
+ return () => {
132
+ streamer.dispose();
133
+ streamerRef.current = null;
134
+ // On teardown, drop the placeholder if nothing was transcribed; otherwise leave it for review.
135
+ const current = editorViews.get(sessionId);
136
+ const pending = current?.view.state.field(pendingTextState, false);
137
+ if (current && pending && pending.final.length === 0) {
138
+ current.view.dispatch({ effects: cancelPendingText.of() });
139
+ }
140
+ };
141
+ }, [
142
+ active,
143
+ sessionId,
144
+ editorViews,
145
+ lookup,
146
+ settings?.streamMode,
147
+ settings?.wordIntervalMs,
148
+ settings?.entityExtraction,
149
+ ]);
150
+
151
+ const handleSegments = useCallback(
152
+ async (segments: ContentBlock.Transcript[]) => {
153
+ const text = segments
154
+ .map((segment) => segment.text)
155
+ .join(' ')
156
+ .trim();
157
+ if (text.length > 0 && !isCancelled()) {
158
+ streamerRef.current?.push(text);
159
+ }
160
+ },
161
+ [isCancelled],
162
+ );
163
+
164
+ // Derive the transcriber's chunk threshold from the configured initial buffering time.
165
+ const transcriberConfig = useMemo(
166
+ () => ({
167
+ transcribeAfterChunksAmount: Math.max(
168
+ 1,
169
+ Math.round((settings?.transcribeAfterMs ?? 4000) / RECORDER_INTERVAL_MS),
170
+ ),
171
+ }),
172
+ [settings?.transcribeAfterMs],
173
+ );
174
+
175
+ // Stable identity: a fresh object would change useTranscriber's memo deps every render, recreating
176
+ // (and reopening) the transcriber and discarding its buffered audio.
177
+ const recorderConfig = useMemo(() => ({ interval: RECORDER_INTERVAL_MS }), []);
178
+ const transcriber = useTranscriber({
179
+ audioStreamTrack: track,
180
+ onSegments: handleSegments,
181
+ transcriberConfig,
182
+ recorderConfig,
183
+ });
184
+ const transcriberRef = useRef(transcriber);
185
+ transcriberRef.current = transcriber;
186
+
187
+ useEffect(() => {
188
+ if (!transcriber) {
189
+ return;
190
+ }
191
+ let cancelled = false;
192
+ // Clear the session if `open()` rejects (e.g. mic permission denied) so the toolbar does not
193
+ // report "stop" forever while nothing is captured.
194
+ void transcriber.open().then(
195
+ () => {
196
+ if (!cancelled && phase === 'recording') {
197
+ transcriber.startChunksRecording();
198
+ }
199
+ },
200
+ (err) => {
201
+ if (!cancelled) {
202
+ log.catch(err);
203
+ setSession(() => null);
204
+ }
205
+ },
206
+ );
207
+ return () => {
208
+ cancelled = true;
209
+ };
210
+ }, [transcriber, phase, setSession]);
211
+
212
+ // Drain on stop: flush buffered audio (final transcription) and the streamer's post-process
213
+ // (entity linking) before tearing down — so the tail of speech and its enrichment are not lost.
214
+ useEffect(() => {
215
+ if (phase !== 'draining') {
216
+ return;
217
+ }
218
+ let cancelled = false;
219
+ // Hard-abort the in-flight transcription request if the user cancels (✕) during the drain.
220
+ const abortTimer = setInterval(() => {
221
+ if (isCancelled()) {
222
+ transcriberRef.current?.abort();
223
+ }
224
+ }, 150);
225
+ void (async () => {
226
+ try {
227
+ // Flush buffered audio (final transcription) then settle the streamer's post-process, unless
228
+ // the user cancelled (✕) — in which case skip the writes so the decoration stays cleared.
229
+ await transcriberRef.current?.flush();
230
+ if (!isCancelled()) {
231
+ await streamerRef.current?.flush();
232
+ }
233
+ } catch (err) {
234
+ log.catch(err);
235
+ } finally {
236
+ clearInterval(abortTimer);
237
+ if (!cancelled) {
238
+ setPhase((current) => (current === 'draining' ? 'idle' : current));
239
+ }
240
+ }
241
+ })();
242
+ return () => {
243
+ cancelled = true;
244
+ clearInterval(abortTimer);
245
+ };
246
+ }, [phase, isCancelled]);
247
+
248
+ return null;
249
+ };
250
+
251
+ export default Capability.makeModule(
252
+ Effect.fnUntraced(function* () {
253
+ return Capability.contributes(Capabilities.ReactContext, {
254
+ id: meta.profile.key,
255
+ context: ({ children }) => (
256
+ <Fragment>
257
+ {children}
258
+ <TranscriptionDriver />
259
+ </Fragment>
260
+ ),
261
+ });
262
+ }),
263
+ );
@@ -0,0 +1,66 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React, { useState } from 'react';
7
+
8
+ import { MicButton, Toolbar } from '@dxos/react-ui';
9
+ import { type AudioInputDevice, MicSettings, type RecordMode } from '@dxos/react-ui-transcription';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+
12
+ import { meta as pluginMeta } from '#meta';
13
+ import { translations } from '#translations';
14
+
15
+ const DEVICES: AudioInputDevice[] = [
16
+ { deviceId: 'default', label: 'Default — MacBook Pro Microphone' },
17
+ { deviceId: 'usb-1', label: 'USB Audio Interface' },
18
+ { deviceId: 'bt-1', label: 'AirPods Pro' },
19
+ ];
20
+
21
+ // Drives the presentational pieces from local state so the dropdown, mode switch, and
22
+ // press-and-hold can be exercised without capabilities.
23
+ const DefaultStory = () => {
24
+ const [recording, setRecording] = useState(false);
25
+ const [recordMode, setRecordMode] = useState<RecordMode>('toggle');
26
+ const [entityExtraction, setEntityExtraction] = useState(true);
27
+ const [selectedDeviceId, setSelectedDeviceId] = useState('');
28
+
29
+ return (
30
+ <Toolbar.Root>
31
+ <MicButton
32
+ iconOnly
33
+ variant='ghost'
34
+ label={recording ? 'Stop recording' : recordMode === 'hold' ? 'Hold to record' : 'Start recording'}
35
+ recording={recording}
36
+ mode={recordMode}
37
+ onToggle={() => setRecording((value) => !value)}
38
+ onPressStart={() => setRecording(true)}
39
+ onPressEnd={() => setRecording(false)}
40
+ />
41
+ <MicSettings
42
+ translationNs={pluginMeta.profile.key}
43
+ recordMode={recordMode}
44
+ entityExtraction={entityExtraction}
45
+ devices={DEVICES}
46
+ selectedDeviceId={selectedDeviceId}
47
+ onRecordModeChange={setRecordMode}
48
+ onEntityExtractionChange={setEntityExtraction}
49
+ onSelectDevice={setSelectedDeviceId}
50
+ />
51
+ </Toolbar.Root>
52
+ );
53
+ };
54
+
55
+ const meta = {
56
+ title: 'plugins/plugin-transcription/components/Mic',
57
+ render: DefaultStory,
58
+ decorators: [withTheme(), withLayout({ layout: 'centered' })],
59
+ parameters: { translations },
60
+ } satisfies Meta<typeof DefaultStory>;
61
+
62
+ export default meta;
63
+
64
+ type Story = StoryObj<typeof meta>;
65
+
66
+ export const Default: Story = {};
@@ -0,0 +1,136 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
6
+
7
+ import { useAtomCapabilityState } from '@dxos/app-framework/ui';
8
+ import { MicButton, useTranslation } from '@dxos/react-ui';
9
+ import { useSoundEffect } from '@dxos/react-ui-audio';
10
+ import { type AudioInputDevice, MicSettings } from '@dxos/react-ui-transcription';
11
+
12
+ import { meta } from '#meta';
13
+ import { type Settings, TranscriptionCapabilities } from '#types';
14
+
15
+ export type MicProps = {
16
+ /** Attendable id of the target editor; keys the recording session. */
17
+ docId: string;
18
+ };
19
+
20
+ /**
21
+ * Connects the {@link MicButton} and {@link MicSettings} to the recording session and settings
22
+ * capabilities, and enumerates available audio inputs. Mounted from the toolbar's custom action, so
23
+ * capability hooks resolve.
24
+ */
25
+ export const Mic = ({ docId }: MicProps) => {
26
+ const { t } = useTranslation(meta.profile.key);
27
+ const [session, setSession] = useAtomCapabilityState(TranscriptionCapabilities.RecordingSession);
28
+ const [settings, setSettings] = useAtomCapabilityState(TranscriptionCapabilities.Settings);
29
+
30
+ const recording = !!session?.recording && session.id === docId;
31
+
32
+ // Play start/stop cues as this session's recording flag flips (skip the initial mount).
33
+ const soundStart = useSoundEffect('StartRecording');
34
+ const soundStop = useSoundEffect('StopRecording');
35
+ const wasRecording = useRef(recording);
36
+ useEffect(() => {
37
+ if (wasRecording.current === recording) {
38
+ return;
39
+ }
40
+ wasRecording.current = recording;
41
+ void (recording ? soundStart : soundStop).play();
42
+ }, [recording, soundStart, soundStop]);
43
+
44
+ const recordMode: Settings.RecordMode = settings?.recordMode ?? 'toggle';
45
+ const entityExtraction = settings?.entityExtraction !== false;
46
+ const selectedDeviceId = settings?.audioDeviceId ?? '';
47
+
48
+ const [devices, setDevices] = useState<AudioInputDevice[]>([]);
49
+ useEffect(() => {
50
+ if (!navigator.mediaDevices?.enumerateDevices) {
51
+ return;
52
+ }
53
+ let cancelled = false;
54
+ const refresh = async () => {
55
+ const all = await navigator.mediaDevices.enumerateDevices();
56
+ if (cancelled) {
57
+ return;
58
+ }
59
+ // Labels are blank until microphone permission is granted; fall back to an ordinal name.
60
+ setDevices(
61
+ all
62
+ .filter((device) => device.kind === 'audioinput' && device.deviceId)
63
+ .map((device, index) => ({
64
+ deviceId: device.deviceId,
65
+ label: device.label || `Microphone ${index + 1}`,
66
+ })),
67
+ );
68
+ };
69
+ void refresh();
70
+ navigator.mediaDevices.addEventListener('devicechange', refresh);
71
+ return () => {
72
+ cancelled = true;
73
+ navigator.mediaDevices.removeEventListener('devicechange', refresh);
74
+ };
75
+ }, []);
76
+
77
+ const handleToggle = useCallback(() => {
78
+ setSession((current) => (current?.recording && current.id === docId ? null : { id: docId, recording: true }));
79
+ }, [setSession, docId]);
80
+
81
+ const handlePressStart = useCallback(() => {
82
+ setSession(() => ({ id: docId, recording: true }));
83
+ }, [setSession, docId]);
84
+
85
+ const handlePressEnd = useCallback(() => {
86
+ // Only stop our own session; a stray release must not clear another editor's recording.
87
+ setSession((current) => (current?.id === docId ? null : current));
88
+ }, [setSession, docId]);
89
+
90
+ const handleRecordModeChange = useCallback(
91
+ (mode: Settings.RecordMode) => setSettings((current) => ({ ...current, recordMode: mode })),
92
+ [setSettings],
93
+ );
94
+
95
+ const handleEntityExtractionChange = useCallback(
96
+ (value: boolean) => setSettings((current) => ({ ...current, entityExtraction: value })),
97
+ [setSettings],
98
+ );
99
+
100
+ const handleSelectDevice = useCallback(
101
+ (deviceId: string) => setSettings((current) => ({ ...current, audioDeviceId: deviceId || undefined })),
102
+ [setSettings],
103
+ );
104
+
105
+ const recordLabel = recording
106
+ ? t('stop-recording.label')
107
+ : recordMode === 'hold'
108
+ ? t('hold-to-record.label')
109
+ : t('start-recording.label');
110
+
111
+ return (
112
+ <div className='flex items-center'>
113
+ <MicButton
114
+ iconOnly
115
+ variant='ghost'
116
+ label={recordLabel}
117
+ recording={recording}
118
+ mode={recordMode}
119
+ onToggle={handleToggle}
120
+ onPressStart={handlePressStart}
121
+ onPressEnd={handlePressEnd}
122
+ data-testid='transcription.record'
123
+ />
124
+ <MicSettings
125
+ translationNs={meta.profile.key}
126
+ recordMode={recordMode}
127
+ entityExtraction={entityExtraction}
128
+ devices={devices}
129
+ selectedDeviceId={selectedDeviceId}
130
+ onRecordModeChange={handleRecordModeChange}
131
+ onEntityExtractionChange={handleEntityExtractionChange}
132
+ onSelectDevice={handleSelectDevice}
133
+ />
134
+ </div>
135
+ );
136
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './Mic';
@@ -2,5 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './Oracle';
6
- export * from './Transcription';
5
+ export * from './Mic';
@@ -7,6 +7,7 @@ import * as Effect from 'effect/Effect';
7
7
  import React from 'react';
8
8
 
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import { AppActivationEvents } from '@dxos/app-toolkit';
10
11
  import { Feed, Query, Ref } from '@dxos/echo';
11
12
  import { ClientPlugin, initializeIdentity } from '@dxos/plugin-client/testing';
12
13
  import { corePlugins } from '@dxos/plugin-testing';
@@ -36,6 +37,9 @@ const meta = {
36
37
  decorators: [
37
38
  withLayout({ layout: 'column' }),
38
39
  withPluginManager({
40
+ // The app-wide TranscriptionDriver (ReactContext) reads the recording-session/settings
41
+ // capabilities, which activate on SetupSettings — fire it so the driver does not throw.
42
+ setupEvents: [AppActivationEvents.SetupSettings],
39
43
  plugins: [
40
44
  ...corePlugins(),
41
45
  ClientPlugin({
@@ -9,14 +9,12 @@ import { Filter, Obj, Query } from '@dxos/echo';
9
9
  import { useMembers, useQuery } from '@dxos/react-client/echo';
10
10
  import { Panel } from '@dxos/react-ui';
11
11
  import { Menu, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';
12
+ import { Transcription, renderByline, useFeedModelAdapter } from '@dxos/react-ui-transcription';
12
13
  import { Message, type Transcript } from '@dxos/types';
13
14
 
14
- import { Transcription } from '#components';
15
- import { useFeedModelAdapter, useTranscriptionRecording } from '#hooks';
15
+ import { useTranscriptionRecording } from '#hooks';
16
16
  import { meta } from '#meta';
17
17
 
18
- import { renderByline } from '../../util';
19
-
20
18
  export type TranscriptionArticleProps = AppSurface.ObjectArticleProps<Transcript.Transcript>;
21
19
 
22
20
  export const TranscriptionArticle = ({ role, subject: transcript, attendableId }: TranscriptionArticleProps) => {
@@ -28,8 +26,9 @@ export const TranscriptionArticle = ({ role, subject: transcript, attendableId }
28
26
  feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()),
29
27
  );
30
28
  const model = useFeedModelAdapter(renderByline(members), messages);
31
- const { recording, toggleRecording } = useTranscriptionRecording(transcript);
32
29
 
30
+ // TODO(burdon): Remove if not mutable. E.g., finalized transcript.
31
+ const { recording, toggleRecording } = useTranscriptionRecording(transcript);
33
32
  const menuActions = useMenuBuilder(
34
33
  () =>
35
34
  MenuBuilder.make()
@@ -2,9 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './useAudioFile';
6
- export * from './useAudioTrack';
7
- export * from './useFeedModelAdapter';
8
- export * from './useTranscriber';
9
5
  export * from './useTranscriptionRecording';
10
- export * from './useVoiceInput';
@@ -6,18 +6,15 @@ import * as Effect from 'effect/Effect';
6
6
  import { useCallback, useEffect, useState } from 'react';
7
7
 
8
8
  import { useAtomCapability, useOperationInvoker } from '@dxos/app-framework/ui';
9
- import { createFeedServiceLayer } from '@dxos/client/echo';
10
- import { Feed, Obj } from '@dxos/echo';
9
+ import { Database, Feed, Obj } from '@dxos/echo';
11
10
  import { EffectEx } from '@dxos/effect';
12
11
  import { log } from '@dxos/log';
13
12
  import { getSpace } from '@dxos/react-client/echo';
14
13
  import { useIdentity } from '@dxos/react-client/halo';
14
+ import { useAudioTrack, useTranscriber } from '@dxos/react-ui-transcription';
15
15
  import { Message, type Transcript } from '@dxos/types';
16
16
 
17
- import { TranscriptOperation, TranscriptionCapabilities } from '#types';
18
-
19
- import { useAudioTrack } from './useAudioTrack';
20
- import { useTranscriber } from './useTranscriber';
17
+ import { TranscriptionCapabilities, TranscriptOperation } from '#types';
21
18
 
22
19
  export type TranscriptionRecording = {
23
20
  recording: boolean;
@@ -68,8 +65,7 @@ export const useTranscriptionRecording = (transcript: Transcript.Transcript): Tr
68
65
  }
69
66
  }
70
67
 
71
- const feedServiceLayer = createFeedServiceLayer(space.db);
72
- await Feed.append(feed, [message]).pipe(Effect.provide(feedServiceLayer), EffectEx.runAndForwardErrors);
68
+ await Feed.append(feed, [message]).pipe(Effect.provide(Database.layer(space.db)), EffectEx.runAndForwardErrors);
73
69
  },
74
70
  [space, feed, identity, invokePromise, settings],
75
71
  );
package/src/index.ts CHANGED
@@ -2,10 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- // TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
6
- // Either refactor callers to not need them or factor them out to a shared package.
7
- export * from './blueprints';
8
- export * from './hooks';
9
5
  export * from './meta';
10
- export * from './transcriber';
6
+ export * from './skills';
11
7
  export * from './types';
@@ -7,7 +7,7 @@ import type * as Runtime from 'effect/Runtime';
7
7
 
8
8
  import { DeferredTask, asyncTimeout } from '@dxos/async';
9
9
  import { LifecycleState, Resource } from '@dxos/context';
10
- import { Feed, Filter } from '@dxos/echo';
10
+ import { Database, Feed, Filter } from '@dxos/echo';
11
11
  import { EffectEx } from '@dxos/effect';
12
12
  import { type FunctionExecutor } from '@dxos/functions-runtime';
13
13
  import { log } from '@dxos/log';
@@ -22,7 +22,7 @@ const MAX_RANGE_ID_COUNT = 10;
22
22
  export type SegmentsNormalizerProps = {
23
23
  functionExecutor: FunctionExecutor;
24
24
  feed: Feed.Feed;
25
- feedRuntime: Runtime.Runtime<Feed.FeedService>;
25
+ feedRuntime: Runtime.Runtime<Database.Service>;
26
26
  startingCursor: QueueCursor;
27
27
  };
28
28
 
@@ -36,7 +36,7 @@ export class MessageNormalizer extends Resource {
36
36
  private readonly _functionExecutor: FunctionExecutor;
37
37
 
38
38
  private _feed: Feed.Feed;
39
- private _feedRuntime: Runtime.Runtime<Feed.FeedService>;
39
+ private _feedRuntime: Runtime.Runtime<Database.Service>;
40
40
  private _cursor: QueueCursor;
41
41
  private _messagesToProcess: MessageWithRangeId[] = [];
42
42
  private _normalizationTask?: DeferredTask;
@@ -7,6 +7,9 @@ import * as Schema from 'effect/Schema';
7
7
 
8
8
  import { Operation } from '@dxos/compute';
9
9
  import { log } from '@dxos/log';
10
+ // Imported so TypeScript can name these types in the emitted .d.ts.
11
+ // eslint-disable-next-line unused-imports/no-unused-imports
12
+ import { type Message, type Person } from '@dxos/types';
10
13
  import { trim } from '@dxos/util';
11
14
 
12
15
  import { TranscriptOperation } from '../types';
@@ -6,17 +6,17 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Operation } from '@dxos/compute';
8
8
  import { Database, Feed, Filter } from '@dxos/echo';
9
+ import { renderByline } from '@dxos/react-ui-transcription';
9
10
  import { Message } from '@dxos/types';
10
11
 
11
12
  import { TranscriptOperation } from '../types';
12
- import { renderByline } from '../util';
13
13
 
14
14
  const handler: Operation.WithHandler<typeof TranscriptOperation.Open> = TranscriptOperation.Open.pipe(
15
15
  Operation.withHandler(
16
16
  Effect.fn(function* ({ transcript }) {
17
17
  const transcriptObj = yield* Database.load(transcript);
18
18
  const feed = yield* Database.load(transcriptObj.feed);
19
- const messages = yield* Feed.runQuery(feed, Filter.type(Message.Message));
19
+ const messages = yield* Feed.query(feed, Filter.type(Message.Message)).run;
20
20
  const content = messages
21
21
  .flatMap((message: Message.Message, index: number) => renderByline([])(message, index))
22
22
  .join('\n\n');
@@ -10,7 +10,7 @@ import * as Option from 'effect/Option';
10
10
 
11
11
  import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
12
12
  import { AiRequest, GenerationObserver } from '@dxos/assistant';
13
- import { Trace, Operation } from '@dxos/compute';
13
+ import { Operation, Trace } from '@dxos/compute';
14
14
  import { Database } from '@dxos/echo';
15
15
  import { registryLayerNoop } from '@dxos/echo/testing';
16
16
  import { trim } from '@dxos/util';
@@ -49,7 +49,7 @@ const handler: Operation.WithHandler<typeof TranscriptOperation.Summarize> = Tra
49
49
  },
50
50
  Effect.provide(
51
51
  Layer.mergeAll(
52
- AiService.model('ai.claude.model.claude-sonnet-4-6'),
52
+ AiService.model('com.anthropic.model.claude-sonnet-4-6.default'),
53
53
  ToolResolverService.layerEmpty,
54
54
  ToolExecutionService.layerEmpty,
55
55
  Trace.writerLayerNoop,
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { default as TranscriptionSkill } from './transcription-skill';