@dxos/plugin-transcription 0.8.4-main.5acf9ea → 0.8.4-main.5ea62a8
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-OX7OOODC.mjs +11 -0
- package/dist/lib/browser/blueprint-definition-QQSGTX5F.mjs +142 -0
- package/dist/lib/browser/blueprint-definition-QQSGTX5F.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4FJIYH7T.mjs → chunk-26XDG6GQ.mjs} +2 -2
- package/dist/lib/browser/{chunk-5WH45KBY.mjs → chunk-3X7HP44M.mjs} +8 -1
- package/dist/lib/browser/{chunk-5WH45KBY.mjs.map → chunk-3X7HP44M.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-5KPYIC3N.mjs → chunk-5I4BMOGE.mjs} +422 -402
- package/dist/lib/browser/chunk-5I4BMOGE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FFEPEPCU.mjs → chunk-BA64VLLR.mjs} +85 -94
- package/dist/lib/browser/chunk-BA64VLLR.mjs.map +7 -0
- package/dist/lib/browser/chunk-HXVGV7T6.mjs +63 -0
- package/dist/lib/browser/chunk-HXVGV7T6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-U6QBOGTN.mjs → chunk-TNEQFHIU.mjs} +2 -2
- package/dist/lib/browser/{chunk-U6QBOGTN.mjs.map → chunk-TNEQFHIU.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +18 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-T3EGLS3L.mjs +25 -0
- package/dist/lib/browser/intent-resolver-T3EGLS3L.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-E5D5AE3F.mjs → react-surface-QYX74JNG.mjs} +8 -8
- package/dist/lib/browser/react-surface-QYX74JNG.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-PXT4QBFY.mjs → transcriber-JOOAQVYV.mjs} +5 -5
- package/dist/lib/browser/transcriber-JOOAQVYV.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -8
- package/dist/lib/node-esm/{TranscriptContainer-VBAOM5DG.mjs → TranscriptContainer-BUWK63SI.mjs} +4 -4
- package/dist/lib/node-esm/blueprint-definition-4PLCTH5Q.mjs +143 -0
- package/dist/lib/node-esm/blueprint-definition-4PLCTH5Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-RHF2ALML.mjs → chunk-3QAIZGMW.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-RHF2ALML.mjs.map → chunk-3QAIZGMW.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-TJKAO7VR.mjs → chunk-DT3AOC3E.mjs} +422 -402
- package/dist/lib/node-esm/chunk-DT3AOC3E.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HT3W7LDP.mjs → chunk-J5GQ3KGX.mjs} +85 -94
- package/dist/lib/node-esm/chunk-J5GQ3KGX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-Y2B4HWSS.mjs → chunk-NWD757KH.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-XMUCZBP3.mjs → chunk-QARUDLHN.mjs} +7 -1
- package/dist/lib/node-esm/{chunk-XMUCZBP3.mjs.map → chunk-QARUDLHN.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs +64 -0
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +18 -12
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-VDHCUAIO.mjs +26 -0
- package/dist/lib/node-esm/intent-resolver-VDHCUAIO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-QRDJOHN5.mjs → react-surface-TM7XOQBR.mjs} +8 -8
- package/dist/lib/node-esm/react-surface-TM7XOQBR.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-YUTEVANE.mjs → transcriber-QPS55YP2.mjs} +5 -5
- package/dist/lib/node-esm/transcriber-QPS55YP2.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -8
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- 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/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 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +4 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +32 -15
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +2 -2
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +2 -2
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +5 -2
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +10 -5
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +7 -4
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +1 -0
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +3 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/open.d.ts +7 -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/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +366 -321
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +1 -1
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +3 -7
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/types/Transcript.d.ts +30 -0
- package/dist/types/src/types/Transcript.d.ts.map +1 -0
- package/dist/types/src/types/TranscriptAction.d.ts +23 -0
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -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/tsconfig.tsbuildinfo +1 -1
- package/package.json +57 -57
- package/src/TranscriptionPlugin.tsx +10 -5
- package/src/capabilities/blueprint-definition.ts +31 -0
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +5 -11
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/capabilities/transcriber.ts +3 -2
- package/src/components/Transcript/Transcript.stories.tsx +12 -13
- package/src/components/Transcript/Transcript.tsx +8 -7
- package/src/components/Transcript/deprecated/OldTranscript.tsx +4 -4
- package/src/components/TranscriptContainer.tsx +5 -4
- package/src/components/stories/FileTranscription.stories.tsx +22 -12
- package/src/components/stories/KeyWordRecognition.stories.tsx +12 -6
- package/src/components/stories/MicrophoneTranscription.stories.tsx +10 -9
- package/src/components/stories/TranscriptionStory.tsx +9 -5
- package/src/functions/index.ts +6 -0
- package/src/functions/open.ts +37 -0
- package/src/functions/summarize.ts +97 -0
- package/src/hooks/useAudioFile.ts +1 -10
- package/src/hooks/useVoiceInput.ts +3 -2
- package/src/model/model.test.ts +1 -1
- package/src/segments-normalization/message-normalizer.ts +1 -1
- package/src/segments-normalization/normalization.test.ts +4 -4
- package/src/segments-normalization/normalization.ts +37 -36
- package/src/testing/testing.ts +3 -3
- package/src/transcriber/media-stream-recorder.ts +1 -1
- package/src/transcriber/transcriber.browser.test.ts +2 -1
- package/src/transcriber/transcriber.ts +2 -1
- package/src/transcriber/transcription-manager.ts +17 -38
- package/src/types/{schema.ts → Transcript.ts} +11 -8
- package/src/types/TranscriptAction.ts +24 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +0 -23
- package/dist/lib/browser/TranscriptContainer-6WCKCXQ6.mjs +0 -11
- package/dist/lib/browser/chunk-5KPYIC3N.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/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.map +0 -7
- package/dist/lib/browser/transcriber-PXT4QBFY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HT3W7LDP.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/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.map +0 -7
- package/dist/lib/node-esm/transcriber-YUTEVANE.mjs.map +0 -7
- package/dist/types/src/types/schema.d.ts +0 -41
- package/dist/types/src/types/schema.d.ts.map +0 -1
- /package/dist/lib/browser/{TranscriptContainer-6WCKCXQ6.mjs.map → TranscriptContainer-OX7OOODC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-4FJIYH7T.mjs.map → chunk-26XDG6GQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-VBAOM5DG.mjs.map → TranscriptContainer-BUWK63SI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-Y2B4HWSS.mjs.map → chunk-NWD757KH.mjs.map} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TranscriptContainer_default,
|
|
3
|
+
TranscriptionContainer
|
|
4
|
+
} from "./chunk-5I4BMOGE.mjs";
|
|
5
|
+
import "./chunk-TNEQFHIU.mjs";
|
|
6
|
+
import "./chunk-3X7HP44M.mjs";
|
|
7
|
+
export {
|
|
8
|
+
TranscriptionContainer,
|
|
9
|
+
TranscriptContainer_default as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=TranscriptContainer-OX7OOODC.mjs.map
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import "./chunk-26XDG6GQ.mjs";
|
|
2
|
+
import {
|
|
3
|
+
renderMarkdown
|
|
4
|
+
} from "./chunk-5I4BMOGE.mjs";
|
|
5
|
+
import "./chunk-TNEQFHIU.mjs";
|
|
6
|
+
import {
|
|
7
|
+
Transcript_exports
|
|
8
|
+
} from "./chunk-HXVGV7T6.mjs";
|
|
9
|
+
import "./chunk-3X7HP44M.mjs";
|
|
10
|
+
|
|
11
|
+
// src/capabilities/blueprint-definition.ts
|
|
12
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
13
|
+
import { Blueprint, Template } from "@dxos/blueprints";
|
|
14
|
+
import { trim as trim2 } from "@dxos/util";
|
|
15
|
+
|
|
16
|
+
// src/functions/open.ts
|
|
17
|
+
import { Effect, Schema } from "effect";
|
|
18
|
+
import { ArtifactId } from "@dxos/assistant";
|
|
19
|
+
import { Obj } from "@dxos/echo";
|
|
20
|
+
import { DatabaseService, QueueService, defineFunction } from "@dxos/functions";
|
|
21
|
+
import { DataType } from "@dxos/schema";
|
|
22
|
+
var open_default = defineFunction({
|
|
23
|
+
name: "dxos.org/function/transcription/open",
|
|
24
|
+
description: "Opens and reads the contents of a transcription object.",
|
|
25
|
+
inputSchema: Schema.Struct({
|
|
26
|
+
id: ArtifactId.annotations({
|
|
27
|
+
description: "The ID of the transcription object."
|
|
28
|
+
})
|
|
29
|
+
}),
|
|
30
|
+
outputSchema: Schema.Struct({
|
|
31
|
+
content: Schema.String
|
|
32
|
+
}),
|
|
33
|
+
handler: Effect.fn(function* ({ data: { id } }) {
|
|
34
|
+
const transcript = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Transcript_exports.Transcript);
|
|
35
|
+
const { dxn } = yield* Effect.promise(() => transcript.queue.load());
|
|
36
|
+
const queue = yield* QueueService.getQueue(dxn);
|
|
37
|
+
yield* Effect.promise(() => queue?.queryObjects());
|
|
38
|
+
const content = queue?.objects.filter((message) => Obj.instanceOf(DataType.Message, message)).flatMap((message, index) => renderMarkdown([])(message, index)).join("\n\n");
|
|
39
|
+
return {
|
|
40
|
+
content
|
|
41
|
+
};
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// src/functions/summarize.ts
|
|
46
|
+
import { Array, Effect as Effect2, Layer, Option, Schema as Schema2, pipe } from "effect";
|
|
47
|
+
import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from "@dxos/ai";
|
|
48
|
+
import { AiSession, GenerationObserver } from "@dxos/assistant";
|
|
49
|
+
import { TracingService, defineFunction as defineFunction2 } from "@dxos/functions";
|
|
50
|
+
import { trim } from "@dxos/util";
|
|
51
|
+
var summarize_default = defineFunction2({
|
|
52
|
+
name: "dxos.org/function/transcription/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 = pipe(result, Array.findLast((msg) => msg.sender.role === "assistant" && msg.blocks.some((block) => block._tag === "text")), Option.flatMap((msg) => 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/capabilities/blueprint-definition.ts
|
|
118
|
+
var functions = [
|
|
119
|
+
open_default,
|
|
120
|
+
summarize_default
|
|
121
|
+
];
|
|
122
|
+
var blueprint_definition_default = () => {
|
|
123
|
+
return [
|
|
124
|
+
contributes(Capabilities.Functions, functions),
|
|
125
|
+
contributes(Capabilities.BlueprintDefinition, Blueprint.make({
|
|
126
|
+
key: "dxos.org/blueprint/transcription",
|
|
127
|
+
name: "Transcription",
|
|
128
|
+
tools: Blueprint.toolDefinitions({
|
|
129
|
+
functions
|
|
130
|
+
}),
|
|
131
|
+
instructions: Template.make({
|
|
132
|
+
source: trim2`
|
|
133
|
+
You can open and summarize a meeting transcript.
|
|
134
|
+
`
|
|
135
|
+
})
|
|
136
|
+
}))
|
|
137
|
+
];
|
|
138
|
+
};
|
|
139
|
+
export {
|
|
140
|
+
blueprint_definition_default as default
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=blueprint-definition-QQSGTX5F.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/blueprint-definition.ts", "../../../src/functions/open.ts", "../../../src/functions/summarize.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { type FunctionDefinition } from '@dxos/functions';\nimport { trim } from '@dxos/util';\n\nimport { open, summarize } from '../functions';\n\nconst functions: FunctionDefinition[] = [open, summarize];\n\nexport default () => {\n return [\n contributes(Capabilities.Functions, functions),\n contributes(\n Capabilities.BlueprintDefinition,\n Blueprint.make({\n key: 'dxos.org/blueprint/transcription',\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 ),\n ];\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Effect, Schema } from 'effect';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { Obj } from '@dxos/echo';\nimport { DatabaseService, QueueService, defineFunction } from '@dxos/functions';\nimport { DataType } from '@dxos/schema';\n\nimport { renderMarkdown } from '../components';\nimport { Transcript } from '../types';\n\nexport default defineFunction({\n name: 'dxos.org/function/transcription/open',\n description: 'Opens and reads the contents of a transcription object.',\n inputSchema: Schema.Struct({\n id: ArtifactId.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: { id } }) {\n const transcript = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Transcript.Transcript);\n const { dxn } = yield* Effect.promise(() => transcript.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(DataType.Message, message))\n .flatMap((message, index) => renderMarkdown([])(message, index))\n .join('\\n\\n');\n return { content };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Array, Effect, Layer, Option, Schema, pipe } from 'effect';\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 name: 'dxos.org/function/transcription/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 = pipe(\n result,\n Array.findLast((msg) => msg.sender.role === 'assistant' && msg.blocks.some((block) => block._tag === 'text')),\n Option.flatMap((msg) =>\n 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"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Capabilities", "contributes", "Blueprint", "Template", "trim", "Effect", "Schema", "ArtifactId", "Obj", "DatabaseService", "QueueService", "defineFunction", "DataType", "defineFunction", "name", "description", "inputSchema", "Schema", "Struct", "id", "ArtifactId", "annotations", "outputSchema", "content", "String", "handler", "Effect", "fn", "data", "transcript", "DatabaseService", "resolve", "toDXN", "Transcript", "dxn", "promise", "queue", "load", "QueueService", "getQueue", "queryObjects", "objects", "filter", "message", "Obj", "instanceOf", "DataType", "Message", "flatMap", "index", "renderMarkdown", "join", "Array", "Effect", "Layer", "Option", "Schema", "pipe", "AiService", "ConsolePrinter", "ToolExecutionService", "ToolResolverService", "AiSession", "GenerationObserver", "TracingService", "defineFunction", "trim", "defineFunction", "name", "description", "inputSchema", "Schema", "Struct", "transcript", "String", "annotations", "notes", "optional", "outputSchema", "summary", "handler", "Effect", "fnUntraced", "data", "result", "AiSession", "run", "prompt", "history", "system", "systemPrompt", "observer", "GenerationObserver", "fromPrinter", "ConsolePrinter", "tag", "pipe", "Array", "findLast", "msg", "sender", "role", "blocks", "some", "block", "_tag", "Option", "flatMap", "map", "text", "getOrThrowWith", "Error", "provide", "Layer", "mergeAll", "AiService", "model", "ToolResolverService", "layerEmpty", "ToolExecutionService", "TracingService", "layerNoop", "trim", "functions", "open", "summarize", "contributes", "Capabilities", "Functions", "BlueprintDefinition", "Blueprint", "make", "key", "name", "tools", "toolDefinitions", "instructions", "Template", "source", "trim"]
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/components/index.ts
|
|
2
2
|
import { lazy } from "react";
|
|
3
|
-
var TranscriptContainer = lazy(() => import("./TranscriptContainer-
|
|
3
|
+
var TranscriptContainer = lazy(() => import("./TranscriptContainer-OX7OOODC.mjs"));
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
TranscriptContainer
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-26XDG6GQ.mjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/meta.ts
|
|
2
8
|
var TRANSCRIPTION_PLUGIN = "dxos.org/plugin/transcription";
|
|
3
9
|
var meta = {
|
|
@@ -13,7 +19,8 @@ var meta = {
|
|
|
13
19
|
};
|
|
14
20
|
|
|
15
21
|
export {
|
|
22
|
+
__export,
|
|
16
23
|
TRANSCRIPTION_PLUGIN,
|
|
17
24
|
meta
|
|
18
25
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-3X7HP44M.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/meta.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const TRANSCRIPTION_PLUGIN = 'dxos.org/plugin/transcription';\n\nexport const meta: PluginMeta = {\n id: TRANSCRIPTION_PLUGIN,\n name: 'Transcription',\n description: 'Voice transcription.',\n icon: 'ph--microphone--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',\n tags: ['labs'],\n screenshots: [],\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;AAMO,IAAMA,uBAAuB;AAE7B,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa,CAAA;AACf;",
|
|
6
6
|
"names": ["TRANSCRIPTION_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags", "screenshots"]
|
|
7
7
|
}
|