@dxos/plugin-transcription 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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/blueprints/index.mjs +31 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-3L623EVL.mjs +17 -0
- package/dist/lib/browser/chunk-3L623EVL.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-KAEXRX3Y.mjs +35 -0
- package/dist/lib/browser/chunk-KAEXRX3Y.mjs.map +7 -0
- package/dist/lib/browser/chunk-L4HW35L6.mjs +111 -0
- package/dist/lib/browser/chunk-L4HW35L6.mjs.map +7 -0
- package/dist/lib/browser/create-ULR5DPJZ.mjs +21 -0
- package/dist/lib/browser/create-ULR5DPJZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1085 -98
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-SFMPLZVW.mjs +27 -0
- package/dist/lib/browser/open-SFMPLZVW.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/summarize-I3POXUK3.mjs +79 -0
- package/dist/lib/browser/summarize-I3POXUK3.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +22 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -8
- package/dist/lib/node-esm/blueprints/index.mjs +32 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7UIZWCD4.mjs +112 -0
- package/dist/lib/node-esm/chunk-7UIZWCD4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-KO3IOD2O.mjs +19 -0
- package/dist/lib/node-esm/chunk-KO3IOD2O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-O533NBMK.mjs +37 -0
- package/dist/lib/node-esm/chunk-O533NBMK.mjs.map +7 -0
- package/dist/lib/node-esm/create-A5QHNWRF.mjs +22 -0
- package/dist/lib/node-esm/create-A5QHNWRF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1085 -98
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-OI24QNTO.mjs +28 -0
- package/dist/lib/node-esm/open-OI24QNTO.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/summarize-F3LLJ45P.mjs +80 -0
- package/dist/lib/node-esm/summarize-F3LLJ45P.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +23 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -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.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts +4 -3
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.d.ts +18 -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/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 +2 -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/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 +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +2 -2
- 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/model/model.d.ts +2 -2
- package/dist/types/src/model/model.d.ts.map +1 -1
- package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
- package/dist/types/src/normalization/index.d.ts.map +1 -0
- package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +5 -5
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
- package/dist/types/src/normalization/normalization.d.ts +364 -0
- package/dist/types/src/normalization/normalization.d.ts.map +1 -0
- package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
- package/dist/types/src/normalization/utils.d.ts +3 -0
- package/dist/types/src/normalization/utils.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +917 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/summarize.d.ts +8 -0
- package/dist/types/src/operations/summarize.d.ts.map +1 -0
- package/dist/types/src/stories/FileTranscription.stories.d.ts +18 -0
- package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts +14 -0
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
- package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts +20 -0
- package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts +23 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
- package/dist/types/src/stories/useIsSpeaking.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +10 -10
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/index.d.ts +1 -1
- package/dist/types/src/transcriber/index.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +60 -5
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
- 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/translations.d.ts +7 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +19 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +5 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.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/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.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 +106 -80
- package/src/TranscriptionPlugin.tsx +47 -60
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/transcription-blueprint.ts +29 -0
- package/src/capabilities/blueprint-definition.ts +17 -0
- package/src/capabilities/index.ts +9 -6
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +23 -14
- package/src/capabilities/transcriber.ts +54 -43
- package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +75 -71
- package/src/components/Transcription/Transcription.tsx +64 -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/containers/TranscriptionContainer/TranscriptionContainer.tsx +35 -0
- package/src/containers/TranscriptionContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useAudioFile.ts +49 -53
- package/src/hooks/useQueueModelAdapter.ts +1 -1
- package/src/hooks/useTranscriber.ts +12 -4
- package/src/hooks/useVoiceInput.ts +2 -3
- package/src/index.ts +1 -1
- package/src/meta.ts +9 -6
- package/src/model/model.test.ts +20 -14
- package/src/model/model.ts +3 -3
- package/src/{segments-normalization → normalization}/message-normalizer.ts +19 -18
- package/src/{segments-normalization → normalization}/normalization.test.ts +7 -12
- package/src/normalization/normalization.ts +77 -0
- package/src/{segments-normalization → normalization}/utils.ts +2 -2
- package/src/operations/create.ts +24 -0
- package/src/operations/definitions.ts +101 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/open.ts +28 -0
- package/src/operations/summarize.ts +102 -0
- package/src/{components/stories → stories}/FileTranscription.stories.tsx +84 -61
- package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +45 -39
- package/src/{components/stories → stories}/MicrophoneTranscription.stories.tsx +81 -100
- package/src/stories/TranscriptionStory.tsx +93 -0
- package/src/testing/testing.ts +39 -39
- package/src/transcriber/index.ts +1 -1
- package/src/transcriber/media-stream-recorder.ts +3 -3
- package/src/transcriber/transcriber.browser.test.ts +4 -5
- package/src/transcriber/transcriber.test.ts +104 -0
- package/src/transcriber/transcriber.ts +99 -58
- package/src/transcriber/transcription-manager.ts +37 -52
- package/src/translations.ts +7 -7
- package/src/types/capabilities.ts +39 -0
- package/src/types/defs.ts +9 -0
- package/src/types/index.ts +2 -2
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +33 -0
- package/dist/lib/browser/TranscriptContainer-FH7VAWYA.mjs +0 -11
- package/dist/lib/browser/chunk-5WH45KBY.mjs +0 -19
- package/dist/lib/browser/chunk-5WH45KBY.mjs.map +0 -7
- package/dist/lib/browser/chunk-BJWYA2BU.mjs +0 -782
- package/dist/lib/browser/chunk-BJWYA2BU.mjs.map +0 -7
- package/dist/lib/browser/chunk-KJIQQHJB.mjs +0 -506
- package/dist/lib/browser/chunk-KJIQQHJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-KWOOVS5G.mjs +0 -55
- package/dist/lib/browser/chunk-KWOOVS5G.mjs.map +0 -7
- package/dist/lib/browser/chunk-SREIAQSP.mjs +0 -16
- package/dist/lib/browser/chunk-SREIAQSP.mjs.map +0 -7
- package/dist/lib/browser/chunk-UKUSJTQW.mjs +0 -8
- package/dist/lib/browser/chunk-UKUSJTQW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AOVQ7JI4.mjs +0 -30
- package/dist/lib/browser/intent-resolver-AOVQ7JI4.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4MEJMKYQ.mjs +0 -34
- package/dist/lib/browser/react-surface-4MEJMKYQ.mjs.map +0 -7
- package/dist/lib/browser/transcriber-V77CN7XX.mjs +0 -56
- package/dist/lib/browser/transcriber-V77CN7XX.mjs.map +0 -7
- package/dist/lib/node-esm/TranscriptContainer-GEUOOYHX.mjs +0 -12
- package/dist/lib/node-esm/chunk-A33GNR44.mjs +0 -507
- package/dist/lib/node-esm/chunk-A33GNR44.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IKQMDRY6.mjs +0 -56
- package/dist/lib/node-esm/chunk-IKQMDRY6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PHP7MCAY.mjs +0 -10
- package/dist/lib/node-esm/chunk-PHP7MCAY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TM2ASOZA.mjs +0 -17
- package/dist/lib/node-esm/chunk-TM2ASOZA.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-Y7PCJ34K.mjs +0 -783
- package/dist/lib/node-esm/chunk-Y7PCJ34K.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-P4XPIKQF.mjs +0 -31
- package/dist/lib/node-esm/intent-resolver-P4XPIKQF.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-EZUPNHUC.mjs +0 -35
- package/dist/lib/node-esm/react-surface-EZUPNHUC.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-3SX3DNLV.mjs +0 -57
- package/dist/lib/node-esm/transcriber-3SX3DNLV.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/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/components/stories/FileTranscription.stories.d.ts +0 -17
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +0 -10
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +0 -19
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -11
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
- package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +0 -422
- package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/utils.d.ts +0 -3
- package/dist/types/src/segments-normalization/utils.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/dist/types/src/types/types.d.ts +0 -31
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -24
- package/src/components/Transcript/Transcript.tsx +0 -101
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/TranscriptContainer.tsx +0 -36
- package/src/components/stories/TranscriptionStory.tsx +0 -41
- package/src/segments-normalization/normalization.ts +0 -115
- package/src/types/schema.ts +0 -41
- package/src/types/types.ts +0 -33
- package/dist/lib/browser/{TranscriptContainer-FH7VAWYA.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- package/dist/lib/node-esm/{TranscriptContainer-GEUOOYHX.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
- package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
- package/dist/types/src/{components/stories → stories}/useIsSpeaking.d.ts +0 -0
- package/src/{segments-normalization → normalization}/index.ts +1 -1
- /package/src/{components/stories → stories}/useIsSpeaking.tsx +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/blueprints/transcription-blueprint.ts
|
|
4
|
+
import { Blueprint, Template } from "@dxos/compute";
|
|
5
|
+
import { trim } from "@dxos/util";
|
|
6
|
+
import { TranscriptOperation } from "#operations";
|
|
7
|
+
var BLUEPRINT_KEY = "org.dxos.blueprint.transcription";
|
|
8
|
+
var make = () => Blueprint.make({
|
|
9
|
+
key: BLUEPRINT_KEY,
|
|
10
|
+
name: "Transcription",
|
|
11
|
+
tools: Blueprint.toolDefinitions({
|
|
12
|
+
operations: [
|
|
13
|
+
TranscriptOperation.Open,
|
|
14
|
+
TranscriptOperation.Summarize
|
|
15
|
+
]
|
|
16
|
+
}),
|
|
17
|
+
instructions: Template.make({
|
|
18
|
+
source: trim`
|
|
19
|
+
You can open and summarize a meeting transcript.
|
|
20
|
+
`
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
var blueprint = {
|
|
24
|
+
key: BLUEPRINT_KEY,
|
|
25
|
+
make
|
|
26
|
+
};
|
|
27
|
+
var transcription_blueprint_default = blueprint;
|
|
28
|
+
export {
|
|
29
|
+
transcription_blueprint_default as TranscriptionBlueprint
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/blueprints/transcription-blueprint.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { TranscriptOperation } from '#operations';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.transcription';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Transcription',\n tools: Blueprint.toolDefinitions({ operations: [TranscriptOperation.Open, TranscriptOperation.Summarize] }),\n instructions: Template.make({\n source: trim`\n You can open and summarize a meeting transcript.\n `,\n }),\n });\n\nconst blueprint: Blueprint.Definition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;AAErB,SAASC,2BAA2B;AAEpC,IAAMC,gBAAgB;AAEtB,IAAMC,OAAO,MACXL,UAAUK,KAAK;EACbC,KAAKF;EACLG,MAAM;EACNC,OAAOR,UAAUS,gBAAgB;IAAEC,YAAY;MAACP,oBAAoBQ;MAAMR,oBAAoBS;;EAAW,CAAA;EACzGC,cAAcZ,SAASI,KAAK;IAC1BS,QAAQZ;;;EAGV,CAAA;AACF,CAAA;AAEF,IAAMa,YAAkC;EACtCT,KAAKF;EACLC;AACF;AAEA,IAAA,kCAAeU;",
|
|
6
|
+
"names": ["Blueprint", "Template", "trim", "TranscriptOperation", "BLUEPRINT_KEY", "make", "key", "name", "tools", "toolDefinitions", "operations", "Open", "Summarize", "instructions", "source", "blueprint"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/types/capabilities.ts
|
|
2
|
+
import { Capability } from "@dxos/app-framework";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
(function(TranscriptionCapabilities2) {
|
|
5
|
+
TranscriptionCapabilities2.Transcriber = Capability.make(`${meta.id}.capability.transcriber`);
|
|
6
|
+
TranscriptionCapabilities2.TranscriptionManager = Capability.make(`${meta.id}.capability.transcription-manager`);
|
|
7
|
+
})(TranscriptionCapabilities || (TranscriptionCapabilities = {}));
|
|
8
|
+
var TranscriptionCapabilities;
|
|
9
|
+
|
|
10
|
+
// src/types/defs.ts
|
|
11
|
+
var TRANSCRIPTION_URL = "https://calls-service.dxos.workers.dev";
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
TranscriptionCapabilities,
|
|
15
|
+
TRANSCRIPTION_URL
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=chunk-3L623EVL.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/defs.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\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 transcribe?: TranscriberProps['transcribe'];\n };\n\n export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;\n\n export type GetTranscriptionManagerProps = {\n messageEnricher?: TranscriptMessageEnricher;\n };\n\n export type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;\n\n export const Transcriber = Capability.make<GetTranscriber>(`${meta.id}.capability.transcriber`);\n\n export const TranscriptionManager = Capability.make<GetTranscriptionManager>(\n `${meta.id}.capability.transcription-manager`,\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;AAE3B,SAASC,YAAY;UAUJC,4BAAAA;6BAiBFC,cAAcH,WAAWI,KAAqB,GAAGH,KAAKI,EAAE,yBAAyB;6BAEjFC,uBAAuBN,WAAWI,KAC7C,GAAGH,KAAKI,EAAE,mCAAmC;AAEjD,GAtBiBH,8BAAAA,4BAAAA,CAAAA,EAAAA;;;;ACRV,IAAMK,oBAAoB;",
|
|
6
|
+
"names": ["Capability", "meta", "TranscriptionCapabilities", "Transcriber", "make", "id", "TranscriptionManager", "TRANSCRIPTION_URL"]
|
|
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-KAEXRX3Y.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,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/operations/definitions.ts
|
|
6
|
+
var definitions_exports = {};
|
|
7
|
+
__export(definitions_exports, {
|
|
8
|
+
Create: () => Create,
|
|
9
|
+
MessageWithRangeId: () => MessageWithRangeId,
|
|
10
|
+
Open: () => Open,
|
|
11
|
+
SentenceNormalization: () => SentenceNormalization,
|
|
12
|
+
SentenceNormalizationInput: () => SentenceNormalizationInput,
|
|
13
|
+
SentenceNormalizationOutput: () => SentenceNormalizationOutput,
|
|
14
|
+
Summarize: () => Summarize
|
|
15
|
+
});
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
|
+
import { AiService } from "@dxos/ai";
|
|
18
|
+
import { SpaceSchema } from "@dxos/client/echo";
|
|
19
|
+
import { Operation } from "@dxos/compute";
|
|
20
|
+
import { Database, Feed, Ref } from "@dxos/echo";
|
|
21
|
+
import { Message, Transcript } from "@dxos/types";
|
|
22
|
+
import { meta } from "#meta";
|
|
23
|
+
var TRANSCRIPT_OPERATION = `${meta.id}.operation`;
|
|
24
|
+
var Create = Operation.make({
|
|
25
|
+
meta: {
|
|
26
|
+
key: `${TRANSCRIPT_OPERATION}.create`,
|
|
27
|
+
name: "Create Transcript"
|
|
28
|
+
},
|
|
29
|
+
input: Schema.Struct({
|
|
30
|
+
name: Schema.optional(Schema.String),
|
|
31
|
+
space: SpaceSchema
|
|
32
|
+
}),
|
|
33
|
+
output: Schema.Struct({
|
|
34
|
+
object: Transcript.Transcript
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
var MessageWithRangeId = Schema.extend(Message.Message, Schema.Struct({
|
|
38
|
+
rangeId: Schema.optional(Schema.Array(Schema.String)).annotations({
|
|
39
|
+
description: "The IDs of the messages that contain the sentences."
|
|
40
|
+
})
|
|
41
|
+
}));
|
|
42
|
+
var Open = Operation.make({
|
|
43
|
+
meta: {
|
|
44
|
+
key: "org.dxos.function.transcription.open",
|
|
45
|
+
name: "Open",
|
|
46
|
+
description: "Opens and reads the contents of a transcription object."
|
|
47
|
+
},
|
|
48
|
+
input: Schema.Struct({
|
|
49
|
+
transcript: Ref.Ref(Transcript.Transcript).annotations({
|
|
50
|
+
description: "The ID of the transcription object."
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
output: Schema.Struct({
|
|
54
|
+
content: Schema.String
|
|
55
|
+
}),
|
|
56
|
+
services: [
|
|
57
|
+
Database.Service,
|
|
58
|
+
Feed.FeedService
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
var Summarize = Operation.make({
|
|
62
|
+
meta: {
|
|
63
|
+
key: "org.dxos.function.transcription.summarize",
|
|
64
|
+
name: "Summarize",
|
|
65
|
+
description: "Summarize a transcript of a meeting."
|
|
66
|
+
},
|
|
67
|
+
input: Schema.Struct({
|
|
68
|
+
transcript: Schema.String.annotations({
|
|
69
|
+
description: "The transcript of the meeting."
|
|
70
|
+
}),
|
|
71
|
+
notes: Schema.optional(Schema.String).annotations({
|
|
72
|
+
description: "Additional notes from the participants."
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
output: Schema.Struct({
|
|
76
|
+
summary: Schema.String.annotations({
|
|
77
|
+
description: "The summary of the transcript."
|
|
78
|
+
})
|
|
79
|
+
}),
|
|
80
|
+
services: [
|
|
81
|
+
AiService.AiService
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
var SentenceNormalizationInput = Schema.Struct({
|
|
85
|
+
messages: Schema.Array(MessageWithRangeId).annotations({
|
|
86
|
+
description: "Messages to normalize into sentences."
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
var SentenceNormalizationOutput = Schema.Struct({
|
|
90
|
+
sentences: Schema.Array(MessageWithRangeId.pipe(Schema.mutable)).pipe(Schema.mutable).annotations({
|
|
91
|
+
description: "The sentences of the transcript."
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
var SentenceNormalization = Operation.make({
|
|
95
|
+
meta: {
|
|
96
|
+
key: "org.dxos.function.transcription.sentence-normalization",
|
|
97
|
+
name: "Sentence Normalization",
|
|
98
|
+
description: "Post process of transcription for sentence normalization"
|
|
99
|
+
},
|
|
100
|
+
input: SentenceNormalizationInput,
|
|
101
|
+
output: SentenceNormalizationOutput,
|
|
102
|
+
services: []
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
Create,
|
|
107
|
+
Open,
|
|
108
|
+
Summarize,
|
|
109
|
+
definitions_exports
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=chunk-L4HW35L6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport { SpaceSchema } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Ref } from '@dxos/echo';\nimport { Message, Transcript } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nconst TRANSCRIPT_OPERATION = `${meta.id}.operation`;\n\nexport const Create = Operation.make({\n meta: { key: `${TRANSCRIPT_OPERATION}.create`, name: 'Create Transcript' },\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\nexport const MessageWithRangeId = Schema.extend(\n Message.Message,\n Schema.Struct({\n rangeId: Schema.optional(Schema.Array(Schema.String)).annotations({\n description: 'The IDs of the messages that contain the sentences.',\n }),\n }),\n);\n\nexport type MessageWithRangeIdType = Schema.Schema.Type<typeof MessageWithRangeId>;\n\nexport const Open = Operation.make({\n meta: {\n key: 'org.dxos.function.transcription.open',\n name: 'Open',\n description: 'Opens and reads the contents of a transcription object.',\n },\n input: Schema.Struct({\n transcript: Ref.Ref(Transcript.Transcript).annotations({\n description: 'The ID of the transcription object.',\n }),\n }),\n output: Schema.Struct({\n content: Schema.String,\n }),\n services: [Database.Service, Feed.FeedService],\n});\n\nexport const Summarize = Operation.make({\n meta: {\n key: 'org.dxos.function.transcription.summarize',\n name: 'Summarize',\n description: 'Summarize a transcript of a meeting.',\n },\n input: 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 output: Schema.Struct({\n summary: Schema.String.annotations({\n description: 'The summary of the transcript.',\n }),\n }),\n services: [AiService.AiService],\n});\n\nexport const SentenceNormalizationInput = Schema.Struct({\n messages: Schema.Array(MessageWithRangeId).annotations({\n description: 'Messages to normalize into sentences.',\n }),\n});\n\nexport type SentenceNormalizationInputType = Schema.Schema.Type<typeof SentenceNormalizationInput>;\n\nexport const SentenceNormalizationOutput = Schema.Struct({\n sentences: Schema.Array(MessageWithRangeId.pipe(Schema.mutable)).pipe(Schema.mutable).annotations({\n description: 'The sentences of the transcript.',\n }),\n});\n\nexport const SentenceNormalization = Operation.make({\n meta: {\n key: 'org.dxos.function.transcription.sentence-normalization',\n name: 'Sentence Normalization',\n description: 'Post process of transcription for sentence normalization',\n },\n input: SentenceNormalizationInput,\n output: SentenceNormalizationOutput,\n services: [],\n});\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,SAASC,kBAAkB;AAEpC,SAASC,YAAY;AAErB,IAAMC,uBAAuB,GAAGD,KAAKE,EAAE;AAEhC,IAAMC,SAAST,UAAUU,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGJ,oBAAAA;IAA+BK,MAAM;EAAoB;EACzEC,OAAcC,cAAO;IACnBF,MAAaG,gBAAgBC,aAAM;IACnCC,OAAOlB;EACT,CAAA;EACAmB,QAAeJ,cAAO;IACpBK,QAAQd,WAAWA;EACrB,CAAA;AACF,CAAA;AAEO,IAAMe,qBAA4BC,cACvCjB,QAAQA,SACDU,cAAO;EACZQ,SAAgBP,gBAAgBQ,aAAaP,aAAM,CAAA,EAAGQ,YAAY;IAChEC,aAAa;EACf,CAAA;AACF,CAAA,CAAA;AAKK,IAAMC,OAAO1B,UAAUU,KAAK;EACjCJ,MAAM;IACJK,KAAK;IACLC,MAAM;IACNa,aAAa;EACf;EACAZ,OAAcC,cAAO;IACnBa,YAAYxB,IAAIA,IAAIE,WAAWA,UAAU,EAAEmB,YAAY;MACrDC,aAAa;IACf,CAAA;EACF,CAAA;EACAP,QAAeJ,cAAO;IACpBc,SAAgBZ;EAClB,CAAA;EACAa,UAAU;IAAC5B,SAAS6B;IAAS5B,KAAK6B;;AACpC,CAAA;AAEO,IAAMC,YAAYhC,UAAUU,KAAK;EACtCJ,MAAM;IACJK,KAAK;IACLC,MAAM;IACNa,aAAa;EACf;EACAZ,OAAcC,cAAO;IACnBa,YAAmBX,cAAOQ,YAAY;MACpCC,aAAa;IACf,CAAA;IACAQ,OAAclB,gBAAgBC,aAAM,EAAEQ,YAAY;MAChDC,aAAa;IACf,CAAA;EACF,CAAA;EACAP,QAAeJ,cAAO;IACpBoB,SAAgBlB,cAAOQ,YAAY;MACjCC,aAAa;IACf,CAAA;EACF,CAAA;EACAI,UAAU;IAAC/B,UAAUA;;AACvB,CAAA;AAEO,IAAMqC,6BAAoCrB,cAAO;EACtDsB,UAAiBb,aAAMH,kBAAAA,EAAoBI,YAAY;IACrDC,aAAa;EACf,CAAA;AACF,CAAA;AAIO,IAAMY,8BAAqCvB,cAAO;EACvDwB,WAAkBf,aAAMH,mBAAmBmB,KAAYC,cAAO,CAAA,EAAGD,KAAYC,cAAO,EAAEhB,YAAY;IAChGC,aAAa;EACf,CAAA;AACF,CAAA;AAEO,IAAMgB,wBAAwBzC,UAAUU,KAAK;EAClDJ,MAAM;IACJK,KAAK;IACLC,MAAM;IACNa,aAAa;EACf;EACAZ,OAAOsB;EACPjB,QAAQmB;EACRR,UAAU,CAAA;AACZ,CAAA;",
|
|
6
|
+
"names": ["Schema", "AiService", "SpaceSchema", "Operation", "Database", "Feed", "Ref", "Message", "Transcript", "meta", "TRANSCRIPT_OPERATION", "id", "Create", "make", "key", "name", "input", "Struct", "optional", "String", "space", "output", "object", "MessageWithRangeId", "extend", "rangeId", "Array", "annotations", "description", "Open", "transcript", "content", "services", "Service", "FeedService", "Summarize", "notes", "summary", "SentenceNormalizationInput", "messages", "SentenceNormalizationOutput", "sentences", "pipe", "mutable", "SentenceNormalization"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Create
|
|
3
|
+
} from "./chunk-L4HW35L6.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/operations/create.ts
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import { Operation } from "@dxos/compute";
|
|
9
|
+
import { Feed, Ref } from "@dxos/echo";
|
|
10
|
+
import { Transcript } from "@dxos/types";
|
|
11
|
+
var handler = Create.pipe(Operation.withHandler(Effect.fn(function* ({ space }) {
|
|
12
|
+
const feed = space.db.add(Feed.make());
|
|
13
|
+
return {
|
|
14
|
+
object: Transcript.make(Ref.make(feed))
|
|
15
|
+
};
|
|
16
|
+
})));
|
|
17
|
+
var create_default = handler;
|
|
18
|
+
export {
|
|
19
|
+
create_default as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=create-ULR5DPJZ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/create.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Feed, Ref } from '@dxos/echo';\nimport { Transcript } from '@dxos/types';\n\nimport { Create } from './definitions';\n\nconst handler: Operation.WithHandler<typeof Create> = Create.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ space }) {\n const feed = space.db.add(Feed.make());\n return {\n object: Transcript.make(Ref.make(feed)),\n };\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,MAAMC,WAAW;AAC1B,SAASC,kBAAkB;AAI3B,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,UAAG,WAAW,EAAEC,MAAK,GAAE;AAC5B,QAAMC,OAAOD,MAAME,GAAGC,IAAIC,KAAKC,KAAI,CAAA;AACnC,SAAO;IACLC,QAAQC,WAAWF,KAAKG,IAAIH,KAAKJ,IAAAA,CAAAA;EACnC;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAeP;",
|
|
6
|
+
"names": ["Effect", "Operation", "Feed", "Ref", "Transcript", "handler", "Create", "pipe", "Operation", "withHandler", "fn", "space", "feed", "db", "add", "Feed", "make", "object", "Transcript", "Ref"]
|
|
7
|
+
}
|