@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.
- package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs → TranscriptContainer-CXA4ZBHW.mjs} +3 -3
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs +351 -0
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DR3NBV6Q.mjs → chunk-3TKXI6TQ.mjs} +105 -78
- package/dist/lib/browser/chunk-3TKXI6TQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-JHWEZRWC.mjs +63 -0
- package/dist/lib/browser/chunk-JHWEZRWC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHHJZQPM.mjs → chunk-K2LS2QOM.mjs} +135 -117
- package/dist/lib/browser/chunk-K2LS2QOM.mjs.map +7 -0
- package/dist/lib/browser/chunk-LCTMCTYY.mjs +27 -0
- package/dist/lib/browser/chunk-LCTMCTYY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs → chunk-LTIQFX4W.mjs} +1 -1
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs.map → chunk-LTIQFX4W.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +30 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-ZQQEH27F.mjs → intent-resolver-DZ62CJPC.mjs} +4 -4
- package/dist/lib/browser/intent-resolver-DZ62CJPC.mjs.map +7 -0
- package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs → meeting-transcription-state-MNA2XROE.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-HETJ5XY6.mjs → react-surface-PUXZNAZL.mjs} +18 -7
- package/dist/lib/browser/react-surface-PUXZNAZL.mjs.map +7 -0
- package/dist/lib/browser/settings-JWDS4J3F.mjs +24 -0
- package/dist/lib/browser/settings-JWDS4J3F.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-SMRLU2KY.mjs → transcriber-YWWIV6KP.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs → TranscriptContainer-SSJVLRM6.cjs} +8 -8
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs.map → TranscriptContainer-SSJVLRM6.cjs.map} +2 -2
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs +352 -0
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs.map +7 -0
- package/dist/lib/node/{chunk-3QEJ5EBO.cjs → chunk-EJWB53WK.cjs} +22 -32
- package/dist/lib/node/chunk-EJWB53WK.cjs.map +7 -0
- package/dist/lib/node/{chunk-KO6MKCED.cjs → chunk-EVE3H46F.cjs} +138 -119
- package/dist/lib/node/chunk-EVE3H46F.cjs.map +7 -0
- package/dist/lib/node/{chunk-HYGDHS6X.cjs → chunk-JUGOXWES.cjs} +4 -4
- package/dist/lib/node/{chunk-HYGDHS6X.cjs.map → chunk-JUGOXWES.cjs.map} +1 -1
- package/dist/lib/node/{chunk-WXG4Z2EZ.cjs → chunk-L27AK6FQ.cjs} +23 -8
- package/dist/lib/node/chunk-L27AK6FQ.cjs.map +7 -0
- package/dist/lib/node/{chunk-LA73IHCB.cjs → chunk-WKZLGVEJ.cjs} +108 -80
- package/dist/lib/node/chunk-WKZLGVEJ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -35
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VY3XWYAA.cjs → intent-resolver-TRBKI24D.cjs} +9 -9
- package/dist/lib/node/intent-resolver-TRBKI24D.cjs.map +7 -0
- package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs → meeting-transcription-state-5XLTMWPA.cjs} +6 -6
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-M2JQIIDY.cjs → react-surface-SZAMHCX7.cjs} +20 -11
- package/dist/lib/node/react-surface-SZAMHCX7.cjs.map +7 -0
- package/dist/lib/node/settings-AWWMOSCV.cjs +38 -0
- package/dist/lib/node/settings-AWWMOSCV.cjs.map +7 -0
- package/dist/lib/node/{transcriber-E6AAB4SU.cjs → transcriber-AFUXFHCR.cjs} +10 -10
- package/dist/lib/node/types/index.cjs +8 -8
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs → TranscriptContainer-M53LI2TX.mjs} +3 -3
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs +352 -0
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SDMGJZLN.mjs → chunk-4KC3E5T4.mjs} +135 -117
- package/dist/lib/node-esm/chunk-4KC3E5T4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs → chunk-5E2MR5XK.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs.map → chunk-5E2MR5XK.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs +28 -0
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-54HDN33F.mjs → chunk-QYG2FOXA.mjs} +22 -32
- package/dist/lib/node-esm/chunk-QYG2FOXA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-K3R3YK3S.mjs → chunk-V5IWBPYO.mjs} +105 -78
- package/dist/lib/node-esm/chunk-V5IWBPYO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +30 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FCTNJPWY.mjs → intent-resolver-HFVAL274.mjs} +4 -4
- package/dist/lib/node-esm/intent-resolver-HFVAL274.mjs.map +7 -0
- package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs → meeting-transcription-state-3WOZ52BQ.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-PXFSIM6V.mjs → react-surface-UEJELL7I.mjs} +18 -7
- package/dist/lib/node-esm/react-surface-UEJELL7I.mjs.map +7 -0
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs +25 -0
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs → transcriber-7RJEFPDI.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +3 -3
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -178
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/Transcript.d.ts +6 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +8 -4
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +27 -0
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +4 -4
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts +6 -0
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts +2 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/transcription.stories.d.ts +6 -3
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
- package/dist/types/src/entity-extraction/entity-extraction.d.ts +33 -7
- package/dist/types/src/entity-extraction/entity-extraction.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +2 -2
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/model/model.d.ts +23 -23
- package/dist/types/src/model/model.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +40 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.d.ts +2 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +17 -15
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -18
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -40
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +18 -7
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/array.d.ts.map +1 -1
- package/dist/types/src/util/get-time-str.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +55 -46
- package/src/TranscriptionPlugin.tsx +30 -13
- package/src/capabilities/app-graph-builder.ts +190 -98
- package/src/capabilities/capabilities.ts +1 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +5 -4
- package/src/capabilities/react-surface.tsx +12 -4
- package/src/capabilities/settings.ts +20 -0
- package/src/components/Transcript/Transcript.stories.tsx +72 -36
- package/src/components/Transcript/Transcript.tsx +37 -30
- package/src/components/Transcript/deprecated/{Transcript.tsx → OldTranscript.tsx} +30 -1
- package/src/components/Transcript/transcript-extension.ts +20 -17
- package/src/components/TranscriptContainer.tsx +6 -4
- package/src/components/TranscriptionSettings/TranscriptionSettings.tsx +26 -0
- package/src/components/TranscriptionSettings/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/components/transcription.stories.tsx +85 -35
- package/src/entity-extraction/entity-extraction.test.ts +75 -10
- package/src/entity-extraction/entity-extraction.ts +110 -55
- package/src/entity-extraction/system-prompt.tpl +38 -9
- package/src/hooks/useQueueModelAdapter.ts +44 -11
- package/src/model/model.test.ts +90 -44
- package/src/model/model.ts +59 -59
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.ts +216 -0
- package/src/transcriber/transcriber.browser.test.ts +3 -3
- package/src/transcriber/transcriber.ts +19 -10
- package/src/transcriber/transcription-manager.ts +66 -57
- package/src/translations.ts +2 -0
- package/src/types/schema.ts +10 -31
- package/src/types/types.ts +18 -8
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs +0 -168
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs.map +0 -7
- package/dist/lib/browser/chunk-5Q3R53U3.mjs +0 -73
- package/dist/lib/browser/chunk-5Q3R53U3.mjs.map +0 -7
- package/dist/lib/browser/chunk-DR3NBV6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs +0 -8
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs.map +0 -7
- package/dist/lib/browser/chunk-RHHJZQPM.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-ZQQEH27F.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HETJ5XY6.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs +0 -177
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs.map +0 -7
- package/dist/lib/node/chunk-3QEJ5EBO.cjs.map +0 -7
- package/dist/lib/node/chunk-KO6MKCED.cjs.map +0 -7
- package/dist/lib/node/chunk-LA73IHCB.cjs.map +0 -7
- package/dist/lib/node/chunk-WXG4Z2EZ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-VY3XWYAA.cjs.map +0 -7
- package/dist/lib/node/react-surface-M2JQIIDY.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs +0 -169
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-54HDN33F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K3R3YK3S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDMGJZLN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs +0 -10
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FCTNJPWY.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-PXFSIM6V.mjs.map +0 -7
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts +0 -13
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/testings.d.ts +0 -51
- package/dist/types/src/components/Transcript/testings.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -73
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/src/components/Transcript/testings.ts +0 -182
- package/src/testing/test-data.ts +0 -314
- /package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs.map → TranscriptContainer-CXA4ZBHW.mjs.map} +0 -0
- /package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs.map → meeting-transcription-state-MNA2XROE.mjs.map} +0 -0
- /package/dist/lib/browser/{transcriber-SMRLU2KY.mjs.map → transcriber-YWWIV6KP.mjs.map} +0 -0
- /package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs.map → meeting-transcription-state-5XLTMWPA.cjs.map} +0 -0
- /package/dist/lib/node/{transcriber-E6AAB4SU.cjs.map → transcriber-AFUXFHCR.cjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs.map → TranscriptContainer-M53LI2TX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs.map → meeting-transcription-state-3WOZ52BQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs.map → transcriber-7RJEFPDI.mjs.map} +0 -0
package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs → TranscriptContainer-CXA4ZBHW.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TranscriptContainer_default,
|
|
3
3
|
TranscriptionContainer
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-K2LS2QOM.mjs";
|
|
5
|
+
import "./chunk-LTIQFX4W.mjs";
|
|
6
6
|
import "./chunk-6ZR5MDK3.mjs";
|
|
7
7
|
export {
|
|
8
8
|
TranscriptionContainer,
|
|
9
9
|
TranscriptContainer_default as default
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=TranscriptContainer-
|
|
11
|
+
//# sourceMappingURL=TranscriptContainer-CXA4ZBHW.mjs.map
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TranscriptionManager
|
|
3
|
+
} from "./chunk-3TKXI6TQ.mjs";
|
|
4
|
+
import "./chunk-KLD7O5GJ.mjs";
|
|
5
|
+
import {
|
|
6
|
+
TranscriptType,
|
|
7
|
+
TranscriptionAction
|
|
8
|
+
} from "./chunk-JHWEZRWC.mjs";
|
|
9
|
+
import {
|
|
10
|
+
TranscriptionCapabilities
|
|
11
|
+
} from "./chunk-LTIQFX4W.mjs";
|
|
12
|
+
import {
|
|
13
|
+
TRANSCRIPTION_PLUGIN
|
|
14
|
+
} from "./chunk-6ZR5MDK3.mjs";
|
|
15
|
+
|
|
16
|
+
// packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts
|
|
17
|
+
import { Rx } from "@effect-rx/rx-react";
|
|
18
|
+
import { Option, pipe } from "effect";
|
|
19
|
+
import { Capabilities, contributes, createIntent } from "@dxos/app-framework";
|
|
20
|
+
import { AIServiceEdgeClient } from "@dxos/assistant";
|
|
21
|
+
import { AI_SERVICE_ENDPOINT } from "@dxos/assistant/testing";
|
|
22
|
+
import { Filter, fullyQualifiedId, getSpace, makeRef, Query } from "@dxos/client/echo";
|
|
23
|
+
import { getSchemaTypename, isInstanceOf } from "@dxos/echo-schema";
|
|
24
|
+
import { invariant } from "@dxos/invariant";
|
|
25
|
+
import { DXN as DXN2 } from "@dxos/keys";
|
|
26
|
+
import { log as log2 } from "@dxos/log";
|
|
27
|
+
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
28
|
+
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from "@dxos/plugin-deck/types";
|
|
29
|
+
import { createExtension, rxFromSignal } from "@dxos/plugin-graph";
|
|
30
|
+
import { DocumentType } from "@dxos/plugin-markdown/types";
|
|
31
|
+
import { MeetingCapabilities } from "@dxos/plugin-meeting";
|
|
32
|
+
import { MeetingType } from "@dxos/plugin-meeting/types";
|
|
33
|
+
import { DataType as DataType2 } from "@dxos/schema";
|
|
34
|
+
|
|
35
|
+
// packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts
|
|
36
|
+
import { Schema } from "effect";
|
|
37
|
+
import { createTemplate, Message, structuredOutputParser } from "@dxos/artifact";
|
|
38
|
+
import { MixedStreamParser } from "@dxos/assistant";
|
|
39
|
+
import { asyncTimeout } from "@dxos/async";
|
|
40
|
+
import { create, ObjectId } from "@dxos/echo-schema";
|
|
41
|
+
import { DXN } from "@dxos/keys";
|
|
42
|
+
import { log } from "@dxos/log";
|
|
43
|
+
import { DataType } from "@dxos/schema";
|
|
44
|
+
|
|
45
|
+
// raw-loader:./system-prompt.tpl?raw
|
|
46
|
+
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.';
|
|
47
|
+
|
|
48
|
+
// packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts
|
|
49
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/entity-extraction/entity-extraction.ts";
|
|
50
|
+
var createSystemPrompt = () => {
|
|
51
|
+
const template = createTemplate(system_prompt_default);
|
|
52
|
+
return template({});
|
|
53
|
+
};
|
|
54
|
+
var ReferencedQuotes = Schema.Struct({
|
|
55
|
+
references: Schema.Array(Schema.Struct({
|
|
56
|
+
quote: Schema.String,
|
|
57
|
+
id: Schema.String
|
|
58
|
+
})).annotations({
|
|
59
|
+
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."
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
var processTranscriptMessage = async (params) => {
|
|
63
|
+
try {
|
|
64
|
+
const outputParser = structuredOutputParser(ReferencedQuotes);
|
|
65
|
+
const runParser = async () => {
|
|
66
|
+
const startTime = performance.now();
|
|
67
|
+
const result = outputParser.getResult(await new MixedStreamParser().parse(await params.aiService.execStream({
|
|
68
|
+
model: "@anthropic/claude-3-5-haiku-20241022",
|
|
69
|
+
systemPrompt: createSystemPrompt(),
|
|
70
|
+
history: [
|
|
71
|
+
create(Message, {
|
|
72
|
+
role: "user",
|
|
73
|
+
content: [
|
|
74
|
+
{
|
|
75
|
+
type: "text",
|
|
76
|
+
text: `<context>${JSON.stringify(params.context.objects)}</context>`
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "text",
|
|
80
|
+
text: `<transcript>${JSON.stringify(params.message.blocks)}</transcript>`
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
],
|
|
85
|
+
tools: [
|
|
86
|
+
outputParser.tool
|
|
87
|
+
]
|
|
88
|
+
})));
|
|
89
|
+
log.info("entity extraction result", {
|
|
90
|
+
refs: result.references
|
|
91
|
+
}, {
|
|
92
|
+
F: __dxlog_file,
|
|
93
|
+
L: 98,
|
|
94
|
+
S: void 0,
|
|
95
|
+
C: (f, a) => f(...a)
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
message: create(DataType.Message, {
|
|
99
|
+
...params.message,
|
|
100
|
+
blocks: params.message.blocks.map((block, i) => block.type !== "transcription" ? block : {
|
|
101
|
+
...block,
|
|
102
|
+
text: postprocessText(block.text, result)
|
|
103
|
+
})
|
|
104
|
+
}),
|
|
105
|
+
timeElapsed: performance.now() - startTime
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
if (params.options?.timeout && params.options.timeout > 0) {
|
|
109
|
+
return await asyncTimeout(runParser(), params.options.timeout);
|
|
110
|
+
} else {
|
|
111
|
+
return await runParser();
|
|
112
|
+
}
|
|
113
|
+
} catch (error) {
|
|
114
|
+
if (params.options?.fallbackToRaw) {
|
|
115
|
+
log.warn("failed to process transcript message, falling back to raw text", {
|
|
116
|
+
error
|
|
117
|
+
}, {
|
|
118
|
+
F: __dxlog_file,
|
|
119
|
+
L: 123,
|
|
120
|
+
S: void 0,
|
|
121
|
+
C: (f, a) => f(...a)
|
|
122
|
+
});
|
|
123
|
+
return {
|
|
124
|
+
message: params.message,
|
|
125
|
+
timeElapsed: 0
|
|
126
|
+
};
|
|
127
|
+
} else {
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
var postprocessText = (text, quotes) => {
|
|
133
|
+
for (const quote of quotes.references) {
|
|
134
|
+
if (!ObjectId.isValid(quote.id)) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const regex = new RegExp(quote.quote.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi");
|
|
138
|
+
text = text.replace(regex, `[${quote.quote}][${DXN.fromLocalObjectId(quote.id).toString()}]`);
|
|
139
|
+
}
|
|
140
|
+
return text;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts
|
|
144
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts";
|
|
145
|
+
var getMeetingTranscript = async (context, meeting) => {
|
|
146
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
147
|
+
const typename = getSchemaTypename(TranscriptType);
|
|
148
|
+
const existing = await meeting.artifacts[typename]?.load();
|
|
149
|
+
if (existing instanceof TranscriptType) {
|
|
150
|
+
return existing;
|
|
151
|
+
}
|
|
152
|
+
const space = getSpace(meeting);
|
|
153
|
+
invariant(space, void 0, {
|
|
154
|
+
F: __dxlog_file2,
|
|
155
|
+
L: 49,
|
|
156
|
+
S: void 0,
|
|
157
|
+
A: [
|
|
158
|
+
"space",
|
|
159
|
+
""
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
const { data } = await dispatch(createIntent(TranscriptionAction.Create, {
|
|
163
|
+
spaceId: space.id
|
|
164
|
+
}));
|
|
165
|
+
meeting.artifacts[typename] = makeRef(data.object);
|
|
166
|
+
return data?.object;
|
|
167
|
+
};
|
|
168
|
+
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
|
|
169
|
+
createExtension({
|
|
170
|
+
id: `${TRANSCRIPTION_PLUGIN}/meeting-transcript`,
|
|
171
|
+
actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => isInstanceOf(MeetingType, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((meeting) => {
|
|
172
|
+
const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
|
|
173
|
+
const enabled = get(rxFromSignal(() => state.enabled));
|
|
174
|
+
return [
|
|
175
|
+
{
|
|
176
|
+
id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,
|
|
177
|
+
data: async () => {
|
|
178
|
+
const transcript = await getMeetingTranscript(context, meeting);
|
|
179
|
+
invariant(transcript, "Failed to create transcript", {
|
|
180
|
+
F: __dxlog_file2,
|
|
181
|
+
L: 76,
|
|
182
|
+
S: void 0,
|
|
183
|
+
A: [
|
|
184
|
+
"transcript",
|
|
185
|
+
"'Failed to create transcript'"
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
const callManager = context.getCapability(MeetingCapabilities.CallManager);
|
|
189
|
+
callManager.setActivity(getSchemaTypename(TranscriptType), {
|
|
190
|
+
queueDxn: transcript.queue.dxn.toString(),
|
|
191
|
+
enabled: !enabled
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
properties: {
|
|
195
|
+
label: enabled ? [
|
|
196
|
+
"stop transcription label",
|
|
197
|
+
{
|
|
198
|
+
ns: TRANSCRIPTION_PLUGIN
|
|
199
|
+
}
|
|
200
|
+
] : [
|
|
201
|
+
"start transcription label",
|
|
202
|
+
{
|
|
203
|
+
ns: TRANSCRIPTION_PLUGIN
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
icon: "ph--subtitles--regular",
|
|
207
|
+
disposition: "toolbar",
|
|
208
|
+
classNames: enabled ? "bg-callAlert" : ""
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
}), Option.getOrElse(() => []))),
|
|
213
|
+
connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => isInstanceOf(MeetingType, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((meeting) => {
|
|
214
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
215
|
+
const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
|
|
216
|
+
const settingsStore = get(context.capabilities(Capabilities.SettingsStore))[0];
|
|
217
|
+
const settings = get(rxFromSignal(() => settingsStore?.getStore(TRANSCRIPTION_PLUGIN).value));
|
|
218
|
+
const aiClient = new AIServiceEdgeClient({
|
|
219
|
+
// TODO(burdon): Get from config.
|
|
220
|
+
endpoint: AI_SERVICE_ENDPOINT.REMOTE
|
|
221
|
+
});
|
|
222
|
+
return [
|
|
223
|
+
{
|
|
224
|
+
id: `${fullyQualifiedId(meeting)}${ATTENDABLE_PATH_SEPARATOR}${getSchemaTypename(TranscriptType)}`,
|
|
225
|
+
type: PLANK_COMPANION_TYPE,
|
|
226
|
+
data: get(rxFromSignal(() => meeting.artifacts[getSchemaTypename(TranscriptType)]?.target)),
|
|
227
|
+
properties: {
|
|
228
|
+
label: [
|
|
229
|
+
"transcript companion label",
|
|
230
|
+
{
|
|
231
|
+
ns: TRANSCRIPTION_PLUGIN
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
icon: "ph--subtitles--regular",
|
|
235
|
+
position: "hoist",
|
|
236
|
+
disposition: "hidden",
|
|
237
|
+
schema: TranscriptType,
|
|
238
|
+
getIntent: ({ space }) => createIntent(TranscriptionAction.Create, {
|
|
239
|
+
spaceId: space.id
|
|
240
|
+
}),
|
|
241
|
+
// TODO(burdon): Is this the right place to inisitalize the state? Change to a capability?
|
|
242
|
+
onJoin: async ({ meeting: meeting2 }) => {
|
|
243
|
+
const identity = client.halo.identity.get();
|
|
244
|
+
invariant(identity, void 0, {
|
|
245
|
+
F: __dxlog_file2,
|
|
246
|
+
L: 134,
|
|
247
|
+
S: void 0,
|
|
248
|
+
A: [
|
|
249
|
+
"identity",
|
|
250
|
+
""
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
const space = getSpace(meeting2);
|
|
254
|
+
invariant(space, void 0, {
|
|
255
|
+
F: __dxlog_file2,
|
|
256
|
+
L: 136,
|
|
257
|
+
S: void 0,
|
|
258
|
+
A: [
|
|
259
|
+
"space",
|
|
260
|
+
""
|
|
261
|
+
]
|
|
262
|
+
});
|
|
263
|
+
let messageEnricher;
|
|
264
|
+
if (aiClient && settings.entityExtraction) {
|
|
265
|
+
messageEnricher = createEntityExtractionEnricher({
|
|
266
|
+
aiClient,
|
|
267
|
+
// TODO(dmaretskyi): Have those be discovered from the schema graph or contributed by capabilities?
|
|
268
|
+
// This forced me to add a dependency on markdown plugin.
|
|
269
|
+
// This will be replaced with a vector search index anyway, so its not a big deal.
|
|
270
|
+
contextTypes: [
|
|
271
|
+
DocumentType,
|
|
272
|
+
DataType2.Person,
|
|
273
|
+
DataType2.Organization
|
|
274
|
+
],
|
|
275
|
+
space
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
state.transcriptionManager = await new TranscriptionManager({
|
|
279
|
+
edgeClient: client.edge,
|
|
280
|
+
messageEnricher
|
|
281
|
+
}).setIdentityDid(identity.did).open();
|
|
282
|
+
},
|
|
283
|
+
onLeave: async () => {
|
|
284
|
+
await state.transcriptionManager?.close();
|
|
285
|
+
state.transcriptionManager = void 0;
|
|
286
|
+
state.enabled = false;
|
|
287
|
+
},
|
|
288
|
+
onCallStateUpdated: async (callState) => {
|
|
289
|
+
const typename = getSchemaTypename(TranscriptType);
|
|
290
|
+
const transcription = typename ? callState.activities?.[typename] : void 0;
|
|
291
|
+
if (!transcription?.payload) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const payload = transcription.payload;
|
|
295
|
+
state.enabled = !!payload.enabled;
|
|
296
|
+
if (payload.queueDxn) {
|
|
297
|
+
state.transcriptionManager?.setQueue(DXN2.parse(payload.queueDxn));
|
|
298
|
+
}
|
|
299
|
+
await state.transcriptionManager?.setEnabled(payload.enabled);
|
|
300
|
+
},
|
|
301
|
+
onMediaStateUpdated: async ([mediaState, isSpeaking]) => {
|
|
302
|
+
void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);
|
|
303
|
+
void state.transcriptionManager?.setRecording(isSpeaking);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
];
|
|
308
|
+
}), Option.getOrElse(() => [])))
|
|
309
|
+
})
|
|
310
|
+
]);
|
|
311
|
+
var createEntityExtractionEnricher = ({ aiClient, contextTypes, space }) => {
|
|
312
|
+
return async (message) => {
|
|
313
|
+
const { objects } = await space.db.query(Query.select(Filter.or(...contextTypes.map((s) => Filter.type(s))))).run();
|
|
314
|
+
log2.info("context", {
|
|
315
|
+
objects
|
|
316
|
+
}, {
|
|
317
|
+
F: __dxlog_file2,
|
|
318
|
+
L: 203,
|
|
319
|
+
S: void 0,
|
|
320
|
+
C: (f, a) => f(...a)
|
|
321
|
+
});
|
|
322
|
+
const { message: enhancedMessage, timeElapsed } = await processTranscriptMessage({
|
|
323
|
+
aiService: aiClient,
|
|
324
|
+
message,
|
|
325
|
+
context: {
|
|
326
|
+
objects: await Promise.all(objects.map((o) => processContextObject(o)))
|
|
327
|
+
},
|
|
328
|
+
options: {
|
|
329
|
+
timeout: ENTITY_EXTRACTOR_TIMEOUT,
|
|
330
|
+
fallbackToRaw: true
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
log2.info("entity extraction time", {
|
|
334
|
+
timeElapsed
|
|
335
|
+
}, {
|
|
336
|
+
F: __dxlog_file2,
|
|
337
|
+
L: 214,
|
|
338
|
+
S: void 0,
|
|
339
|
+
C: (f, a) => f(...a)
|
|
340
|
+
});
|
|
341
|
+
return enhancedMessage;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
var processContextObject = async (object) => {
|
|
345
|
+
return object;
|
|
346
|
+
};
|
|
347
|
+
var ENTITY_EXTRACTOR_TIMEOUT = 25e3;
|
|
348
|
+
export {
|
|
349
|
+
app_graph_builder_default as default
|
|
350
|
+
};
|
|
351
|
+
//# sourceMappingURL=app-graph-builder-REQZ5SC5.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,oBAA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", "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
|
+
}
|