@dxos/plugin-transcription 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/lib/TranscriptionPlugin.mjs +2 -0
  2. package/dist/lib/TranscriptionPlugin.node.mjs +11 -0
  3. package/dist/lib/TranscriptionPlugin.node.mjs.map +1 -0
  4. package/dist/lib/TranscriptionPlugin.workerd.mjs +11 -0
  5. package/dist/lib/TranscriptionPlugin.workerd.mjs.map +1 -0
  6. package/dist/lib/capabilities/node.mjs +9 -0
  7. package/dist/lib/capabilities/node.mjs.map +1 -0
  8. package/dist/lib/capabilities.mjs +18 -0
  9. package/dist/lib/capabilities.mjs.map +1 -0
  10. package/dist/lib/chunk-TranscriptionArticle.mjs +49 -0
  11. package/dist/lib/chunk-TranscriptionArticle.mjs.map +1 -0
  12. package/dist/lib/chunk-TranscriptionPlugin.mjs +39 -0
  13. package/dist/lib/chunk-TranscriptionPlugin.mjs.map +1 -0
  14. package/dist/lib/chunk-app-graph-builder.mjs +33 -0
  15. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  16. package/dist/lib/chunk-create.mjs +14 -0
  17. package/dist/lib/chunk-create.mjs.map +1 -0
  18. package/dist/lib/chunk-enrich-message.mjs +18 -0
  19. package/dist/lib/chunk-enrich-message.mjs.map +1 -0
  20. package/dist/lib/chunk-entity-lookup.mjs +26 -0
  21. package/dist/lib/chunk-entity-lookup.mjs.map +1 -0
  22. package/dist/lib/{neutral/markdown-extension-CCDXXY7E.mjs → chunk-markdown-extension.mjs} +7 -11
  23. package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
  24. package/dist/lib/{neutral/chunk-5BVHY75B.mjs → chunk-meta.mjs} +20 -27
  25. package/dist/lib/chunk-meta.mjs.map +1 -0
  26. package/dist/lib/chunk-open.mjs +16 -0
  27. package/dist/lib/chunk-open.mjs.map +1 -0
  28. package/dist/lib/chunk-operation-handler.mjs +11 -0
  29. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  30. package/dist/lib/chunk-pipeline-status.mjs +17 -0
  31. package/dist/lib/chunk-pipeline-status.mjs.map +1 -0
  32. package/dist/lib/chunk-react-surface.mjs +21 -0
  33. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  34. package/dist/lib/chunk-recording-session.mjs +13 -0
  35. package/dist/lib/chunk-recording-session.mjs.map +1 -0
  36. package/dist/lib/chunk-render-byline.mjs +15 -0
  37. package/dist/lib/chunk-render-byline.mjs.map +1 -0
  38. package/dist/lib/chunk-settings.mjs +26 -0
  39. package/dist/lib/chunk-settings.mjs.map +1 -0
  40. package/dist/lib/chunk-skill-definition.mjs +10 -0
  41. package/dist/lib/chunk-skill-definition.mjs.map +1 -0
  42. package/dist/lib/chunk-skills.mjs +21 -0
  43. package/dist/lib/chunk-skills.mjs.map +1 -0
  44. package/dist/lib/{neutral/summarize-LBUZTOTH.mjs → chunk-summarize.mjs} +25 -38
  45. package/dist/lib/chunk-summarize.mjs.map +1 -0
  46. package/dist/lib/chunk-text-content.mjs +28 -0
  47. package/dist/lib/chunk-text-content.mjs.map +1 -0
  48. package/dist/lib/chunk-transcriber.mjs +161 -0
  49. package/dist/lib/chunk-transcriber.mjs.map +1 -0
  50. package/dist/lib/chunk-transcription-driver.mjs +165 -0
  51. package/dist/lib/chunk-transcription-driver.mjs.map +1 -0
  52. package/dist/lib/chunk-types.mjs +141 -0
  53. package/dist/lib/chunk-types.mjs.map +1 -0
  54. package/dist/lib/components.mjs +108 -0
  55. package/dist/lib/components.mjs.map +1 -0
  56. package/dist/lib/containers.mjs +7 -0
  57. package/dist/lib/containers.mjs.map +1 -0
  58. package/dist/lib/hooks.mjs +87 -0
  59. package/dist/lib/hooks.mjs.map +1 -0
  60. package/dist/lib/index.mjs +4 -0
  61. package/dist/lib/meta.mjs +2 -0
  62. package/dist/lib/operations.mjs +7 -0
  63. package/dist/lib/operations.mjs.map +1 -0
  64. package/dist/lib/plugin.mjs +9 -0
  65. package/dist/lib/plugin.mjs.map +1 -0
  66. package/dist/lib/skills.mjs +2 -0
  67. package/dist/lib/testing.mjs +118 -0
  68. package/dist/lib/testing.mjs.map +1 -0
  69. package/dist/lib/translations.mjs +23 -0
  70. package/dist/lib/translations.mjs.map +1 -0
  71. package/dist/lib/types.mjs +2 -0
  72. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  73. package/dist/types/src/capabilities/entity-lookup.d.ts +1 -1
  74. package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
  75. package/dist/types/src/capabilities/node.d.ts +6 -0
  76. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  78. package/dist/types/src/capabilities/pipeline-status.d.ts +1 -1
  79. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  80. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/recording-session.d.ts +1 -1
  82. package/dist/types/src/capabilities/settings.d.ts +1 -1
  83. package/dist/types/src/capabilities/text-content.d.ts +1 -1
  84. package/dist/types/src/capabilities/transcriber.d.ts +1 -1
  85. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
  86. package/dist/types/src/capabilities/transcription-driver.d.ts +1 -1
  87. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +4 -1
  88. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -1
  89. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -1
  90. package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -1
  91. package/dist/types/src/normalization/message-normalizer.d.ts +4 -4
  92. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
  93. package/dist/types/src/normalization/normalization.d.ts +97 -87
  94. package/dist/types/src/normalization/normalization.d.ts.map +1 -1
  95. package/dist/types/src/operations/open.d.ts.map +1 -1
  96. package/dist/types/src/stories/Pipeline.stories.d.ts.map +1 -1
  97. package/dist/types/src/stories/Transcription.stories.d.ts.map +1 -1
  98. package/dist/types/src/transcription-manager.d.ts +1 -1
  99. package/dist/types/src/transcription-manager.d.ts.map +1 -1
  100. package/dist/types/src/types/TranscriptOperation.d.ts +97 -87
  101. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -1
  102. package/dist/types/src/types/TranscriptionCapabilities.d.ts +2 -2
  103. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -1
  104. package/dist/types/src/util/index.d.ts +1 -0
  105. package/dist/types/src/util/index.d.ts.map +1 -1
  106. package/dist/types/src/util/render-byline.d.ts +11 -0
  107. package/dist/types/src/util/render-byline.d.ts.map +1 -0
  108. package/dist/types/tsconfig.tsbuildinfo +1 -1
  109. package/dx.config.ts +1 -1
  110. package/package.json +78 -70
  111. package/src/capabilities/entity-lookup.ts +1 -1
  112. package/src/capabilities/node.ts +17 -0
  113. package/src/capabilities/pipeline-status.ts +1 -1
  114. package/src/capabilities/{react-surface.tsx → react-surface.ts} +2 -4
  115. package/src/capabilities/recording-session.ts +1 -1
  116. package/src/capabilities/text-content.ts +9 -4
  117. package/src/capabilities/transcriber.ts +3 -1
  118. package/src/capabilities/transcription-driver.tsx +1 -1
  119. package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +2 -1
  120. package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +8 -3
  121. package/src/hooks/useTranscriptionRecording.ts +7 -8
  122. package/src/normalization/message-normalizer.ts +10 -7
  123. package/src/normalization/normalization.test.ts +41 -44
  124. package/src/operations/open.ts +1 -1
  125. package/src/stories/Pipeline.stories.tsx +15 -14
  126. package/src/stories/Transcription.stories.tsx +3 -8
  127. package/src/transcription-manager.ts +2 -2
  128. package/src/types/TranscriptionCapabilities.ts +2 -2
  129. package/src/util/index.ts +1 -0
  130. package/src/util/render-byline.ts +40 -0
  131. package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs +0 -51
  132. package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs.map +0 -7
  133. package/dist/lib/neutral/TranscriptionPlugin.mjs +0 -69
  134. package/dist/lib/neutral/TranscriptionPlugin.mjs.map +0 -7
  135. package/dist/lib/neutral/TranscriptionPlugin.node.mjs +0 -25
  136. package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +0 -7
  137. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +0 -21
  138. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +0 -7
  139. package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs +0 -48
  140. package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs.map +0 -7
  141. package/dist/lib/neutral/capabilities/index.mjs +0 -31
  142. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  143. package/dist/lib/neutral/chunk-5BVHY75B.mjs.map +0 -7
  144. package/dist/lib/neutral/chunk-HNXSU7HJ.mjs +0 -8
  145. package/dist/lib/neutral/chunk-HNXSU7HJ.mjs.map +0 -7
  146. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  147. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  148. package/dist/lib/neutral/chunk-KOXLGGSL.mjs +0 -30
  149. package/dist/lib/neutral/chunk-KOXLGGSL.mjs.map +0 -7
  150. package/dist/lib/neutral/chunk-MDV7NBFJ.mjs +0 -182
  151. package/dist/lib/neutral/chunk-MDV7NBFJ.mjs.map +0 -7
  152. package/dist/lib/neutral/components/index.mjs +0 -125
  153. package/dist/lib/neutral/components/index.mjs.map +0 -7
  154. package/dist/lib/neutral/containers/index.mjs +0 -9
  155. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  156. package/dist/lib/neutral/create-HNHGCKZ4.mjs +0 -21
  157. package/dist/lib/neutral/create-HNHGCKZ4.mjs.map +0 -7
  158. package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs +0 -24
  159. package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs.map +0 -7
  160. package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs +0 -25
  161. package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs.map +0 -7
  162. package/dist/lib/neutral/hooks/index.mjs +0 -97
  163. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  164. package/dist/lib/neutral/index.mjs +0 -20
  165. package/dist/lib/neutral/index.mjs.map +0 -7
  166. package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs.map +0 -7
  167. package/dist/lib/neutral/meta.json +0 -1
  168. package/dist/lib/neutral/meta.mjs +0 -8
  169. package/dist/lib/neutral/meta.mjs.map +0 -7
  170. package/dist/lib/neutral/open-SNMZXXYO.mjs +0 -25
  171. package/dist/lib/neutral/open-SNMZXXYO.mjs.map +0 -7
  172. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +0 -13
  173. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +0 -7
  174. package/dist/lib/neutral/operations/index.mjs +0 -8
  175. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  176. package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs +0 -17
  177. package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs.map +0 -7
  178. package/dist/lib/neutral/plugin.mjs +0 -16
  179. package/dist/lib/neutral/plugin.mjs.map +0 -7
  180. package/dist/lib/neutral/react-surface-YMZRO242.mjs +0 -26
  181. package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +0 -7
  182. package/dist/lib/neutral/recording-session-IADO7ATU.mjs +0 -15
  183. package/dist/lib/neutral/recording-session-IADO7ATU.mjs.map +0 -7
  184. package/dist/lib/neutral/settings-7KE4MABW.mjs +0 -31
  185. package/dist/lib/neutral/settings-7KE4MABW.mjs.map +0 -7
  186. package/dist/lib/neutral/skill-definition-DXNK324V.mjs +0 -15
  187. package/dist/lib/neutral/skill-definition-DXNK324V.mjs.map +0 -7
  188. package/dist/lib/neutral/skills/index.mjs +0 -8
  189. package/dist/lib/neutral/skills/index.mjs.map +0 -7
  190. package/dist/lib/neutral/summarize-LBUZTOTH.mjs.map +0 -7
  191. package/dist/lib/neutral/text-content-NOWR642C.mjs +0 -30
  192. package/dist/lib/neutral/text-content-NOWR642C.mjs.map +0 -7
  193. package/dist/lib/neutral/transcriber-6XZHUUHK.mjs +0 -174
  194. package/dist/lib/neutral/transcriber-6XZHUUHK.mjs.map +0 -7
  195. package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs +0 -207
  196. package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs.map +0 -7
  197. package/dist/lib/neutral/translations.mjs +0 -31
  198. package/dist/lib/neutral/translations.mjs.map +0 -7
  199. package/dist/lib/neutral/types/index.mjs +0 -12
  200. package/dist/lib/neutral/types/index.mjs.map +0 -7
@@ -2,10 +2,15 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Registry } from '@effect-atom/atom';
6
+ import * as KeyValueStore from '@effect/platform/KeyValueStore';
7
+ import * as Layer from 'effect/Layer';
8
+ import * as ManagedRuntime from 'effect/ManagedRuntime';
5
9
  import { describe, test } from 'vitest';
6
10
 
11
+ import { Operation, OperationHandlerSet, ServiceResolver, Trace } from '@dxos/compute';
12
+ import { ProcessManager } from '@dxos/compute-runtime';
7
13
  import { Obj } from '@dxos/echo';
8
- import { FunctionExecutor, ServiceContainer } from '@dxos/functions-runtime';
9
14
  import { log } from '@dxos/log';
10
15
  import { type Actor, Message } from '@dxos/types';
11
16
 
@@ -48,54 +53,46 @@ const messages: MessageWithRangeId[] = [
48
53
  }),
49
54
  );
50
55
 
51
- // const REMOTE_AI = true;
56
+ // Local process runtime that resolves and invokes operations through `Operation.Service`.
57
+ // `sentenceNormalization` declares no services, so `ServiceResolver.layerRequirements()` is empty.
58
+ const operationLayer = ProcessManager.ProcessOperationInvoker.layer.pipe(
59
+ Layer.provide(ProcessManager.layer({ idGenerator: ProcessManager.SequentialIdGenerator })),
60
+ Layer.provide(ServiceResolver.layerRequirements()),
61
+ Layer.provide(OperationHandlerSet.provide(OperationHandlerSet.make(sentenceNormalization))),
62
+ Layer.provide(Registry.layer),
63
+ Layer.provide(Trace.layerNoop),
64
+ Layer.provide(KeyValueStore.layerMemory),
65
+ );
52
66
 
53
67
  describe.skip('SentenceNormalization', () => {
54
- const getExecutor = () => {
55
- return new FunctionExecutor(
56
- new ServiceContainer().setServices({
57
- // ai: {
58
- // client: REMOTE_AI
59
- // ? new Edge AiServiceClient({
60
- // endpoint: AI_SERVICE_ENDPOINT.REMOTE,
61
- // defaultGenerationOptions: {
62
- // model: 'ai.claude.model.claude-3-5-sonnet-20241022',
63
- // },
64
- // })
65
- // : new Ollama AiServiceClient({
66
- // overrides: {
67
- // model: 'llama3.1:8b',
68
- // },
69
- // }),
70
- // },
71
- }),
72
- );
73
- };
74
-
75
68
  test('messages merging', { timeout: 120_000 }, async () => {
76
- const executor = getExecutor();
77
- const sentences: MessageWithRangeId[] = [];
78
- let buffer: MessageWithRangeId[] = [];
79
- let activeSentenceIndex = 0;
80
- for (const message of messages) {
81
- const result = await executor.invoke(sentenceNormalization, {
82
- messages: [...buffer, message],
83
- });
84
- log.info('BEFORE sentence splicing', { activeSentenceIndex, sentences, inserting: result.sentences });
85
- sentences.splice(activeSentenceIndex, sentences.length - activeSentenceIndex, ...result.sentences);
86
- log.info('AFTER sentence splicing', { activeSentenceIndex, sentences });
87
-
88
- if (sentences.length > 0) {
89
- activeSentenceIndex = sentences.length - 1;
90
- buffer = sentences.slice(activeSentenceIndex);
69
+ const runtime = ManagedRuntime.make(operationLayer);
70
+ try {
71
+ const sentences: MessageWithRangeId[] = [];
72
+ let buffer: MessageWithRangeId[] = [];
73
+ let activeSentenceIndex = 0;
74
+ for (const message of messages) {
75
+ const result = await runtime.runPromise(
76
+ Operation.invoke(sentenceNormalization, { messages: [...buffer, message] }),
77
+ );
78
+ log.info('BEFORE sentence splicing', { activeSentenceIndex, sentences, inserting: result.sentences });
79
+ sentences.splice(activeSentenceIndex, sentences.length - activeSentenceIndex, ...result.sentences);
80
+ log.info('AFTER sentence splicing', { activeSentenceIndex, sentences });
81
+
82
+ if (sentences.length > 0) {
83
+ activeSentenceIndex = sentences.length - 1;
84
+ buffer = sentences.slice(activeSentenceIndex);
85
+ }
91
86
  }
92
- }
93
87
 
94
- log.info('sentences', {
95
- messages: JSON.stringify(messages, null, 2),
96
- sentences: JSON.stringify(sentences, null, 2),
97
- });
98
- throw new Error('test');
88
+ log.info('sentences', {
89
+ messages: JSON.stringify(messages, null, 2),
90
+ sentences: JSON.stringify(sentences, null, 2),
91
+ });
92
+ throw new Error('test');
93
+ } finally {
94
+ await runtime.dispose();
95
+ }
99
96
  });
100
97
 
101
98
  // TODO(burdon): Restore a Feed-based version once `MessageNormalizer` has a
@@ -6,10 +6,10 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Operation } from '@dxos/compute';
8
8
  import { Database, Feed, Filter } from '@dxos/echo';
9
- import { renderByline } from '@dxos/react-ui-transcription';
10
9
  import { Message } from '@dxos/types';
11
10
 
12
11
  import { TranscriptOperation } from '../types';
12
+ import { renderByline } from '../util';
13
13
 
14
14
  const handler: Operation.WithHandler<typeof TranscriptOperation.Open> = TranscriptOperation.Open.pipe(
15
15
  Operation.withHandler(
@@ -29,8 +29,20 @@ import { AppActivationEvents, AppCapabilities, AppNode, AppPlugin, AppSpace } fr
29
29
  import { AppSurface, useAppGraph } from '@dxos/app-toolkit/ui';
30
30
  import { Filter, Query } from '@dxos/echo';
31
31
  import { Doc } from '@dxos/echo-doc';
32
+ import { useQuery } from '@dxos/echo-react';
32
33
  import { EffectEx } from '@dxos/effect';
33
34
  import { DXN } from '@dxos/keys';
35
+ import {
36
+ type CommitFn,
37
+ PipelineRuntime,
38
+ type Stage,
39
+ type TelemetryEvent,
40
+ TranscriptEvent,
41
+ makeCorrectionStage,
42
+ makeDatabaseLookup,
43
+ makeExtractionStage,
44
+ makeSummarizationStage,
45
+ } from '@dxos/pipeline-transcription';
34
46
  import { ClientCapabilities } from '@dxos/plugin-client';
35
47
  import { ClientPlugin, initializeIdentity } from '@dxos/plugin-client/testing';
36
48
  import { Graph, GraphBuilder, Node, NodeMatcher, qualifyId } from '@dxos/plugin-graph';
@@ -38,22 +50,11 @@ import { Markdown, MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-mar
38
50
  import { MarkdownPlugin } from '@dxos/plugin-markdown/testing';
39
51
  import { SpacePlugin } from '@dxos/plugin-space/testing';
40
52
  import { corePlugins } from '@dxos/plugin-testing';
41
- import { useQuery, useSpaces } from '@dxos/react-client/echo';
53
+ import { useSpaces } from '@dxos/react-client/echo';
42
54
  import { useAttentionAttributes } from '@dxos/react-ui-attention';
43
55
  import { PipelineStatus } from '@dxos/react-ui-transcription';
44
56
  import { Loading, withLayout } from '@dxos/react-ui/testing';
45
57
  import { Text } from '@dxos/schema';
46
- import {
47
- type CommitFn,
48
- PipelineRuntime,
49
- type Stage,
50
- type TelemetryEvent,
51
- TranscriptEvent,
52
- makeCorrectionStage,
53
- makeDatabaseLookup,
54
- makeExtractionStage,
55
- makeSummarizationStage,
56
- } from '@dxos/transcription-pipeline';
57
58
  import { type ContentBlock, Organization, Person } from '@dxos/types';
58
59
  import { seedTestData } from '@dxos/types/testing';
59
60
  import { appendPendingText, cancelPendingText, setPendingAnchor, setPendingInterim } from '@dxos/ui-editor';
@@ -283,8 +284,8 @@ const DefaultStory = ({ stages, seed }: StoryArgs) => {
283
284
  }
284
285
 
285
286
  return (
286
- <div role='none' className='dx-container grid grid-cols-[1fr_20rem] gap-2' {...attentionAttrs}>
287
- <div role='none' className='dx-expander'>
287
+ <div className='dx-container grid grid-cols-[1fr_20rem] gap-2' {...attentionAttrs}>
288
+ <div className='dx-expander'>
288
289
  <Surface.Surface type={AppSurface.Article} data={data} limit={1} />
289
290
  </div>
290
291
  <PipelineStatus
@@ -15,18 +15,13 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
15
15
  import * as Effect from 'effect/Effect';
16
16
  import React, { type ChangeEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
17
17
 
18
+ import { type CommitFn, type TranscribeConfig, makeCorrectionStage } from '@dxos/pipeline-transcription';
18
19
  import { IconButton, Panel, ScrollContainer, Toolbar } from '@dxos/react-ui';
19
- import {
20
- Transcription,
21
- renderByline,
22
- useAudioFile,
23
- useFeedModelAdapter,
24
- useRecordingPipeline,
25
- } from '@dxos/react-ui-transcription';
26
- import { type CommitFn, type TranscribeConfig, makeCorrectionStage } from '@dxos/transcription-pipeline';
20
+ import { Transcription, useAudioFile, useFeedModelAdapter, useRecordingPipeline } from '@dxos/react-ui-transcription';
27
21
  import { type ContentBlock, Message } from '@dxos/types';
28
22
 
29
23
  import { createStoryDecorators } from '../testing';
24
+ import { renderByline } from '../util';
30
25
 
31
26
  // Small chunk threshold so the transcriber emits every few seconds while the file plays (streaming),
32
27
  // instead of only flushing the whole buffer on stop.
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom, type Registry } from '@effect-atom/atom-react';
5
+ import { Atom, type Registry } from '@effect-atom/atom';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import * as Layer from 'effect/Layer';
8
8
 
@@ -11,9 +11,9 @@ import { type Space } from '@dxos/client/echo';
11
11
  import { Resource } from '@dxos/context';
12
12
  import { Database, Feed, Obj } from '@dxos/echo';
13
13
  import { EffectEx } from '@dxos/effect';
14
+ import { Transcriber } from '@dxos/pipeline-transcription';
14
15
  import { type EdgeHttpClient } from '@dxos/react-edge-client';
15
16
  import { MediaStreamRecorder } from '@dxos/react-ui-transcription';
16
- import { Transcriber } from '@dxos/transcription-pipeline';
17
17
  import { type ContentBlock, Message } from '@dxos/types';
18
18
 
19
19
  import { type TranscriptionCapabilities } from '#types';
@@ -4,12 +4,12 @@
4
4
 
5
5
  // @import-as-namespace
6
6
 
7
- import { type Atom } from '@effect-atom/atom-react';
7
+ import { type Atom } from '@effect-atom/atom';
8
8
 
9
9
  import { Capability } from '@dxos/app-framework';
10
10
  import { type Space } from '@dxos/client/echo';
11
11
  import { type Feed } from '@dxos/echo';
12
- import { type EntityLookup as EntityLookupFn } from '@dxos/transcription-pipeline';
12
+ import { type EntityLookup as EntityLookupFn } from '@dxos/pipeline-transcription';
13
13
  import { type Message } from '@dxos/types';
14
14
 
15
15
  import { meta } from '#meta';
package/src/util/index.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  //
4
4
 
5
5
  export * from './get-time-str';
6
+ export * from './render-byline';
@@ -0,0 +1,40 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Message } from '@dxos/types';
6
+
7
+ /**
8
+ * Minimal identity shape for byline rendering. Satisfied by the `@dxos/halo`
9
+ * `Space.Member` / `Identity.Info` (flat `did` / `displayName`).
10
+ */
11
+ export type BylineIdentity = {
12
+ did?: string;
13
+ displayName?: string;
14
+ };
15
+
16
+ export const renderByline =
17
+ (identities: readonly BylineIdentity[]) =>
18
+ (message: Message.Message, index: number, debug = false): string[] => {
19
+ if (message.sender.role === 'assistant') {
20
+ // Start/stop block.
21
+ return [message.blocks.find((block) => block._tag === 'transcript')?.text ?? '', ''];
22
+ }
23
+
24
+ // TODO(burdon): Use link/reference markup for users (with popover).
25
+ // TODO(burdon): Color and avatar.
26
+ const identity = identities.find((identity) => identity.did === message.sender.identityDid);
27
+ const name =
28
+ identity?.displayName ??
29
+ message.sender.contact?.target?.fullName ??
30
+ message.sender.name ??
31
+ message.sender.email ??
32
+ message.sender.identityDid;
33
+ const blocks = message.blocks.filter((block) => block._tag === 'transcript');
34
+ return [
35
+ // TODO(thure): Use an XML tag with the bits needed here.
36
+ `###### ${name}` + (debug ? ` [${index}]:${message.id}` : ''),
37
+ blocks.map((block) => block.text.trim()).join(' '),
38
+ '',
39
+ ];
40
+ };
@@ -1,51 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/TranscriptionArticle/TranscriptionArticle.tsx
4
- import React from "react";
5
- import { Filter, Obj, Query } from "@dxos/echo";
6
- import { useMembers, useQuery } from "@dxos/react-client/echo";
7
- import { Panel } from "@dxos/react-ui";
8
- import { Menu, MenuBuilder, useMenuBuilder } from "@dxos/react-ui-menu";
9
- import { Transcription, renderByline, useFeedModelAdapter } from "@dxos/react-ui-transcription";
10
- import { Message } from "@dxos/types";
11
- import { useTranscriptionRecording } from "#hooks";
12
- import { meta } from "#meta";
13
- var TranscriptionArticle = ({ role, subject: transcript, attendableId }) => {
14
- const db = Obj.getDatabase(transcript);
15
- const members = useMembers(db?.spaceId).map((member) => member.identity);
16
- const feed = transcript.feed.target;
17
- const messages = useQuery(db, feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()));
18
- const model = useFeedModelAdapter(renderByline(members), messages);
19
- const { recording, toggleRecording } = useTranscriptionRecording(transcript);
20
- const menuActions = useMenuBuilder(() => MenuBuilder.make().action("toggle-recording", {
21
- label: [
22
- recording ? "stop-recording.label" : "start-recording.label",
23
- {
24
- ns: meta.profile.key
25
- }
26
- ],
27
- icon: recording ? "ph--stop-circle--regular" : "ph--microphone--regular",
28
- disposition: "toolbar",
29
- testId: "transcription.toggle-recording"
30
- }, toggleRecording).build(), [
31
- recording,
32
- toggleRecording
33
- ]);
34
- return /* @__PURE__ */ React.createElement(Panel.Root, {
35
- role
36
- }, /* @__PURE__ */ React.createElement(Menu.Root, {
37
- ...menuActions,
38
- attendableId
39
- }, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
40
- asChild: true
41
- }, /* @__PURE__ */ React.createElement(Menu.Toolbar, null))), /* @__PURE__ */ React.createElement(Panel.Content, {
42
- asChild: true
43
- }, /* @__PURE__ */ React.createElement(Transcription, {
44
- model,
45
- transcript
46
- })));
47
- };
48
- export {
49
- TranscriptionArticle as default
50
- };
51
- //# sourceMappingURL=TranscriptionArticle-FEWCWG4A.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/TranscriptionArticle/TranscriptionArticle.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Filter, Obj, Query } from '@dxos/echo';\nimport { useMembers, useQuery } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { Menu, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';\nimport { Transcription, renderByline, useFeedModelAdapter } from '@dxos/react-ui-transcription';\nimport { Message, type Transcript } from '@dxos/types';\n\nimport { useTranscriptionRecording } from '#hooks';\nimport { meta } from '#meta';\n\nexport type TranscriptionArticleProps = AppSurface.ObjectArticleProps<Transcript.Transcript>;\n\nexport const TranscriptionArticle = ({ role, subject: transcript, attendableId }: TranscriptionArticleProps) => {\n const db = Obj.getDatabase(transcript);\n const members = useMembers(db?.spaceId).map((member) => member.identity);\n const feed = transcript.feed.target;\n const messages = useQuery(\n db,\n feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()),\n );\n const model = useFeedModelAdapter(renderByline(members), messages);\n\n // TODO(burdon): Remove if not mutable. E.g., finalized transcript.\n const { recording, toggleRecording } = useTranscriptionRecording(transcript);\n const menuActions = useMenuBuilder(\n () =>\n MenuBuilder.make()\n .action(\n 'toggle-recording',\n {\n label: [recording ? 'stop-recording.label' : 'start-recording.label', { ns: meta.profile.key }],\n icon: recording ? 'ph--stop-circle--regular' : 'ph--microphone--regular',\n disposition: 'toolbar',\n testId: 'transcription.toggle-recording',\n },\n toggleRecording,\n )\n .build(),\n [recording, toggleRecording],\n );\n\n return (\n <Panel.Root role={role}>\n <Menu.Root {...menuActions} attendableId={attendableId}>\n <Panel.Toolbar asChild>\n <Menu.Toolbar />\n </Panel.Toolbar>\n </Menu.Root>\n <Panel.Content asChild>\n <Transcription model={model} transcript={transcript} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
5
- "mappings": ";;;AAIA,OAAOA,WAAW;AAGlB,SAASC,QAAQC,KAAKC,aAAa;AACnC,SAASC,YAAYC,gBAAgB;AACrC,SAASC,aAAa;AACtB,SAASC,MAAMC,aAAaC,sBAAsB;AAClD,SAASC,eAAeC,cAAcC,2BAA2B;AACjE,SAASC,eAAgC;AAEzC,SAASC,iCAAiC;AAC1C,SAASC,YAAY;AAId,IAAMC,uBAAuB,CAAC,EAAEC,MAAMC,SAASC,YAAYC,aAAY,MAA6B;AACzG,QAAMC,KAAKnB,IAAIoB,YAAYH,UAAAA;AAC3B,QAAMI,UAAUnB,WAAWiB,IAAIG,OAAAA,EAASC,IAAI,CAACC,WAAWA,OAAOC,QAAQ;AACvE,QAAMC,OAAOT,WAAWS,KAAKC;AAC7B,QAAMC,WAAWzB,SACfgB,IACAO,OAAOzB,MAAM4B,OAAO9B,OAAO+B,KAAKnB,QAAQA,OAAO,CAAA,EAAGoB,KAAKL,IAAAA,IAAQzB,MAAM4B,OAAO9B,OAAOiC,QAAO,CAAA,CAAA;AAE5F,QAAMC,QAAQvB,oBAAoBD,aAAaY,OAAAA,GAAUO,QAAAA;AAGzD,QAAM,EAAEM,WAAWC,gBAAe,IAAKvB,0BAA0BK,UAAAA;AACjE,QAAMmB,cAAc7B,eAClB,MACED,YAAY+B,KAAI,EACbC,OACC,oBACA;IACEC,OAAO;MAACL,YAAY,yBAAyB;MAAyB;QAAEM,IAAI3B,KAAK4B,QAAQC;MAAI;;IAC7FC,MAAMT,YAAY,6BAA6B;IAC/CU,aAAa;IACbC,QAAQ;EACV,GACAV,eAAAA,EAEDW,MAAK,GACV;IAACZ;IAAWC;GAAgB;AAG9B,SACE,sBAAA,cAAC/B,MAAM2C,MAAI;IAAChC;KACV,sBAAA,cAACV,KAAK0C,MAAI;IAAE,GAAGX;IAAalB;KAC1B,sBAAA,cAACd,MAAM4C,SAAO;IAACC,SAAAA;KACb,sBAAA,cAAC5C,KAAK2C,SAAO,IAAA,CAAA,CAAA,GAGjB,sBAAA,cAAC5C,MAAM8C,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACzC,eAAAA;IAAcyB;IAAchB;;AAIrC;",
6
- "names": ["React", "Filter", "Obj", "Query", "useMembers", "useQuery", "Panel", "Menu", "MenuBuilder", "useMenuBuilder", "Transcription", "renderByline", "useFeedModelAdapter", "Message", "useTranscriptionRecording", "meta", "TranscriptionArticle", "role", "subject", "transcript", "attendableId", "db", "getDatabase", "members", "spaceId", "map", "member", "identity", "feed", "target", "messages", "select", "type", "from", "nothing", "model", "recording", "toggleRecording", "menuActions", "make", "action", "label", "ns", "profile", "key", "icon", "disposition", "testId", "build", "Root", "Toolbar", "asChild", "Content"]
7
- }
@@ -1,69 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/TranscriptionPlugin.tsx
4
- import { Plugin } from "@dxos/app-framework";
5
- import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
6
- import { MarkdownEvents } from "@dxos/plugin-markdown";
7
- import { Transcript } from "@dxos/types";
8
- import { AppGraphBuilder, EntityLookup, MarkdownExtension, OperationHandler, PipelineStatus, ReactSurface, RecordingSession, SkillDefinition, TextContent, Transcriber, TranscriptionDriver, TranscriptionSettings } from "#capabilities";
9
- import { meta } from "#meta";
10
- import { translations } from "#translations";
11
-
12
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-transcription/PLUGIN.mdl
13
- var PLUGIN_default = '---\nid: org.dxos.plugin.transcription\nname: TranscriptionPlugin\nversion: 0.1.0\n---\n\nA real-time voice-to-text transcription plugin for DXOS Composer.\nCaptures spoken audio from a microphone, converts it to timestamped text segments via the\nWhisper speech-recognition service, and stores the results in an ECHO `Transcript` object\nbacked by a `Feed`.\nThe plugin also exposes skill-compatible operations that let AI assistants open and\nsummarize transcripts inside agent workflows.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype TranscriptSegment\n fields:\n text: string # transcribed text for this segment\n started: string # ISO-8601 wall-clock timestamp of segment start\n```\n\n```mdl\ntype Message\n fields:\n id: string\n created: string # ISO-8601 creation timestamp\n blocks: TranscriptSegment[]\n sender:\n identityDid?: string # DID of the speaker, if known\n```\n\n```mdl\ntype Transcript\n fields:\n id: string\n feed: Ref<Feed> # ECHO feed that stores Message objects\n started?: string # ISO-8601 timestamp when recording started\n```\n\n```mdl\ntype WhisperWord\n fields:\n word: string\n start: number # seconds from start of audio chunk\n end: number\n```\n\n```mdl\ntype WhisperSegment\n fields:\n text: string\n start: number\n end: number\n no_speech_prob: number # probability of silence; used to filter noise\n words: WhisperWord[]\n```\n\n```mdl\ntype Settings\n fields:\n entityExtraction: boolean # default: true \u2014 annotate transcript with references to known objects\n```\n\n## Components\n\n```mdl\ncomponent Transcription\n desc: Read-only CodeMirror editor that renders transcript messages as Markdown with byline headings.\n props:\n transcript?: Transcript\n model: TranscriptModel<Message>\n slots:\n (none \u2014 self-contained editor viewport)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [CodeMirror editor \u2014 read-only] \u2502\n \u2502 ## Speaker \xB7 HH:MM \u2502\n \u2502 Transcribed text\u2026 \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Oracle\n desc: |\n Ambient display surface with an SVG graph canvas and a centered text overlay.\n Used to show the latest transcribed utterance alongside a live visualization.\n props:\n text?: string # latest utterance to display\n delay?: number # per-character reveal delay in ms (default 12)\n slots:\n canvas?: ReactNode # replaces default SVG.Graph when provided\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [SVG canvas \u2014 absolutely fills]\u2502\n \u2502 [Oracle.Text] \u2502\n \u2502 "latest utterance\u2026" \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent TranscriptionArticle\n desc: Full-page article panel combining the Transcription editor with a start/stop recording toolbar action.\n props:\n subject: Transcript\n role: string\n attendableId?: string\n state:\n recording: boolean # whether microphone capture is active\n actions:\n toggleRecording()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Toolbar] [\u{1F3A4} Start/Stop] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [Transcription editor] \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\nPure operations \u2014 no side-effects.\n\n```mdl\nop openTranscript\n desc: Loads a Transcript from ECHO, reads all Messages from its Feed, and returns the full text content rendered with speaker bylines.\n input:\n transcript: Ref<Transcript>\n output: string\n errors:\n TranscriptNotFound: no Transcript object found for the given ref\n FeedNotFound: the Transcript\'s feed ref cannot be resolved\n requires: [Database, FeedService]\n```\n\nEffectful operations \u2014 produce output via AI or mutate persistent state.\n\n```mdl\nop createTranscript\n desc: Creates a new Feed and a Transcript object linked to it, then writes both into the current ECHO space.\n input:\n name?: string\n space: Space\n output: Transcript\n effects: [echo:write]\n```\n\n```mdl\nop summarizeTranscript\n desc: Sends a transcript string and optional participant notes to an LLM and returns a Markdown summary with key points, verbatim quotes, and actionable tasks extracted from the conversation.\n input:\n transcript: string\n notes?: string\n output: string\n effects: [http]\n requires: [AiService]\n note: |\n Uses Claude Sonnet. Prompt instructs the model to bold speaker names,\n include verbatim quotes, and emit only tasks that are directly actionable\n and clearly assigned.\n```\n\n```mdl\nop enrichMessage\n desc: Extracts proper nouns from each transcript block of a Message using a small LLM, full-text-searches the space for matching objects, and rewrites the text with inline `[noun](dxn)` reference links.\n input:\n message: Message\n output:\n message: Message\n effects: [echo:read, ai:inference]\n requires: [AiService, Database]\n note: |\n Uses Claude Haiku. Falls back to the raw message if extraction fails (e.g. the AI\n service is unavailable). Gated by the entityExtraction setting.\n```\n\n```mdl\nop normalizeSentences\n desc: Post-processes an array of raw transcript messages, merging word-level tokens into grammatically complete sentences.\n input:\n messages: Message[]\n output: Message[]\n note: pure transformation; no effects or service dependencies\n```\n\n## Features\n\n```mdl\nfeat F-1: Recording Lifecycle\n\n req F-1.1: User can start microphone capture from TranscriptionArticle toolbar.\n req F-1.2: User can stop microphone capture; final buffered chunks are flushed and transcribed.\n req F-1.3: TranscriptionManager restarts the Transcriber automatically when the audio track changes.\n```\n\n```mdl\nfeat F-2: Audio Chunking and Transcription\n\n req F-2.1:\n when: user is speaking and chunk count reaches transcribeAfterChunksAmount\n then: Transcriber schedules a deferred transcription task\n\n req F-2.2:\n when: transcription task runs\n then: buffered PCM chunks are merged into a WAV file and POSTed to the Whisper endpoint\n\n req F-2.3:\n when: Whisper response is received\n then: segments are filtered by no_speech_prob and aligned to absolute wall-clock timestamps\n\n req F-2.4:\n when: user is not speaking\n then: only prefixBufferChunksAmount most-recent chunks are retained; older chunks discarded\n```\n\n```mdl\nfeat F-3: Transcript Persistence\n\n req F-3.1:\n when: aligned segments are produced\n then: a Message object with the segments is appended to the Transcript\'s ECHO Feed\n\n req F-3.2:\n when: a messageEnricher is configured\n then: Message is passed through the enricher before being written to the Feed\n\n req F-3.3:\n when: a peer\'s ECHO space receives the Feed update\n then: TranscriptionArticle re-renders with the new messages\n tags: [collaborative]\n```\n\n```mdl\nfeat F-4: Transcript Display\n\n req F-4.1:\n when: a Transcript object is opened\n then: all Messages are rendered in the Transcription editor with speaker bylines and timestamps\n\n req F-4.2:\n when: new messages arrive during live recording\n then: the TranscriptModel is updated and the editor scrolls to show the latest content\n```\n\n```mdl\nfeat F-5: AI Summary\n\n req F-5.1:\n when: op:summarizeTranscript is invoked\n then: LLM returns a structured Markdown document with key points, quotes, and tasks\n\n req F-5.2:\n when: participant notes are provided\n then: notes are correlated with transcript content in the summary\n\n req F-5.3:\n when: no actionable tasks are found\n then: the tasks section is omitted from the summary\n```\n\n```mdl\nfeat F-6: Skill Integration\n\n req F-6.1: Skill exposes op:openTranscript and op:summarizeTranscript as AI tools.\n req F-6.2: An AI assistant can open a transcript by Ref and return formatted text to the user.\n req F-6.3: An AI assistant can invoke the summary operation and present the result as a message.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create transcript\n given: a DXOS space is available\n when: op:createTranscript is invoked\n then:\n - a new Feed is created in the space\n - a Transcript object linked to the Feed is created in the space\n - the returned Transcript.feed.target is not null\n```\n\n```mdl\ntest T-2: Record and persist segment\n given: a Transcript with a Feed, microphone capture active\n when: the user speaks and silence is detected\n then:\n - Whisper returns at least one segment\n - a Message is appended to the Feed\n - Message.blocks contains at least one TranscriptSegment with non-empty text\n```\n\n```mdl\ntest T-3: Deduplicate segments across chunk boundaries\n given: two consecutive transcription tasks with overlapping Whisper output\n when: the second task produces segments whose end timestamps fall before lastTimestamp\n then:\n - duplicate segments are filtered out\n - only novel words (start >= lastTimestamp) are included\n```\n\n```mdl\ntest T-4: Open transcript\n given: a Transcript with three Messages in its Feed\n when: op:openTranscript is invoked\n then:\n - content string contains three byline sections\n - each section starts with "## <speaker> \xB7 <time>"\n```\n\n```mdl\ntest T-5: Summarize transcript\n given: a transcript string and optional notes string\n when: op:summarizeTranscript is invoked\n then:\n - summary is a non-empty Markdown string\n - speaker names appear in bold\n - a tasks section is present if actionable tasks were detected\n```\n\n```mdl\ntest T-6: Sentence normalization is pure\n given: an array of raw word-level Messages\n when: op:normalizeSentences is called\n then:\n - output messages contain complete sentences\n - no ECHO writes occur\n - input array is not mutated\n```\n\n```mdl\ntest T-7: Toggle recording in UI\n given: TranscriptionArticle is mounted with a Transcript\n when: user clicks the Start Recording toolbar button\n then:\n - recording state becomes true\n - toolbar button label changes to "Stop Recording"\n - microphone capture begins\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n';
14
-
15
- // src/TranscriptionPlugin.tsx
16
- var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addSkillDefinitionModule({
17
- activate: SkillDefinition
18
- }), AppPlugin.addTextContentModule({
19
- activate: TextContent
20
- }), AppPlugin.addOperationHandlerModule({
21
- activate: OperationHandler
22
- }), AppPlugin.addSchemaModule({
23
- schema: [
24
- Transcript.Transcript
25
- ]
26
- }), AppPlugin.addSurfaceModule({
27
- activate: ReactSurface
28
- }), AppPlugin.addTranslationsModule({
29
- translations
30
- }), AppPlugin.addSettingsModule({
31
- activate: TranscriptionSettings
32
- }), AppPlugin.addAppGraphModule({
33
- activate: AppGraphBuilder
34
- }), AppPlugin.addReactContextModule({
35
- activate: TranscriptionDriver
36
- }), Plugin.addModule({
37
- id: "transcription",
38
- activatesOn: AppActivationEvents.SetupAppGraph,
39
- activate: Transcriber
40
- }), Plugin.addModule({
41
- id: "entity-lookup",
42
- activatesOn: AppActivationEvents.SetupAppGraph,
43
- activate: EntityLookup
44
- }), Plugin.addModule({
45
- id: "recording-session",
46
- activatesOn: AppActivationEvents.SetupSettings,
47
- activate: RecordingSession
48
- }), Plugin.addModule({
49
- id: "pipeline-status",
50
- activatesOn: AppActivationEvents.SetupSettings,
51
- activate: PipelineStatus
52
- }), Plugin.addModule({
53
- id: "markdown",
54
- activatesOn: MarkdownEvents.SetupExtensions,
55
- activate: MarkdownExtension
56
- }), AppPlugin.addPluginAssetModule({
57
- asset: {
58
- pluginId: meta.profile.key,
59
- path: "PLUGIN.mdl",
60
- content: PLUGIN_default,
61
- mimeType: "application/x-mdl"
62
- }
63
- }), Plugin.make);
64
- var TranscriptionPlugin_default = TranscriptionPlugin;
65
- export {
66
- TranscriptionPlugin,
67
- TranscriptionPlugin_default as default
68
- };
69
- //# sourceMappingURL=TranscriptionPlugin.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/TranscriptionPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-transcription/PLUGIN.mdl"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\nimport { Transcript } from '@dxos/types';\n\nimport {\n AppGraphBuilder,\n EntityLookup,\n MarkdownExtension,\n OperationHandler,\n PipelineStatus,\n ReactSurface,\n RecordingSession,\n SkillDefinition,\n TextContent,\n Transcriber,\n TranscriptionDriver,\n TranscriptionSettings,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addSettingsModule({ activate: TranscriptionSettings }),\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addReactContextModule({ activate: TranscriptionDriver }),\n Plugin.addModule({\n id: 'transcription',\n activatesOn: AppActivationEvents.SetupAppGraph,\n activate: Transcriber,\n }),\n Plugin.addModule({\n id: 'entity-lookup',\n activatesOn: AppActivationEvents.SetupAppGraph,\n activate: EntityLookup,\n }),\n Plugin.addModule({\n id: 'recording-session',\n activatesOn: AppActivationEvents.SetupSettings,\n activate: RecordingSession,\n }),\n Plugin.addModule({\n id: 'pipeline-status',\n activatesOn: AppActivationEvents.SetupSettings,\n activate: PipelineStatus,\n }),\n Plugin.addModule({\n id: 'markdown',\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: MarkdownExtension,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n", "---\nid: org.dxos.plugin.transcription\nname: TranscriptionPlugin\nversion: 0.1.0\n---\n\nA real-time voice-to-text transcription plugin for DXOS Composer.\nCaptures spoken audio from a microphone, converts it to timestamped text segments via the\nWhisper speech-recognition service, and stores the results in an ECHO `Transcript` object\nbacked by a `Feed`.\nThe plugin also exposes skill-compatible operations that let AI assistants open and\nsummarize transcripts inside agent workflows.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype TranscriptSegment\n fields:\n text: string # transcribed text for this segment\n started: string # ISO-8601 wall-clock timestamp of segment start\n```\n\n```mdl\ntype Message\n fields:\n id: string\n created: string # ISO-8601 creation timestamp\n blocks: TranscriptSegment[]\n sender:\n identityDid?: string # DID of the speaker, if known\n```\n\n```mdl\ntype Transcript\n fields:\n id: string\n feed: Ref<Feed> # ECHO feed that stores Message objects\n started?: string # ISO-8601 timestamp when recording started\n```\n\n```mdl\ntype WhisperWord\n fields:\n word: string\n start: number # seconds from start of audio chunk\n end: number\n```\n\n```mdl\ntype WhisperSegment\n fields:\n text: string\n start: number\n end: number\n no_speech_prob: number # probability of silence; used to filter noise\n words: WhisperWord[]\n```\n\n```mdl\ntype Settings\n fields:\n entityExtraction: boolean # default: true \u2014 annotate transcript with references to known objects\n```\n\n## Components\n\n```mdl\ncomponent Transcription\n desc: Read-only CodeMirror editor that renders transcript messages as Markdown with byline headings.\n props:\n transcript?: Transcript\n model: TranscriptModel<Message>\n slots:\n (none \u2014 self-contained editor viewport)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [CodeMirror editor \u2014 read-only] \u2502\n \u2502 ## Speaker \u00B7 HH:MM \u2502\n \u2502 Transcribed text\u2026 \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Oracle\n desc: |\n Ambient display surface with an SVG graph canvas and a centered text overlay.\n Used to show the latest transcribed utterance alongside a live visualization.\n props:\n text?: string # latest utterance to display\n delay?: number # per-character reveal delay in ms (default 12)\n slots:\n canvas?: ReactNode # replaces default SVG.Graph when provided\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [SVG canvas \u2014 absolutely fills]\u2502\n \u2502 [Oracle.Text] \u2502\n \u2502 \"latest utterance\u2026\" \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent TranscriptionArticle\n desc: Full-page article panel combining the Transcription editor with a start/stop recording toolbar action.\n props:\n subject: Transcript\n role: string\n attendableId?: string\n state:\n recording: boolean # whether microphone capture is active\n actions:\n toggleRecording()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Toolbar] [\uD83C\uDFA4 Start/Stop] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [Transcription editor] \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\nPure operations \u2014 no side-effects.\n\n```mdl\nop openTranscript\n desc: Loads a Transcript from ECHO, reads all Messages from its Feed, and returns the full text content rendered with speaker bylines.\n input:\n transcript: Ref<Transcript>\n output: string\n errors:\n TranscriptNotFound: no Transcript object found for the given ref\n FeedNotFound: the Transcript's feed ref cannot be resolved\n requires: [Database, FeedService]\n```\n\nEffectful operations \u2014 produce output via AI or mutate persistent state.\n\n```mdl\nop createTranscript\n desc: Creates a new Feed and a Transcript object linked to it, then writes both into the current ECHO space.\n input:\n name?: string\n space: Space\n output: Transcript\n effects: [echo:write]\n```\n\n```mdl\nop summarizeTranscript\n desc: Sends a transcript string and optional participant notes to an LLM and returns a Markdown summary with key points, verbatim quotes, and actionable tasks extracted from the conversation.\n input:\n transcript: string\n notes?: string\n output: string\n effects: [http]\n requires: [AiService]\n note: |\n Uses Claude Sonnet. Prompt instructs the model to bold speaker names,\n include verbatim quotes, and emit only tasks that are directly actionable\n and clearly assigned.\n```\n\n```mdl\nop enrichMessage\n desc: Extracts proper nouns from each transcript block of a Message using a small LLM, full-text-searches the space for matching objects, and rewrites the text with inline `[noun](dxn)` reference links.\n input:\n message: Message\n output:\n message: Message\n effects: [echo:read, ai:inference]\n requires: [AiService, Database]\n note: |\n Uses Claude Haiku. Falls back to the raw message if extraction fails (e.g. the AI\n service is unavailable). Gated by the entityExtraction setting.\n```\n\n```mdl\nop normalizeSentences\n desc: Post-processes an array of raw transcript messages, merging word-level tokens into grammatically complete sentences.\n input:\n messages: Message[]\n output: Message[]\n note: pure transformation; no effects or service dependencies\n```\n\n## Features\n\n```mdl\nfeat F-1: Recording Lifecycle\n\n req F-1.1: User can start microphone capture from TranscriptionArticle toolbar.\n req F-1.2: User can stop microphone capture; final buffered chunks are flushed and transcribed.\n req F-1.3: TranscriptionManager restarts the Transcriber automatically when the audio track changes.\n```\n\n```mdl\nfeat F-2: Audio Chunking and Transcription\n\n req F-2.1:\n when: user is speaking and chunk count reaches transcribeAfterChunksAmount\n then: Transcriber schedules a deferred transcription task\n\n req F-2.2:\n when: transcription task runs\n then: buffered PCM chunks are merged into a WAV file and POSTed to the Whisper endpoint\n\n req F-2.3:\n when: Whisper response is received\n then: segments are filtered by no_speech_prob and aligned to absolute wall-clock timestamps\n\n req F-2.4:\n when: user is not speaking\n then: only prefixBufferChunksAmount most-recent chunks are retained; older chunks discarded\n```\n\n```mdl\nfeat F-3: Transcript Persistence\n\n req F-3.1:\n when: aligned segments are produced\n then: a Message object with the segments is appended to the Transcript's ECHO Feed\n\n req F-3.2:\n when: a messageEnricher is configured\n then: Message is passed through the enricher before being written to the Feed\n\n req F-3.3:\n when: a peer's ECHO space receives the Feed update\n then: TranscriptionArticle re-renders with the new messages\n tags: [collaborative]\n```\n\n```mdl\nfeat F-4: Transcript Display\n\n req F-4.1:\n when: a Transcript object is opened\n then: all Messages are rendered in the Transcription editor with speaker bylines and timestamps\n\n req F-4.2:\n when: new messages arrive during live recording\n then: the TranscriptModel is updated and the editor scrolls to show the latest content\n```\n\n```mdl\nfeat F-5: AI Summary\n\n req F-5.1:\n when: op:summarizeTranscript is invoked\n then: LLM returns a structured Markdown document with key points, quotes, and tasks\n\n req F-5.2:\n when: participant notes are provided\n then: notes are correlated with transcript content in the summary\n\n req F-5.3:\n when: no actionable tasks are found\n then: the tasks section is omitted from the summary\n```\n\n```mdl\nfeat F-6: Skill Integration\n\n req F-6.1: Skill exposes op:openTranscript and op:summarizeTranscript as AI tools.\n req F-6.2: An AI assistant can open a transcript by Ref and return formatted text to the user.\n req F-6.3: An AI assistant can invoke the summary operation and present the result as a message.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create transcript\n given: a DXOS space is available\n when: op:createTranscript is invoked\n then:\n - a new Feed is created in the space\n - a Transcript object linked to the Feed is created in the space\n - the returned Transcript.feed.target is not null\n```\n\n```mdl\ntest T-2: Record and persist segment\n given: a Transcript with a Feed, microphone capture active\n when: the user speaks and silence is detected\n then:\n - Whisper returns at least one segment\n - a Message is appended to the Feed\n - Message.blocks contains at least one TranscriptSegment with non-empty text\n```\n\n```mdl\ntest T-3: Deduplicate segments across chunk boundaries\n given: two consecutive transcription tasks with overlapping Whisper output\n when: the second task produces segments whose end timestamps fall before lastTimestamp\n then:\n - duplicate segments are filtered out\n - only novel words (start >= lastTimestamp) are included\n```\n\n```mdl\ntest T-4: Open transcript\n given: a Transcript with three Messages in its Feed\n when: op:openTranscript is invoked\n then:\n - content string contains three byline sections\n - each section starts with \"## <speaker> \u00B7 <time>\"\n```\n\n```mdl\ntest T-5: Summarize transcript\n given: a transcript string and optional notes string\n when: op:summarizeTranscript is invoked\n then:\n - summary is a non-empty Markdown string\n - speaker names appear in bold\n - a tasks section is present if actionable tasks were detected\n```\n\n```mdl\ntest T-6: Sentence normalization is pure\n given: an array of raw word-level Messages\n when: op:normalizeSentences is called\n then:\n - output messages contain complete sentences\n - no ECHO writes occur\n - input array is not mutated\n```\n\n```mdl\ntest T-7: Toggle recording in UI\n given: TranscriptionArticle is mounted with a Transcript\n when: user clicks the Start Recording toolbar button\n then:\n - recording state becomes true\n - toolbar button label changes to \"Stop Recording\"\n - microphone capture begins\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
5
- "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,sBAAsB;AAC/B,SAASC,kBAAkB;AAE3B,SACEC,iBACAC,cACAC,mBACAC,kBACAC,gBACAC,cACAC,kBACAC,iBACAC,aACAC,aACAC,qBACAC,6BACK;AACP,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACxB7B;;;AD6BO,IAAMC,sBAAsBC,OAAOC,OAAOC,IAAAA,EAAMC,KACrDC,UAAUC,yBAAyB;EAAEC,UAAUC;AAAgB,CAAA,GAC/DH,UAAUI,qBAAqB;EAAEF,UAAUG;AAAY,CAAA,GACvDL,UAAUM,0BAA0B;EAAEJ,UAAUK;AAAiB,CAAA,GACjEP,UAAUQ,gBAAgB;EAAEC,QAAQ;IAACC,WAAWA;;AAAY,CAAA,GAC5DV,UAAUW,iBAAiB;EAAET,UAAUU;AAAa,CAAA,GACpDZ,UAAUa,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cd,UAAUe,kBAAkB;EAAEb,UAAUc;AAAsB,CAAA,GAC9DhB,UAAUiB,kBAAkB;EAAEf,UAAUgB;AAAgB,CAAA,GACxDlB,UAAUmB,sBAAsB;EAAEjB,UAAUkB;AAAoB,CAAA,GAChExB,OAAOyB,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBC;EACjCvB,UAAUwB;AACZ,CAAA,GACA9B,OAAOyB,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBC;EACjCvB,UAAUyB;AACZ,CAAA,GACA/B,OAAOyB,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBI;EACjC1B,UAAU2B;AACZ,CAAA,GACAjC,OAAOyB,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBI;EACjC1B,UAAU4B;AACZ,CAAA,GACAlC,OAAOyB,UAAU;EACfC,IAAI;EACJC,aAAaQ,eAAeC;EAC5B9B,UAAU+B;AACZ,CAAA,GACAjC,UAAUkC,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUtC,KAAKuC,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACA9C,OAAO+C,IAAI;AAGb,IAAA,8BAAehD;",
6
- "names": ["Plugin", "AppActivationEvents", "AppPlugin", "MarkdownEvents", "Transcript", "AppGraphBuilder", "EntityLookup", "MarkdownExtension", "OperationHandler", "PipelineStatus", "ReactSurface", "RecordingSession", "SkillDefinition", "TextContent", "Transcriber", "TranscriptionDriver", "TranscriptionSettings", "meta", "translations", "TranscriptionPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSkillDefinitionModule", "activate", "SkillDefinition", "addTextContentModule", "TextContent", "addOperationHandlerModule", "OperationHandler", "addSchemaModule", "schema", "Transcript", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addSettingsModule", "TranscriptionSettings", "addAppGraphModule", "AppGraphBuilder", "addReactContextModule", "TranscriptionDriver", "addModule", "id", "activatesOn", "AppActivationEvents", "SetupAppGraph", "Transcriber", "EntityLookup", "SetupSettings", "RecordingSession", "PipelineStatus", "MarkdownEvents", "SetupExtensions", "MarkdownExtension", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
7
- }
@@ -1,25 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/TranscriptionPlugin.node.ts
4
- import { Plugin } from "@dxos/app-framework";
5
- import { AppPlugin } from "@dxos/app-toolkit";
6
- import { Transcript } from "@dxos/types";
7
- import { OperationHandler, SkillDefinition, TextContent } from "#capabilities";
8
- import { meta } from "#meta";
9
- var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addSkillDefinitionModule({
10
- activate: SkillDefinition
11
- }), AppPlugin.addTextContentModule({
12
- activate: TextContent
13
- }), AppPlugin.addOperationHandlerModule({
14
- activate: OperationHandler
15
- }), AppPlugin.addSchemaModule({
16
- schema: [
17
- Transcript.Transcript
18
- ]
19
- }), Plugin.make);
20
- var TranscriptionPlugin_node_default = TranscriptionPlugin;
21
- export {
22
- TranscriptionPlugin,
23
- TranscriptionPlugin_node_default as default
24
- };
25
- //# sourceMappingURL=TranscriptionPlugin.node.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/TranscriptionPlugin.node.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { OperationHandler, SkillDefinition, TextContent } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
5
- "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAE3B,SAASC,kBAAkBC,iBAAiBC,mBAAmB;AAC/D,SAASC,YAAY;AAEd,IAAMC,sBAAsBP,OAAOQ,OAAOF,IAAAA,EAAMG,KACrDR,UAAUS,yBAAyB;EAAEC,UAAUP;AAAgB,CAAA,GAC/DH,UAAUW,qBAAqB;EAAED,UAAUN;AAAY,CAAA,GACvDJ,UAAUY,0BAA0B;EAAEF,UAAUR;AAAiB,CAAA,GACjEF,UAAUa,gBAAgB;EAAEC,QAAQ;IAACb,WAAWA;;AAAY,CAAA,GAC5DF,OAAOgB,IAAI;AAGb,IAAA,mCAAeT;",
6
- "names": ["Plugin", "AppPlugin", "Transcript", "OperationHandler", "SkillDefinition", "TextContent", "meta", "TranscriptionPlugin", "define", "pipe", "addSkillDefinitionModule", "activate", "addTextContentModule", "addOperationHandlerModule", "addSchemaModule", "schema", "make"]
7
- }
@@ -1,21 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/TranscriptionPlugin.workerd.ts
4
- import { Plugin } from "@dxos/app-framework";
5
- import { AppPlugin } from "@dxos/app-toolkit";
6
- import { Transcript } from "@dxos/types";
7
- import { OperationHandler } from "#capabilities";
8
- import { meta } from "#meta";
9
- var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
10
- activate: OperationHandler
11
- }), AppPlugin.addSchemaModule({
12
- schema: [
13
- Transcript.Transcript
14
- ]
15
- }), Plugin.make);
16
- var TranscriptionPlugin_workerd_default = TranscriptionPlugin;
17
- export {
18
- TranscriptionPlugin,
19
- TranscriptionPlugin_workerd_default as default
20
- };
21
- //# sourceMappingURL=TranscriptionPlugin.workerd.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/TranscriptionPlugin.workerd.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { OperationHandler } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
5
- "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAE3B,SAASC,wBAAwB;AACjC,SAASC,YAAY;AAEd,IAAMC,sBAAsBL,OAAOM,OAAOF,IAAAA,EAAMG,KACrDN,UAAUO,0BAA0B;EAAEC,UAAUN;AAAiB,CAAA,GACjEF,UAAUS,gBAAgB;EAAEC,QAAQ;IAACT,WAAWA;;AAAY,CAAA,GAC5DF,OAAOY,IAAI;AAGb,IAAA,sCAAeP;",
6
- "names": ["Plugin", "AppPlugin", "Transcript", "OperationHandler", "meta", "TranscriptionPlugin", "define", "pipe", "addOperationHandlerModule", "activate", "addSchemaModule", "schema", "make"]
7
- }
@@ -1,48 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/capabilities/app-graph-builder.tsx
4
- import * as Effect from "effect/Effect";
5
- import React from "react";
6
- import { Capability } from "@dxos/app-framework";
7
- import { AppCapabilities } from "@dxos/app-toolkit";
8
- import { GraphBuilder, Node, NodeMatcher } from "@dxos/plugin-graph";
9
- import { Markdown } from "@dxos/plugin-markdown/types";
10
- import { Mic } from "#components";
11
- import { meta } from "#meta";
12
- var whenMarkdownDocument = NodeMatcher.whenAll(NodeMatcher.whenEchoObjectMatches, NodeMatcher.whenEchoTypeMatches(Markdown.Document));
13
- var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
14
- const extensions = yield* GraphBuilder.createExtension({
15
- id: "transcriptionToolbar",
16
- match: (node, get) => whenMarkdownDocument(node, get),
17
- // The control owns recording state, mode, device selection, and entity-extraction —
18
- // interactions the action model cannot express (press-and-hold, an embedded dropdown, a
19
- // live device list) — so it renders via the custom toolbar variant rather than a plain
20
- // toggle action. The node is static (state lives in the control), keeping the toolbar's
21
- // action atom stable across recording changes.
22
- actions: (matched) => Effect.succeed([
23
- Node.makeAction({
24
- id: "transcription",
25
- data: () => Effect.void,
26
- properties: {
27
- label: [
28
- "start-recording.label",
29
- {
30
- ns: meta.profile.key
31
- }
32
- ],
33
- icon: "ph--microphone--regular",
34
- disposition: "toolbar",
35
- variant: "custom",
36
- render: () => /* @__PURE__ */ React.createElement(Mic, {
37
- docId: matched.id
38
- })
39
- }
40
- })
41
- ])
42
- });
43
- return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
44
- }));
45
- export {
46
- app_graph_builder_default as default
47
- };
48
- //# sourceMappingURL=app-graph-builder-GQRMI22E.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { Markdown } from '@dxos/plugin-markdown/types';\n\nimport { Mic } from '#components';\nimport { meta } from '#meta';\n\nconst whenMarkdownDocument = NodeMatcher.whenAll(\n NodeMatcher.whenEchoObjectMatches,\n NodeMatcher.whenEchoTypeMatches(Markdown.Document),\n);\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: 'transcriptionToolbar',\n match: (node, get) => whenMarkdownDocument(node, get),\n // The control owns recording state, mode, device selection, and entity-extraction —\n // interactions the action model cannot express (press-and-hold, an embedded dropdown, a\n // live device list) — so it renders via the custom toolbar variant rather than a plain\n // toggle action. The node is static (state lives in the control), keeping the toolbar's\n // action atom stable across recording changes.\n actions: (matched) =>\n Effect.succeed([\n Node.makeAction({\n id: 'transcription',\n data: () => Effect.void,\n properties: {\n label: ['start-recording.label', { ns: meta.profile.key }],\n icon: 'ph--microphone--regular',\n disposition: 'toolbar',\n variant: 'custom',\n render: () => <Mic docId={matched.id} />,\n },\n }),\n ]),\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,cAAcC,MAAMC,mBAAmB;AAChD,SAASC,gBAAgB;AAEzB,SAASC,WAAW;AACpB,SAASC,YAAY;AAErB,IAAMC,uBAAuBJ,YAAYK,QACvCL,YAAYM,uBACZN,YAAYO,oBAAoBN,SAASO,QAAQ,CAAA;AAGnD,IAAA,4BAAeZ,WAAWa,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOb,aAAac,gBAAgB;IACrDC,IAAI;IACJC,OAAO,CAACC,MAAMC,QAAQZ,qBAAqBW,MAAMC,GAAAA;;;;;;IAMjDC,SAAS,CAACC,YACDC,eAAQ;MACbpB,KAAKqB,WAAW;QACdP,IAAI;QACJQ,MAAM,MAAaC;QACnBC,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAItB,KAAKuB,QAAQC;YAAI;;UACxDC,MAAM;UACNC,aAAa;UACbC,SAAS;UACTC,QAAQ,MAAM,sBAAA,cAAC7B,KAAAA;YAAI8B,OAAOd,QAAQL;;QACpC;MACF,CAAA;KACD;EACL,CAAA;AAEA,SAAOjB,WAAWqC,YAAYpC,gBAAgBqC,iBAAiBvB,UAAAA;AACjE,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capability", "AppCapabilities", "GraphBuilder", "Node", "NodeMatcher", "Markdown", "Mic", "meta", "whenMarkdownDocument", "whenAll", "whenEchoObjectMatches", "whenEchoTypeMatches", "Document", "makeModule", "fnUntraced", "extensions", "createExtension", "id", "match", "node", "get", "actions", "matched", "succeed", "makeAction", "data", "void", "properties", "label", "ns", "profile", "key", "icon", "disposition", "variant", "render", "docId", "contributes", "AppGraphBuilder"]
7
- }