@dxos/plugin-transcription 0.8.2-main.f081794 → 0.8.2-main.fbd8ed0

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 (208) hide show
  1. package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs → TranscriptContainer-CXA4ZBHW.mjs} +3 -3
  2. package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs +351 -0
  3. package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs.map +7 -0
  4. package/dist/lib/browser/{chunk-DR3NBV6Q.mjs → chunk-3TKXI6TQ.mjs} +105 -78
  5. package/dist/lib/browser/chunk-3TKXI6TQ.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-JHWEZRWC.mjs +63 -0
  7. package/dist/lib/browser/chunk-JHWEZRWC.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-RHHJZQPM.mjs → chunk-K2LS2QOM.mjs} +135 -117
  9. package/dist/lib/browser/chunk-K2LS2QOM.mjs.map +7 -0
  10. package/dist/lib/browser/chunk-LCTMCTYY.mjs +27 -0
  11. package/dist/lib/browser/chunk-LCTMCTYY.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-5BE6RTNC.mjs → chunk-LTIQFX4W.mjs} +1 -1
  13. package/dist/lib/browser/{chunk-5BE6RTNC.mjs.map → chunk-LTIQFX4W.mjs.map} +1 -1
  14. package/dist/lib/browser/index.mjs +30 -18
  15. package/dist/lib/browser/index.mjs.map +3 -3
  16. package/dist/lib/browser/{intent-resolver-ZQQEH27F.mjs → intent-resolver-DZ62CJPC.mjs} +4 -4
  17. package/dist/lib/browser/intent-resolver-DZ62CJPC.mjs.map +7 -0
  18. package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs → meeting-transcription-state-MNA2XROE.mjs} +2 -2
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/{react-surface-HETJ5XY6.mjs → react-surface-PUXZNAZL.mjs} +18 -7
  21. package/dist/lib/browser/react-surface-PUXZNAZL.mjs.map +7 -0
  22. package/dist/lib/browser/settings-JWDS4J3F.mjs +24 -0
  23. package/dist/lib/browser/settings-JWDS4J3F.mjs.map +7 -0
  24. package/dist/lib/browser/{transcriber-SMRLU2KY.mjs → transcriber-YWWIV6KP.mjs} +4 -4
  25. package/dist/lib/browser/types/index.mjs +3 -3
  26. package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs → TranscriptContainer-SSJVLRM6.cjs} +8 -8
  27. package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs.map → TranscriptContainer-SSJVLRM6.cjs.map} +2 -2
  28. package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs +352 -0
  29. package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs.map +7 -0
  30. package/dist/lib/node/{chunk-3QEJ5EBO.cjs → chunk-EJWB53WK.cjs} +22 -32
  31. package/dist/lib/node/chunk-EJWB53WK.cjs.map +7 -0
  32. package/dist/lib/node/{chunk-KO6MKCED.cjs → chunk-EVE3H46F.cjs} +138 -119
  33. package/dist/lib/node/chunk-EVE3H46F.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-HYGDHS6X.cjs → chunk-JUGOXWES.cjs} +4 -4
  35. package/dist/lib/node/{chunk-HYGDHS6X.cjs.map → chunk-JUGOXWES.cjs.map} +1 -1
  36. package/dist/lib/node/{chunk-WXG4Z2EZ.cjs → chunk-L27AK6FQ.cjs} +23 -8
  37. package/dist/lib/node/chunk-L27AK6FQ.cjs.map +7 -0
  38. package/dist/lib/node/{chunk-LA73IHCB.cjs → chunk-WKZLGVEJ.cjs} +108 -80
  39. package/dist/lib/node/chunk-WKZLGVEJ.cjs.map +7 -0
  40. package/dist/lib/node/index.cjs +47 -35
  41. package/dist/lib/node/index.cjs.map +3 -3
  42. package/dist/lib/node/{intent-resolver-VY3XWYAA.cjs → intent-resolver-TRBKI24D.cjs} +9 -9
  43. package/dist/lib/node/intent-resolver-TRBKI24D.cjs.map +7 -0
  44. package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs → meeting-transcription-state-5XLTMWPA.cjs} +6 -6
  45. package/dist/lib/node/meta.json +1 -1
  46. package/dist/lib/node/{react-surface-M2JQIIDY.cjs → react-surface-SZAMHCX7.cjs} +20 -11
  47. package/dist/lib/node/react-surface-SZAMHCX7.cjs.map +7 -0
  48. package/dist/lib/node/settings-AWWMOSCV.cjs +38 -0
  49. package/dist/lib/node/settings-AWWMOSCV.cjs.map +7 -0
  50. package/dist/lib/node/{transcriber-E6AAB4SU.cjs → transcriber-AFUXFHCR.cjs} +10 -10
  51. package/dist/lib/node/types/index.cjs +8 -8
  52. package/dist/lib/node/types/index.cjs.map +1 -1
  53. package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs → TranscriptContainer-M53LI2TX.mjs} +3 -3
  54. package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs +352 -0
  55. package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs.map +7 -0
  56. package/dist/lib/node-esm/{chunk-SDMGJZLN.mjs → chunk-4KC3E5T4.mjs} +135 -117
  57. package/dist/lib/node-esm/chunk-4KC3E5T4.mjs.map +7 -0
  58. package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs → chunk-5E2MR5XK.mjs} +1 -1
  59. package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs.map → chunk-5E2MR5XK.mjs.map} +1 -1
  60. package/dist/lib/node-esm/chunk-MHQP2PAF.mjs +28 -0
  61. package/dist/lib/node-esm/chunk-MHQP2PAF.mjs.map +7 -0
  62. package/dist/lib/node-esm/{chunk-54HDN33F.mjs → chunk-QYG2FOXA.mjs} +22 -32
  63. package/dist/lib/node-esm/chunk-QYG2FOXA.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-K3R3YK3S.mjs → chunk-V5IWBPYO.mjs} +105 -78
  65. package/dist/lib/node-esm/chunk-V5IWBPYO.mjs.map +7 -0
  66. package/dist/lib/node-esm/index.mjs +30 -18
  67. package/dist/lib/node-esm/index.mjs.map +3 -3
  68. package/dist/lib/node-esm/{intent-resolver-FCTNJPWY.mjs → intent-resolver-HFVAL274.mjs} +4 -4
  69. package/dist/lib/node-esm/intent-resolver-HFVAL274.mjs.map +7 -0
  70. package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs → meeting-transcription-state-3WOZ52BQ.mjs} +2 -2
  71. package/dist/lib/node-esm/meta.json +1 -1
  72. package/dist/lib/node-esm/{react-surface-PXFSIM6V.mjs → react-surface-UEJELL7I.mjs} +18 -7
  73. package/dist/lib/node-esm/react-surface-UEJELL7I.mjs.map +7 -0
  74. package/dist/lib/node-esm/settings-QFNFGFJ5.mjs +25 -0
  75. package/dist/lib/node-esm/settings-QFNFGFJ5.mjs.map +7 -0
  76. package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs → transcriber-7RJEFPDI.mjs} +4 -4
  77. package/dist/lib/node-esm/types/index.mjs +3 -3
  78. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  80. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/capabilities.d.ts +1 -1
  82. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/index.d.ts +3 -178
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  86. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  88. package/dist/types/src/capabilities/settings.d.ts +4 -0
  89. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  90. package/dist/types/src/components/Transcript/Transcript.d.ts +6 -4
  91. package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
  92. package/dist/types/src/components/Transcript/Transcript.stories.d.ts +8 -4
  93. package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
  94. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +27 -0
  95. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -0
  96. package/dist/types/src/components/Transcript/transcript-extension.d.ts +4 -4
  97. package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
  98. package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
  99. package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts +6 -0
  100. package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts.map +1 -0
  101. package/dist/types/src/components/TranscriptionSettings/index.d.ts +2 -0
  102. package/dist/types/src/components/TranscriptionSettings/index.d.ts.map +1 -0
  103. package/dist/types/src/components/index.d.ts +1 -0
  104. package/dist/types/src/components/index.d.ts.map +1 -1
  105. package/dist/types/src/components/transcription.stories.d.ts +6 -3
  106. package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
  107. package/dist/types/src/entity-extraction/entity-extraction.d.ts +33 -7
  108. package/dist/types/src/entity-extraction/entity-extraction.d.ts.map +1 -1
  109. package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
  110. package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
  111. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +2 -2
  112. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
  113. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  114. package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
  115. package/dist/types/src/model/model.d.ts +23 -23
  116. package/dist/types/src/model/model.d.ts.map +1 -1
  117. package/dist/types/src/testing/index.d.ts +2 -0
  118. package/dist/types/src/testing/index.d.ts.map +1 -0
  119. package/dist/types/src/testing/testing.d.ts +40 -0
  120. package/dist/types/src/testing/testing.d.ts.map +1 -0
  121. package/dist/types/src/transcriber/transcriber.d.ts +2 -2
  122. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  123. package/dist/types/src/transcriber/transcription-manager.d.ts +17 -15
  124. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  125. package/dist/types/src/translations.d.ts +3 -18
  126. package/dist/types/src/translations.d.ts.map +1 -1
  127. package/dist/types/src/types/schema.d.ts +26 -40
  128. package/dist/types/src/types/schema.d.ts.map +1 -1
  129. package/dist/types/src/types/types.d.ts +18 -7
  130. package/dist/types/src/types/types.d.ts.map +1 -1
  131. package/dist/types/src/util/array.d.ts.map +1 -1
  132. package/dist/types/src/util/get-time-str.d.ts.map +1 -1
  133. package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
  134. package/dist/types/tsconfig.tsbuildinfo +1 -1
  135. package/package.json +55 -46
  136. package/src/TranscriptionPlugin.tsx +30 -13
  137. package/src/capabilities/app-graph-builder.ts +190 -98
  138. package/src/capabilities/capabilities.ts +1 -1
  139. package/src/capabilities/index.ts +1 -0
  140. package/src/capabilities/intent-resolver.ts +5 -4
  141. package/src/capabilities/react-surface.tsx +12 -4
  142. package/src/capabilities/settings.ts +20 -0
  143. package/src/components/Transcript/Transcript.stories.tsx +72 -36
  144. package/src/components/Transcript/Transcript.tsx +37 -30
  145. package/src/components/Transcript/deprecated/{Transcript.tsx → OldTranscript.tsx} +30 -1
  146. package/src/components/Transcript/transcript-extension.ts +20 -17
  147. package/src/components/TranscriptContainer.tsx +6 -4
  148. package/src/components/TranscriptionSettings/TranscriptionSettings.tsx +26 -0
  149. package/src/components/TranscriptionSettings/index.ts +5 -0
  150. package/src/components/index.ts +1 -0
  151. package/src/components/transcription.stories.tsx +85 -35
  152. package/src/entity-extraction/entity-extraction.test.ts +75 -10
  153. package/src/entity-extraction/entity-extraction.ts +110 -55
  154. package/src/entity-extraction/system-prompt.tpl +38 -9
  155. package/src/hooks/useQueueModelAdapter.ts +44 -11
  156. package/src/model/model.test.ts +90 -44
  157. package/src/model/model.ts +59 -59
  158. package/src/testing/index.ts +5 -0
  159. package/src/testing/testing.ts +216 -0
  160. package/src/transcriber/transcriber.browser.test.ts +3 -3
  161. package/src/transcriber/transcriber.ts +19 -10
  162. package/src/transcriber/transcription-manager.ts +66 -57
  163. package/src/translations.ts +2 -0
  164. package/src/types/schema.ts +10 -31
  165. package/src/types/types.ts +18 -8
  166. package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs +0 -168
  167. package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs.map +0 -7
  168. package/dist/lib/browser/chunk-5Q3R53U3.mjs +0 -73
  169. package/dist/lib/browser/chunk-5Q3R53U3.mjs.map +0 -7
  170. package/dist/lib/browser/chunk-DR3NBV6Q.mjs.map +0 -7
  171. package/dist/lib/browser/chunk-GI5LZ4SV.mjs +0 -8
  172. package/dist/lib/browser/chunk-GI5LZ4SV.mjs.map +0 -7
  173. package/dist/lib/browser/chunk-RHHJZQPM.mjs.map +0 -7
  174. package/dist/lib/browser/intent-resolver-ZQQEH27F.mjs.map +0 -7
  175. package/dist/lib/browser/react-surface-HETJ5XY6.mjs.map +0 -7
  176. package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs +0 -177
  177. package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs.map +0 -7
  178. package/dist/lib/node/chunk-3QEJ5EBO.cjs.map +0 -7
  179. package/dist/lib/node/chunk-KO6MKCED.cjs.map +0 -7
  180. package/dist/lib/node/chunk-LA73IHCB.cjs.map +0 -7
  181. package/dist/lib/node/chunk-WXG4Z2EZ.cjs.map +0 -7
  182. package/dist/lib/node/intent-resolver-VY3XWYAA.cjs.map +0 -7
  183. package/dist/lib/node/react-surface-M2JQIIDY.cjs.map +0 -7
  184. package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs +0 -169
  185. package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs.map +0 -7
  186. package/dist/lib/node-esm/chunk-54HDN33F.mjs.map +0 -7
  187. package/dist/lib/node-esm/chunk-K3R3YK3S.mjs.map +0 -7
  188. package/dist/lib/node-esm/chunk-SDMGJZLN.mjs.map +0 -7
  189. package/dist/lib/node-esm/chunk-XY22OP6H.mjs +0 -10
  190. package/dist/lib/node-esm/chunk-XY22OP6H.mjs.map +0 -7
  191. package/dist/lib/node-esm/intent-resolver-FCTNJPWY.mjs.map +0 -7
  192. package/dist/lib/node-esm/react-surface-PXFSIM6V.mjs.map +0 -7
  193. package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts +0 -13
  194. package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts.map +0 -1
  195. package/dist/types/src/components/Transcript/testings.d.ts +0 -51
  196. package/dist/types/src/components/Transcript/testings.d.ts.map +0 -1
  197. package/dist/types/src/testing/test-data.d.ts +0 -73
  198. package/dist/types/src/testing/test-data.d.ts.map +0 -1
  199. package/src/components/Transcript/testings.ts +0 -182
  200. package/src/testing/test-data.ts +0 -314
  201. /package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs.map → TranscriptContainer-CXA4ZBHW.mjs.map} +0 -0
  202. /package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs.map → meeting-transcription-state-MNA2XROE.mjs.map} +0 -0
  203. /package/dist/lib/browser/{transcriber-SMRLU2KY.mjs.map → transcriber-YWWIV6KP.mjs.map} +0 -0
  204. /package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs.map → meeting-transcription-state-5XLTMWPA.cjs.map} +0 -0
  205. /package/dist/lib/node/{transcriber-E6AAB4SU.cjs.map → transcriber-AFUXFHCR.cjs.map} +0 -0
  206. /package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs.map → TranscriptContainer-M53LI2TX.mjs.map} +0 -0
  207. /package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs.map → meeting-transcription-state-3WOZ52BQ.mjs.map} +0 -0
  208. /package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs.map → transcriber-7RJEFPDI.mjs.map} +0 -0
@@ -26,30 +26,39 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var react_surface_M2JQIIDY_exports = {};
30
- __export(react_surface_M2JQIIDY_exports, {
29
+ var react_surface_SZAMHCX7_exports = {};
30
+ __export(react_surface_SZAMHCX7_exports, {
31
31
  default: () => react_surface_default
32
32
  });
33
- module.exports = __toCommonJS(react_surface_M2JQIIDY_exports);
34
- var import_chunk_WXG4Z2EZ = require("./chunk-WXG4Z2EZ.cjs");
35
- var import_chunk_KO6MKCED = require("./chunk-KO6MKCED.cjs");
36
- var import_chunk_3QEJ5EBO = require("./chunk-3QEJ5EBO.cjs");
37
- var import_chunk_HYGDHS6X = require("./chunk-HYGDHS6X.cjs");
33
+ module.exports = __toCommonJS(react_surface_SZAMHCX7_exports);
34
+ var import_chunk_L27AK6FQ = require("./chunk-L27AK6FQ.cjs");
35
+ var import_chunk_EVE3H46F = require("./chunk-EVE3H46F.cjs");
36
+ var import_chunk_EJWB53WK = require("./chunk-EJWB53WK.cjs");
37
+ var import_chunk_JUGOXWES = require("./chunk-JUGOXWES.cjs");
38
38
  var import_chunk_NVZWGFJL = require("./chunk-NVZWGFJL.cjs");
39
39
  var import_react = __toESM(require("react"));
40
40
  var import_app_framework = require("@dxos/app-framework");
41
+ var import_local_storage = require("@dxos/local-storage");
41
42
  var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
42
43
  (0, import_app_framework.createSurface)({
43
- id: `${import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN}/article/transcript`,
44
+ id: `${import_chunk_NVZWGFJL.meta.id}/plugin-settings`,
45
+ role: "article",
46
+ filter: (data) => data.subject instanceof import_local_storage.SettingsStore && data.subject.prefix === import_chunk_NVZWGFJL.meta.id,
47
+ component: ({ data: { subject } }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_L27AK6FQ.TranscriptionSettings, {
48
+ settings: subject.value
49
+ })
50
+ }),
51
+ (0, import_app_framework.createSurface)({
52
+ id: `${import_chunk_NVZWGFJL.meta.id}/article/transcript`,
44
53
  role: [
45
54
  "article",
46
55
  "section"
47
56
  ],
48
- filter: (data) => (0, import_chunk_3QEJ5EBO.isTranscript)(data.subject),
49
- component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_KO6MKCED.TranscriptionContainer, {
57
+ filter: (data) => (0, import_chunk_EJWB53WK.isTranscript)(data.subject),
58
+ component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_EVE3H46F.TranscriptionContainer, {
50
59
  transcript: data.subject,
51
60
  role
52
61
  })
53
62
  })
54
63
  ]);
55
- //# sourceMappingURL=react-surface-M2JQIIDY.cjs.map
64
+ //# sourceMappingURL=react-surface-SZAMHCX7.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { SettingsStore } from '@dxos/local-storage';\n\nimport { TranscriptionContainer, TranscriptionSettings } from '../components';\nimport { meta } from '../meta';\nimport { isTranscript, type TranscriptionSettingsProps, type TranscriptType } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${meta.id}/plugin-settings`,\n role: 'article',\n filter: (data): data is { subject: SettingsStore<TranscriptionSettingsProps> } =>\n data.subject instanceof SettingsStore && data.subject.prefix === meta.id,\n component: ({ data: { subject } }) => <TranscriptionSettings settings={subject.value} />,\n }),\n createSurface({\n id: `${meta.id}/article/transcript`,\n role: ['article', 'section'],\n filter: (data): data is { subject: TranscriptType } => isTranscript(data.subject),\n component: ({ data, role }) => <TranscriptionContainer transcript={data.subject} role={role} />,\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AACzD,2BAA8B;AAM9B,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SACPA,KAAKC,mBAAmBC,sCAAiBF,KAAKC,QAAQE,WAAWN,2BAAKD;IACxEQ,WAAW,CAAC,EAAEJ,MAAM,EAAEC,QAAO,EAAE,MAAO,6BAAAI,QAAA,cAACC,6CAAAA;MAAsBC,UAAUN,QAAQO;;EACjF,CAAA;MACAb,oCAAc;IACZC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,aAA8CS,oCAAaT,KAAKC,OAAO;IAChFG,WAAW,CAAC,EAAEJ,MAAMF,KAAI,MAAO,6BAAAO,QAAA,cAACK,8CAAAA;MAAuBC,YAAYX,KAAKC;MAASH;;EACnF,CAAA;CACD;",
6
+ "names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "subject", "SettingsStore", "prefix", "component", "React", "TranscriptionSettings", "settings", "value", "isTranscript", "TranscriptionContainer", "transcript"]
7
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var settings_AWWMOSCV_exports = {};
20
+ __export(settings_AWWMOSCV_exports, {
21
+ default: () => settings_default
22
+ });
23
+ module.exports = __toCommonJS(settings_AWWMOSCV_exports);
24
+ var import_chunk_EJWB53WK = require("./chunk-EJWB53WK.cjs");
25
+ var import_chunk_NVZWGFJL = require("./chunk-NVZWGFJL.cjs");
26
+ var import_app_framework = require("@dxos/app-framework");
27
+ var import_live_object = require("@dxos/live-object");
28
+ var settings_default = () => {
29
+ const settings = (0, import_live_object.live)(import_chunk_EJWB53WK.TranscriptionSettingsSchema, {
30
+ entityExtraction: true
31
+ });
32
+ return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Settings, {
33
+ schema: import_chunk_EJWB53WK.TranscriptionSettingsSchema,
34
+ prefix: import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN,
35
+ value: settings
36
+ });
37
+ };
38
+ //# sourceMappingURL=settings-AWWMOSCV.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { live } from '@dxos/live-object';\n\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { TranscriptionSettingsSchema } from '../types';\n\nexport default () => {\n // TODO(wittjosiah): `live` currently doesn't handle schema default values.\n const settings = live(TranscriptionSettingsSchema, { entityExtraction: true });\n\n return contributes(Capabilities.Settings, {\n schema: TranscriptionSettingsSchema,\n prefix: TRANSCRIPTION_PLUGIN,\n value: settings,\n });\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA0C;AAC1C,yBAAqB;AAKrB,IAAA,mBAAe,MAAA;AAEb,QAAMA,eAAWC,yBAAKC,mDAA6B;IAAEC,kBAAkB;EAAK,CAAA;AAE5E,aAAOC,kCAAYC,kCAAaC,UAAU;IACxCC,QAAQL;IACRM,QAAQC;IACRC,OAAOV;EACT,CAAA;AACF;",
6
+ "names": ["settings", "live", "TranscriptionSettingsSchema", "entityExtraction", "contributes", "Capabilities", "Settings", "schema", "prefix", "TRANSCRIPTION_PLUGIN", "value"]
7
+ }
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var transcriber_E6AAB4SU_exports = {};
20
- __export(transcriber_E6AAB4SU_exports, {
19
+ var transcriber_AFUXFHCR_exports = {};
20
+ __export(transcriber_AFUXFHCR_exports, {
21
21
  default: () => transcriber_default
22
22
  });
23
- module.exports = __toCommonJS(transcriber_E6AAB4SU_exports);
24
- var import_chunk_LA73IHCB = require("./chunk-LA73IHCB.cjs");
23
+ module.exports = __toCommonJS(transcriber_AFUXFHCR_exports);
24
+ var import_chunk_WKZLGVEJ = require("./chunk-WKZLGVEJ.cjs");
25
25
  var import_chunk_J72PUQ3C = require("./chunk-J72PUQ3C.cjs");
26
- var import_chunk_3QEJ5EBO = require("./chunk-3QEJ5EBO.cjs");
27
- var import_chunk_HYGDHS6X = require("./chunk-HYGDHS6X.cjs");
26
+ var import_chunk_EJWB53WK = require("./chunk-EJWB53WK.cjs");
27
+ var import_chunk_JUGOXWES = require("./chunk-JUGOXWES.cjs");
28
28
  var import_chunk_NVZWGFJL = require("./chunk-NVZWGFJL.cjs");
29
29
  var import_app_framework = require("@dxos/app-framework");
30
30
  var RECORD_INTERVAL = 200;
@@ -32,19 +32,19 @@ var PREFIXED_CHUNKS_AMOUNT = 10;
32
32
  var TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;
33
33
  var transcriber_default = () => {
34
34
  const getTranscriber = ({ audioStreamTrack, onSegments, config }) => {
35
- return new import_chunk_LA73IHCB.Transcriber({
35
+ return new import_chunk_WKZLGVEJ.Transcriber({
36
36
  config: {
37
37
  transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,
38
38
  prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,
39
39
  ...config
40
40
  },
41
- recorder: new import_chunk_LA73IHCB.MediaStreamRecorder({
41
+ recorder: new import_chunk_WKZLGVEJ.MediaStreamRecorder({
42
42
  mediaStreamTrack: audioStreamTrack,
43
43
  interval: RECORD_INTERVAL
44
44
  }),
45
45
  onSegments
46
46
  });
47
47
  };
48
- return (0, import_app_framework.contributes)(import_chunk_HYGDHS6X.TranscriptionCapabilities.Transcriber, getTranscriber);
48
+ return (0, import_app_framework.contributes)(import_chunk_JUGOXWES.TranscriptionCapabilities.Transcriber, getTranscriber);
49
49
  };
50
- //# sourceMappingURL=transcriber-E6AAB4SU.cjs.map
50
+ //# sourceMappingURL=transcriber-AFUXFHCR.cjs.map
@@ -18,23 +18,23 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var types_exports = {};
20
20
  __export(types_exports, {
21
- TRANSCRIPTION_URL: () => import_chunk_3QEJ5EBO.TRANSCRIPTION_URL,
22
- TranscriptBlock: () => import_chunk_3QEJ5EBO.TranscriptBlock,
23
- TranscriptSchema: () => import_chunk_3QEJ5EBO.TranscriptSchema,
24
- TranscriptType: () => import_chunk_3QEJ5EBO.TranscriptType,
25
- TranscriptionAction: () => import_chunk_3QEJ5EBO.TranscriptionAction,
26
- isTranscript: () => import_chunk_3QEJ5EBO.isTranscript
21
+ TRANSCRIPTION_URL: () => import_chunk_EJWB53WK.TRANSCRIPTION_URL,
22
+ TranscriptSchema: () => import_chunk_EJWB53WK.TranscriptSchema,
23
+ TranscriptType: () => import_chunk_EJWB53WK.TranscriptType,
24
+ TranscriptionAction: () => import_chunk_EJWB53WK.TranscriptionAction,
25
+ TranscriptionSettingsSchema: () => import_chunk_EJWB53WK.TranscriptionSettingsSchema,
26
+ isTranscript: () => import_chunk_EJWB53WK.isTranscript
27
27
  });
28
28
  module.exports = __toCommonJS(types_exports);
29
- var import_chunk_3QEJ5EBO = require("../chunk-3QEJ5EBO.cjs");
29
+ var import_chunk_EJWB53WK = require("../chunk-EJWB53WK.cjs");
30
30
  var import_chunk_NVZWGFJL = require("../chunk-NVZWGFJL.cjs");
31
31
  // Annotate the CommonJS export names for ESM import in node:
32
32
  0 && (module.exports = {
33
33
  TRANSCRIPTION_URL,
34
- TranscriptBlock,
35
34
  TranscriptSchema,
36
35
  TranscriptType,
37
36
  TranscriptionAction,
37
+ TranscriptionSettingsSchema,
38
38
  isTranscript
39
39
  });
40
40
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.cjs"],
4
- "sourcesContent": ["import {\n TRANSCRIPTION_URL,\n TranscriptBlock,\n TranscriptSchema,\n TranscriptType,\n TranscriptionAction,\n isTranscript\n} from \"../chunk-3QEJ5EBO.cjs\";\nimport \"../chunk-NVZWGFJL.cjs\";\nexport {\n TRANSCRIPTION_URL,\n TranscriptBlock,\n TranscriptSchema,\n TranscriptType,\n TranscriptionAction,\n isTranscript\n};\n//# sourceMappingURL=index.cjs.map\n"],
4
+ "sourcesContent": ["import {\n TRANSCRIPTION_URL,\n TranscriptSchema,\n TranscriptType,\n TranscriptionAction,\n TranscriptionSettingsSchema,\n isTranscript\n} from \"../chunk-EJWB53WK.cjs\";\nimport \"../chunk-NVZWGFJL.cjs\";\nexport {\n TRANSCRIPTION_URL,\n TranscriptSchema,\n TranscriptType,\n TranscriptionAction,\n TranscriptionSettingsSchema,\n isTranscript\n};\n//# sourceMappingURL=index.cjs.map\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOO;AACP,4BAAO;",
6
6
  "names": []
7
7
  }
@@ -2,11 +2,11 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  TranscriptContainer_default,
4
4
  TranscriptionContainer
5
- } from "./chunk-SDMGJZLN.mjs";
6
- import "./chunk-YXZOLOFT.mjs";
5
+ } from "./chunk-4KC3E5T4.mjs";
6
+ import "./chunk-5E2MR5XK.mjs";
7
7
  import "./chunk-X4DDJIVL.mjs";
8
8
  export {
9
9
  TranscriptionContainer,
10
10
  TranscriptContainer_default as default
11
11
  };
12
- //# sourceMappingURL=TranscriptContainer-3HJ752CP.mjs.map
12
+ //# sourceMappingURL=TranscriptContainer-M53LI2TX.mjs.map
@@ -0,0 +1,352 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ TranscriptionManager
4
+ } from "./chunk-V5IWBPYO.mjs";
5
+ import "./chunk-QMHMEKB3.mjs";
6
+ import {
7
+ TranscriptType,
8
+ TranscriptionAction
9
+ } from "./chunk-QYG2FOXA.mjs";
10
+ import {
11
+ TranscriptionCapabilities
12
+ } from "./chunk-5E2MR5XK.mjs";
13
+ import {
14
+ TRANSCRIPTION_PLUGIN
15
+ } from "./chunk-X4DDJIVL.mjs";
16
+
17
+ // packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts
18
+ import { Rx } from "@effect-rx/rx-react";
19
+ import { Option, pipe } from "effect";
20
+ import { Capabilities, contributes, createIntent } from "@dxos/app-framework";
21
+ import { AIServiceEdgeClient } from "@dxos/assistant";
22
+ import { AI_SERVICE_ENDPOINT } from "@dxos/assistant/testing";
23
+ import { Filter, fullyQualifiedId, getSpace, makeRef, Query } from "@dxos/client/echo";
24
+ import { getSchemaTypename, isInstanceOf } from "@dxos/echo-schema";
25
+ import { invariant } from "@dxos/invariant";
26
+ import { DXN as DXN2 } from "@dxos/keys";
27
+ import { log as log2 } from "@dxos/log";
28
+ import { ClientCapabilities } from "@dxos/plugin-client";
29
+ import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from "@dxos/plugin-deck/types";
30
+ import { createExtension, rxFromSignal } from "@dxos/plugin-graph";
31
+ import { DocumentType } from "@dxos/plugin-markdown/types";
32
+ import { MeetingCapabilities } from "@dxos/plugin-meeting";
33
+ import { MeetingType } from "@dxos/plugin-meeting/types";
34
+ import { DataType as DataType2 } from "@dxos/schema";
35
+
36
+ // packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts
37
+ import { Schema } from "effect";
38
+ import { createTemplate, Message, structuredOutputParser } from "@dxos/artifact";
39
+ import { MixedStreamParser } from "@dxos/assistant";
40
+ import { asyncTimeout } from "@dxos/async";
41
+ import { create, ObjectId } from "@dxos/echo-schema";
42
+ import { DXN } from "@dxos/keys";
43
+ import { log } from "@dxos/log";
44
+ import { DataType } from "@dxos/schema";
45
+
46
+ // raw-loader:./system-prompt.tpl?raw
47
+ var system_prompt_default = 'You are an AI assistant specialized in processing and enhancing transcripts with contextual information.\nYour task is to analyze a given transcript and extract references to the context objects.\n\nThe context and transcript are provided in the user message in `context` and `transcript` XML tags.\n\nHere are your instructions:\n\n1. Read the transcript and context information provided above.\n\n2. Process each segment of the transcript separately.\n\n3. For each segment:\n a. Analyze the content and identify relevant information from the context.\n b. Extract a number of references to the context objects that are mentioned in the segment.\n c. Output the references in the format `{ "quote": "earnings report", "id": "01JT0JP9AX0XKGZX4MV4B69VT6" }`.\n d. If there are no references, just output an empty array.\n\n4. Maintain the exact order and structure of the original transcript segments.\n\nOutput Format:\nThe final output should be a JSON array of references.\n\nExample output structure:\n```json\n{\n "references": [\n { "quote": "earnings report", "id": "01JT0JP9AX0XKGZX4MV4B69VT6" },\n { "quote": "John", "id": "01JT0VM0VN3ZKN7GDBM8CV9BA7" }\n ]\n}\n```\n\nRemember:\n- Only quote the text that is in the transcript.\n- Analyze each segment carefully before processing it.\n- Only reference objects that appear in the context and exactly by their id, If the object is not in the context, do not insert a reference. \n\nNow, process the transcript and context provided below according to these instructions.';
48
+
49
+ // packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts
50
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts";
51
+ var createSystemPrompt = () => {
52
+ const template = createTemplate(system_prompt_default);
53
+ return template({});
54
+ };
55
+ var ReferencedQuotes = Schema.Struct({
56
+ references: Schema.Array(Schema.Struct({
57
+ quote: Schema.String,
58
+ id: Schema.String
59
+ })).annotations({
60
+ description: "The references to the context objects that are mentioned in the transcript. quote should match the original transcript text exactly, while id is the id of the context object."
61
+ })
62
+ });
63
+ var processTranscriptMessage = async (params) => {
64
+ try {
65
+ const outputParser = structuredOutputParser(ReferencedQuotes);
66
+ const runParser = async () => {
67
+ const startTime = performance.now();
68
+ const result = outputParser.getResult(await new MixedStreamParser().parse(await params.aiService.execStream({
69
+ model: "@anthropic/claude-3-5-haiku-20241022",
70
+ systemPrompt: createSystemPrompt(),
71
+ history: [
72
+ create(Message, {
73
+ role: "user",
74
+ content: [
75
+ {
76
+ type: "text",
77
+ text: `<context>${JSON.stringify(params.context.objects)}</context>`
78
+ },
79
+ {
80
+ type: "text",
81
+ text: `<transcript>${JSON.stringify(params.message.blocks)}</transcript>`
82
+ }
83
+ ]
84
+ })
85
+ ],
86
+ tools: [
87
+ outputParser.tool
88
+ ]
89
+ })));
90
+ log.info("entity extraction result", {
91
+ refs: result.references
92
+ }, {
93
+ F: __dxlog_file,
94
+ L: 98,
95
+ S: void 0,
96
+ C: (f, a) => f(...a)
97
+ });
98
+ return {
99
+ message: create(DataType.Message, {
100
+ ...params.message,
101
+ blocks: params.message.blocks.map((block, i) => block.type !== "transcription" ? block : {
102
+ ...block,
103
+ text: postprocessText(block.text, result)
104
+ })
105
+ }),
106
+ timeElapsed: performance.now() - startTime
107
+ };
108
+ };
109
+ if (params.options?.timeout && params.options.timeout > 0) {
110
+ return await asyncTimeout(runParser(), params.options.timeout);
111
+ } else {
112
+ return await runParser();
113
+ }
114
+ } catch (error) {
115
+ if (params.options?.fallbackToRaw) {
116
+ log.warn("failed to process transcript message, falling back to raw text", {
117
+ error
118
+ }, {
119
+ F: __dxlog_file,
120
+ L: 123,
121
+ S: void 0,
122
+ C: (f, a) => f(...a)
123
+ });
124
+ return {
125
+ message: params.message,
126
+ timeElapsed: 0
127
+ };
128
+ } else {
129
+ throw error;
130
+ }
131
+ }
132
+ };
133
+ var postprocessText = (text, quotes) => {
134
+ for (const quote of quotes.references) {
135
+ if (!ObjectId.isValid(quote.id)) {
136
+ continue;
137
+ }
138
+ const regex = new RegExp(quote.quote.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi");
139
+ text = text.replace(regex, `[${quote.quote}][${DXN.fromLocalObjectId(quote.id).toString()}]`);
140
+ }
141
+ return text;
142
+ };
143
+
144
+ // packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts
145
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts";
146
+ var getMeetingTranscript = async (context, meeting) => {
147
+ const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
148
+ const typename = getSchemaTypename(TranscriptType);
149
+ const existing = await meeting.artifacts[typename]?.load();
150
+ if (existing instanceof TranscriptType) {
151
+ return existing;
152
+ }
153
+ const space = getSpace(meeting);
154
+ invariant(space, void 0, {
155
+ F: __dxlog_file2,
156
+ L: 49,
157
+ S: void 0,
158
+ A: [
159
+ "space",
160
+ ""
161
+ ]
162
+ });
163
+ const { data } = await dispatch(createIntent(TranscriptionAction.Create, {
164
+ spaceId: space.id
165
+ }));
166
+ meeting.artifacts[typename] = makeRef(data.object);
167
+ return data?.object;
168
+ };
169
+ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
170
+ createExtension({
171
+ id: `${TRANSCRIPTION_PLUGIN}/meeting-transcript`,
172
+ actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => isInstanceOf(MeetingType, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((meeting) => {
173
+ const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
174
+ const enabled = get(rxFromSignal(() => state.enabled));
175
+ return [
176
+ {
177
+ id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,
178
+ data: async () => {
179
+ const transcript = await getMeetingTranscript(context, meeting);
180
+ invariant(transcript, "Failed to create transcript", {
181
+ F: __dxlog_file2,
182
+ L: 76,
183
+ S: void 0,
184
+ A: [
185
+ "transcript",
186
+ "'Failed to create transcript'"
187
+ ]
188
+ });
189
+ const callManager = context.getCapability(MeetingCapabilities.CallManager);
190
+ callManager.setActivity(getSchemaTypename(TranscriptType), {
191
+ queueDxn: transcript.queue.dxn.toString(),
192
+ enabled: !enabled
193
+ });
194
+ },
195
+ properties: {
196
+ label: enabled ? [
197
+ "stop transcription label",
198
+ {
199
+ ns: TRANSCRIPTION_PLUGIN
200
+ }
201
+ ] : [
202
+ "start transcription label",
203
+ {
204
+ ns: TRANSCRIPTION_PLUGIN
205
+ }
206
+ ],
207
+ icon: "ph--subtitles--regular",
208
+ disposition: "toolbar",
209
+ classNames: enabled ? "bg-callAlert" : ""
210
+ }
211
+ }
212
+ ];
213
+ }), Option.getOrElse(() => []))),
214
+ connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => isInstanceOf(MeetingType, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((meeting) => {
215
+ const client = context.getCapability(ClientCapabilities.Client);
216
+ const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
217
+ const settingsStore = get(context.capabilities(Capabilities.SettingsStore))[0];
218
+ const settings = get(rxFromSignal(() => settingsStore?.getStore(TRANSCRIPTION_PLUGIN).value));
219
+ const aiClient = new AIServiceEdgeClient({
220
+ // TODO(burdon): Get from config.
221
+ endpoint: AI_SERVICE_ENDPOINT.REMOTE
222
+ });
223
+ return [
224
+ {
225
+ id: `${fullyQualifiedId(meeting)}${ATTENDABLE_PATH_SEPARATOR}${getSchemaTypename(TranscriptType)}`,
226
+ type: PLANK_COMPANION_TYPE,
227
+ data: get(rxFromSignal(() => meeting.artifacts[getSchemaTypename(TranscriptType)]?.target)),
228
+ properties: {
229
+ label: [
230
+ "transcript companion label",
231
+ {
232
+ ns: TRANSCRIPTION_PLUGIN
233
+ }
234
+ ],
235
+ icon: "ph--subtitles--regular",
236
+ position: "hoist",
237
+ disposition: "hidden",
238
+ schema: TranscriptType,
239
+ getIntent: ({ space }) => createIntent(TranscriptionAction.Create, {
240
+ spaceId: space.id
241
+ }),
242
+ // TODO(burdon): Is this the right place to inisitalize the state? Change to a capability?
243
+ onJoin: async ({ meeting: meeting2 }) => {
244
+ const identity = client.halo.identity.get();
245
+ invariant(identity, void 0, {
246
+ F: __dxlog_file2,
247
+ L: 134,
248
+ S: void 0,
249
+ A: [
250
+ "identity",
251
+ ""
252
+ ]
253
+ });
254
+ const space = getSpace(meeting2);
255
+ invariant(space, void 0, {
256
+ F: __dxlog_file2,
257
+ L: 136,
258
+ S: void 0,
259
+ A: [
260
+ "space",
261
+ ""
262
+ ]
263
+ });
264
+ let messageEnricher;
265
+ if (aiClient && settings.entityExtraction) {
266
+ messageEnricher = createEntityExtractionEnricher({
267
+ aiClient,
268
+ // TODO(dmaretskyi): Have those be discovered from the schema graph or contributed by capabilities?
269
+ // This forced me to add a dependency on markdown plugin.
270
+ // This will be replaced with a vector search index anyway, so its not a big deal.
271
+ contextTypes: [
272
+ DocumentType,
273
+ DataType2.Person,
274
+ DataType2.Organization
275
+ ],
276
+ space
277
+ });
278
+ }
279
+ state.transcriptionManager = await new TranscriptionManager({
280
+ edgeClient: client.edge,
281
+ messageEnricher
282
+ }).setIdentityDid(identity.did).open();
283
+ },
284
+ onLeave: async () => {
285
+ await state.transcriptionManager?.close();
286
+ state.transcriptionManager = void 0;
287
+ state.enabled = false;
288
+ },
289
+ onCallStateUpdated: async (callState) => {
290
+ const typename = getSchemaTypename(TranscriptType);
291
+ const transcription = typename ? callState.activities?.[typename] : void 0;
292
+ if (!transcription?.payload) {
293
+ return;
294
+ }
295
+ const payload = transcription.payload;
296
+ state.enabled = !!payload.enabled;
297
+ if (payload.queueDxn) {
298
+ state.transcriptionManager?.setQueue(DXN2.parse(payload.queueDxn));
299
+ }
300
+ await state.transcriptionManager?.setEnabled(payload.enabled);
301
+ },
302
+ onMediaStateUpdated: async ([mediaState, isSpeaking]) => {
303
+ void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);
304
+ void state.transcriptionManager?.setRecording(isSpeaking);
305
+ }
306
+ }
307
+ }
308
+ ];
309
+ }), Option.getOrElse(() => [])))
310
+ })
311
+ ]);
312
+ var createEntityExtractionEnricher = ({ aiClient, contextTypes, space }) => {
313
+ return async (message) => {
314
+ const { objects } = await space.db.query(Query.select(Filter.or(...contextTypes.map((s) => Filter.type(s))))).run();
315
+ log2.info("context", {
316
+ objects
317
+ }, {
318
+ F: __dxlog_file2,
319
+ L: 203,
320
+ S: void 0,
321
+ C: (f, a) => f(...a)
322
+ });
323
+ const { message: enhancedMessage, timeElapsed } = await processTranscriptMessage({
324
+ aiService: aiClient,
325
+ message,
326
+ context: {
327
+ objects: await Promise.all(objects.map((o) => processContextObject(o)))
328
+ },
329
+ options: {
330
+ timeout: ENTITY_EXTRACTOR_TIMEOUT,
331
+ fallbackToRaw: true
332
+ }
333
+ });
334
+ log2.info("entity extraction time", {
335
+ timeElapsed
336
+ }, {
337
+ F: __dxlog_file2,
338
+ L: 214,
339
+ S: void 0,
340
+ C: (f, a) => f(...a)
341
+ });
342
+ return enhancedMessage;
343
+ };
344
+ };
345
+ var processContextObject = async (object) => {
346
+ return object;
347
+ };
348
+ var ENTITY_EXTRACTOR_TIMEOUT = 25e3;
349
+ export {
350
+ app_graph_builder_default as default
351
+ };
352
+ //# sourceMappingURL=app-graph-builder-UBP6EOBR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.ts", "../../../src/entity-extraction/entity-extraction.ts", "raw-loader:./system-prompt.tpl?raw"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe, type Schema } from 'effect';\n\nimport { Capabilities, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { AIServiceEdgeClient, type AIServiceClient } from '@dxos/assistant';\nimport { AI_SERVICE_ENDPOINT } from '@dxos/assistant/testing';\nimport { Filter, fullyQualifiedId, getSpace, makeRef, Query, type Space } from '@dxos/client/echo';\nimport { getSchemaTypename, isInstanceOf, type BaseEchoObject } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';\nimport { createExtension, rxFromSignal } from '@dxos/plugin-graph';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { MeetingCapabilities, type CallState, type MediaState } from '@dxos/plugin-meeting';\nimport { MeetingType, type MeetingCallProperties } from '@dxos/plugin-meeting/types';\nimport { type buf } from '@dxos/protocols/buf';\nimport { type TranscriptionPayloadSchema } from '@dxos/protocols/buf/dxos/edge/calls_pb';\nimport { DataType } from '@dxos/schema';\n\nimport { TranscriptionCapabilities } from './capabilities';\nimport { processTranscriptMessage } from '../entity-extraction';\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { TranscriptionManager } from '../transcriber';\nimport { TranscriptionAction, type TranscriptionSettingsProps, TranscriptType } from '../types';\n\n// TODO(wittjosiah): Factor out.\n// TODO(wittjosiah): Can we stop using protobuf for this?\ntype TranscriptionPayload = buf.MessageInitShape<typeof TranscriptionPayloadSchema>;\n\nconst getMeetingTranscript = async (\n context: PluginContext,\n meeting: MeetingType,\n): Promise<TranscriptType | undefined> => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n\n const typename = getSchemaTypename(TranscriptType)!;\n const existing = await meeting.artifacts[typename]?.load();\n if (existing instanceof TranscriptType) {\n return existing;\n }\n\n const space = getSpace(meeting);\n invariant(space);\n const { data } = await dispatch(createIntent(TranscriptionAction.Create, { spaceId: space.id }));\n meeting.artifacts[typename] = makeRef(data!.object);\n return data?.object;\n};\n\n// TODO(wittjosiah): Introduce a sound that plays when transcription is activated/deactivated.\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${TRANSCRIPTION_PLUGIN}/meeting-transcript`,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (isInstanceOf(MeetingType, node.data) ? Option.some(node.data) : Option.none())),\n Option.map((meeting) => {\n const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);\n const enabled = get(rxFromSignal(() => state.enabled));\n return [\n {\n id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,\n data: async () => {\n // NOTE: We are not saving the state of the transcription manager here.\n // We expect the state to be updated through `onCallStateUpdated` once it is propagated through Swarm.\n // This is done to avoid race conditions and to not handle optimistic updates.\n const transcript = await getMeetingTranscript(context, meeting);\n invariant(transcript, 'Failed to create transcript');\n\n const callManager = context.getCapability(MeetingCapabilities.CallManager);\n callManager.setActivity(getSchemaTypename(TranscriptType)!, {\n queueDxn: transcript.queue.dxn.toString(),\n enabled: !enabled,\n });\n },\n properties: {\n label: enabled\n ? ['stop transcription label', { ns: TRANSCRIPTION_PLUGIN }]\n : ['start transcription label', { ns: TRANSCRIPTION_PLUGIN }],\n icon: 'ph--subtitles--regular',\n disposition: 'toolbar',\n classNames: enabled ? 'bg-callAlert' : '',\n },\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (isInstanceOf(MeetingType, node.data) ? Option.some(node.data) : Option.none())),\n Option.map((meeting) => {\n const client = context.getCapability(ClientCapabilities.Client);\n const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);\n const settingsStore = get(context.capabilities(Capabilities.SettingsStore))[0];\n const settings = get(\n rxFromSignal(() => settingsStore?.getStore<TranscriptionSettingsProps>(TRANSCRIPTION_PLUGIN)!.value),\n );\n\n // TODO(dmaretskyi): Request via capability.\n const aiClient: AIServiceClient | undefined = new AIServiceEdgeClient({\n // TODO(burdon): Get from config.\n endpoint: AI_SERVICE_ENDPOINT.REMOTE,\n });\n\n return [\n {\n id: `${fullyQualifiedId(meeting)}${ATTENDABLE_PATH_SEPARATOR}${getSchemaTypename(TranscriptType)}`,\n type: PLANK_COMPANION_TYPE,\n data: get(rxFromSignal(() => meeting.artifacts[getSchemaTypename(TranscriptType)!]?.target)),\n properties: {\n label: ['transcript companion label', { ns: TRANSCRIPTION_PLUGIN }],\n icon: 'ph--subtitles--regular',\n position: 'hoist',\n disposition: 'hidden',\n schema: TranscriptType,\n getIntent: ({ space }: { space: Space }) =>\n createIntent(TranscriptionAction.Create, { spaceId: space.id }),\n\n // TODO(burdon): Is this the right place to inisitalize the state? Change to a capability?\n onJoin: async ({ meeting }: { meeting?: MeetingType }) => {\n const identity = client.halo.identity.get();\n invariant(identity);\n const space = getSpace(meeting);\n invariant(space);\n\n let messageEnricher;\n if (aiClient && settings.entityExtraction) {\n messageEnricher = createEntityExtractionEnricher({\n aiClient,\n // TODO(dmaretskyi): Have those be discovered from the schema graph or contributed by capabilities?\n // This forced me to add a dependency on markdown plugin.\n // This will be replaced with a vector search index anyway, so its not a big deal.\n contextTypes: [DocumentType, DataType.Person, DataType.Organization],\n space,\n });\n }\n\n // TODO(burdon): The TranscriptionManager singleton is part of the state and should just be updated here.\n state.transcriptionManager = await new TranscriptionManager({\n edgeClient: client.edge,\n messageEnricher,\n })\n .setIdentityDid(identity.did)\n .open();\n },\n onLeave: async () => {\n await state.transcriptionManager?.close();\n state.transcriptionManager = undefined;\n state.enabled = false;\n },\n onCallStateUpdated: async (callState: CallState) => {\n const typename = getSchemaTypename(TranscriptType);\n const transcription = typename ? callState.activities?.[typename] : undefined;\n if (!transcription?.payload) {\n return;\n }\n\n const payload: TranscriptionPayload = transcription.payload;\n state.enabled = !!payload.enabled;\n if (payload.queueDxn) {\n // NOTE: Must set queue before enabling transcription.\n state.transcriptionManager?.setQueue(DXN.parse(payload.queueDxn));\n }\n await state.transcriptionManager?.setEnabled(payload.enabled);\n },\n onMediaStateUpdated: async ([mediaState, isSpeaking]: [MediaState, boolean]) => {\n void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);\n void state.transcriptionManager?.setRecording(isSpeaking);\n },\n } satisfies MeetingCallProperties,\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n\ntype EntityExtractionEnricherFactoryOptions = {\n aiClient: AIServiceClient;\n contextTypes: Schema.Schema.AnyNoContext[];\n space: Space;\n};\n\nconst createEntityExtractionEnricher = ({ aiClient, contextTypes, space }: EntityExtractionEnricherFactoryOptions) => {\n return async (message: DataType.Message) => {\n const { objects } = await space.db\n .query(Query.select(Filter.or(...contextTypes.map((s) => Filter.type(s as Schema.Schema<BaseEchoObject>)))))\n .run();\n log.info('context', { objects });\n\n const { message: enhancedMessage, timeElapsed } = await processTranscriptMessage({\n aiService: aiClient,\n message,\n context: {\n objects: await Promise.all(objects.map((o) => processContextObject(o))),\n },\n options: { timeout: ENTITY_EXTRACTOR_TIMEOUT, fallbackToRaw: true },\n });\n\n log.info('entity extraction time', { timeElapsed });\n return enhancedMessage;\n };\n};\n\n// TODO(dmaretskyi): Use Type.Any\nconst processContextObject = async (object: BaseEchoObject): Promise<any> => {\n // TODO(dmaretskyi): Documents need special processing is the content is behind a ref.\n // TODO(dmaretskyi): Think about a way to handle this serialization with a decorator.\n // if (isInstanceOf(DocumentType, object)) {\n // return {\n // ...object,\n // content: await object.content.load(),\n // };\n // }\n\n return object;\n};\n\nconst ENTITY_EXTRACTOR_TIMEOUT = 25_000;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { createTemplate, Message, structuredOutputParser } from '@dxos/artifact';\nimport type { AIServiceClient } from '@dxos/assistant';\nimport { MixedStreamParser } from '@dxos/assistant';\nimport { asyncTimeout } from '@dxos/async';\nimport { type BaseEchoObject, create, ObjectId } from '@dxos/echo-schema';\nimport { DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { DataType } from '@dxos/schema';\n\nimport SYSTEM_PROMPT from './system-prompt.tpl?raw';\n\ntype ProcessTranscriptMessageParams = {\n message: DataType.Message;\n aiService: AIServiceClient;\n context: {\n objects?: BaseEchoObject[];\n };\n\n options?: {\n /**\n * Timeout for the entity extraction.\n */\n timeout?: number;\n\n /**\n * Fallback to raw text if the entity extraction fails.\n * Otherwise the function will throw an error.\n * @default false\n */\n fallbackToRaw?: boolean;\n };\n};\n\ntype ProcessTranscriptMessageResult = {\n message: DataType.Message;\n timeElapsed: number;\n};\n\n/**\n * Process Handlebars template.\n */\nconst createSystemPrompt = (): string => {\n const template = createTemplate(SYSTEM_PROMPT);\n return template({});\n};\n\nconst ReferencedQuotes = Schema.Struct({\n references: Schema.Array(\n Schema.Struct({\n quote: Schema.String,\n id: Schema.String,\n }),\n ).annotations({\n description:\n 'The references to the context objects that are mentioned in the transcript. quote should match the original transcript text exactly, while id is the id of the context object.',\n }),\n});\ninterface ReferencedQuotes extends Schema.Schema.Type<typeof ReferencedQuotes> {}\n\n// TODO(dmaretskyi): Move context to a vector search index.\nexport const processTranscriptMessage = async (\n params: ProcessTranscriptMessageParams,\n): Promise<ProcessTranscriptMessageResult> => {\n try {\n const outputParser = structuredOutputParser(ReferencedQuotes);\n const runParser = async (): Promise<ProcessTranscriptMessageResult> => {\n const startTime = performance.now();\n const result = outputParser.getResult(\n await new MixedStreamParser().parse(\n await params.aiService.execStream({\n model: '@anthropic/claude-3-5-haiku-20241022',\n systemPrompt: createSystemPrompt(),\n history: [\n create(Message, {\n role: 'user',\n content: [\n {\n type: 'text',\n text: `<context>${JSON.stringify(params.context.objects)}</context>`,\n },\n {\n type: 'text',\n text: `<transcript>${JSON.stringify(params.message.blocks)}</transcript>`,\n },\n ],\n }),\n ],\n tools: [outputParser.tool],\n }),\n ),\n );\n log.info('entity extraction result', { refs: result.references });\n\n return {\n message: create(DataType.Message, {\n ...params.message,\n blocks: params.message.blocks.map((block, i) =>\n block.type !== 'transcription'\n ? block\n : {\n ...block,\n text: postprocessText(block.text, result),\n },\n ),\n }),\n timeElapsed: performance.now() - startTime,\n };\n };\n\n if (params.options?.timeout && params.options.timeout > 0) {\n return await asyncTimeout(runParser(), params.options.timeout);\n } else {\n return await runParser();\n }\n } catch (error) {\n if (params.options?.fallbackToRaw) {\n log.warn('failed to process transcript message, falling back to raw text', { error });\n return {\n message: params.message,\n timeElapsed: 0,\n };\n } else {\n throw error;\n }\n }\n};\n\n/**\n * Finds and replaces all quotes with DXNs references.\n */\n// TODO(dmaretskyi): Lookup and verifiy ids from provided context.\nexport const postprocessText = (text: string, quotes: ReferencedQuotes) => {\n for (const quote of quotes.references) {\n if (!ObjectId.isValid(quote.id)) {\n continue;\n }\n\n // Use a case-insensitive regular expression to replace the quote\n const regex = new RegExp(quote.quote.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n text = text.replace(regex, `[${quote.quote}][${DXN.fromLocalObjectId(quote.id).toString()}]`);\n }\n return text;\n};\n", "You are an AI assistant specialized in processing and enhancing transcripts with contextual information.\nYour task is to analyze a given transcript and extract references to the context objects.\n\nThe context and transcript are provided in the user message in `context` and `transcript` XML tags.\n\nHere are your instructions:\n\n1. Read the transcript and context information provided above.\n\n2. Process each segment of the transcript separately.\n\n3. For each segment:\n a. Analyze the content and identify relevant information from the context.\n b. Extract a number of references to the context objects that are mentioned in the segment.\n c. Output the references in the format `{ \"quote\": \"earnings report\", \"id\": \"01JT0JP9AX0XKGZX4MV4B69VT6\" }`.\n d. If there are no references, just output an empty array.\n\n4. Maintain the exact order and structure of the original transcript segments.\n\nOutput Format:\nThe final output should be a JSON array of references.\n\nExample output structure:\n```json\n{\n \"references\": [\n { \"quote\": \"earnings report\", \"id\": \"01JT0JP9AX0XKGZX4MV4B69VT6\" },\n { \"quote\": \"John\", \"id\": \"01JT0VM0VN3ZKN7GDBM8CV9BA7\" }\n ]\n}\n```\n\nRemember:\n- Only quote the text that is in the transcript.\n- Analyze each segment carefully before processing it.\n- Only reference objects that appear in the context and exactly by their id, If the object is not in the context, do not insert a reference. \n\nNow, process the transcript and context provided below according to these instructions."],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAyB;AAE1C,SAASC,cAAcC,aAAaC,oBAAwC;AAC5E,SAASC,2BAAiD;AAC1D,SAASC,2BAA2B;AACpC,SAASC,QAAQC,kBAAkBC,UAAUC,SAASC,aAAyB;AAC/E,SAASC,mBAAmBC,oBAAyC;AACrE,SAASC,iBAAiB;AAC1B,SAASC,OAAAA,YAAW;AACpB,SAASC,OAAAA,YAAW;AACpB,SAASC,0BAA0B;AACnC,SAASC,sBAAsBC,iCAAiC;AAChE,SAASC,iBAAiBC,oBAAoB;AAC9C,SAASC,oBAAoB;AAC7B,SAASC,2BAA4D;AACrE,SAASC,mBAA+C;AAGxD,SAASC,YAAAA,iBAAgB;;;ACnBzB,SAASC,cAAc;AAEvB,SAASC,gBAAgBC,SAASC,8BAA8B;AAEhE,SAASC,yBAAyB;AAClC,SAASC,oBAAoB;AAC7B,SAA8BC,QAAQC,gBAAgB;AACtD,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,gBAAgB;;;ACbzB;;;;AD+CA,IAAMC,qBAAqB,MAAA;AACzB,QAAMC,WAAWC,eAAeC,qBAAAA;AAChC,SAAOF,SAAS,CAAC,CAAA;AACnB;AAEA,IAAMG,mBAAmBC,OAAOC,OAAO;EACrCC,YAAYF,OAAOG,MACjBH,OAAOC,OAAO;IACZG,OAAOJ,OAAOK;IACdC,IAAIN,OAAOK;EACb,CAAA,CAAA,EACAE,YAAY;IACZC,aACE;EACJ,CAAA;AACF,CAAA;AAIO,IAAMC,2BAA2B,OACtCC,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CAAAA,CAAAA;MACrE;MACAE,SAAS;QAAEC,SAASC;QAA0BC,eAAe;MAAK;IACpE,CAAA;AAEAb,IAAAA,KAAIC,KAAK,0BAA0B;MAAEE;IAAY,GAAA;;;;;;AACjD,WAAOD;EACT;AACF;AAGA,IAAMO,uBAAuB,OAAOrH,WAAAA;AAUlC,SAAOA;AACT;AAEA,IAAMwH,2BAA2B;",
6
+ "names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "createIntent", "AIServiceEdgeClient", "AI_SERVICE_ENDPOINT", "Filter", "fullyQualifiedId", "getSpace", "makeRef", "Query", "getSchemaTypename", "isInstanceOf", "invariant", "DXN", "log", "ClientCapabilities", "PLANK_COMPANION_TYPE", "ATTENDABLE_PATH_SEPARATOR", "createExtension", "rxFromSignal", "DocumentType", "MeetingCapabilities", "MeetingType", "DataType", "Schema", "createTemplate", "Message", "structuredOutputParser", "MixedStreamParser", "asyncTimeout", "create", "ObjectId", "DXN", "log", "DataType", "createSystemPrompt", "template", "createTemplate", "SYSTEM_PROMPT", "ReferencedQuotes", "Schema", "Struct", "references", "Array", "quote", "String", "id", "annotations", "description", "processTranscriptMessage", "params", "outputParser", "structuredOutputParser", "runParser", "startTime", "performance", "now", "result", "getResult", "MixedStreamParser", "parse", "aiService", "execStream", "model", "systemPrompt", "history", "create", "Message", "role", "content", "type", "text", "JSON", "stringify", "context", "objects", "message", "blocks", "tools", "tool", "log", "info", "refs", "DataType", "map", "block", "i", "postprocessText", "timeElapsed", "options", "timeout", "asyncTimeout", "error", "fallbackToRaw", "warn", "quotes", "ObjectId", "isValid", "regex", "RegExp", "replace", "DXN", "fromLocalObjectId", "toString", "getMeetingTranscript", "context", "meeting", "dispatchPromise", "dispatch", "getCapability", "Capabilities", "IntentDispatcher", "typename", "getSchemaTypename", "TranscriptType", "existing", "artifacts", "load", "space", "getSpace", "invariant", "data", "createIntent", "TranscriptionAction", "Create", "spaceId", "id", "makeRef", "object", "contributes", "AppGraphBuilder", "createExtension", "TRANSCRIPTION_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "isInstanceOf", "MeetingType", "some", "none", "map", "state", "TranscriptionCapabilities", "MeetingTranscriptionState", "enabled", "rxFromSignal", "fullyQualifiedId", "transcript", "callManager", "MeetingCapabilities", "CallManager", "setActivity", "queueDxn", "queue", "dxn", "toString", "properties", "label", "ns", "icon", "disposition", "classNames", "getOrElse", "connector", "client", "ClientCapabilities", "Client", "settingsStore", "capabilities", "SettingsStore", "settings", "getStore", "value", "aiClient", "AIServiceEdgeClient", "endpoint", "AI_SERVICE_ENDPOINT", "REMOTE", "ATTENDABLE_PATH_SEPARATOR", "type", "PLANK_COMPANION_TYPE", "target", "position", "schema", "getIntent", "onJoin", "identity", "halo", "messageEnricher", "entityExtraction", "createEntityExtractionEnricher", "contextTypes", "DocumentType", "DataType", "Person", "Organization", "transcriptionManager", "TranscriptionManager", "edgeClient", "edge", "setIdentityDid", "did", "open", "onLeave", "close", "undefined", "onCallStateUpdated", "callState", "transcription", "activities", "payload", "setQueue", "DXN", "parse", "setEnabled", "onMediaStateUpdated", "mediaState", "isSpeaking", "setAudioTrack", "audioTrack", "setRecording", "message", "objects", "db", "query", "Query", "select", "Filter", "or", "s", "run", "log", "info", "enhancedMessage", "timeElapsed", "processTranscriptMessage", "aiService", "Promise", "all", "o", "processContextObject", "options", "timeout", "ENTITY_EXTRACTOR_TIMEOUT", "fallbackToRaw"]
7
+ }