@dxos/plugin-transcription 0.8.4-main.c1de068 → 0.8.4-main.c351d160a8
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/TranscriptionContainer-5MFETUHZ.mjs +40 -0
- package/dist/lib/browser/TranscriptionContainer-5MFETUHZ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-ICUHRZXS.mjs +18 -0
- package/dist/lib/browser/blueprint-definition-ICUHRZXS.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +9 -0
- package/dist/lib/browser/chunk-7D57BEI2.mjs +54 -0
- package/dist/lib/browser/chunk-7D57BEI2.mjs.map +7 -0
- package/dist/lib/browser/chunk-DCPLHPHH.mjs +148 -0
- package/dist/lib/browser/chunk-DCPLHPHH.mjs.map +7 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs +35 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-KYI5GIQM.mjs +22 -0
- package/dist/lib/browser/chunk-KYI5GIQM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FFEPEPCU.mjs → chunk-QWIUIEWX.mjs} +64 -99
- package/dist/lib/browser/chunk-QWIUIEWX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5KPYIC3N.mjs → chunk-SLZXQVQU.mjs} +126 -221
- package/dist/lib/browser/chunk-SLZXQVQU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +64 -74
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-PFR5PQTK.mjs +23 -0
- package/dist/lib/browser/operation-resolver-PFR5PQTK.mjs.map +7 -0
- package/dist/lib/browser/react-surface-MISGR3BD.mjs +37 -0
- package/dist/lib/browser/react-surface-MISGR3BD.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-PXT4QBFY.mjs → transcriber-GKFU347S.mjs} +19 -14
- package/dist/lib/browser/transcriber-GKFU347S.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +9 -8
- package/dist/lib/node-esm/TranscriptionContainer-3ZP67PX6.mjs +41 -0
- package/dist/lib/node-esm/TranscriptionContainer-3ZP67PX6.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-KYLTO7UH.mjs +19 -0
- package/dist/lib/node-esm/blueprint-definition-KYLTO7UH.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +10 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5XJY5QP5.mjs +24 -0
- package/dist/lib/node-esm/chunk-5XJY5QP5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6BWAFL5Z.mjs +55 -0
- package/dist/lib/node-esm/chunk-6BWAFL5Z.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HT3W7LDP.mjs → chunk-LSWGXNVP.mjs} +64 -99
- package/dist/lib/node-esm/chunk-LSWGXNVP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +37 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TRS6GDYW.mjs +149 -0
- package/dist/lib/node-esm/chunk-TRS6GDYW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TJKAO7VR.mjs → chunk-WVSA6JHE.mjs} +126 -221
- package/dist/lib/node-esm/chunk-WVSA6JHE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +64 -74
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-IZ7BRISJ.mjs +24 -0
- package/dist/lib/node-esm/operation-resolver-IZ7BRISJ.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-BCAKAGCT.mjs +38 -0
- package/dist/lib/node-esm/react-surface-BCAKAGCT.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-YUTEVANE.mjs → transcriber-7BSCYWMV.mjs} +19 -14
- package/dist/lib/node-esm/transcriber-7BSCYWMV.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +9 -8
- package/dist/types/src/TranscriptionPlugin.d.ts +2 -1
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +5 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber/index.d.ts +3 -0
- package/dist/types/src/capabilities/transcriber/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts +9 -0
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts +17 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +40 -0
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/index.d.ts +2 -0
- package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +8 -7
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +10 -6
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +10 -9
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +4 -3
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +18 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/open.d.ts +11 -0
- package/dist/types/src/functions/open.d.ts.map +1 -0
- package/dist/types/src/functions/summarize.d.ts +11 -0
- package/dist/types/src/functions/summarize.d.ts.map +1 -0
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +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/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/message-normalizer.d.ts +5 -5
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +516 -398
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/utils.d.ts +2 -2
- package/dist/types/src/segments-normalization/utils.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +11 -11
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +3 -3
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +4 -4
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +12 -13
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptAction.d.ts +25 -0
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +18 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -26
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/render-byline.d.ts +4 -0
- package/dist/types/src/util/render-byline.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +88 -72
- package/src/TranscriptionPlugin.tsx +42 -58
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/transcription-blueprint.ts +33 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/index.ts +4 -7
- package/src/capabilities/operation-handler/index.ts +7 -0
- package/src/capabilities/operation-handler/operation-handler.ts +25 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +30 -0
- package/src/capabilities/transcriber/index.ts +7 -0
- package/src/capabilities/transcriber/transcriber.ts +85 -0
- package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +60 -56
- package/src/components/Transcription/Transcription.tsx +63 -0
- package/src/components/{Transcript → Transcription}/index.ts +1 -1
- package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -46
- package/src/components/index.ts +1 -6
- package/src/components/stories/FileTranscription.stories.tsx +66 -59
- package/src/components/stories/KeyWordRecognition.stories.tsx +17 -13
- package/src/components/stories/MicrophoneTranscription.stories.tsx +80 -80
- package/src/components/stories/TranscriptionStory.tsx +13 -13
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +32 -0
- package/src/containers/TranscriptionContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/functions/index.ts +11 -0
- package/src/functions/open.ts +37 -0
- package/src/functions/summarize.ts +103 -0
- package/src/hooks/useAudioFile.ts +49 -53
- package/src/hooks/useQueueModelAdapter.ts +1 -1
- package/src/hooks/useTranscriber.ts +8 -3
- package/src/hooks/useVoiceInput.ts +4 -3
- package/src/index.ts +1 -1
- package/src/meta.ts +9 -6
- package/src/model/model.test.ts +21 -15
- package/src/segments-normalization/message-normalizer.ts +19 -14
- package/src/segments-normalization/normalization.test.ts +11 -16
- package/src/segments-normalization/normalization.ts +43 -42
- package/src/segments-normalization/utils.ts +2 -2
- package/src/testing/testing.ts +36 -26
- package/src/transcriber/media-stream-recorder.ts +4 -4
- package/src/transcriber/transcriber.browser.test.ts +6 -5
- package/src/transcriber/transcriber.ts +8 -7
- package/src/transcriber/transcription-manager.ts +37 -52
- package/src/types/TranscriptAction.ts +32 -0
- package/src/types/capabilities.ts +33 -0
- package/src/types/index.ts +3 -1
- package/src/types/types.ts +0 -23
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +33 -0
- package/dist/lib/browser/TranscriptContainer-6WCKCXQ6.mjs +0 -11
- package/dist/lib/browser/chunk-4FJIYH7T.mjs +0 -8
- package/dist/lib/browser/chunk-4FJIYH7T.mjs.map +0 -7
- package/dist/lib/browser/chunk-5KPYIC3N.mjs.map +0 -7
- package/dist/lib/browser/chunk-5WH45KBY.mjs +0 -19
- package/dist/lib/browser/chunk-5WH45KBY.mjs.map +0 -7
- package/dist/lib/browser/chunk-FFEPEPCU.mjs.map +0 -7
- package/dist/lib/browser/chunk-R7INNNUQ.mjs +0 -55
- package/dist/lib/browser/chunk-R7INNNUQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-U6QBOGTN.mjs +0 -16
- package/dist/lib/browser/chunk-U6QBOGTN.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3O33MMP5.mjs +0 -30
- package/dist/lib/browser/intent-resolver-3O33MMP5.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E5D5AE3F.mjs +0 -34
- package/dist/lib/browser/react-surface-E5D5AE3F.mjs.map +0 -7
- package/dist/lib/browser/transcriber-PXT4QBFY.mjs.map +0 -7
- package/dist/lib/node-esm/TranscriptContainer-VBAOM5DG.mjs +0 -12
- package/dist/lib/node-esm/chunk-HT3W7LDP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RHF2ALML.mjs +0 -17
- package/dist/lib/node-esm/chunk-RHF2ALML.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TJKAO7VR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-U65ZWK3L.mjs +0 -56
- package/dist/lib/node-esm/chunk-U65ZWK3L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XMUCZBP3.mjs +0 -21
- package/dist/lib/node-esm/chunk-XMUCZBP3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Y2B4HWSS.mjs +0 -10
- package/dist/lib/node-esm/chunk-Y2B4HWSS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YMN5SXNC.mjs +0 -31
- package/dist/lib/node-esm/intent-resolver-YMN5SXNC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QRDJOHN5.mjs +0 -35
- package/dist/lib/node-esm/react-surface-QRDJOHN5.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-YUTEVANE.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -17
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber.d.ts +0 -8
- package/dist/types/src/capabilities/transcriber.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +0 -24
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/index.d.ts +0 -2
- package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -19
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
- package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -41
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -24
- package/src/capabilities/react-surface.tsx +0 -22
- package/src/capabilities/transcriber.ts +0 -76
- package/src/components/Transcript/Transcript.tsx +0 -100
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/TranscriptContainer.tsx +0 -35
- package/src/types/schema.ts +0 -41
- /package/dist/lib/browser/{TranscriptContainer-6WCKCXQ6.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/TranscriptContainer-VBAOM5DG.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Transcription,
|
|
3
|
+
useQueueModelAdapter
|
|
4
|
+
} from "./chunk-SLZXQVQU.mjs";
|
|
5
|
+
import {
|
|
6
|
+
renderByline
|
|
7
|
+
} from "./chunk-HOOPZ7EM.mjs";
|
|
8
|
+
import "./chunk-7D57BEI2.mjs";
|
|
9
|
+
import "./chunk-KYI5GIQM.mjs";
|
|
10
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
11
|
+
|
|
12
|
+
// src/containers/TranscriptionContainer/TranscriptionContainer.tsx
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { Obj } from "@dxos/echo";
|
|
15
|
+
import { useMembers, useQueue } from "@dxos/react-client/echo";
|
|
16
|
+
import { Panel } from "@dxos/react-ui";
|
|
17
|
+
var TranscriptionContainer = ({ role, subject: transcript, attendableId }) => {
|
|
18
|
+
const db = Obj.getDatabase(transcript);
|
|
19
|
+
const members = useMembers(db?.spaceId).map((member) => member.identity);
|
|
20
|
+
const queue = useQueue(transcript.queue.dxn, {
|
|
21
|
+
pollInterval: 1e3
|
|
22
|
+
});
|
|
23
|
+
const model = useQueueModelAdapter(renderByline(members), queue);
|
|
24
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
25
|
+
role
|
|
26
|
+
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
27
|
+
asChild: true
|
|
28
|
+
}, /* @__PURE__ */ React.createElement(Transcription, {
|
|
29
|
+
attendableId,
|
|
30
|
+
model,
|
|
31
|
+
transcript
|
|
32
|
+
})));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/containers/TranscriptionContainer/index.ts
|
|
36
|
+
var TranscriptionContainer_default = TranscriptionContainer;
|
|
37
|
+
export {
|
|
38
|
+
TranscriptionContainer_default as default
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=TranscriptionContainer-5MFETUHZ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/TranscriptionContainer/TranscriptionContainer.tsx", "../../../src/containers/TranscriptionContainer/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { useMembers, useQueue } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { type Message, type Transcript } from '@dxos/types';\n\nimport { Transcription } from '../../components';\nimport { useQueueModelAdapter } from '../../hooks';\nimport { renderByline } from '../../util';\n\nexport type TranscriptionContainerProps = SurfaceComponentProps<Transcript.Transcript>;\n\nexport const TranscriptionContainer = ({ role, subject: transcript, attendableId }: TranscriptionContainerProps) => {\n const db = Obj.getDatabase(transcript);\n const members = useMembers(db?.spaceId).map((member) => member.identity);\n const queue = useQueue<Message.Message>(transcript.queue.dxn, { pollInterval: 1_000 });\n const model = useQueueModelAdapter(renderByline(members), queue);\n\n return (\n <Panel.Root role={role}>\n <Panel.Content asChild>\n <Transcription attendableId={attendableId} model={model} transcript={transcript} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { TranscriptionContainer } from './TranscriptionContainer';\n\nexport default TranscriptionContainer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,WAAW;AACpB,SAASC,YAAYC,gBAAgB;AACrC,SAASC,aAAa;AASf,IAAMC,yBAAyB,CAAC,EAAEC,MAAMC,SAASC,YAAYC,aAAY,MAA+B;AAC7G,QAAMC,KAAKC,IAAIC,YAAYJ,UAAAA;AAC3B,QAAMK,UAAUC,WAAWJ,IAAIK,OAAAA,EAASC,IAAI,CAACC,WAAWA,OAAOC,QAAQ;AACvE,QAAMC,QAAQC,SAA0BZ,WAAWW,MAAME,KAAK;IAAEC,cAAc;EAAM,CAAA;AACpF,QAAMC,QAAQC,qBAAqBC,aAAaZ,OAAAA,GAAUM,KAAAA;AAE1D,SACE,sBAAA,cAACO,MAAMC,MAAI;IAACrB;KACV,sBAAA,cAACoB,MAAME,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,eAAAA;IAAcrB;IAA4Bc;IAAcf;;AAIjE;;;ACzBA,IAAA,iCAAeuB;",
|
|
6
|
+
"names": ["React", "Obj", "useMembers", "useQueue", "Panel", "TranscriptionContainer", "role", "subject", "transcript", "attendableId", "db", "Obj", "getDatabase", "members", "useMembers", "spaceId", "map", "member", "identity", "queue", "useQueue", "dxn", "pollInterval", "model", "useQueueModelAdapter", "renderByline", "Panel", "Root", "Content", "asChild", "Transcription", "TranscriptionContainer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
transcription_blueprint_default
|
|
3
|
+
} from "./chunk-DCPLHPHH.mjs";
|
|
4
|
+
import "./chunk-HOOPZ7EM.mjs";
|
|
5
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
6
|
+
|
|
7
|
+
// src/capabilities/blueprint-definition/blueprint-definition.ts
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import { Capability } from "@dxos/app-framework";
|
|
10
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
11
|
+
var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
|
|
12
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, transcription_blueprint_default)
|
|
13
|
+
]));
|
|
14
|
+
var blueprint_definition_default = blueprintDefinition;
|
|
15
|
+
export {
|
|
16
|
+
blueprint_definition_default as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=blueprint-definition-ICUHRZXS.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/blueprint-definition/blueprint-definition.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { TranscriptionBlueprint } from '../../blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)]));\n\nexport default blueprintDefinition;\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,IAAMC,sBAAsBC,WAAWC,WAGrC,MAAaC,eAAQ;EAACF,WAAWG,YAAYC,gBAAgBC,qBAAqBC,+BAAAA;CAAwB,CAAA;AAE5G,IAAA,+BAAeP;",
|
|
6
|
+
"names": ["Effect", "Capability", "AppCapabilities", "blueprintDefinition", "Capability", "makeModule", "succeed", "contributes", "AppCapabilities", "BlueprintDefinition", "TranscriptionBlueprint"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-KYI5GIQM.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
7
|
+
|
|
8
|
+
// src/types/capabilities.ts
|
|
9
|
+
import { Capability } from "@dxos/app-framework";
|
|
10
|
+
(function(TranscriptionCapabilities2) {
|
|
11
|
+
TranscriptionCapabilities2.Transcriber = Capability.make(`${meta.id}.capability.transcriber`);
|
|
12
|
+
TranscriptionCapabilities2.TranscriptionManager = Capability.make(`${meta.id}.capability.transcription-manager`);
|
|
13
|
+
})(TranscriptionCapabilities || (TranscriptionCapabilities = {}));
|
|
14
|
+
var TranscriptionCapabilities;
|
|
15
|
+
|
|
16
|
+
// src/types/TranscriptAction.ts
|
|
17
|
+
var TranscriptAction_exports = {};
|
|
18
|
+
__export(TranscriptAction_exports, {
|
|
19
|
+
TranscriptOperation: () => TranscriptOperation
|
|
20
|
+
});
|
|
21
|
+
import * as Schema from "effect/Schema";
|
|
22
|
+
import { SpaceSchema } from "@dxos/client/echo";
|
|
23
|
+
import { Operation } from "@dxos/operation";
|
|
24
|
+
import { Transcript } from "@dxos/types";
|
|
25
|
+
var TRANSCRIPT_OPERATION = `${meta.id}.operation`;
|
|
26
|
+
(function(TranscriptOperation2) {
|
|
27
|
+
TranscriptOperation2.Create = Operation.make({
|
|
28
|
+
meta: {
|
|
29
|
+
key: `${TRANSCRIPT_OPERATION}.create`,
|
|
30
|
+
name: "Create Transcript"
|
|
31
|
+
},
|
|
32
|
+
schema: {
|
|
33
|
+
input: Schema.Struct({
|
|
34
|
+
name: Schema.optional(Schema.String),
|
|
35
|
+
space: SpaceSchema
|
|
36
|
+
}),
|
|
37
|
+
output: Schema.Struct({
|
|
38
|
+
object: Transcript.Transcript
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
})(TranscriptOperation || (TranscriptOperation = {}));
|
|
43
|
+
var TranscriptOperation;
|
|
44
|
+
|
|
45
|
+
// src/types/types.ts
|
|
46
|
+
var TRANSCRIPTION_URL = "https://calls-service.dxos.workers.dev";
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
TranscriptionCapabilities,
|
|
50
|
+
TranscriptOperation,
|
|
51
|
+
TranscriptAction_exports,
|
|
52
|
+
TRANSCRIPTION_URL
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-7D57BEI2.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/TranscriptAction.ts", "../../../src/types/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\nimport {\n type MediaStreamRecorderProps,\n type Transcriber,\n type TranscriberProps,\n type TranscriptMessageEnricher,\n type TranscriptionManager,\n} from '../transcriber';\n\nexport namespace TranscriptionCapabilities {\n export type GetTranscriberProps = {\n audioStreamTrack: MediaStreamTrack;\n recorderConfig?: Partial<MediaStreamRecorderProps['config']>;\n transcriberConfig?: Partial<TranscriberProps['config']>;\n onSegments: TranscriberProps['onSegments'];\n };\n export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;\n export const Transcriber = Capability.make<GetTranscriber>(`${meta.id}.capability.transcriber`);\n\n export type GetTranscriptionManagerProps = {\n messageEnricher?: TranscriptMessageEnricher;\n };\n export type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;\n export const TranscriptionManager = Capability.make<GetTranscriptionManager>(\n `${meta.id}.capability.transcription-manager`,\n );\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SpaceSchema } from '@dxos/client/echo';\nimport { Operation } from '@dxos/operation';\nimport { Transcript } from '@dxos/types';\n\nimport { meta } from '../meta';\n\n//\n// Operations\n//\n\nconst TRANSCRIPT_OPERATION = `${meta.id}.operation`;\n\nexport namespace TranscriptOperation {\n export const Create = Operation.make({\n meta: { key: `${TRANSCRIPT_OPERATION}.create`, name: 'Create Transcript' },\n schema: {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n space: SpaceSchema,\n }),\n output: Schema.Struct({\n object: Transcript.Transcript,\n }),\n },\n });\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Endpoint to the calls service.\n */\n// TODO(burdon): Reconfigure/move.\nexport const TRANSCRIPTION_URL = 'https://calls-service.dxos.workers.dev';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,kBAAkB;UAWVC,4BAAAA;6BAQFC,cAAcC,WAAWC,KAAqB,GAAGC,KAAKC,EAAE,yBAAyB;6BAMjFC,uBAAuBJ,WAAWC,KAC7C,GAAGC,KAAKC,EAAE,mCAAmC;AAEjD,GAjBiBL,8BAAAA,4BAAAA,CAAAA,EAAAA;;;;ACfjB;;;;AAIA,YAAYO,YAAY;AAExB,SAASC,mBAAmB;AAC5B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAQ3B,IAAMC,uBAAuB,GAAGC,KAAKC,EAAE;UAEtBC,sBAAAA;uBACFC,SAASC,UAAUC,KAAK;IACnCL,MAAM;MAAEM,KAAK,GAAGP,oBAAAA;MAA+BQ,MAAM;IAAoB;IACzEC,QAAQ;MACNC,OAAcC,cAAO;QACnBH,MAAaI,gBAAgBC,aAAM;QACnCC,OAAOC;MACT,CAAA;MACAC,QAAeL,cAAO;QACpBM,QAAQC,WAAWA;MACrB,CAAA;IACF;EACF,CAAA;AACF,GAbiBf,wBAAAA,sBAAAA,CAAAA,EAAAA;;;;ACVV,IAAMgB,oBAAoB;",
|
|
6
|
+
"names": ["Capability", "TranscriptionCapabilities", "Transcriber", "Capability", "make", "meta", "id", "TranscriptionManager", "Schema", "SpaceSchema", "Operation", "Transcript", "TRANSCRIPT_OPERATION", "meta", "id", "TranscriptOperation", "Create", "Operation", "make", "key", "name", "schema", "input", "Struct", "optional", "String", "space", "SpaceSchema", "output", "object", "Transcript", "TRANSCRIPTION_URL"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderByline
|
|
3
|
+
} from "./chunk-HOOPZ7EM.mjs";
|
|
4
|
+
|
|
5
|
+
// src/blueprints/transcription-blueprint.ts
|
|
6
|
+
import { Blueprint, Template } from "@dxos/blueprints";
|
|
7
|
+
import { trim as trim2 } from "@dxos/util";
|
|
8
|
+
|
|
9
|
+
// src/functions/open.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Schema from "effect/Schema";
|
|
12
|
+
import { Database, Obj, Ref } from "@dxos/echo";
|
|
13
|
+
import { QueueService, defineFunction } from "@dxos/functions";
|
|
14
|
+
import { Message, Transcript } from "@dxos/types";
|
|
15
|
+
var open_default = defineFunction({
|
|
16
|
+
key: "org.dxos.function.transcription.open",
|
|
17
|
+
name: "Open",
|
|
18
|
+
description: "Opens and reads the contents of a transcription object.",
|
|
19
|
+
inputSchema: Schema.Struct({
|
|
20
|
+
transcript: Ref.Ref(Transcript.Transcript).annotations({
|
|
21
|
+
description: "The ID of the transcription object."
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
outputSchema: Schema.Struct({
|
|
25
|
+
content: Schema.String
|
|
26
|
+
}),
|
|
27
|
+
handler: Effect.fn(function* ({ data: { transcript } }) {
|
|
28
|
+
const transcriptObj = yield* Database.load(transcript);
|
|
29
|
+
const { dxn } = yield* Effect.promise(() => transcriptObj.queue.load());
|
|
30
|
+
const queue = yield* QueueService.getQueue(dxn);
|
|
31
|
+
yield* Effect.promise(() => queue?.queryObjects());
|
|
32
|
+
const content = queue?.objects.filter((message) => Obj.instanceOf(Message.Message, message)).flatMap((message, index) => renderByline([])(message, index)).join("\n\n");
|
|
33
|
+
return {
|
|
34
|
+
content
|
|
35
|
+
};
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// src/functions/summarize.ts
|
|
40
|
+
import * as Array from "effect/Array";
|
|
41
|
+
import * as Effect2 from "effect/Effect";
|
|
42
|
+
import * as Function from "effect/Function";
|
|
43
|
+
import * as Layer from "effect/Layer";
|
|
44
|
+
import * as Option from "effect/Option";
|
|
45
|
+
import * as Schema2 from "effect/Schema";
|
|
46
|
+
import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from "@dxos/ai";
|
|
47
|
+
import { AiSession, GenerationObserver } from "@dxos/assistant";
|
|
48
|
+
import { TracingService, defineFunction as defineFunction2 } from "@dxos/functions";
|
|
49
|
+
import { trim } from "@dxos/util";
|
|
50
|
+
var summarize_default = defineFunction2({
|
|
51
|
+
key: "org.dxos.function.transcription.summarize",
|
|
52
|
+
name: "Summarize",
|
|
53
|
+
description: "Summarize a transcript of a meeting.",
|
|
54
|
+
inputSchema: Schema2.Struct({
|
|
55
|
+
transcript: Schema2.String.annotations({
|
|
56
|
+
description: "The transcript of the meeting."
|
|
57
|
+
}),
|
|
58
|
+
notes: Schema2.optional(Schema2.String).annotations({
|
|
59
|
+
description: "Additional notes from the participants."
|
|
60
|
+
})
|
|
61
|
+
}),
|
|
62
|
+
outputSchema: Schema2.Struct({
|
|
63
|
+
summary: Schema2.String.annotations({
|
|
64
|
+
description: "The summary of the transcript."
|
|
65
|
+
})
|
|
66
|
+
}),
|
|
67
|
+
handler: Effect2.fnUntraced(function* ({ data: { transcript, notes } }) {
|
|
68
|
+
const result = yield* new AiSession().run({
|
|
69
|
+
prompt: `Transcript: ${transcript}
|
|
70
|
+
|
|
71
|
+
Notes: ${notes}`,
|
|
72
|
+
history: [],
|
|
73
|
+
system: systemPrompt,
|
|
74
|
+
observer: GenerationObserver.fromPrinter(new ConsolePrinter({
|
|
75
|
+
tag: "summarize"
|
|
76
|
+
}))
|
|
77
|
+
});
|
|
78
|
+
const summary = Function.pipe(result, Array.findLast((msg) => msg.sender.role === "assistant" && msg.blocks.some((block) => block._tag === "text")), Option.flatMap((msg) => Function.pipe(msg.blocks, Array.findLast((block) => block._tag === "text"), Option.map((block) => block.text))), Option.getOrThrowWith(() => new Error("No summary found")));
|
|
79
|
+
return {
|
|
80
|
+
summary
|
|
81
|
+
};
|
|
82
|
+
}, Effect2.provide(Layer.mergeAll(AiService.model("@anthropic/claude-sonnet-4-0"), ToolResolverService.layerEmpty, ToolExecutionService.layerEmpty, TracingService.layerNoop)))
|
|
83
|
+
});
|
|
84
|
+
var systemPrompt = trim`
|
|
85
|
+
You are a helpful assistant that summarizes transcripts of meetings.
|
|
86
|
+
|
|
87
|
+
# Goal
|
|
88
|
+
Create a markdown summary of the meeting transcript with text notes provided.
|
|
89
|
+
Notes are very important so make sure to include them in the summary if they contain meaningful information.
|
|
90
|
+
|
|
91
|
+
# Formatting
|
|
92
|
+
- Format the summary as a markdown document without extra comments like "Here is the summary of the transcript:".
|
|
93
|
+
- Use markdown formatting for headings and bullet points.
|
|
94
|
+
- Format the summary as a list of key points and takeaways.
|
|
95
|
+
- All names of people should be in bold.
|
|
96
|
+
|
|
97
|
+
# Note Taking
|
|
98
|
+
- Correlate items in the summary with the person of origin to build a coherent narrative.
|
|
99
|
+
- Include short quotes verbatim where appropriate. Especially when concerned with design decisions and problem descriptions.
|
|
100
|
+
|
|
101
|
+
# Tasks
|
|
102
|
+
At the end of the summary include tasks.
|
|
103
|
+
Extract only the tasks that are:
|
|
104
|
+
- Directly actionable.
|
|
105
|
+
- Clearly assigned to a person or team (or can easily be inferred).
|
|
106
|
+
- Strongly implied by the conversation and/or user note (no speculative tasks).
|
|
107
|
+
- Specific enough that someone reading them would know exactly what to do next.
|
|
108
|
+
|
|
109
|
+
Format all tasks as markdown checkboxes using the syntax:
|
|
110
|
+
- [ ] Task description.
|
|
111
|
+
|
|
112
|
+
Additional information can be included (indented).
|
|
113
|
+
|
|
114
|
+
If no actionable tasks are found, omit this tasks section.
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
// src/functions/index.ts
|
|
118
|
+
var TranscriptionFunctions = {
|
|
119
|
+
Open: open_default,
|
|
120
|
+
Summarize: summarize_default
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/blueprints/transcription-blueprint.ts
|
|
124
|
+
var BLUEPRINT_KEY = "org.dxos.blueprint.transcription";
|
|
125
|
+
var functions = Object.values(TranscriptionFunctions);
|
|
126
|
+
var make = () => Blueprint.make({
|
|
127
|
+
key: BLUEPRINT_KEY,
|
|
128
|
+
name: "Transcription",
|
|
129
|
+
tools: Blueprint.toolDefinitions({
|
|
130
|
+
functions
|
|
131
|
+
}),
|
|
132
|
+
instructions: Template.make({
|
|
133
|
+
source: trim2`
|
|
134
|
+
You can open and summarize a meeting transcript.
|
|
135
|
+
`
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
var blueprint = {
|
|
139
|
+
key: BLUEPRINT_KEY,
|
|
140
|
+
functions,
|
|
141
|
+
make
|
|
142
|
+
};
|
|
143
|
+
var transcription_blueprint_default = blueprint;
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
transcription_blueprint_default
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=chunk-DCPLHPHH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/transcription-blueprint.ts", "../../../src/functions/open.ts", "../../../src/functions/summarize.ts", "../../../src/functions/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { TranscriptionFunctions } from '../functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.transcription';\n\nconst functions = Object.values(TranscriptionFunctions);\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Transcription',\n tools: Blueprint.toolDefinitions({ functions }),\n instructions: Template.make({\n source: trim`\n You can open and summarize a meeting transcript.\n `,\n }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n functions,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Database, Obj, Ref } from '@dxos/echo';\nimport { QueueService, defineFunction } from '@dxos/functions';\nimport { Message, Transcript } from '@dxos/types';\n\nimport { renderByline } from '../util';\n\nexport default defineFunction({\n key: 'org.dxos.function.transcription.open',\n name: 'Open',\n description: 'Opens and reads the contents of a transcription object.',\n inputSchema: Schema.Struct({\n transcript: Ref.Ref(Transcript.Transcript).annotations({\n description: 'The ID of the transcription object.',\n }),\n }),\n outputSchema: Schema.Struct({\n content: Schema.String,\n }),\n handler: Effect.fn(function* ({ data: { transcript } }) {\n const transcriptObj = yield* Database.load(transcript);\n const { dxn } = yield* Effect.promise(() => transcriptObj.queue.load());\n const queue = yield* QueueService.getQueue(dxn);\n yield* Effect.promise(() => queue?.queryObjects());\n const content = queue?.objects\n .filter((message) => Obj.instanceOf(Message.Message, message))\n .flatMap((message, index) => renderByline([])(message, index))\n .join('\\n\\n');\n return { content };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';\nimport { AiSession, GenerationObserver } from '@dxos/assistant';\nimport { TracingService, defineFunction } from '@dxos/functions';\nimport { trim } from '@dxos/util';\n\n/**\n * Summarize a transcript of a meeting.\n */\nexport default defineFunction({\n key: 'org.dxos.function.transcription.summarize',\n name: 'Summarize',\n description: 'Summarize a transcript of a meeting.',\n inputSchema: Schema.Struct({\n transcript: Schema.String.annotations({\n description: 'The transcript of the meeting.',\n }),\n notes: Schema.optional(Schema.String).annotations({\n description: 'Additional notes from the participants.',\n }),\n }),\n outputSchema: Schema.Struct({\n summary: Schema.String.annotations({\n description: 'The summary of the transcript.',\n }),\n }),\n handler: Effect.fnUntraced(\n function* ({ data: { transcript, notes } }) {\n const result = yield* new AiSession().run({\n prompt: `Transcript: ${transcript}\\n\\nNotes: ${notes}`,\n history: [],\n system: systemPrompt,\n observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'summarize' })),\n });\n\n const summary = Function.pipe(\n result,\n Array.findLast((msg) => msg.sender.role === 'assistant' && msg.blocks.some((block) => block._tag === 'text')),\n Option.flatMap((msg) =>\n Function.pipe(\n msg.blocks,\n Array.findLast((block) => block._tag === 'text'),\n Option.map((block) => block.text),\n ),\n ),\n Option.getOrThrowWith(() => new Error('No summary found')),\n );\n\n return { summary };\n },\n Effect.provide(\n Layer.mergeAll(\n AiService.model('@anthropic/claude-sonnet-4-0'),\n ToolResolverService.layerEmpty,\n ToolExecutionService.layerEmpty,\n TracingService.layerNoop,\n ),\n ),\n ),\n});\n\nconst systemPrompt = trim`\n You are a helpful assistant that summarizes transcripts of meetings.\n\n # Goal\n Create a markdown summary of the meeting transcript with text notes provided.\n Notes are very important so make sure to include them in the summary if they contain meaningful information.\n\n # Formatting\n - Format the summary as a markdown document without extra comments like \"Here is the summary of the transcript:\".\n - Use markdown formatting for headings and bullet points.\n - Format the summary as a list of key points and takeaways.\n - All names of people should be in bold.\n\n # Note Taking\n - Correlate items in the summary with the person of origin to build a coherent narrative.\n - Include short quotes verbatim where appropriate. Especially when concerned with design decisions and problem descriptions.\n\n # Tasks\n At the end of the summary include tasks.\n Extract only the tasks that are:\n - Directly actionable.\n - Clearly assigned to a person or team (or can easily be inferred).\n - Strongly implied by the conversation and/or user note (no speculative tasks).\n - Specific enough that someone reading them would know exactly what to do next.\n\n Format all tasks as markdown checkboxes using the syntax:\n - [ ] Task description.\n\n Additional information can be included (indented).\n\n If no actionable tasks are found, omit this tasks section.\n`;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport Open from './open';\nimport Summarize from './summarize';\n\nexport const TranscriptionFunctions = {\n Open,\n Summarize,\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Blueprint", "Template", "trim", "Effect", "Schema", "Database", "Obj", "Ref", "QueueService", "defineFunction", "Message", "Transcript", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "transcript", "Ref", "Transcript", "annotations", "outputSchema", "content", "String", "handler", "fn", "data", "transcriptObj", "Database", "load", "dxn", "promise", "queue", "QueueService", "getQueue", "queryObjects", "objects", "filter", "message", "Obj", "instanceOf", "Message", "flatMap", "index", "renderByline", "join", "Array", "Effect", "Function", "Layer", "Option", "Schema", "AiService", "ConsolePrinter", "ToolExecutionService", "ToolResolverService", "AiSession", "GenerationObserver", "TracingService", "defineFunction", "trim", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "transcript", "String", "annotations", "notes", "optional", "outputSchema", "summary", "handler", "fnUntraced", "data", "result", "AiSession", "run", "prompt", "history", "system", "systemPrompt", "observer", "GenerationObserver", "fromPrinter", "ConsolePrinter", "tag", "pipe", "findLast", "msg", "sender", "role", "blocks", "some", "block", "_tag", "flatMap", "map", "text", "getOrThrowWith", "Error", "provide", "mergeAll", "AiService", "model", "ToolResolverService", "layerEmpty", "ToolExecutionService", "TracingService", "layerNoop", "trim", "TranscriptionFunctions", "Open", "Summarize", "BLUEPRINT_KEY", "functions", "Object", "values", "TranscriptionFunctions", "make", "Blueprint", "key", "name", "tools", "toolDefinitions", "instructions", "Template", "source", "trim", "blueprint"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/util/render-byline.ts
|
|
2
|
+
var renderByline = (identities) => (message, index, debug = false) => {
|
|
3
|
+
if (message.sender.role === "assistant") {
|
|
4
|
+
return [
|
|
5
|
+
message.blocks.find((block) => block._tag === "transcript")?.text ?? "",
|
|
6
|
+
""
|
|
7
|
+
];
|
|
8
|
+
}
|
|
9
|
+
const identity = identities.find((identity2) => identity2.did === message.sender.identityDid);
|
|
10
|
+
const name = identity?.profile?.displayName ?? message.sender.contact?.target?.fullName ?? message.sender.name ?? message.sender.email ?? message.sender.identityDid;
|
|
11
|
+
const blocks = message.blocks.filter((block) => block._tag === "transcript");
|
|
12
|
+
return [
|
|
13
|
+
// TODO(thure): Use an XML tag with the bits needed here.
|
|
14
|
+
`###### ${name}` + (debug ? ` [${index}]:${message.id}` : ""),
|
|
15
|
+
blocks.map((block) => block.text.trim()).join(" "),
|
|
16
|
+
""
|
|
17
|
+
];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/util/array.ts
|
|
21
|
+
var mergeFloat64Arrays = (arrays) => {
|
|
22
|
+
const newArray = new Float64Array(arrays.reduce((acc, array) => array.length + acc, 0));
|
|
23
|
+
let offset = 0;
|
|
24
|
+
for (const array of arrays) {
|
|
25
|
+
newArray.set(array, offset);
|
|
26
|
+
offset += array.length;
|
|
27
|
+
}
|
|
28
|
+
return newArray;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
mergeFloat64Arrays,
|
|
33
|
+
renderByline
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=chunk-HOOPZ7EM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/util/render-byline.ts", "../../../src/util/array.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Identity } from '@dxos/react-client/halo';\nimport { type Message } from '@dxos/types';\n\n// TODO(thure): Move this?\nexport const renderByline =\n (identities: Identity[]) =>\n (message: Message.Message, index: number, debug = false): string[] => {\n if (message.sender.role === 'assistant') {\n // Start/stop block.\n return [message.blocks.find((block) => block._tag === 'transcript')?.text ?? '', ''];\n }\n\n // TODO(burdon): Use link/reference markup for users (with popover).\n // TODO(burdon): Color and avatar.\n const identity = identities.find((identity) => identity.did === message.sender.identityDid);\n const name =\n identity?.profile?.displayName ??\n message.sender.contact?.target?.fullName ??\n message.sender.name ??\n message.sender.email ??\n message.sender.identityDid;\n const blocks = message.blocks.filter((block) => block._tag === 'transcript');\n return [\n // TODO(thure): Use an XML tag with the bits needed here.\n `###### ${name}` + (debug ? ` [${index}]:${message.id}` : ''),\n blocks.map((block) => block.text.trim()).join(' '),\n '',\n ];\n };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport const mergeFloat64Arrays = (arrays: Float64Array[]) => {\n const newArray = new Float64Array(arrays.reduce((acc, array) => array.length + acc, 0));\n let offset = 0;\n for (const array of arrays) {\n newArray.set(array, offset);\n offset += array.length;\n }\n\n return newArray;\n};\n"],
|
|
5
|
+
"mappings": ";AAQO,IAAMA,eACX,CAACC,eACD,CAACC,SAA0BC,OAAeC,QAAQ,UAAK;AACrD,MAAIF,QAAQG,OAAOC,SAAS,aAAa;AAEvC,WAAO;MAACJ,QAAQK,OAAOC,KAAK,CAACC,UAAUA,MAAMC,SAAS,YAAA,GAAeC,QAAQ;MAAI;;EACnF;AAIA,QAAMC,WAAWX,WAAWO,KAAK,CAACI,cAAaA,UAASC,QAAQX,QAAQG,OAAOS,WAAW;AAC1F,QAAMC,OACJH,UAAUI,SAASC,eACnBf,QAAQG,OAAOa,SAASC,QAAQC,YAChClB,QAAQG,OAAOU,QACfb,QAAQG,OAAOgB,SACfnB,QAAQG,OAAOS;AACjB,QAAMP,SAASL,QAAQK,OAAOe,OAAO,CAACb,UAAUA,MAAMC,SAAS,YAAA;AAC/D,SAAO;;IAEL,UAAUK,IAAAA,MAAUX,QAAQ,KAAKD,KAAAA,KAAUD,QAAQqB,EAAE,KAAK;IAC1DhB,OAAOiB,IAAI,CAACf,UAAUA,MAAME,KAAKc,KAAI,CAAA,EAAIC,KAAK,GAAA;IAC9C;;AAEJ;;;AC5BK,IAAMC,qBAAqB,CAACC,WAAAA;AACjC,QAAMC,WAAW,IAAIC,aAAaF,OAAOG,OAAO,CAACC,KAAKC,UAAUA,MAAMC,SAASF,KAAK,CAAA,CAAA;AACpF,MAAIG,SAAS;AACb,aAAWF,SAASL,QAAQ;AAC1BC,aAASO,IAAIH,OAAOE,MAAAA;AACpBA,cAAUF,MAAMC;EAClB;AAEA,SAAOL;AACT;",
|
|
6
|
+
"names": ["renderByline", "identities", "message", "index", "debug", "sender", "role", "blocks", "find", "block", "_tag", "text", "identity", "did", "identityDid", "name", "profile", "displayName", "contact", "target", "fullName", "email", "filter", "id", "map", "trim", "join", "mergeFloat64Arrays", "arrays", "newArray", "Float64Array", "reduce", "acc", "array", "length", "offset", "set"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.transcription",
|
|
5
|
+
name: "Transcription",
|
|
6
|
+
description: trim`
|
|
7
|
+
Real-time voice-to-text transcription service for capturing spoken content.
|
|
8
|
+
Convert audio input into searchable text that integrates seamlessly with notes and documents.
|
|
9
|
+
`,
|
|
10
|
+
icon: "ph--microphone--regular",
|
|
11
|
+
iconHue: "sky",
|
|
12
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription",
|
|
13
|
+
tags: [
|
|
14
|
+
"labs"
|
|
15
|
+
],
|
|
16
|
+
screenshots: []
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
meta
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-KYI5GIQM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.transcription',\n name: 'Transcription',\n description: trim`\n Real-time voice-to-text transcription service for capturing spoken content.\n Convert audio input into searchable text that integrates seamlessly with notes and documents.\n `,\n icon: 'ph--microphone--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',\n tags: ['labs'],\n screenshots: [],\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa,CAAA;AACf;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
|
+
}
|