@dxos/plugin-transcription 0.8.4-main.abd8ff62ef → 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 (262) 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/{browser/chunk-NQQK7UZQ.mjs → neutral/chunk-2O3ONPRZ.mjs} +94 -40
  17. package/dist/lib/neutral/chunk-2O3ONPRZ.mjs.map +7 -0
  18. package/dist/lib/{browser/chunk-L4HW35L6.mjs → neutral/chunk-5FXU36PN.mjs} +19 -10
  19. package/dist/lib/neutral/chunk-5FXU36PN.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-GL4RS533.mjs +22 -0
  21. package/dist/lib/neutral/chunk-GL4RS533.mjs.map +7 -0
  22. package/dist/lib/{browser/index.mjs → neutral/chunk-ILSA3DU7.mjs} +32 -70
  23. package/dist/lib/neutral/chunk-ILSA3DU7.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-Y5EQAFFR.mjs +8 -0
  25. package/dist/lib/neutral/chunk-Y5EQAFFR.mjs.map +7 -0
  26. package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-ZR4BH4QQ.mjs} +4 -5
  27. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
  28. package/dist/lib/{browser → neutral}/components/index.mjs +83 -18
  29. package/dist/lib/neutral/components/index.mjs.map +7 -0
  30. package/dist/lib/neutral/containers/index.mjs +9 -0
  31. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  32. package/dist/lib/{browser/create-ULR5DPJZ.mjs → neutral/create-RRWRIUSR.mjs} +4 -4
  33. package/dist/lib/neutral/create-RRWRIUSR.mjs.map +7 -0
  34. package/dist/lib/{browser → neutral}/hooks/index.mjs +5 -3
  35. package/dist/lib/neutral/index.mjs +44 -0
  36. package/dist/lib/neutral/meta.json +1 -0
  37. package/dist/lib/neutral/meta.mjs +8 -0
  38. package/dist/lib/{browser/open-SFMPLZVW.mjs → neutral/open-CVMX5KXZ.mjs} +5 -5
  39. package/dist/lib/neutral/open-CVMX5KXZ.mjs.map +7 -0
  40. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
  41. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
  42. package/dist/lib/neutral/operations/index.mjs +8 -0
  43. package/dist/lib/neutral/plugin.mjs +16 -0
  44. package/dist/lib/neutral/plugin.mjs.map +7 -0
  45. package/dist/lib/neutral/react-surface-YMZRO242.mjs +26 -0
  46. package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +7 -0
  47. package/dist/lib/{browser/summarize-BDFX4APN.mjs → neutral/summarize-LA7TRW7A.mjs} +5 -5
  48. package/dist/lib/neutral/summarize-LA7TRW7A.mjs.map +7 -0
  49. package/dist/lib/neutral/text-content-F4ASMITB.mjs +30 -0
  50. package/dist/lib/neutral/text-content-F4ASMITB.mjs.map +7 -0
  51. package/dist/lib/neutral/transcriber-ABHATBVH.mjs +59 -0
  52. package/dist/lib/neutral/transcriber-ABHATBVH.mjs.map +7 -0
  53. package/dist/lib/neutral/translations.mjs +24 -0
  54. package/dist/lib/neutral/translations.mjs.map +7 -0
  55. package/dist/lib/neutral/types/index.mjs +10 -0
  56. package/dist/lib/neutral/types/index.mjs.map +7 -0
  57. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  58. package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -1
  59. package/dist/types/src/TranscriptionPlugin.workerd.d.ts +4 -0
  60. package/dist/types/src/TranscriptionPlugin.workerd.d.ts.map +1 -0
  61. package/dist/types/src/capabilities/index.d.ts +5 -1
  62. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/text-content.d.ts +8 -0
  64. package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
  65. package/dist/types/src/components/Oracle/Oracle.d.ts +24 -0
  66. package/dist/types/src/components/Oracle/Oracle.d.ts.map +1 -0
  67. package/dist/types/src/components/Oracle/Oracle.stories.d.ts +32 -0
  68. package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +1 -0
  69. package/dist/types/src/components/Oracle/index.d.ts +2 -0
  70. package/dist/types/src/components/Oracle/index.d.ts.map +1 -0
  71. package/dist/types/src/components/Transcription/Transcription.d.ts +0 -5
  72. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
  73. package/dist/types/src/components/Transcription/Transcription.stories.d.ts +13 -16
  74. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -1
  75. package/dist/types/src/components/index.d.ts +1 -0
  76. package/dist/types/src/components/index.d.ts.map +1 -1
  77. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +6 -0
  78. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -0
  79. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +28 -0
  80. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -0
  81. package/dist/types/src/containers/TranscriptionArticle/index.d.ts +2 -0
  82. package/dist/types/src/containers/TranscriptionArticle/index.d.ts.map +1 -0
  83. package/dist/types/src/containers/index.d.ts +1 -1
  84. package/dist/types/src/containers/index.d.ts.map +1 -1
  85. package/dist/types/src/enrichment/conversation.test.d.ts +2 -0
  86. package/dist/types/src/enrichment/conversation.test.d.ts.map +1 -0
  87. package/dist/types/src/enrichment/operations.d.ts +200 -0
  88. package/dist/types/src/enrichment/operations.d.ts.map +1 -0
  89. package/dist/types/src/enrichment/parser.d.ts +26 -0
  90. package/dist/types/src/enrichment/parser.d.ts.map +1 -0
  91. package/dist/types/src/enrichment/stream-simulator.d.ts +38 -0
  92. package/dist/types/src/enrichment/stream-simulator.d.ts.map +1 -0
  93. package/dist/types/src/hooks/index.d.ts +2 -1
  94. package/dist/types/src/hooks/index.d.ts.map +1 -1
  95. package/dist/types/src/hooks/useFeedModelAdapter.d.ts +12 -0
  96. package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +1 -0
  97. package/dist/types/src/hooks/useTranscriptionRecording.d.ts +12 -0
  98. package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -0
  99. package/dist/types/src/index.d.ts +3 -4
  100. package/dist/types/src/index.d.ts.map +1 -1
  101. package/dist/types/src/normalization/message-normalizer.d.ts +7 -5
  102. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
  103. package/dist/types/src/normalization/normalization.d.ts +180 -1
  104. package/dist/types/src/normalization/normalization.d.ts.map +1 -1
  105. package/dist/types/src/operations/create.d.ts +2 -2
  106. package/dist/types/src/operations/create.d.ts.map +1 -1
  107. package/dist/types/src/operations/index.d.ts +0 -1
  108. package/dist/types/src/operations/index.d.ts.map +1 -1
  109. package/dist/types/src/operations/open.d.ts +2 -2
  110. package/dist/types/src/operations/open.d.ts.map +1 -1
  111. package/dist/types/src/operations/summarize.d.ts +2 -2
  112. package/dist/types/src/operations/summarize.d.ts.map +1 -1
  113. package/dist/types/src/plugin.d.ts +4 -0
  114. package/dist/types/src/plugin.d.ts.map +1 -0
  115. package/dist/types/src/stories/FileTranscription.stories.d.ts +5 -3
  116. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -1
  117. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -1
  118. package/dist/types/src/stories/{MicrophoneTranscription.stories.d.ts → LiveTranscription.stories.d.ts} +4 -4
  119. package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +1 -0
  120. package/dist/types/src/stories/TranscriptionStory.d.ts +11 -13
  121. package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -1
  122. package/dist/types/src/stories/common.d.ts +46 -0
  123. package/dist/types/src/stories/common.d.ts.map +1 -0
  124. package/dist/types/src/testing/testing.d.ts +5 -6
  125. package/dist/types/src/testing/testing.d.ts.map +1 -1
  126. package/dist/types/src/transcriber/transcriber.d.ts +4 -4
  127. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  128. package/dist/types/src/transcriber/transcription-manager.d.ts +6 -4
  129. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  130. package/dist/types/src/translations.d.ts +2 -0
  131. package/dist/types/src/translations.d.ts.map +1 -1
  132. package/dist/types/src/{operations/definitions.d.ts → types/TranscriptOperation.d.ts} +1 -1
  133. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
  134. package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
  135. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
  136. package/dist/types/src/types/index.d.ts +2 -2
  137. package/dist/types/src/types/index.d.ts.map +1 -1
  138. package/dist/types/tsconfig.tsbuildinfo +1 -1
  139. package/package.json +125 -94
  140. package/src/TranscriptionPlugin.node.ts +3 -31
  141. package/src/TranscriptionPlugin.test.ts +3 -3
  142. package/src/TranscriptionPlugin.tsx +3 -31
  143. package/src/TranscriptionPlugin.workerd.ts +18 -0
  144. package/src/blueprints/transcription-blueprint.ts +1 -1
  145. package/src/capabilities/index.ts +1 -0
  146. package/src/capabilities/react-surface.tsx +2 -2
  147. package/src/capabilities/text-content.ts +33 -0
  148. package/src/capabilities/transcriber.ts +1 -1
  149. package/src/components/Oracle/Oracle.stories.tsx +147 -0
  150. package/src/components/Oracle/Oracle.tsx +141 -0
  151. package/src/components/Oracle/index.ts +5 -0
  152. package/src/components/Transcription/Transcription.stories.tsx +116 -150
  153. package/src/components/Transcription/Transcription.tsx +7 -13
  154. package/src/components/index.ts +1 -0
  155. package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +61 -0
  156. package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +62 -0
  157. package/src/containers/TranscriptionArticle/index.ts +5 -0
  158. package/src/containers/index.ts +1 -1
  159. package/src/enrichment/conversation.test.ts +162 -0
  160. package/src/enrichment/conversation.txt +23 -0
  161. package/src/enrichment/operations.ts +268 -0
  162. package/src/enrichment/parser.ts +101 -0
  163. package/src/enrichment/stream-simulator.ts +125 -0
  164. package/src/hooks/index.ts +2 -1
  165. package/src/hooks/useFeedModelAdapter.ts +46 -0
  166. package/src/hooks/useTranscriptionRecording.ts +87 -0
  167. package/src/index.ts +3 -9
  168. package/src/normalization/message-normalizer.ts +25 -13
  169. package/src/normalization/normalization.test.ts +3 -37
  170. package/src/normalization/normalization.ts +6 -7
  171. package/src/operations/create.ts +2 -2
  172. package/src/operations/index.ts +0 -2
  173. package/src/operations/open.ts +2 -2
  174. package/src/operations/summarize.ts +3 -3
  175. package/src/plugin.ts +11 -0
  176. package/src/stories/FileTranscription.stories.tsx +49 -175
  177. package/src/stories/KeyWordRecognition.stories.tsx +7 -9
  178. package/src/stories/LiveTranscription.stories.tsx +153 -0
  179. package/src/stories/TranscriptionStory.tsx +32 -24
  180. package/src/stories/common.ts +233 -0
  181. package/src/testing/testing.ts +20 -27
  182. package/src/transcriber/transcriber.test.ts +9 -9
  183. package/src/transcriber/transcriber.ts +18 -14
  184. package/src/transcriber/transcription-manager.ts +14 -9
  185. package/src/translations.ts +3 -0
  186. package/src/{operations/definitions.ts → types/TranscriptOperation.ts} +2 -0
  187. package/src/types/TranscriptionCapabilities.ts +39 -0
  188. package/src/types/index.ts +2 -2
  189. package/dist/lib/browser/blueprints/index.mjs.map +0 -7
  190. package/dist/lib/browser/chunk-3L623EVL.mjs +0 -17
  191. package/dist/lib/browser/chunk-3L623EVL.mjs.map +0 -7
  192. package/dist/lib/browser/chunk-L4HW35L6.mjs.map +0 -7
  193. package/dist/lib/browser/chunk-NQQK7UZQ.mjs.map +0 -7
  194. package/dist/lib/browser/components/index.mjs.map +0 -7
  195. package/dist/lib/browser/create-ULR5DPJZ.mjs.map +0 -7
  196. package/dist/lib/browser/index.mjs.map +0 -7
  197. package/dist/lib/browser/meta.json +0 -1
  198. package/dist/lib/browser/open-SFMPLZVW.mjs.map +0 -7
  199. package/dist/lib/browser/operations/index.mjs +0 -13
  200. package/dist/lib/browser/operations/index.mjs.map +0 -7
  201. package/dist/lib/browser/summarize-BDFX4APN.mjs.map +0 -7
  202. package/dist/lib/browser/types/index.mjs +0 -10
  203. package/dist/lib/node-esm/blueprints/index.mjs +0 -32
  204. package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
  205. package/dist/lib/node-esm/chunk-7UIZWCD4.mjs +0 -112
  206. package/dist/lib/node-esm/chunk-7UIZWCD4.mjs.map +0 -7
  207. package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs +0 -181
  208. package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs.map +0 -7
  209. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  210. package/dist/lib/node-esm/chunk-KO3IOD2O.mjs +0 -19
  211. package/dist/lib/node-esm/chunk-KO3IOD2O.mjs.map +0 -7
  212. package/dist/lib/node-esm/chunk-MQK4R6GT.mjs +0 -245
  213. package/dist/lib/node-esm/chunk-MQK4R6GT.mjs.map +0 -7
  214. package/dist/lib/node-esm/chunk-O533NBMK.mjs +0 -37
  215. package/dist/lib/node-esm/chunk-O533NBMK.mjs.map +0 -7
  216. package/dist/lib/node-esm/components/index.mjs +0 -208
  217. package/dist/lib/node-esm/components/index.mjs.map +0 -7
  218. package/dist/lib/node-esm/create-A5QHNWRF.mjs +0 -22
  219. package/dist/lib/node-esm/create-A5QHNWRF.mjs.map +0 -7
  220. package/dist/lib/node-esm/hooks/index.mjs +0 -18
  221. package/dist/lib/node-esm/index.mjs +0 -474
  222. package/dist/lib/node-esm/index.mjs.map +0 -7
  223. package/dist/lib/node-esm/meta.json +0 -1
  224. package/dist/lib/node-esm/open-OI24QNTO.mjs +0 -28
  225. package/dist/lib/node-esm/open-OI24QNTO.mjs.map +0 -7
  226. package/dist/lib/node-esm/operations/index.mjs +0 -14
  227. package/dist/lib/node-esm/operations/index.mjs.map +0 -7
  228. package/dist/lib/node-esm/summarize-3UNN24I2.mjs +0 -79
  229. package/dist/lib/node-esm/summarize-3UNN24I2.mjs.map +0 -7
  230. package/dist/lib/node-esm/types/index.mjs +0 -11
  231. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +0 -6
  232. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +0 -1
  233. package/dist/types/src/containers/TranscriptionContainer/index.d.ts +0 -2
  234. package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +0 -1
  235. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -8
  236. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +0 -1
  237. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  238. package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
  239. package/dist/types/src/stories/useIsSpeaking.d.ts +0 -3
  240. package/dist/types/src/stories/useIsSpeaking.d.ts.map +0 -1
  241. package/dist/types/src/types/capabilities.d.ts +0 -19
  242. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  243. package/dist/types/src/types/defs.d.ts +0 -5
  244. package/dist/types/src/types/defs.d.ts.map +0 -1
  245. package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +0 -35
  246. package/src/containers/TranscriptionContainer/index.ts +0 -5
  247. package/src/hooks/useQueueModelAdapter.ts +0 -66
  248. package/src/stories/MicrophoneTranscription.stories.tsx +0 -264
  249. package/src/stories/useIsSpeaking.tsx +0 -40
  250. package/src/types/capabilities.ts +0 -39
  251. package/src/types/defs.ts +0 -9
  252. /package/dist/lib/{browser/hooks → neutral/blueprints}/index.mjs.map +0 -0
  253. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  254. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  255. /package/dist/lib/{browser → neutral}/chunk-KAEXRX3Y.mjs +0 -0
  256. /package/dist/lib/{browser → neutral}/chunk-KAEXRX3Y.mjs.map +0 -0
  257. /package/dist/lib/{browser → neutral}/chunk-MLRJWAQH.mjs +0 -0
  258. /package/dist/lib/{browser → neutral}/chunk-MLRJWAQH.mjs.map +0 -0
  259. /package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
  260. /package/dist/lib/{node-esm/hooks → neutral}/index.mjs.map +0 -0
  261. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
  262. /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
@@ -0,0 +1,59 @@
1
+ import {
2
+ MediaStreamRecorder,
3
+ Transcriber,
4
+ TranscriptionManager
5
+ } from "./chunk-ILSA3DU7.mjs";
6
+ import "./chunk-KAEXRX3Y.mjs";
7
+ import "./chunk-J5LGTIGS.mjs";
8
+
9
+ // src/capabilities/transcriber.ts
10
+ import * as Effect from "effect/Effect";
11
+ import { Capabilities, Capability } from "@dxos/app-framework";
12
+ import { ClientCapabilities } from "@dxos/plugin-client";
13
+ import { TranscriptionCapabilities } from "#types";
14
+ var RECORD_INTERVAL = 200;
15
+ var PREFIXED_CHUNKS_AMOUNT = 10;
16
+ var TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;
17
+ var transcriber_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
+ const capabilities = yield* Capability.Service;
19
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
20
+ const getTranscriber = ({ audioStreamTrack, onSegments, transcriberConfig, recorderConfig, transcribe }) => {
21
+ return new Transcriber({
22
+ config: {
23
+ transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,
24
+ prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,
25
+ ...transcriberConfig
26
+ },
27
+ recorder: new MediaStreamRecorder({
28
+ mediaStreamTrack: audioStreamTrack,
29
+ config: {
30
+ interval: RECORD_INTERVAL,
31
+ ...recorderConfig
32
+ }
33
+ }),
34
+ onSegments,
35
+ transcribe
36
+ });
37
+ };
38
+ const getTranscriptionManager = ({ messageEnricher }) => {
39
+ const client = capabilities.get(ClientCapabilities.Client);
40
+ const transcriptionManager = new TranscriptionManager({
41
+ edgeClient: client.edge.http,
42
+ messageEnricher,
43
+ registry
44
+ });
45
+ const identity = client.halo.identity.get();
46
+ if (identity) {
47
+ transcriptionManager.setIdentityDid(identity.did);
48
+ }
49
+ return transcriptionManager;
50
+ };
51
+ return [
52
+ Capability.contributes(TranscriptionCapabilities.Transcriber, getTranscriber),
53
+ Capability.contributes(TranscriptionCapabilities.TranscriptionManager, getTranscriptionManager)
54
+ ];
55
+ }));
56
+ export {
57
+ transcriber_default as default
58
+ };
59
+ //# sourceMappingURL=transcriber-ABHATBVH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/transcriber.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { TranscriptionCapabilities } from '#types';\n\nimport { MediaStreamRecorder, Transcriber, TranscriptionManager } from '../transcriber';\n\n// TODO(burdon): Move to config?\n\n/**\n * Length of the chunk in ms.\n */\nconst RECORD_INTERVAL = 200;\n\n/**\n * Number of chunks to save before the user starts speaking.\n */\nconst PREFIXED_CHUNKS_AMOUNT = 10;\n\n/**\n * Number of chunks to transcribe automatically after.\n * Combined should be mess than 25MB or whisper would fail.\n */\nconst TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;\n\n/**\n * Records audio while user is speaking and transcribes it after user is done speaking.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n // Get context for lazy capability access in callbacks.\n const capabilities = yield* Capability.Service;\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n\n const getTranscriber: TranscriptionCapabilities.GetTranscriber = ({\n audioStreamTrack,\n onSegments,\n transcriberConfig,\n recorderConfig,\n transcribe,\n }) => {\n // Initialize audio transcription.\n return new Transcriber({\n config: {\n transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,\n prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,\n ...transcriberConfig,\n },\n recorder: new MediaStreamRecorder({\n mediaStreamTrack: audioStreamTrack,\n config: {\n interval: RECORD_INTERVAL,\n ...recorderConfig,\n },\n }),\n onSegments,\n transcribe,\n });\n };\n\n const getTranscriptionManager: TranscriptionCapabilities.GetTranscriptionManager = ({ messageEnricher }) => {\n const client = capabilities.get(ClientCapabilities.Client);\n const transcriptionManager = new TranscriptionManager({\n edgeClient: client.edge.http,\n messageEnricher,\n registry,\n });\n\n const identity = client.halo.identity.get();\n if (identity) {\n transcriptionManager.setIdentityDid(identity.did);\n }\n\n return transcriptionManager;\n };\n\n return [\n Capability.contributes(TranscriptionCapabilities.Transcriber, getTranscriber),\n Capability.contributes(TranscriptionCapabilities.TranscriptionManager, getTranscriptionManager),\n ];\n }),\n);\n"],
5
+ "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,0BAA0B;AAEnC,SAASC,iCAAiC;AAS1C,IAAMC,kBAAkB;AAKxB,IAAMC,yBAAyB;AAM/B,IAAMC,iCAAiC;AAKvC,IAAA,sBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAEhB,QAAMC,eAAe,OAAOH,WAAWI;AACvC,QAAMC,WAAW,OAAOL,WAAWM,IAAIC,aAAaC,YAAY;AAEhE,QAAMC,iBAA2D,CAAC,EAChEC,kBACAC,YACAC,mBACAC,gBACAC,WAAU,MACX;AAEC,WAAO,IAAIC,YAAY;MACrBC,QAAQ;QACNC,6BAA6BlB;QAC7BmB,0BAA0BpB;QAC1B,GAAGc;MACL;MACAO,UAAU,IAAIC,oBAAoB;QAChCC,kBAAkBX;QAClBM,QAAQ;UACNM,UAAUzB;UACV,GAAGgB;QACL;MACF,CAAA;MACAF;MACAG;IACF,CAAA;EACF;AAEA,QAAMS,0BAA6E,CAAC,EAAEC,gBAAe,MAAE;AACrG,UAAMC,SAAStB,aAAaG,IAAIoB,mBAAmBC,MAAM;AACzD,UAAMC,uBAAuB,IAAIC,qBAAqB;MACpDC,YAAYL,OAAOM,KAAKC;MACxBR;MACAnB;IACF,CAAA;AAEA,UAAM4B,WAAWR,OAAOS,KAAKD,SAAS3B,IAAG;AACzC,QAAI2B,UAAU;AACZL,2BAAqBO,eAAeF,SAASG,GAAG;IAClD;AAEA,WAAOR;EACT;AAEA,SAAO;IACL5B,WAAWqC,YAAYC,0BAA0BvB,aAAaN,cAAAA;IAC9DT,WAAWqC,YAAYC,0BAA0BT,sBAAsBN,uBAAAA;;AAE3E,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "ClientCapabilities", "TranscriptionCapabilities", "RECORD_INTERVAL", "PREFIXED_CHUNKS_AMOUNT", "TRANSCRIBE_AFTER_CHUNKS_AMOUNT", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "registry", "get", "Capabilities", "AtomRegistry", "getTranscriber", "audioStreamTrack", "onSegments", "transcriberConfig", "recorderConfig", "transcribe", "Transcriber", "config", "transcribeAfterChunksAmount", "prefixBufferChunksAmount", "recorder", "MediaStreamRecorder", "mediaStreamTrack", "interval", "getTranscriptionManager", "messageEnricher", "client", "ClientCapabilities", "Client", "transcriptionManager", "TranscriptionManager", "edgeClient", "edge", "http", "identity", "halo", "setIdentityDid", "did", "contributes", "TranscriptionCapabilities"]
7
+ }
@@ -0,0 +1,24 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/translations.ts
4
+ import { meta } from "#meta";
5
+ var translations = [
6
+ {
7
+ "en-US": {
8
+ [meta.id]: {
9
+ "plugin.name": "Transcription",
10
+ "transcript-companion.label": "Transcript",
11
+ "delete.button": "Delete",
12
+ "bookmark.button": "Bookmark",
13
+ "scroll-to-end.label": "Scroll to latest",
14
+ "start-recording.label": "Start recording",
15
+ "stop-recording.label": "Stop recording",
16
+ "settings.entity-extraction.label": "Entity extraction"
17
+ }
18
+ }
19
+ }
20
+ ];
21
+ export {
22
+ translations
23
+ };
24
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Transcription',\n 'transcript-companion.label': 'Transcript',\n\n 'delete.button': 'Delete',\n 'bookmark.button': 'Bookmark',\n 'scroll-to-end.label': 'Scroll to latest',\n\n 'start-recording.label': 'Start recording',\n 'stop-recording.label': 'Stop recording',\n\n 'settings.entity-extraction.label': 'Entity extraction',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,eAAe;QACf,8BAA8B;QAE9B,iBAAiB;QACjB,mBAAmB;QACnB,uBAAuB;QAEvB,yBAAyB;QACzB,wBAAwB;QAExB,oCAAoC;MACtC;IACF;EACF;;",
6
+ "names": ["meta", "translations", "id"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import {
2
+ TranscriptOperation_exports,
3
+ TranscriptionCapabilities_exports
4
+ } from "../chunk-5FXU36PN.mjs";
5
+ import "../chunk-J5LGTIGS.mjs";
6
+ export {
7
+ TranscriptOperation_exports as TranscriptOperation,
8
+ TranscriptionCapabilities_exports as TranscriptionCapabilities
9
+ };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"TranscriptionPlugin.d.ts","sourceRoot":"","sources":["../../../src/TranscriptionPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAY7C,eAAO,MAAM,mBAAmB,4BAmC/B,CAAC;eAEa,mBAAmB"}
1
+ {"version":3,"file":"TranscriptionPlugin.d.ts","sourceRoot":"","sources":["../../../src/TranscriptionPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,eAAO,MAAM,mBAAmB,4BAa/B,CAAC;eAEa,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"TranscriptionPlugin.node.d.ts","sourceRoot":"","sources":["../../../src/TranscriptionPlugin.node.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAW7C,eAAO,MAAM,mBAAmB,4BA4B/B,CAAC;eAEa,mBAAmB"}
1
+ {"version":3,"file":"TranscriptionPlugin.node.d.ts","sourceRoot":"","sources":["../../../src/TranscriptionPlugin.node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,eAAO,MAAM,mBAAmB,4BAM/B,CAAC;eAEa,mBAAmB"}
@@ -0,0 +1,4 @@
1
+ import { Plugin } from '@dxos/app-framework';
2
+ export declare const TranscriptionPlugin: Plugin.PluginFactory<void>;
3
+ export default TranscriptionPlugin;
4
+ //# sourceMappingURL=TranscriptionPlugin.workerd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranscriptionPlugin.workerd.d.ts","sourceRoot":"","sources":["../../../src/TranscriptionPlugin.workerd.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,eAAO,MAAM,mBAAmB,4BAI/B,CAAC;eAEa,mBAAmB"}
@@ -1,7 +1,11 @@
1
1
  import { Capability } from '@dxos/app-framework';
2
2
  import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
3
3
  export declare const BlueprintDefinition: Capability.LazyCapability<[], Capability.Capability<Capability.InterfaceDef<Blueprint.Definition>>[], Error>;
4
+ export declare const TextContent: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
5
+ id: string;
6
+ getTextContent: (object: any) => Promise<string | undefined>;
7
+ }>>>, Error>;
4
8
  export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
5
9
  export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
6
- export declare const Transcriber: Capability.LazyCapability<void, [Capability.Capability<Capability.InterfaceDef<import("..").TranscriptionCapabilities.GetTranscriber>>, Capability.Capability<Capability.InterfaceDef<import("..").TranscriptionCapabilities.GetTranscriptionManager>>], Error>;
10
+ export declare const Transcriber: Capability.LazyCapability<void, [Capability.Capability<Capability.InterfaceDef<import("../types/TranscriptionCapabilities").GetTranscriber>>, Capability.Capability<Capability.InterfaceDef<import("../types/TranscriptionCapabilities").GetTranscriptionManager>>], Error>;
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpE,eAAO,MAAM,mBAAmB,8GAAiF,CAAC;AAClH,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY,iJAAmE,CAAC;AAC7F,eAAO,MAAM,WAAW,iQAAgE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpE,eAAO,MAAM,mBAAmB,8GAAiF,CAAC;AAClH,eAAO,MAAM,WAAW;;;YAAiE,CAAC;AAC1F,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY,iJAAmE,CAAC;AAC7F,eAAO,MAAM,WAAW,6QAAgE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Readonly<{
4
+ id: string;
5
+ getTextContent: (object: any) => Promise<string | undefined>;
6
+ }>>>, never, never>;
7
+ export default _default;
8
+ //# sourceMappingURL=text-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/text-content.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import '@dxos/react-ui-graph/styles/graph.css';
3
+ import { type ThemedClassName } from '@dxos/react-ui';
4
+ import { type SlottableProps } from '@dxos/ui-types';
5
+ export type OracleRootProps = PropsWithChildren<{
6
+ /** Latest utterance / phrase rendered by `Oracle.Text`. */
7
+ text?: string;
8
+ /** Per-character reveal delay in ms for the streaming TextBlock. @default 12 */
9
+ delay?: number;
10
+ }>;
11
+ export type OracleContentProps = SlottableProps;
12
+ export type OracleCanvasProps = ThemedClassName<PropsWithChildren<{}>>;
13
+ export type OracleTextProps = ThemedClassName<{}>;
14
+ export declare const Oracle: {
15
+ Root: ({ children, text, delay }: OracleRootProps) => React.JSX.Element;
16
+ Content: React.ForwardRefExoticComponent<Omit<{
17
+ asChild?: boolean;
18
+ }, "className"> & {
19
+ classNames?: import("@dxos/ui-types").ClassNameValue;
20
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
21
+ Canvas: ({ classNames, children }: OracleCanvasProps) => React.JSX.Element;
22
+ Text: ({ classNames }: OracleTextProps) => React.JSX.Element;
23
+ };
24
+ //# sourceMappingURL=Oracle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Oracle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Oracle/Oracle.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAE1F,OAAO,uCAAuC,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA2BrD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAC9C,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAiBH,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAwBhD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;AAyBvE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,EAAE,CAAC,CAAC;AAwBlD,eAAO,MAAM,MAAM;sCAlFgC,eAAe;;;;;;uCAwCxB,iBAAiB;2BAyB7B,eAAe;CAsB5C,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ type DefaultStoryProps = {
4
+ delay?: number;
5
+ };
6
+ declare const meta: {
7
+ title: string;
8
+ render: ({ delay }: DefaultStoryProps) => React.JSX.Element;
9
+ decorators: import("@storybook/react").Decorator[];
10
+ parameters: {
11
+ layout: string;
12
+ translations: [{
13
+ readonly 'en-US': {
14
+ readonly [x: string]: {
15
+ readonly 'plugin.name': 'Transcription';
16
+ readonly 'transcript-companion.label': 'Transcript';
17
+ readonly 'delete.button': 'Delete';
18
+ readonly 'bookmark.button': 'Bookmark';
19
+ readonly 'scroll-to-end.label': 'Scroll to latest';
20
+ readonly 'start-recording.label': 'Start recording';
21
+ readonly 'stop-recording.label': 'Stop recording';
22
+ readonly 'settings.entity-extraction.label': 'Entity extraction';
23
+ };
24
+ };
25
+ }];
26
+ };
27
+ };
28
+ export default meta;
29
+ type Story = StoryObj<typeof meta>;
30
+ export declare const Default: Story;
31
+ export declare const Instant: Story;
32
+ //# sourceMappingURL=Oracle.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Oracle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Oracle/Oracle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA2C,MAAM,OAAO,CAAC;AAehE,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAuEF,QAAA,MAAM,IAAI;;wBArEuB,iBAAiB;;;;;;;;;;;;;;;;;;;CA2Fb,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Oracle';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Oracle/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
@@ -6,12 +6,7 @@ export { renderByline };
6
6
  export type TranscriptionProps = {
7
7
  transcript?: Transcript.Transcript;
8
8
  model: SerializationModel<Message.Message>;
9
- attendableId?: string;
10
- ignoreAttention?: boolean;
11
9
  };
12
- /**
13
- * Transcript component implemented using the editor.
14
- */
15
10
  export declare const Transcription: React.ForwardRefExoticComponent<Omit<TranscriptionProps, "className"> & {
16
11
  classNames?: import("@dxos/ui-types").ClassNameValue;
17
12
  } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Transcription.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcription/Transcription.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAa5D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;;2HAyBzB,CAAC"}
1
+ {"version":3,"file":"Transcription.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcription/Transcription.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAY5D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5C,CAAC;AAGF,eAAO,MAAM,aAAa;;2HAyBzB,CAAC"}
@@ -1,20 +1,15 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- import { type Message } from '@dxos/types';
4
- import { type TranscriptionProps } from './Transcription';
3
+ type Source = 'local' | 'feed';
5
4
  type DefaultStoryProps = {
6
- messages?: Message.Message[];
7
- } & Pick<TranscriptionProps, 'ignoreAttention' | 'attendableId'>;
8
- /**
9
- * Basic story mutates array of messages.
10
- */
11
- declare const BasicStory: ({ messages: initialMessages, ...props }: DefaultStoryProps) => React.JSX.Element;
12
- /**
13
- * Wrapper remounts on refresh to reload queue.
14
- */
15
- declare const QueueStoryWrapper: () => React.JSX.Element;
5
+ /** Where transcript messages come from. */
6
+ source?: Source;
7
+ /** Number of synthetic messages to pre-populate (local source only). */
8
+ seed?: number;
9
+ };
16
10
  declare const meta: {
17
11
  title: string;
12
+ render: ({ source, seed, ...props }: DefaultStoryProps) => React.JSX.Element;
18
13
  decorators: import("@storybook/react").Decorator[];
19
14
  parameters: {
20
15
  layout: string;
@@ -26,6 +21,8 @@ declare const meta: {
26
21
  readonly 'delete.button': 'Delete';
27
22
  readonly 'bookmark.button': 'Bookmark';
28
23
  readonly 'scroll-to-end.label': 'Scroll to latest';
24
+ readonly 'start-recording.label': 'Start recording';
25
+ readonly 'stop-recording.label': 'Stop recording';
29
26
  readonly 'settings.entity-extraction.label': 'Entity extraction';
30
27
  };
31
28
  };
@@ -33,8 +30,8 @@ declare const meta: {
33
30
  };
34
31
  };
35
32
  export default meta;
36
- declare const DefaultStory: (props: DefaultStoryProps) => React.JSX.Element;
37
- export declare const Default: StoryObj<typeof DefaultStory>;
38
- export declare const Empty: StoryObj<typeof BasicStory>;
39
- export declare const WithQueue: StoryObj<typeof QueueStoryWrapper>;
33
+ type Story = StoryObj<typeof meta>;
34
+ export declare const Default: Story;
35
+ export declare const Empty: Story;
36
+ export declare const WithQueue: Story;
40
37
  //# sourceMappingURL=Transcription.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Transcription.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcription/Transcription.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAgD,MAAM,OAAO,CAAC;AAcrE,OAAO,EAAqB,KAAK,OAAO,EAAwB,MAAM,aAAa,CAAC;AAapF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAkCzE,KAAK,iBAAiB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAA;CAAE,GAAG,IAAI,CAC9D,kBAAkB,EAClB,iBAAiB,GAAG,cAAc,CACnC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,UAAU,4CAAkD,iBAAiB,sBAoDlF,CAAC;AAiCF;;GAEG;AACH,QAAA,MAAM,iBAAiB,yBAQtB,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAwBM,CAAC;eAEF,IAAI;AAEnB,QAAA,MAAM,YAAY,UAAW,iBAAiB,sBAS7C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,YAAY,CAMjD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,UAAU,CAM7C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,OAAO,iBAAiB,CAMxD,CAAC"}
1
+ {"version":3,"file":"Transcription.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcription/Transcription.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AAwBzE,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/B,KAAK,iBAAiB,GAAG;IACvB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA8HF,QAAA,MAAM,IAAI;;yCA5HsD,iBAAiB;;;;;;;;;;;;;;;;;;;CAoJ5C,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from './Oracle';
1
2
  export * from './Transcription';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
3
+ import { type Transcript } from '@dxos/types';
4
+ export type TranscriptionArticleProps = AppSurface.ObjectArticleProps<Transcript.Transcript>;
5
+ export declare const TranscriptionArticle: ({ role, subject: transcript, attendableId }: TranscriptionArticleProps) => React.JSX.Element;
6
+ //# sourceMappingURL=TranscriptionArticle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranscriptionArticle.d.ts","sourceRoot":"","sources":["../../../../../src/containers/TranscriptionArticle/TranscriptionArticle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAQvD,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAE7F,eAAO,MAAM,oBAAoB,gDAAiD,yBAAyB,sBAwC1G,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ translations: [{
10
+ readonly 'en-US': {
11
+ readonly [x: string]: {
12
+ readonly 'plugin.name': 'Transcription';
13
+ readonly 'transcript-companion.label': 'Transcript';
14
+ readonly 'delete.button': 'Delete';
15
+ readonly 'bookmark.button': 'Bookmark';
16
+ readonly 'scroll-to-end.label': 'Scroll to latest';
17
+ readonly 'start-recording.label': 'Start recording';
18
+ readonly 'stop-recording.label': 'Stop recording';
19
+ readonly 'settings.entity-extraction.label': 'Entity extraction';
20
+ };
21
+ };
22
+ }];
23
+ };
24
+ };
25
+ export default meta;
26
+ type Story = StoryObj<typeof meta>;
27
+ export declare const Default: Story;
28
+ //# sourceMappingURL=TranscriptionArticle.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranscriptionArticle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAsB2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { TranscriptionArticle as default } from './TranscriptionArticle';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/TranscriptionArticle/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type ComponentType } from 'react';
2
- export declare const TranscriptionContainer: ComponentType<any>;
2
+ export declare const TranscriptionArticle: ComponentType<any>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,GAAG,CAAkD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAAgD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.test.d.ts","sourceRoot":"","sources":["../../../../src/enrichment/conversation.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,200 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import { Operation } from '@dxos/compute';
3
+ /** A noun / proper noun surfaced for follow-up actions (create object, research, link…). */
4
+ export declare const CandidateMention: Schema.Struct<{
5
+ text: Schema.SchemaClass<string, string, never>;
6
+ kind: Schema.Literal<["noun", "proper-noun"]>;
7
+ start: Schema.SchemaClass<number, number, never>;
8
+ end: Schema.SchemaClass<number, number, never>;
9
+ suggested: Schema.optional<Schema.Struct<{
10
+ typename: Schema.SchemaClass<string, string, never>;
11
+ }>>;
12
+ }>;
13
+ /** Per-block enrichment output produced by Pass A. */
14
+ export declare const EnrichmentBlock: Schema.Struct<{
15
+ /** Index into the input window; lets the caller match enrichment to the originating block. */
16
+ index: typeof Schema.Number;
17
+ /** Corrected text — punctuation, capitalization, words split across batch boundaries reassembled. */
18
+ corrected: typeof Schema.String;
19
+ /**
20
+ * IDs of ECHO objects the LLM is confident the block mentions. Strings rather than `Ref<T>`
21
+ * to keep the schema serialisable; the consumer resolves them via `Database.resolve(...)`.
22
+ */
23
+ referenceIds: Schema.Array$<typeof Schema.String>;
24
+ /** Candidate nouns / proper nouns not already covered by `referenceIds`. */
25
+ candidates: Schema.Array$<Schema.Struct<{
26
+ text: Schema.SchemaClass<string, string, never>;
27
+ kind: Schema.Literal<["noun", "proper-noun"]>;
28
+ start: Schema.SchemaClass<number, number, never>;
29
+ end: Schema.SchemaClass<number, number, never>;
30
+ suggested: Schema.optional<Schema.Struct<{
31
+ typename: Schema.SchemaClass<string, string, never>;
32
+ }>>;
33
+ }>>;
34
+ }>;
35
+ export declare const EnrichmentInput: Schema.Struct<{
36
+ /** Sliding-window blocks. Each carries the speaker that produced it. */
37
+ window: Schema.Array$<Schema.Struct<{
38
+ speaker: typeof Schema.String;
39
+ text: typeof Schema.String;
40
+ started: typeof Schema.String;
41
+ }>>;
42
+ /** ECHO objects available in the space that the LLM may pick from when linking references. */
43
+ knownEntities: Schema.optional<Schema.Array$<Schema.Struct<{
44
+ id: typeof Schema.String;
45
+ typename: typeof Schema.String;
46
+ name: typeof Schema.String;
47
+ }>>>;
48
+ }>;
49
+ export type EnrichmentInputType = Schema.Schema.Type<typeof EnrichmentInput>;
50
+ export declare const EnrichmentOutput: Schema.Struct<{
51
+ blocks: Schema.Array$<Schema.Struct<{
52
+ /** Index into the input window; lets the caller match enrichment to the originating block. */
53
+ index: typeof Schema.Number;
54
+ /** Corrected text — punctuation, capitalization, words split across batch boundaries reassembled. */
55
+ corrected: typeof Schema.String;
56
+ /**
57
+ * IDs of ECHO objects the LLM is confident the block mentions. Strings rather than `Ref<T>`
58
+ * to keep the schema serialisable; the consumer resolves them via `Database.resolve(...)`.
59
+ */
60
+ referenceIds: Schema.Array$<typeof Schema.String>;
61
+ /** Candidate nouns / proper nouns not already covered by `referenceIds`. */
62
+ candidates: Schema.Array$<Schema.Struct<{
63
+ text: Schema.SchemaClass<string, string, never>;
64
+ kind: Schema.Literal<["noun", "proper-noun"]>;
65
+ start: Schema.SchemaClass<number, number, never>;
66
+ end: Schema.SchemaClass<number, number, never>;
67
+ suggested: Schema.optional<Schema.Struct<{
68
+ typename: Schema.SchemaClass<string, string, never>;
69
+ }>>;
70
+ }>>;
71
+ }>>;
72
+ }>;
73
+ export type EnrichmentOutputType = Schema.Schema.Type<typeof EnrichmentOutput>;
74
+ export declare const EnrichTranscript: Operation.Definition<{
75
+ readonly window: readonly {
76
+ readonly speaker: string;
77
+ readonly text: string;
78
+ readonly started: string;
79
+ }[];
80
+ readonly knownEntities?: readonly {
81
+ readonly id: string;
82
+ readonly typename: string;
83
+ readonly name: string;
84
+ }[] | undefined;
85
+ }, {
86
+ readonly blocks: readonly {
87
+ readonly index: number;
88
+ readonly corrected: string;
89
+ readonly referenceIds: readonly string[];
90
+ readonly candidates: readonly {
91
+ readonly text: string;
92
+ readonly kind: "noun" | "proper-noun";
93
+ readonly start: number;
94
+ readonly end: number;
95
+ readonly suggested?: {
96
+ readonly typename: string;
97
+ } | undefined;
98
+ }[];
99
+ }[];
100
+ }, never>;
101
+ export declare const SummaryInput: Schema.Struct<{
102
+ /** The cumulative summary as of the last invocation (empty string on first call). */
103
+ previousSummary: typeof Schema.String;
104
+ /** New corrected utterances appended since the previous summary. */
105
+ newUtterances: Schema.Array$<Schema.Struct<{
106
+ speaker: typeof Schema.String;
107
+ text: typeof Schema.String;
108
+ }>>;
109
+ /** Map of speaker label → human-readable display name. Drives "I" resolution. */
110
+ speakerNames: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
111
+ /** IDs and surface forms of references emitted by recent Pass A invocations. */
112
+ recentReferences: Schema.optional<Schema.Array$<Schema.Struct<{
113
+ id: typeof Schema.String;
114
+ name: typeof Schema.String;
115
+ }>>>;
116
+ }>;
117
+ export type SummaryInputType = Schema.Schema.Type<typeof SummaryInput>;
118
+ export declare const ResolvedReferent: Schema.Struct<{
119
+ surface: Schema.SchemaClass<string, string, never>;
120
+ referent: Schema.SchemaClass<string, string, never>;
121
+ refId: Schema.optional<typeof Schema.String>;
122
+ }>;
123
+ export declare const SummaryOutput: Schema.Struct<{
124
+ summary: typeof Schema.String;
125
+ resolvedReferents: Schema.Array$<Schema.Struct<{
126
+ surface: Schema.SchemaClass<string, string, never>;
127
+ referent: Schema.SchemaClass<string, string, never>;
128
+ refId: Schema.optional<typeof Schema.String>;
129
+ }>>;
130
+ }>;
131
+ export type SummaryOutputType = Schema.Schema.Type<typeof SummaryOutput>;
132
+ export declare const SummarizeConversation: Operation.Definition<{
133
+ readonly previousSummary: string;
134
+ readonly newUtterances: readonly {
135
+ readonly speaker: string;
136
+ readonly text: string;
137
+ }[];
138
+ readonly speakerNames?: {
139
+ readonly [x: string]: string;
140
+ } | undefined;
141
+ readonly recentReferences?: readonly {
142
+ readonly id: string;
143
+ readonly name: string;
144
+ }[] | undefined;
145
+ }, {
146
+ readonly summary: string;
147
+ readonly resolvedReferents: readonly {
148
+ readonly surface: string;
149
+ readonly referent: string;
150
+ readonly refId?: string | undefined;
151
+ }[];
152
+ }, never>;
153
+ export declare const EnrichmentHandlers: (Operation.WithHandler<Operation.Definition<{
154
+ readonly window: readonly {
155
+ readonly speaker: string;
156
+ readonly text: string;
157
+ readonly started: string;
158
+ }[];
159
+ readonly knownEntities?: readonly {
160
+ readonly id: string;
161
+ readonly typename: string;
162
+ readonly name: string;
163
+ }[] | undefined;
164
+ }, {
165
+ readonly blocks: readonly {
166
+ readonly index: number;
167
+ readonly corrected: string;
168
+ readonly referenceIds: readonly string[];
169
+ readonly candidates: readonly {
170
+ readonly text: string;
171
+ readonly kind: "noun" | "proper-noun";
172
+ readonly start: number;
173
+ readonly end: number;
174
+ readonly suggested?: {
175
+ readonly typename: string;
176
+ } | undefined;
177
+ }[];
178
+ }[];
179
+ }, never>> | Operation.WithHandler<Operation.Definition<{
180
+ readonly previousSummary: string;
181
+ readonly newUtterances: readonly {
182
+ readonly speaker: string;
183
+ readonly text: string;
184
+ }[];
185
+ readonly speakerNames?: {
186
+ readonly [x: string]: string;
187
+ } | undefined;
188
+ readonly recentReferences?: readonly {
189
+ readonly id: string;
190
+ readonly name: string;
191
+ }[] | undefined;
192
+ }, {
193
+ readonly summary: string;
194
+ readonly resolvedReferents: readonly {
195
+ readonly surface: string;
196
+ readonly referent: string;
197
+ readonly refId?: string | undefined;
198
+ }[];
199
+ }, never>>)[];
200
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/enrichment/operations.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB;;;;;;;;EAc3B,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,eAAe;IAC1B,8FAA8F;;IAE9F,qGAAqG;;IAErG;;;OAGG;;IAEH,4EAA4E;;;;;;;;;;EAE5E,CAAC;AAMH,eAAO,MAAM,eAAe;IAC1B,wEAAwE;;;;;;IAQxE,8FAA8F;;;;;;EAU9F,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC;AAE7E,eAAO,MAAM,gBAAgB;;QAvC3B,8FAA8F;;QAE9F,qGAAqG;;QAErG;;;WAGG;;QAEH,4EAA4E;;;;;;;;;;;EAgC5E,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;SAQ3B,CAAC;AAwCH,eAAO,MAAM,YAAY;IACvB,qFAAqF;;IAErF,oEAAoE;;;;;IAOpE,iFAAiF;;IAEjF,gFAAgF;;;;;EAShF,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvE,eAAO,MAAM,gBAAgB;;;;EAM3B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;EAGxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;SAQhC,CAAC;AAgCH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAoC,CAAC"}