@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.
- package/dist/lib/TranscriptionPlugin.mjs +2 -0
- package/dist/lib/TranscriptionPlugin.node.mjs +11 -0
- package/dist/lib/TranscriptionPlugin.node.mjs.map +1 -0
- package/dist/lib/TranscriptionPlugin.workerd.mjs +11 -0
- package/dist/lib/TranscriptionPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +9 -0
- package/dist/lib/capabilities/node.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +18 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-TranscriptionArticle.mjs +49 -0
- package/dist/lib/chunk-TranscriptionArticle.mjs.map +1 -0
- package/dist/lib/chunk-TranscriptionPlugin.mjs +39 -0
- package/dist/lib/chunk-TranscriptionPlugin.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +33 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-create.mjs +14 -0
- package/dist/lib/chunk-create.mjs.map +1 -0
- package/dist/lib/chunk-enrich-message.mjs +18 -0
- package/dist/lib/chunk-enrich-message.mjs.map +1 -0
- package/dist/lib/chunk-entity-lookup.mjs +26 -0
- package/dist/lib/chunk-entity-lookup.mjs.map +1 -0
- package/dist/lib/{neutral/markdown-extension-CCDXXY7E.mjs → chunk-markdown-extension.mjs} +7 -11
- package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-5BVHY75B.mjs → chunk-meta.mjs} +20 -27
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-open.mjs +16 -0
- package/dist/lib/chunk-open.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-pipeline-status.mjs +17 -0
- package/dist/lib/chunk-pipeline-status.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +21 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-recording-session.mjs +13 -0
- package/dist/lib/chunk-recording-session.mjs.map +1 -0
- package/dist/lib/chunk-render-byline.mjs +15 -0
- package/dist/lib/chunk-render-byline.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +26 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-skill-definition.mjs +10 -0
- package/dist/lib/chunk-skill-definition.mjs.map +1 -0
- package/dist/lib/chunk-skills.mjs +21 -0
- package/dist/lib/chunk-skills.mjs.map +1 -0
- package/dist/lib/{neutral/summarize-LBUZTOTH.mjs → chunk-summarize.mjs} +25 -38
- package/dist/lib/chunk-summarize.mjs.map +1 -0
- package/dist/lib/chunk-text-content.mjs +28 -0
- package/dist/lib/chunk-text-content.mjs.map +1 -0
- package/dist/lib/chunk-transcriber.mjs +161 -0
- package/dist/lib/chunk-transcriber.mjs.map +1 -0
- package/dist/lib/chunk-transcription-driver.mjs +165 -0
- package/dist/lib/chunk-transcription-driver.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +141 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/components.mjs +108 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +7 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/hooks.mjs +87 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/skills.mjs +2 -0
- package/dist/lib/testing.mjs +118 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +23 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/entity-lookup.d.ts +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/node.d.ts +6 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/pipeline-status.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/recording-session.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/text-content.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/capabilities/transcription-driver.d.ts +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +4 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -1
- package/dist/types/src/normalization/message-normalizer.d.ts +4 -4
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/normalization/normalization.d.ts +97 -87
- package/dist/types/src/normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/stories/Pipeline.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Transcription.stories.d.ts.map +1 -1
- package/dist/types/src/transcription-manager.d.ts +1 -1
- package/dist/types/src/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptOperation.d.ts +97 -87
- package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptionCapabilities.d.ts +2 -2
- package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/render-byline.d.ts +11 -0
- package/dist/types/src/util/render-byline.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -1
- package/package.json +78 -70
- package/src/capabilities/entity-lookup.ts +1 -1
- package/src/capabilities/node.ts +17 -0
- package/src/capabilities/pipeline-status.ts +1 -1
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +2 -4
- package/src/capabilities/recording-session.ts +1 -1
- package/src/capabilities/text-content.ts +9 -4
- package/src/capabilities/transcriber.ts +3 -1
- package/src/capabilities/transcription-driver.tsx +1 -1
- package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +2 -1
- package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +8 -3
- package/src/hooks/useTranscriptionRecording.ts +7 -8
- package/src/normalization/message-normalizer.ts +10 -7
- package/src/normalization/normalization.test.ts +41 -44
- package/src/operations/open.ts +1 -1
- package/src/stories/Pipeline.stories.tsx +15 -14
- package/src/stories/Transcription.stories.tsx +3 -8
- package/src/transcription-manager.ts +2 -2
- package/src/types/TranscriptionCapabilities.ts +2 -2
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +40 -0
- package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs +0 -51
- package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs.map +0 -7
- package/dist/lib/neutral/TranscriptionPlugin.mjs +0 -69
- package/dist/lib/neutral/TranscriptionPlugin.mjs.map +0 -7
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs +0 -25
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +0 -21
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs +0 -48
- package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -31
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5BVHY75B.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HNXSU7HJ.mjs +0 -8
- package/dist/lib/neutral/chunk-HNXSU7HJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KOXLGGSL.mjs +0 -30
- package/dist/lib/neutral/chunk-KOXLGGSL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MDV7NBFJ.mjs +0 -182
- package/dist/lib/neutral/chunk-MDV7NBFJ.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -125
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -9
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-HNHGCKZ4.mjs +0 -21
- package/dist/lib/neutral/create-HNHGCKZ4.mjs.map +0 -7
- package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs +0 -24
- package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs.map +0 -7
- package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs +0 -25
- package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -97
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -20
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/open-SNMZXXYO.mjs +0 -25
- package/dist/lib/neutral/open-SNMZXXYO.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +0 -13
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs +0 -17
- package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-YMZRO242.mjs +0 -26
- package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +0 -7
- package/dist/lib/neutral/recording-session-IADO7ATU.mjs +0 -15
- package/dist/lib/neutral/recording-session-IADO7ATU.mjs.map +0 -7
- package/dist/lib/neutral/settings-7KE4MABW.mjs +0 -31
- package/dist/lib/neutral/settings-7KE4MABW.mjs.map +0 -7
- package/dist/lib/neutral/skill-definition-DXNK324V.mjs +0 -15
- package/dist/lib/neutral/skill-definition-DXNK324V.mjs.map +0 -7
- package/dist/lib/neutral/skills/index.mjs +0 -8
- package/dist/lib/neutral/skills/index.mjs.map +0 -7
- package/dist/lib/neutral/summarize-LBUZTOTH.mjs.map +0 -7
- package/dist/lib/neutral/text-content-NOWR642C.mjs +0 -30
- package/dist/lib/neutral/text-content-NOWR642C.mjs.map +0 -7
- package/dist/lib/neutral/transcriber-6XZHUUHK.mjs +0 -174
- package/dist/lib/neutral/transcriber-6XZHUUHK.mjs.map +0 -7
- package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs +0 -207
- package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -31
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -12
- package/dist/lib/neutral/types/index.mjs.map +0 -7
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/capabilities/index.ts
|
|
4
|
-
import { Capability } from "@dxos/app-framework";
|
|
5
|
-
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-GQRMI22E.mjs"));
|
|
6
|
-
var EntityLookup = Capability.lazy("EntityLookup", () => import("../entity-lookup-PCDW7NC4.mjs"));
|
|
7
|
-
var MarkdownExtension = Capability.lazy("MarkdownExtension", () => import("../markdown-extension-CCDXXY7E.mjs"));
|
|
8
|
-
var PipelineStatus = Capability.lazy("PipelineStatus", () => import("../pipeline-status-XMWMAUJY.mjs"));
|
|
9
|
-
var RecordingSession = Capability.lazy("RecordingSession", () => import("../recording-session-IADO7ATU.mjs"));
|
|
10
|
-
var TranscriptionDriver = Capability.lazy("TranscriptionDriver", () => import("../transcription-driver-DN6ELQXZ.mjs"));
|
|
11
|
-
var SkillDefinition = Capability.lazy("SkillDefinition", () => import("../skill-definition-DXNK324V.mjs"));
|
|
12
|
-
var TextContent = Capability.lazy("TextContent", () => import("../text-content-NOWR642C.mjs"));
|
|
13
|
-
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-NXMOAXFP.mjs"));
|
|
14
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-YMZRO242.mjs"));
|
|
15
|
-
var Transcriber = Capability.lazy("Transcriber", () => import("../transcriber-6XZHUUHK.mjs"));
|
|
16
|
-
var TranscriptionSettings = Capability.lazy("TranscriptionSettings", () => import("../settings-7KE4MABW.mjs"));
|
|
17
|
-
export {
|
|
18
|
-
AppGraphBuilder,
|
|
19
|
-
EntityLookup,
|
|
20
|
-
MarkdownExtension,
|
|
21
|
-
OperationHandler,
|
|
22
|
-
PipelineStatus,
|
|
23
|
-
ReactSurface,
|
|
24
|
-
RecordingSession,
|
|
25
|
-
SkillDefinition,
|
|
26
|
-
TextContent,
|
|
27
|
-
Transcriber,
|
|
28
|
-
TranscriptionDriver,
|
|
29
|
-
TranscriptionSettings
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const EntityLookup = Capability.lazy('EntityLookup', () => import('./entity-lookup'));\nexport const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));\nexport const PipelineStatus = Capability.lazy('PipelineStatus', () => import('./pipeline-status'));\nexport const RecordingSession = Capability.lazy('RecordingSession', () => import('./recording-session'));\nexport const TranscriptionDriver = Capability.lazy('TranscriptionDriver', () => import('./transcription-driver'));\nexport const SkillDefinition = Capability.lazy('SkillDefinition', () => import('./skill-definition'));\nexport const TextContent = Capability.lazy('TextContent', () => import('./text-content'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const Transcriber = Capability.lazy('Transcriber', () => import('./transcriber'));\nexport const TranscriptionSettings = Capability.lazy('TranscriptionSettings', () => import('./settings'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAME,oBAAoBJ,WAAWE,KAAK,qBAAqB,MAAM,OAAO,oCAAA,CAAA;AAC5E,IAAMG,iBAAiBL,WAAWE,KAAK,kBAAkB,MAAM,OAAO,iCAAA,CAAA;AACtE,IAAMI,mBAAmBN,WAAWE,KAAK,oBAAoB,MAAM,OAAO,mCAAA,CAAA;AAC1E,IAAMK,sBAAsBP,WAAWE,KAAK,uBAAuB,MAAM,OAAO,sCAAA,CAAA;AAChF,IAAMM,kBAAkBR,WAAWE,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;AACxE,IAAMO,cAAcT,WAAWE,KAAK,eAAe,MAAM,OAAO,8BAAA,CAAA;AAChE,IAAMQ,mBAAmBV,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMS,eAAeX,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMU,cAAcZ,WAAWE,KAAK,eAAe,MAAM,OAAO,6BAAA,CAAA;AAChE,IAAMW,wBAAwBb,WAAWE,KAAK,yBAAyB,MAAM,OAAO,0BAAA,CAAA;",
|
|
6
|
-
"names": ["Capability", "AppGraphBuilder", "lazy", "EntityLookup", "MarkdownExtension", "PipelineStatus", "RecordingSession", "TranscriptionDriver", "SkillDefinition", "TextContent", "OperationHandler", "ReactSurface", "Transcriber", "TranscriptionSettings"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.transcription',\n name: 'Transcription',\n author: 'DXOS',\n description: trim`\n Real-time voice-to-text transcription for DXOS Composer.\n Captures microphone audio in short PCM chunks, batches them into WAV payloads, and streams\n the results to a Whisper-compatible speech-recognition endpoint.\n Transcribed segments are timestamped, deduplicated across chunk boundaries, and persisted\n as Message objects in an ECHO Feed so that every participant in a shared space sees the\n live transcript without any manual sync step.\n\n Each recording session is represented as a Transcript object linked to its Feed.\n The read-only editor renders messages with speaker bylines and wall-clock timestamps,\n supporting markdown decoration and document preview.\n An optional message enricher pipeline lets plugins annotate messages before they are\n committed — for example, to attach speaker identity from a calls service.\n\n The plugin ships two skill-compatible operations: Open (loads and formats a transcript\n for reading by an AI assistant) and Summarize (sends the transcript text to an LLM and\n returns a structured Markdown summary with key points, verbatim quotes, and actionable\n tasks extracted from the conversation).\n\n A sentence-normalization pass merges raw word-level tokens from the recognizer into\n grammatically complete sentences, improving readability of the stored transcript without\n altering the underlying audio timeline.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',\n icon: { key: 'ph--microphone--regular', hue: 'sky' },\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n screenshots: [],\n },\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;;;;;;;;IAuBbO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAA2BM,KAAK;IAAM;IACnDC,MAAM;IACNC,MAAM;MAAC;;IACPC,aAAa,CAAA;EACf;AACF,CAAA;;;ADjCO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
|
|
6
|
-
"names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "spec", "tags", "screenshots", "meta", "Plugin", "getMetaFromConfig", "config"]
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// src/operations/index.ts
|
|
2
|
-
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
-
var TranscriptionOperationHandlerSet = OperationHandlerSet.lazy(() => import("./create-HNHGCKZ4.mjs"), () => import("./open-SNMZXXYO.mjs"), () => import("./summarize-LBUZTOTH.mjs"), () => import("./enrich-message-DSJU4TXC.mjs"));
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
TranscriptionOperationHandlerSet
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=chunk-HNXSU7HJ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const TranscriptionOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./create'),\n () => import('./open'),\n () => import('./summarize'),\n () => import('./enrich-message'),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,2BAA2B;AAE7B,IAAMC,mCAAmCD,oBAAoBE,KAClE,MAAM,OAAO,uBAAA,GACb,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,0BAAA,GACb,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
-
"names": ["OperationHandlerSet", "TranscriptionOperationHandlerSet", "lazy"]
|
|
7
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/skills/transcription-skill.ts
|
|
2
|
-
import { Skill, Template } from "@dxos/compute";
|
|
3
|
-
import { trim } from "@dxos/util";
|
|
4
|
-
import { TranscriptOperation } from "#types";
|
|
5
|
-
var SKILL_KEY = "org.dxos.skill.transcription";
|
|
6
|
-
var make = () => Skill.make({
|
|
7
|
-
key: SKILL_KEY,
|
|
8
|
-
name: "Transcription",
|
|
9
|
-
tools: Skill.toolDefinitions({
|
|
10
|
-
operations: [
|
|
11
|
-
TranscriptOperation.Open,
|
|
12
|
-
TranscriptOperation.Summarize
|
|
13
|
-
]
|
|
14
|
-
}),
|
|
15
|
-
instructions: Template.make({
|
|
16
|
-
source: trim`
|
|
17
|
-
You can open and summarize a meeting transcript.
|
|
18
|
-
`
|
|
19
|
-
})
|
|
20
|
-
});
|
|
21
|
-
var skill = {
|
|
22
|
-
key: SKILL_KEY,
|
|
23
|
-
make
|
|
24
|
-
};
|
|
25
|
-
var transcription_skill_default = skill;
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
transcription_skill_default
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=chunk-KOXLGGSL.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/skills/transcription-skill.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Skill, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { TranscriptOperation } from '#types';\n\nconst SKILL_KEY = 'org.dxos.skill.transcription';\n\nconst make = () =>\n Skill.make({\n key: SKILL_KEY,\n name: 'Transcription',\n tools: Skill.toolDefinitions({ operations: [TranscriptOperation.Open, TranscriptOperation.Summarize] }),\n instructions: Template.make({\n source: trim`\n You can open and summarize a meeting transcript.\n `,\n }),\n });\n\nconst skill: Skill.Definition = {\n key: SKILL_KEY,\n make,\n};\n\nexport default skill;\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,OAAOC,gBAAgB;AAChC,SAASC,YAAY;AAErB,SAASC,2BAA2B;AAEpC,IAAMC,YAAY;AAElB,IAAMC,OAAO,MACXL,MAAMK,KAAK;EACTC,KAAKF;EACLG,MAAM;EACNC,OAAOR,MAAMS,gBAAgB;IAAEC,YAAY;MAACP,oBAAoBQ;MAAMR,oBAAoBS;;EAAW,CAAA;EACrGC,cAAcZ,SAASI,KAAK;IAC1BS,QAAQZ;;;EAGV,CAAA;AACF,CAAA;AAEF,IAAMa,QAA0B;EAC9BT,KAAKF;EACLC;AACF;AAEA,IAAA,8BAAeU;",
|
|
6
|
-
"names": ["Skill", "Template", "trim", "TranscriptOperation", "SKILL_KEY", "make", "key", "name", "tools", "toolDefinitions", "operations", "Open", "Summarize", "instructions", "source", "skill"]
|
|
7
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
-
|
|
5
|
-
// src/types/Settings.ts
|
|
6
|
-
var Settings_exports = {};
|
|
7
|
-
__export(Settings_exports, {
|
|
8
|
-
Settings: () => Settings
|
|
9
|
-
});
|
|
10
|
-
import * as Schema from "effect/Schema";
|
|
11
|
-
var Settings = Schema.mutable(Schema.Struct({
|
|
12
|
-
entityExtraction: Schema.optional(Schema.Boolean.annotations({
|
|
13
|
-
title: "Entity extraction",
|
|
14
|
-
description: "While transcribing, use the Assistant to detect and annotate mentions of known objects such as people or organizations."
|
|
15
|
-
})).pipe(Schema.withConstructorDefault(() => true)),
|
|
16
|
-
recordMode: Schema.optional(Schema.Literal("toggle", "hold").annotations({
|
|
17
|
-
title: "Record mode",
|
|
18
|
-
description: "Whether the mic toggles recording on each click, or records only while the control is held (push-to-talk)."
|
|
19
|
-
})).pipe(Schema.withConstructorDefault(() => "toggle")),
|
|
20
|
-
audioDeviceId: Schema.optional(Schema.String.annotations({
|
|
21
|
-
title: "Audio input device",
|
|
22
|
-
description: "Identifier of the microphone to capture from; empty uses the system default."
|
|
23
|
-
})),
|
|
24
|
-
transcribeAfterMs: Schema.optional(Schema.Number.annotations({
|
|
25
|
-
title: "Initial buffering (ms)",
|
|
26
|
-
description: "How long to accumulate audio before producing the first transcription."
|
|
27
|
-
})).pipe(Schema.withConstructorDefault(() => 4e3)),
|
|
28
|
-
streamMode: Schema.optional(Schema.Literal("batch", "word").annotations({
|
|
29
|
-
title: "Reveal mode",
|
|
30
|
-
description: "Whether transcribed text appears in batches or streams word-by-word."
|
|
31
|
-
})).pipe(Schema.withConstructorDefault(() => "word")),
|
|
32
|
-
wordIntervalMs: Schema.optional(Schema.Number.annotations({
|
|
33
|
-
title: "Word interval (ms)",
|
|
34
|
-
description: "Pacing between words when streaming word-by-word."
|
|
35
|
-
})).pipe(Schema.withConstructorDefault(() => 80))
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
// src/types/TranscriptionCapabilities.ts
|
|
39
|
-
var TranscriptionCapabilities_exports = {};
|
|
40
|
-
__export(TranscriptionCapabilities_exports, {
|
|
41
|
-
EntityLookup: () => EntityLookup,
|
|
42
|
-
PipelineStatus: () => PipelineStatus,
|
|
43
|
-
RecordingSession: () => RecordingSession,
|
|
44
|
-
Settings: () => Settings2,
|
|
45
|
-
TranscriptionManagerProvider: () => TranscriptionManagerProvider
|
|
46
|
-
});
|
|
47
|
-
import { Capability } from "@dxos/app-framework";
|
|
48
|
-
import { meta } from "#meta";
|
|
49
|
-
var TranscriptionManagerProvider = Capability.make(`${meta.profile.key}.capability.transcription-manager`);
|
|
50
|
-
var Settings2 = Capability.make(`${meta.profile.key}.capability.settings`);
|
|
51
|
-
var RecordingSession = Capability.make(`${meta.profile.key}.capability.recording-session`);
|
|
52
|
-
var EntityLookup = Capability.make(`${meta.profile.key}.capability.entity-lookup`);
|
|
53
|
-
var PipelineStatus = Capability.make(`${meta.profile.key}.capability.pipeline-status`);
|
|
54
|
-
|
|
55
|
-
// src/types/TranscriptOperation.ts
|
|
56
|
-
var TranscriptOperation_exports = {};
|
|
57
|
-
__export(TranscriptOperation_exports, {
|
|
58
|
-
Create: () => Create,
|
|
59
|
-
EnrichMessage: () => EnrichMessage,
|
|
60
|
-
MessageWithRangeId: () => MessageWithRangeId,
|
|
61
|
-
Open: () => Open,
|
|
62
|
-
SentenceNormalization: () => SentenceNormalization,
|
|
63
|
-
SentenceNormalizationInput: () => SentenceNormalizationInput,
|
|
64
|
-
SentenceNormalizationOutput: () => SentenceNormalizationOutput,
|
|
65
|
-
Summarize: () => Summarize
|
|
66
|
-
});
|
|
67
|
-
import * as Schema2 from "effect/Schema";
|
|
68
|
-
import { AiService } from "@dxos/ai";
|
|
69
|
-
import { SpaceSchema } from "@dxos/client/echo";
|
|
70
|
-
import { Operation } from "@dxos/compute";
|
|
71
|
-
import { Database, DXN, Ref, Type } from "@dxos/echo";
|
|
72
|
-
import { Message, Transcript } from "@dxos/types";
|
|
73
|
-
import { meta as meta2 } from "#meta";
|
|
74
|
-
var makeKey = (name) => DXN.make(`${meta2.profile.key}.operation.${name}`);
|
|
75
|
-
var Create = Operation.make({
|
|
76
|
-
meta: {
|
|
77
|
-
key: makeKey("create"),
|
|
78
|
-
name: "Create Transcript",
|
|
79
|
-
icon: "ph--microphone--regular"
|
|
80
|
-
},
|
|
81
|
-
input: Schema2.Struct({
|
|
82
|
-
name: Schema2.optional(Schema2.String),
|
|
83
|
-
space: SpaceSchema
|
|
84
|
-
}),
|
|
85
|
-
output: Schema2.Struct({
|
|
86
|
-
object: Type.getSchema(Transcript.Transcript)
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
var MessageWithRangeId = Schema2.extend(Type.getSchema(Message.Message), Schema2.Struct({
|
|
90
|
-
rangeId: Schema2.optional(Schema2.Array(Schema2.String)).annotations({
|
|
91
|
-
description: "The IDs of the messages that contain the sentences."
|
|
92
|
-
})
|
|
93
|
-
}));
|
|
94
|
-
var Open = Operation.make({
|
|
95
|
-
meta: {
|
|
96
|
-
key: DXN.make("org.dxos.function.transcription.open"),
|
|
97
|
-
name: "Open",
|
|
98
|
-
description: "Opens and reads the contents of a transcription object.",
|
|
99
|
-
icon: "ph--folder-open--regular"
|
|
100
|
-
},
|
|
101
|
-
input: Schema2.Struct({
|
|
102
|
-
transcript: Ref.Ref(Transcript.Transcript).annotations({
|
|
103
|
-
description: "The ID of the transcription object."
|
|
104
|
-
})
|
|
105
|
-
}),
|
|
106
|
-
output: Schema2.Struct({
|
|
107
|
-
content: Schema2.String
|
|
108
|
-
}),
|
|
109
|
-
services: [
|
|
110
|
-
Database.Service
|
|
111
|
-
]
|
|
112
|
-
});
|
|
113
|
-
var Summarize = Operation.make({
|
|
114
|
-
meta: {
|
|
115
|
-
key: DXN.make("org.dxos.function.transcription.summarize"),
|
|
116
|
-
name: "Summarize",
|
|
117
|
-
description: "Summarize a transcript of a meeting.",
|
|
118
|
-
icon: "ph--text-align-left--regular"
|
|
119
|
-
},
|
|
120
|
-
input: Schema2.Struct({
|
|
121
|
-
transcript: Schema2.String.annotations({
|
|
122
|
-
description: "The transcript of the meeting."
|
|
123
|
-
}),
|
|
124
|
-
notes: Schema2.optional(Schema2.String).annotations({
|
|
125
|
-
description: "Additional notes from the participants."
|
|
126
|
-
})
|
|
127
|
-
}),
|
|
128
|
-
output: Schema2.Struct({
|
|
129
|
-
summary: Schema2.String.annotations({
|
|
130
|
-
description: "The summary of the transcript."
|
|
131
|
-
})
|
|
132
|
-
}),
|
|
133
|
-
services: [
|
|
134
|
-
AiService.AiService
|
|
135
|
-
]
|
|
136
|
-
}).pipe(Operation.visible);
|
|
137
|
-
var EnrichMessage = Operation.make({
|
|
138
|
-
meta: {
|
|
139
|
-
key: DXN.make("org.dxos.function.transcription.enrichMessage"),
|
|
140
|
-
name: "Enrich Transcript Message",
|
|
141
|
-
description: "Extract proper nouns from a transcript message and link them to objects in the space.",
|
|
142
|
-
icon: "ph--text-t--regular"
|
|
143
|
-
},
|
|
144
|
-
input: Schema2.Struct({
|
|
145
|
-
message: Type.getSchema(Message.Message)
|
|
146
|
-
}),
|
|
147
|
-
output: Schema2.Struct({
|
|
148
|
-
message: Type.getSchema(Message.Message)
|
|
149
|
-
}),
|
|
150
|
-
services: [
|
|
151
|
-
AiService.AiService,
|
|
152
|
-
Database.Service
|
|
153
|
-
]
|
|
154
|
-
});
|
|
155
|
-
var SentenceNormalizationInput = Schema2.Struct({
|
|
156
|
-
messages: Schema2.Array(MessageWithRangeId).annotations({
|
|
157
|
-
description: "Messages to normalize into sentences."
|
|
158
|
-
})
|
|
159
|
-
});
|
|
160
|
-
var SentenceNormalizationOutput = Schema2.Struct({
|
|
161
|
-
sentences: Schema2.Array(MessageWithRangeId.pipe(Schema2.mutable)).pipe(Schema2.mutable).annotations({
|
|
162
|
-
description: "The sentences of the transcript."
|
|
163
|
-
})
|
|
164
|
-
});
|
|
165
|
-
var SentenceNormalization = Operation.make({
|
|
166
|
-
meta: {
|
|
167
|
-
key: DXN.make("org.dxos.function.transcription.sentenceNormalization"),
|
|
168
|
-
name: "Sentence Normalization",
|
|
169
|
-
description: "Post process of transcription for sentence normalization",
|
|
170
|
-
icon: "ph--text-t--regular"
|
|
171
|
-
},
|
|
172
|
-
input: SentenceNormalizationInput,
|
|
173
|
-
output: SentenceNormalizationOutput,
|
|
174
|
-
services: []
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
export {
|
|
178
|
-
Settings_exports,
|
|
179
|
-
TranscriptionCapabilities_exports,
|
|
180
|
-
TranscriptOperation_exports
|
|
181
|
-
};
|
|
182
|
-
//# sourceMappingURL=chunk-MDV7NBFJ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/Settings.ts", "../../../src/types/TranscriptionCapabilities.ts", "../../../src/types/TranscriptOperation.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport type RecordMode = 'toggle' | 'hold';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n entityExtraction: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Entity extraction',\n description:\n 'While transcribing, use the Assistant to detect and annotate mentions of known objects such as people or organizations.',\n }),\n ).pipe(Schema.withConstructorDefault(() => true)),\n\n recordMode: Schema.optional(\n Schema.Literal('toggle', 'hold').annotations({\n title: 'Record mode',\n description:\n 'Whether the mic toggles recording on each click, or records only while the control is held (push-to-talk).',\n }),\n ).pipe(Schema.withConstructorDefault(() => 'toggle' as const)),\n\n audioDeviceId: Schema.optional(\n Schema.String.annotations({\n title: 'Audio input device',\n description: 'Identifier of the microphone to capture from; empty uses the system default.',\n }),\n ),\n\n transcribeAfterMs: Schema.optional(\n Schema.Number.annotations({\n title: 'Initial buffering (ms)',\n description: 'How long to accumulate audio before producing the first transcription.',\n }),\n ).pipe(Schema.withConstructorDefault(() => 4000)),\n\n streamMode: Schema.optional(\n Schema.Literal('batch', 'word').annotations({\n title: 'Reveal mode',\n description: 'Whether transcribed text appears in batches or streams word-by-word.',\n }),\n ).pipe(Schema.withConstructorDefault(() => 'word' as const)),\n\n wordIntervalMs: Schema.optional(\n Schema.Number.annotations({\n title: 'Word interval (ms)',\n description: 'Pacing between words when streaming word-by-word.',\n }),\n ).pipe(Schema.withConstructorDefault(() => 80)),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Space } from '@dxos/client/echo';\nimport { type Feed } from '@dxos/echo';\nimport { type EntityLookup as EntityLookupFn } from '@dxos/transcription-pipeline';\nimport { type Message } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport * as SettingsModule from './Settings';\n\n/**\n * Enriches a transcript message before it is written to the feed (e.g. entity linking).\n */\nexport type TranscriptMessageEnricher = (message: Message.Message) => Promise<Message.Message>;\n\n/**\n * Service contract for the meeting transcription manager. Consumers (e.g. plugin-meeting) depend on\n * this interface via the {@link TranscriptionManagerProvider} capability, not on the concrete\n * implementation, keeping the manager's browser/SDK dependencies out of consumer packages.\n */\nexport interface TranscriptionManager {\n readonly enabled: Atom.Atom<boolean>;\n setFeed(space: Space, feed: Feed.Feed): void;\n setAudioTrack(track?: MediaStreamTrack): Promise<void>;\n setRecording(recording?: boolean): void;\n setEnabled(enabled: boolean): Promise<void>;\n open(): Promise<this>;\n close(): Promise<this>;\n}\n\nexport type TranscriptionManagerProviderProps = {\n messageEnricher?: TranscriptMessageEnricher;\n};\n\nexport type TranscriptionManagerProvider = (props: TranscriptionManagerProviderProps) => TranscriptionManager;\n\nexport const TranscriptionManagerProvider = Capability.make<TranscriptionManagerProvider>(\n `${meta.profile.key}.capability.transcription-manager`,\n);\n\nexport const Settings = Capability.make<Atom.Writable<SettingsModule.Settings>>(\n `${meta.profile.key}.capability.settings`,\n);\n\n/**\n * The single active editor transcription session. `id` is the editor's attendable id (the key it\n * registered under in `MarkdownCapabilities.EditorViews`); `recording` gates audio capture. `null`\n * when no session is active.\n */\nexport type RecordingSession = { id: string; recording: boolean };\n\nexport const RecordingSession = Capability.make<Atom.Writable<RecordingSession | null>>(\n `${meta.profile.key}.capability.recording-session`,\n);\n\n/**\n * Resolves entity references for live-transcription enrichment. Backend-agnostic (full-text, vector,\n * a remote service, …) so the headless driver depends on the function, not the database.\n */\nexport type EntityLookup = EntityLookupFn;\n\nexport const EntityLookup = Capability.make<EntityLookupFn>(`${meta.profile.key}.capability.entity-lookup`);\n\n/**\n * Live transcription lifecycle, published by the driver for observers (toolbar spinner, testbench):\n * `recording` (mic capturing) → `draining` (mic off, finishing the pipeline) → `idle`.\n */\nexport type PipelinePhase = 'idle' | 'recording' | 'draining';\n\nexport const PipelineStatus = Capability.make<Atom.Writable<{ phase: PipelinePhase }>>(\n `${meta.profile.key}.capability.pipeline-status`,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport { SpaceSchema } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Database, DXN, Ref, Type } from '@dxos/echo';\n// Message and Person are used via Type.getSchema(Message.Message); they also appear in emitted .d.ts.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { Message, type Person, Transcript } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const Create = Operation.make({\n meta: { key: makeKey('create'), name: 'Create Transcript', icon: 'ph--microphone--regular' },\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n space: SpaceSchema,\n }),\n output: Schema.Struct({\n object: Type.getSchema(Transcript.Transcript),\n }),\n});\n\nexport const MessageWithRangeId = Schema.extend(\n Type.getSchema(Message.Message),\n Schema.Struct({\n rangeId: Schema.optional(Schema.Array(Schema.String)).annotations({\n description: 'The IDs of the messages that contain the sentences.',\n }),\n }),\n);\n\nexport type MessageWithRangeIdType = Schema.Schema.Type<typeof MessageWithRangeId>;\n\nexport const Open = Operation.make({\n meta: {\n key: DXN.make('org.dxos.function.transcription.open'),\n name: 'Open',\n description: 'Opens and reads the contents of a transcription object.',\n icon: 'ph--folder-open--regular',\n },\n input: Schema.Struct({\n transcript: Ref.Ref(Transcript.Transcript).annotations({\n description: 'The ID of the transcription object.',\n }),\n }),\n output: Schema.Struct({\n content: Schema.String,\n }),\n services: [Database.Service],\n});\n\nexport const Summarize = Operation.make({\n meta: {\n key: DXN.make('org.dxos.function.transcription.summarize'),\n name: 'Summarize',\n description: 'Summarize a transcript of a meeting.',\n icon: 'ph--text-align-left--regular',\n },\n input: Schema.Struct({\n transcript: Schema.String.annotations({\n description: 'The transcript of the meeting.',\n }),\n notes: Schema.optional(Schema.String).annotations({\n description: 'Additional notes from the participants.',\n }),\n }),\n output: Schema.Struct({\n summary: Schema.String.annotations({\n description: 'The summary of the transcript.',\n }),\n }),\n services: [AiService.AiService],\n}).pipe(Operation.visible);\n\nexport const EnrichMessage = Operation.make({\n meta: {\n key: DXN.make('org.dxos.function.transcription.enrichMessage'),\n name: 'Enrich Transcript Message',\n description: 'Extract proper nouns from a transcript message and link them to objects in the space.',\n icon: 'ph--text-t--regular',\n },\n input: Schema.Struct({\n message: Type.getSchema(Message.Message),\n }),\n output: Schema.Struct({\n message: Type.getSchema(Message.Message),\n }),\n services: [AiService.AiService, Database.Service],\n});\n\nexport const SentenceNormalizationInput = Schema.Struct({\n messages: Schema.Array(MessageWithRangeId).annotations({\n description: 'Messages to normalize into sentences.',\n }),\n});\n\nexport type SentenceNormalizationInputType = Schema.Schema.Type<typeof SentenceNormalizationInput>;\n\nexport const SentenceNormalizationOutput = Schema.Struct({\n sentences: Schema.Array(MessageWithRangeId.pipe(Schema.mutable)).pipe(Schema.mutable).annotations({\n description: 'The sentences of the transcript.',\n }),\n});\n\nexport const SentenceNormalization = Operation.make({\n meta: {\n key: DXN.make('org.dxos.function.transcription.sentenceNormalization'),\n name: 'Sentence Normalization',\n description: 'Post process of transcription for sentence normalization',\n icon: 'ph--text-t--regular',\n },\n input: SentenceNormalizationInput,\n output: SentenceNormalizationOutput,\n services: [],\n});\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["Schema", "Settings", "mutable", "Struct", "entityExtraction", "optional", "Boolean", "annotations", "title", "description", "pipe", "withConstructorDefault", "recordMode", "Literal", "audioDeviceId", "String", "transcribeAfterMs", "Number", "streamMode", "wordIntervalMs", "Settings", "Capability", "meta", "TranscriptionManagerProvider", "make", "profile", "key", "RecordingSession", "EntityLookup", "PipelineStatus", "Schema", "AiService", "SpaceSchema", "Operation", "Database", "DXN", "Ref", "Type", "Message", "Transcript", "meta", "makeKey", "name", "make", "profile", "key", "Create", "icon", "input", "Struct", "optional", "String", "space", "output", "object", "getSchema", "MessageWithRangeId", "extend", "rangeId", "Array", "annotations", "description", "Open", "transcript", "content", "services", "Service", "Summarize", "notes", "summary", "pipe", "visible", "EnrichMessage", "message", "SentenceNormalizationInput", "messages", "SentenceNormalizationOutput", "sentences", "mutable", "SentenceNormalization"]
|
|
7
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/components/Mic/Mic.tsx
|
|
4
|
-
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
-
import { useAtomCapabilityState } from "@dxos/app-framework/ui";
|
|
6
|
-
import { MicButton, useTranslation } from "@dxos/react-ui";
|
|
7
|
-
import { useSoundEffect } from "@dxos/react-ui-audio";
|
|
8
|
-
import { MicSettings } from "@dxos/react-ui-transcription";
|
|
9
|
-
import { meta } from "#meta";
|
|
10
|
-
import { TranscriptionCapabilities } from "#types";
|
|
11
|
-
var Mic = ({ docId }) => {
|
|
12
|
-
const { t } = useTranslation(meta.profile.key);
|
|
13
|
-
const [session, setSession] = useAtomCapabilityState(TranscriptionCapabilities.RecordingSession);
|
|
14
|
-
const [settings, setSettings] = useAtomCapabilityState(TranscriptionCapabilities.Settings);
|
|
15
|
-
const recording = !!session?.recording && session.id === docId;
|
|
16
|
-
const soundStart = useSoundEffect("StartRecording");
|
|
17
|
-
const soundStop = useSoundEffect("StopRecording");
|
|
18
|
-
const wasRecording = useRef(recording);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (wasRecording.current === recording) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
wasRecording.current = recording;
|
|
24
|
-
void (recording ? soundStart : soundStop).play();
|
|
25
|
-
}, [
|
|
26
|
-
recording,
|
|
27
|
-
soundStart,
|
|
28
|
-
soundStop
|
|
29
|
-
]);
|
|
30
|
-
const recordMode = settings?.recordMode ?? "toggle";
|
|
31
|
-
const entityExtraction = settings?.entityExtraction !== false;
|
|
32
|
-
const selectedDeviceId = settings?.audioDeviceId ?? "";
|
|
33
|
-
const [devices, setDevices] = useState([]);
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
if (!navigator.mediaDevices?.enumerateDevices) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
let cancelled = false;
|
|
39
|
-
const refresh = async () => {
|
|
40
|
-
const all = await navigator.mediaDevices.enumerateDevices();
|
|
41
|
-
if (cancelled) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
setDevices(all.filter((device) => device.kind === "audioinput" && device.deviceId).map((device, index) => ({
|
|
45
|
-
deviceId: device.deviceId,
|
|
46
|
-
label: device.label || `Microphone ${index + 1}`
|
|
47
|
-
})));
|
|
48
|
-
};
|
|
49
|
-
void refresh();
|
|
50
|
-
navigator.mediaDevices.addEventListener("devicechange", refresh);
|
|
51
|
-
return () => {
|
|
52
|
-
cancelled = true;
|
|
53
|
-
navigator.mediaDevices.removeEventListener("devicechange", refresh);
|
|
54
|
-
};
|
|
55
|
-
}, []);
|
|
56
|
-
const handleToggle = useCallback(() => {
|
|
57
|
-
setSession((current) => current?.recording && current.id === docId ? null : {
|
|
58
|
-
id: docId,
|
|
59
|
-
recording: true
|
|
60
|
-
});
|
|
61
|
-
}, [
|
|
62
|
-
setSession,
|
|
63
|
-
docId
|
|
64
|
-
]);
|
|
65
|
-
const handlePressStart = useCallback(() => {
|
|
66
|
-
setSession(() => ({
|
|
67
|
-
id: docId,
|
|
68
|
-
recording: true
|
|
69
|
-
}));
|
|
70
|
-
}, [
|
|
71
|
-
setSession,
|
|
72
|
-
docId
|
|
73
|
-
]);
|
|
74
|
-
const handlePressEnd = useCallback(() => {
|
|
75
|
-
setSession((current) => current?.id === docId ? null : current);
|
|
76
|
-
}, [
|
|
77
|
-
setSession,
|
|
78
|
-
docId
|
|
79
|
-
]);
|
|
80
|
-
const handleRecordModeChange = useCallback((mode) => setSettings((current) => ({
|
|
81
|
-
...current,
|
|
82
|
-
recordMode: mode
|
|
83
|
-
})), [
|
|
84
|
-
setSettings
|
|
85
|
-
]);
|
|
86
|
-
const handleEntityExtractionChange = useCallback((value) => setSettings((current) => ({
|
|
87
|
-
...current,
|
|
88
|
-
entityExtraction: value
|
|
89
|
-
})), [
|
|
90
|
-
setSettings
|
|
91
|
-
]);
|
|
92
|
-
const handleSelectDevice = useCallback((deviceId) => setSettings((current) => ({
|
|
93
|
-
...current,
|
|
94
|
-
audioDeviceId: deviceId || void 0
|
|
95
|
-
})), [
|
|
96
|
-
setSettings
|
|
97
|
-
]);
|
|
98
|
-
const recordLabel = recording ? t("stop-recording.label") : recordMode === "hold" ? t("hold-to-record.label") : t("start-recording.label");
|
|
99
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
100
|
-
className: "flex items-center"
|
|
101
|
-
}, /* @__PURE__ */ React.createElement(MicButton, {
|
|
102
|
-
iconOnly: true,
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
label: recordLabel,
|
|
105
|
-
recording,
|
|
106
|
-
mode: recordMode,
|
|
107
|
-
onToggle: handleToggle,
|
|
108
|
-
onPressStart: handlePressStart,
|
|
109
|
-
onPressEnd: handlePressEnd,
|
|
110
|
-
"data-testid": "transcription.record"
|
|
111
|
-
}), /* @__PURE__ */ React.createElement(MicSettings, {
|
|
112
|
-
translationNs: meta.profile.key,
|
|
113
|
-
recordMode,
|
|
114
|
-
entityExtraction,
|
|
115
|
-
devices,
|
|
116
|
-
selectedDeviceId,
|
|
117
|
-
onRecordModeChange: handleRecordModeChange,
|
|
118
|
-
onEntityExtractionChange: handleEntityExtractionChange,
|
|
119
|
-
onSelectDevice: handleSelectDevice
|
|
120
|
-
}));
|
|
121
|
-
};
|
|
122
|
-
export {
|
|
123
|
-
Mic
|
|
124
|
-
};
|
|
125
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/Mic/Mic.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { useAtomCapabilityState } from '@dxos/app-framework/ui';\nimport { MicButton, useTranslation } from '@dxos/react-ui';\nimport { useSoundEffect } from '@dxos/react-ui-audio';\nimport { type AudioInputDevice, MicSettings } from '@dxos/react-ui-transcription';\n\nimport { meta } from '#meta';\nimport { type Settings, TranscriptionCapabilities } from '#types';\n\nexport type MicProps = {\n /** Attendable id of the target editor; keys the recording session. */\n docId: string;\n};\n\n/**\n * Connects the {@link MicButton} and {@link MicSettings} to the recording session and settings\n * capabilities, and enumerates available audio inputs. Mounted from the toolbar's custom action, so\n * capability hooks resolve.\n */\nexport const Mic = ({ docId }: MicProps) => {\n const { t } = useTranslation(meta.profile.key);\n const [session, setSession] = useAtomCapabilityState(TranscriptionCapabilities.RecordingSession);\n const [settings, setSettings] = useAtomCapabilityState(TranscriptionCapabilities.Settings);\n\n const recording = !!session?.recording && session.id === docId;\n\n // Play start/stop cues as this session's recording flag flips (skip the initial mount).\n const soundStart = useSoundEffect('StartRecording');\n const soundStop = useSoundEffect('StopRecording');\n const wasRecording = useRef(recording);\n useEffect(() => {\n if (wasRecording.current === recording) {\n return;\n }\n wasRecording.current = recording;\n void (recording ? soundStart : soundStop).play();\n }, [recording, soundStart, soundStop]);\n\n const recordMode: Settings.RecordMode = settings?.recordMode ?? 'toggle';\n const entityExtraction = settings?.entityExtraction !== false;\n const selectedDeviceId = settings?.audioDeviceId ?? '';\n\n const [devices, setDevices] = useState<AudioInputDevice[]>([]);\n useEffect(() => {\n if (!navigator.mediaDevices?.enumerateDevices) {\n return;\n }\n let cancelled = false;\n const refresh = async () => {\n const all = await navigator.mediaDevices.enumerateDevices();\n if (cancelled) {\n return;\n }\n // Labels are blank until microphone permission is granted; fall back to an ordinal name.\n setDevices(\n all\n .filter((device) => device.kind === 'audioinput' && device.deviceId)\n .map((device, index) => ({\n deviceId: device.deviceId,\n label: device.label || `Microphone ${index + 1}`,\n })),\n );\n };\n void refresh();\n navigator.mediaDevices.addEventListener('devicechange', refresh);\n return () => {\n cancelled = true;\n navigator.mediaDevices.removeEventListener('devicechange', refresh);\n };\n }, []);\n\n const handleToggle = useCallback(() => {\n setSession((current) => (current?.recording && current.id === docId ? null : { id: docId, recording: true }));\n }, [setSession, docId]);\n\n const handlePressStart = useCallback(() => {\n setSession(() => ({ id: docId, recording: true }));\n }, [setSession, docId]);\n\n const handlePressEnd = useCallback(() => {\n // Only stop our own session; a stray release must not clear another editor's recording.\n setSession((current) => (current?.id === docId ? null : current));\n }, [setSession, docId]);\n\n const handleRecordModeChange = useCallback(\n (mode: Settings.RecordMode) => setSettings((current) => ({ ...current, recordMode: mode })),\n [setSettings],\n );\n\n const handleEntityExtractionChange = useCallback(\n (value: boolean) => setSettings((current) => ({ ...current, entityExtraction: value })),\n [setSettings],\n );\n\n const handleSelectDevice = useCallback(\n (deviceId: string) => setSettings((current) => ({ ...current, audioDeviceId: deviceId || undefined })),\n [setSettings],\n );\n\n const recordLabel = recording\n ? t('stop-recording.label')\n : recordMode === 'hold'\n ? t('hold-to-record.label')\n : t('start-recording.label');\n\n return (\n <div className='flex items-center'>\n <MicButton\n iconOnly\n variant='ghost'\n label={recordLabel}\n recording={recording}\n mode={recordMode}\n onToggle={handleToggle}\n onPressStart={handlePressStart}\n onPressEnd={handlePressEnd}\n data-testid='transcription.record'\n />\n <MicSettings\n translationNs={meta.profile.key}\n recordMode={recordMode}\n entityExtraction={entityExtraction}\n devices={devices}\n selectedDeviceId={selectedDeviceId}\n onRecordModeChange={handleRecordModeChange}\n onEntityExtractionChange={handleEntityExtractionChange}\n onSelectDevice={handleSelectDevice}\n />\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["React", "useCallback", "useEffect", "useRef", "useState", "useAtomCapabilityState", "MicButton", "useTranslation", "useSoundEffect", "MicSettings", "meta", "TranscriptionCapabilities", "Mic", "docId", "t", "profile", "key", "session", "setSession", "RecordingSession", "settings", "setSettings", "Settings", "recording", "id", "soundStart", "soundStop", "wasRecording", "current", "play", "recordMode", "entityExtraction", "selectedDeviceId", "audioDeviceId", "devices", "setDevices", "navigator", "mediaDevices", "enumerateDevices", "cancelled", "refresh", "all", "filter", "device", "kind", "deviceId", "map", "index", "label", "addEventListener", "removeEventListener", "handleToggle", "handlePressStart", "handlePressEnd", "handleRecordModeChange", "mode", "handleEntityExtractionChange", "value", "handleSelectDevice", "undefined", "recordLabel", "div", "className", "iconOnly", "variant", "onToggle", "onPressStart", "onPressEnd", "data-testid", "translationNs", "onRecordModeChange", "onEntityExtractionChange", "onSelectDevice"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const TranscriptionArticle: ComponentType<any> = lazy(() => import('./TranscriptionArticle'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,uBAA2CD,KAAK,MAAM,OAAO,sCAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "TranscriptionArticle"]
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TranscriptOperation_exports
|
|
3
|
-
} from "./chunk-MDV7NBFJ.mjs";
|
|
4
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/operations/create.ts
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import { Operation } from "@dxos/compute";
|
|
9
|
-
import { Feed, Ref } from "@dxos/echo";
|
|
10
|
-
import { Transcript } from "@dxos/types";
|
|
11
|
-
var handler = TranscriptOperation_exports.Create.pipe(Operation.withHandler(Effect.fn(function* ({ space }) {
|
|
12
|
-
const feed = space.db.add(Feed.make());
|
|
13
|
-
return {
|
|
14
|
-
object: Transcript.make(Ref.make(feed))
|
|
15
|
-
};
|
|
16
|
-
})));
|
|
17
|
-
var create_default = handler;
|
|
18
|
-
export {
|
|
19
|
-
create_default as default
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=create-HNHGCKZ4.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/create.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Feed, Ref } from '@dxos/echo';\nimport { Transcript } from '@dxos/types';\n\nimport { TranscriptOperation } from '../types';\n\nconst handler: Operation.WithHandler<typeof TranscriptOperation.Create> = TranscriptOperation.Create.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ space }) {\n const feed = space.db.add(Feed.make());\n return {\n object: Transcript.make(Ref.make(feed)),\n };\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,MAAMC,WAAW;AAC1B,SAASC,kBAAkB;AAI3B,IAAMC,UAAoEC,4BAAoBC,OAAOC,KACnGC,UAAUC,YACDC,UAAG,WAAW,EAAEC,MAAK,GAAE;AAC5B,QAAMC,OAAOD,MAAME,GAAGC,IAAIC,KAAKC,KAAI,CAAA;AACnC,SAAO;IACLC,QAAQC,WAAWF,KAAKG,IAAIH,KAAKJ,IAAAA,CAAAA;EACnC;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAeR;",
|
|
6
|
-
"names": ["Effect", "Operation", "Feed", "Ref", "Transcript", "handler", "TranscriptOperation", "Create", "pipe", "Operation", "withHandler", "fn", "space", "feed", "db", "add", "Feed", "make", "object", "Transcript", "Ref"]
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TranscriptOperation_exports
|
|
3
|
-
} from "./chunk-MDV7NBFJ.mjs";
|
|
4
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/operations/enrich-message.ts
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import { enrichTranscriptMessage } from "@dxos/assistant/extraction";
|
|
9
|
-
import { Operation } from "@dxos/compute";
|
|
10
|
-
import { Database } from "@dxos/echo";
|
|
11
|
-
var handler = TranscriptOperation_exports.EnrichMessage.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ message }) {
|
|
12
|
-
const { db } = yield* Database.Service;
|
|
13
|
-
const enriched = yield* enrichTranscriptMessage(message, {
|
|
14
|
-
db
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
message: enriched
|
|
18
|
-
};
|
|
19
|
-
})));
|
|
20
|
-
var enrich_message_default = handler;
|
|
21
|
-
export {
|
|
22
|
-
enrich_message_default as default
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=enrich-message-DSJU4TXC.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/enrich-message.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { enrichTranscriptMessage } from '@dxos/assistant/extraction';\nimport { Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nimport { TranscriptOperation } from '../types';\n\n/**\n * Extracts proper nouns from a transcript message and links them to objects in the space via\n * full-text search, rewriting the text with reference links.\n */\nconst handler: Operation.WithHandler<typeof TranscriptOperation.EnrichMessage> = TranscriptOperation.EnrichMessage.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ message }) {\n const { db } = yield* Database.Service;\n const enriched = yield* enrichTranscriptMessage(message, { db });\n return { message: enriched };\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,+BAA+B;AACxC,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAQzB,IAAMC,UAA2EC,4BAAoBC,cAAcC,KACjHC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,QAAO,GAAE;AACtC,QAAM,EAAEC,GAAE,IAAK,OAAOC,SAASC;AAC/B,QAAMC,WAAW,OAAOC,wBAAwBL,SAAS;IAAEC;EAAG,CAAA;AAC9D,SAAO;IAAED,SAASI;EAAS;AAC7B,CAAA,CAAA,CAAA;AAIJ,IAAA,yBAAeX;",
|
|
6
|
-
"names": ["Effect", "enrichTranscriptMessage", "Operation", "Database", "handler", "TranscriptOperation", "EnrichMessage", "pipe", "Operation", "withHandler", "fnUntraced", "message", "db", "Database", "Service", "enriched", "enrichTranscriptMessage"]
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/capabilities/entity-lookup.ts
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import { Capability } from "@dxos/app-framework";
|
|
6
|
-
import { AppSpace } from "@dxos/app-toolkit";
|
|
7
|
-
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
8
|
-
import { makeDatabaseLookup } from "@dxos/transcription-pipeline";
|
|
9
|
-
import { TranscriptionCapabilities } from "#types";
|
|
10
|
-
var entity_lookup_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
11
|
-
const capabilities = yield* Capability.Service;
|
|
12
|
-
const lookup = async (noun, context) => {
|
|
13
|
-
const client = capabilities.get(ClientCapabilities.Client);
|
|
14
|
-
const space = AppSpace.getPersonalSpace(client);
|
|
15
|
-
if (!space) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
return makeDatabaseLookup(space.db)(noun, context);
|
|
19
|
-
};
|
|
20
|
-
return Capability.contributes(TranscriptionCapabilities.EntityLookup, lookup);
|
|
21
|
-
}));
|
|
22
|
-
export {
|
|
23
|
-
entity_lookup_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=entity-lookup-PCDW7NC4.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/entity-lookup.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppSpace } from '@dxos/app-toolkit';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type EntityLookup, makeDatabaseLookup } from '@dxos/transcription-pipeline';\n\nimport { TranscriptionCapabilities } from '#types';\n\n/**\n * Contributes an {@link EntityLookup} backed by the personal space's full-text index. Resolved lazily\n * per call so it reflects the current space. Consumers (e.g. the live-transcription driver) depend on\n * this function rather than the database — swap the backend (vector, space-aware, remote) here.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n const lookup: EntityLookup = async (noun, context) => {\n const client = capabilities.get(ClientCapabilities.Client);\n const space = AppSpace.getPersonalSpace(client);\n if (!space) {\n return [];\n }\n return makeDatabaseLookup(space.db)(noun, context);\n };\n return Capability.contributes(TranscriptionCapabilities.EntityLookup, lookup);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,0BAA0B;AACnC,SAA4BC,0BAA0B;AAEtD,SAASC,iCAAiC;AAO1C,IAAA,wBAAeJ,WAAWK,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOP,WAAWQ;AACvC,QAAMC,SAAuB,OAAOC,MAAMC,YAAAA;AACxC,UAAMC,SAASL,aAAaM,IAAIX,mBAAmBY,MAAM;AACzD,UAAMC,QAAQd,SAASe,iBAAiBJ,MAAAA;AACxC,QAAI,CAACG,OAAO;AACV,aAAO,CAAA;IACT;AACA,WAAOZ,mBAAmBY,MAAME,EAAE,EAAEP,MAAMC,OAAAA;EAC5C;AACA,SAAOX,WAAWkB,YAAYd,0BAA0Be,cAAcV,MAAAA;AACxE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppSpace", "ClientCapabilities", "makeDatabaseLookup", "TranscriptionCapabilities", "makeModule", "fnUntraced", "capabilities", "Service", "lookup", "noun", "context", "client", "get", "Client", "space", "getPersonalSpace", "db", "contributes", "EntityLookup"]
|
|
7
|
-
}
|