@flowingspring/dsh-voco 0.3.12 → 0.3.13
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/README.en.md +2 -2
- package/README.md +2 -2
- package/{packages/voice-app/lib → lib}/client.js +46 -46
- package/{packages/voice-app/lib → lib}/index.js +1 -1
- package/{packages/voice-app/lib → lib}/invariant.js +1 -1
- package/{packages/voice-app/lib → lib}/plugins/llm-tool-call-compat.js +1 -1
- package/{packages/voice-app/lib → lib}/plugins/voice-assistant.js +20 -20
- package/{packages/voice-app/lib → lib}/plugins/voice-local.js +5 -5
- package/{packages/voice-app/lib → lib}/plugins/voice-web.js +3 -3
- package/{packages/voice-app/lib → lib}/plugins/voice.js +2 -2
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +4 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +7 -0
- package/lib/types/invariant.js.map +1 -0
- package/package.json +15 -20
- /package/{packages/voice-app/lib → lib}/client.js.map +0 -0
- /package/{packages/voice-app/lib → lib}/types/index.d.ts +0 -0
- /package/{packages/voice-app/lib → lib}/types/invariant.d.ts +0 -0
package/README.en.md
CHANGED
|
@@ -40,10 +40,10 @@ Open the local URL printed by DSH, click the microphone in a session, and allow
|
|
|
40
40
|
GitHub Releases provide the same prebuilt plugin package as npm. No source checkout or pnpm development environment is required:
|
|
41
41
|
|
|
42
42
|
```powershell
|
|
43
|
-
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.
|
|
43
|
+
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.13/flowingspring-dsh-voco-0.3.13.tgz
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Release page: [v0.3.
|
|
46
|
+
Release page: [v0.3.13](https://github.com/lgquan/dsh-voco/releases/tag/v0.3.13)
|
|
47
47
|
|
|
48
48
|
Whichever installation method you choose, start the Web UI through DSH:
|
|
49
49
|
|
package/README.md
CHANGED
|
@@ -40,10 +40,10 @@ dsh web
|
|
|
40
40
|
GitHub Release 提供和 npm 相同的预构建插件包,不需要 clone 源码或准备 pnpm 开发环境:
|
|
41
41
|
|
|
42
42
|
```powershell
|
|
43
|
-
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.
|
|
43
|
+
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.13/flowingspring-dsh-voco-0.3.13.tgz
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Release 页面:[v0.3.
|
|
46
|
+
Release 页面:[v0.3.13](https://github.com/lgquan/dsh-voco/releases/tag/v0.3.13)
|
|
47
47
|
|
|
48
48
|
无论选择哪种安装方式,最后都通过 DSH 启动 Web UI:
|
|
49
49
|
|
|
@@ -19,14 +19,14 @@ window.__ModuleLoader__.load({
|
|
|
19
19
|
document.head.appendChild(tag);
|
|
20
20
|
}
|
|
21
21
|
var VoiceControl_module_css_default = {
|
|
22
|
-
"
|
|
23
|
-
"interruptButton": "TFZsua_interruptButton",
|
|
24
|
-
"controls": "TFZsua_controls",
|
|
22
|
+
"voice-pulse": "TFZsua_voice-pulse",
|
|
25
23
|
"active": "TFZsua_active",
|
|
26
|
-
"
|
|
24
|
+
"interruptButton": "TFZsua_interruptButton",
|
|
25
|
+
"button": "TFZsua_button",
|
|
26
|
+
"controls": "TFZsua_controls"
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
|
-
//#region
|
|
29
|
+
//#region packages/ui-voice/src/client/VoiceControl.tsx
|
|
30
30
|
/** Start a fresh Voice Session from this Session's location or control the active connection. */
|
|
31
31
|
function VoiceControl({ sessionId, useVoice, startVoice, retryVoice, beginPushToTalk, endPushToTalk, setVoiceMuted, t, interruptResponse }) {
|
|
32
32
|
const state = useVoice((snapshot) => snapshot.state);
|
|
@@ -191,7 +191,7 @@ window.__ModuleLoader__.load({
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
|
-
//#region
|
|
194
|
+
//#region packages/ui-voice/src/client/session-archive.ts
|
|
195
195
|
/**
|
|
196
196
|
* Returns whether a session is archived itself or inherits archive state from
|
|
197
197
|
* any known ancestor. The optional fallback resolves a parent when the
|
|
@@ -222,26 +222,26 @@ window.__ModuleLoader__.load({
|
|
|
222
222
|
document.head.appendChild(tag);
|
|
223
223
|
}
|
|
224
224
|
var VoiceNodeViews_module_css_default = {
|
|
225
|
-
"
|
|
225
|
+
"miniWave": "Kt2smW_miniWave",
|
|
226
|
+
"voiceBadge": "Kt2smW_voiceBadge",
|
|
227
|
+
"taskSummary": "Kt2smW_taskSummary",
|
|
226
228
|
"taskStatus": "Kt2smW_taskStatus",
|
|
227
|
-
"taskUpdate": "Kt2smW_taskUpdate",
|
|
228
229
|
"taskDot": "Kt2smW_taskDot",
|
|
229
|
-
"taskSummary": "Kt2smW_taskSummary",
|
|
230
230
|
"taskCancel": "Kt2smW_taskCancel",
|
|
231
|
-
"taskActions": "Kt2smW_taskActions",
|
|
232
|
-
"voiceBadge": "Kt2smW_voiceBadge",
|
|
233
|
-
"taskInput": "Kt2smW_taskInput",
|
|
234
231
|
"bubble": "Kt2smW_bubble",
|
|
235
|
-
"taskLink": "Kt2smW_taskLink",
|
|
236
232
|
"taskDetails": "Kt2smW_taskDetails",
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
233
|
+
"taskLink": "Kt2smW_taskLink",
|
|
234
|
+
"taskUpdate": "Kt2smW_taskUpdate",
|
|
235
|
+
"taskActions": "Kt2smW_taskActions",
|
|
236
|
+
"taskChevron": "Kt2smW_taskChevron",
|
|
237
|
+
"taskInput": "Kt2smW_taskInput",
|
|
238
|
+
"taskTitle": "Kt2smW_taskTitle",
|
|
240
239
|
"utterance": "Kt2smW_utterance",
|
|
241
|
-
"
|
|
240
|
+
"meta": "Kt2smW_meta",
|
|
241
|
+
"taskCard": "Kt2smW_taskCard"
|
|
242
242
|
};
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region
|
|
244
|
+
//#region packages/ui-voice/src/client/VoiceNodeViews.tsx
|
|
245
245
|
/** Render a durable Voice utterance while replacing its unsettled text with live WebSocket deltas. */
|
|
246
246
|
function VoiceUtteranceView({ node, sessionId, useVoice, t }) {
|
|
247
247
|
const liveText = useVoice((snapshot) => snapshot.sessionId === sessionId ? snapshot.textById[String(node.data.utteranceId)]?.text : void 0);
|
|
@@ -377,13 +377,13 @@ window.__ModuleLoader__.load({
|
|
|
377
377
|
}
|
|
378
378
|
var VoiceOverlay_module_css_default = {
|
|
379
379
|
"root": "GPPB2G_root",
|
|
380
|
-
"voice-wave": "GPPB2G_voice-wave",
|
|
381
380
|
"wave": "GPPB2G_wave",
|
|
381
|
+
"voice-wave": "GPPB2G_voice-wave",
|
|
382
382
|
"stop": "GPPB2G_stop",
|
|
383
383
|
"status": "GPPB2G_status"
|
|
384
384
|
};
|
|
385
385
|
//#endregion
|
|
386
|
-
//#region
|
|
386
|
+
//#region packages/ui-voice/src/client/VoiceOverlay.tsx
|
|
387
387
|
const STATE_KEYS = {
|
|
388
388
|
connecting: "overlay.connecting",
|
|
389
389
|
listening: "overlay.listening",
|
|
@@ -443,7 +443,7 @@ window.__ModuleLoader__.load({
|
|
|
443
443
|
"marker": "_0brRca_marker"
|
|
444
444
|
};
|
|
445
445
|
//#endregion
|
|
446
|
-
//#region
|
|
446
|
+
//#region packages/ui-voice/src/client/VoiceSessionMarkers.tsx
|
|
447
447
|
/**
|
|
448
448
|
* The workspace package owns the session-row renderer and filters addressed
|
|
449
449
|
* subagent children from its top-level list. This decorator only adds the
|
|
@@ -550,33 +550,33 @@ window.__ModuleLoader__.load({
|
|
|
550
550
|
document.head.appendChild(tag);
|
|
551
551
|
}
|
|
552
552
|
var VocoSettingsCard_module_css_default = {
|
|
553
|
-
"
|
|
553
|
+
"cardOpen": "G5LlXq_cardOpen",
|
|
554
|
+
"fieldHead": "G5LlXq_fieldHead",
|
|
554
555
|
"providerDetail": "G5LlXq_providerDetail",
|
|
555
|
-
"badgeMuted": "G5LlXq_badgeMuted",
|
|
556
|
-
"failed": "G5LlXq_failed",
|
|
557
|
-
"providerDetails": "G5LlXq_providerDetails",
|
|
558
|
-
"chevron": "G5LlXq_chevron",
|
|
559
556
|
"card": "G5LlXq_card",
|
|
560
|
-
"
|
|
561
|
-
"
|
|
557
|
+
"failed": "G5LlXq_failed",
|
|
558
|
+
"headText": "G5LlXq_headText",
|
|
559
|
+
"chevronOpen": "G5LlXq_chevronOpen",
|
|
560
|
+
"badge": "G5LlXq_badge",
|
|
562
561
|
"save": "G5LlXq_save",
|
|
563
|
-
"
|
|
562
|
+
"pending": "G5LlXq_pending",
|
|
563
|
+
"badgeMuted": "G5LlXq_badgeMuted",
|
|
564
|
+
"providerDetails": "G5LlXq_providerDetails",
|
|
565
|
+
"discard": "G5LlXq_discard",
|
|
566
|
+
"header": "G5LlXq_header",
|
|
564
567
|
"body": "G5LlXq_body",
|
|
565
568
|
"readOnly": "G5LlXq_readOnly",
|
|
566
|
-
"hint": "G5LlXq_hint",
|
|
567
|
-
"description": "G5LlXq_description",
|
|
568
|
-
"footer": "G5LlXq_footer",
|
|
569
|
-
"header": "G5LlXq_header",
|
|
570
|
-
"chevronOpen": "G5LlXq_chevronOpen",
|
|
571
569
|
"input": "G5LlXq_input",
|
|
572
|
-
"
|
|
573
|
-
"fieldHead": "G5LlXq_fieldHead",
|
|
570
|
+
"hint": "G5LlXq_hint",
|
|
574
571
|
"name": "G5LlXq_name",
|
|
575
|
-
"
|
|
576
|
-
"field": "G5LlXq_field"
|
|
572
|
+
"footer": "G5LlXq_footer",
|
|
573
|
+
"field": "G5LlXq_field",
|
|
574
|
+
"chevron": "G5LlXq_chevron",
|
|
575
|
+
"description": "G5LlXq_description",
|
|
576
|
+
"label": "G5LlXq_label"
|
|
577
577
|
};
|
|
578
578
|
//#endregion
|
|
579
|
-
//#region
|
|
579
|
+
//#region packages/ui-voice/src/client/VocoSettingsCard.tsx
|
|
580
580
|
/** Official plugin-settings slot contribution for the Voco credential. */
|
|
581
581
|
function VocoSettingsCard({ useVocoSettings, editApiKey, save, discard, t }) {
|
|
582
582
|
const [open, setOpen] = (0, react.useState)(false);
|
|
@@ -690,7 +690,7 @@ window.__ModuleLoader__.load({
|
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
692
|
//#endregion
|
|
693
|
-
//#region
|
|
693
|
+
//#region packages/ui-voice/src/client/voice-controller.ts
|
|
694
694
|
const INITIAL_SNAPSHOT = {
|
|
695
695
|
state: "off",
|
|
696
696
|
inputMuted: false,
|
|
@@ -1506,7 +1506,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1506
1506
|
node.start(start);
|
|
1507
1507
|
}
|
|
1508
1508
|
//#endregion
|
|
1509
|
-
//#region
|
|
1509
|
+
//#region packages/ui-voice/src/client/voice-history.ts
|
|
1510
1510
|
const STORAGE_KEY = "dsh.voice.history.v1";
|
|
1511
1511
|
function parseEntry(input) {
|
|
1512
1512
|
if (typeof input !== "object" || input === null) return void 0;
|
|
@@ -1637,7 +1637,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1637
1637
|
}
|
|
1638
1638
|
};
|
|
1639
1639
|
//#endregion
|
|
1640
|
-
//#region
|
|
1640
|
+
//#region packages/ui-voice/src/client/voice-text-submit.ts
|
|
1641
1641
|
/** Routes the native composer through Voice while preserving its ordinary offline submission. */
|
|
1642
1642
|
var VoiceTextSubmitBridge = class {
|
|
1643
1643
|
voice;
|
|
@@ -1683,7 +1683,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
1685
1685
|
//#endregion
|
|
1686
|
-
//#region
|
|
1686
|
+
//#region packages/ui-voice/src/client/voice-definitions.ts
|
|
1687
1687
|
/** Fold one streamed utterance into a stable Chat node. */
|
|
1688
1688
|
const voiceUtteranceDefinition = {
|
|
1689
1689
|
kind: "voice-utterance",
|
|
@@ -1781,7 +1781,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1781
1781
|
}
|
|
1782
1782
|
};
|
|
1783
1783
|
//#endregion
|
|
1784
|
-
//#region
|
|
1784
|
+
//#region packages/ui-voice/src/client/locales.ts
|
|
1785
1785
|
/** `voice` namespace dictionaries. */
|
|
1786
1786
|
/** Dictionary namespace owned by this plugin. */
|
|
1787
1787
|
const NS = "voice";
|
|
@@ -1886,7 +1886,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1886
1886
|
"settings.saveFailed": "The key could not be saved and was kept for you to retry."
|
|
1887
1887
|
};
|
|
1888
1888
|
//#endregion
|
|
1889
|
-
//#region
|
|
1889
|
+
//#region packages/ui-voice/src/client/voco-settings-controller.ts
|
|
1890
1890
|
const VOCO_SETTINGS_NAMESPACE = "voice-local";
|
|
1891
1891
|
const SILICONFLOW_API_KEY_REF = "SILICONFLOW_API_KEY";
|
|
1892
1892
|
/** Bridges the voice-local namespace and the write-only DSH credentials API. */
|
|
@@ -1988,7 +1988,7 @@ registerProcessor('dsh-pcm-capture', DshPcmCaptureProcessor)
|
|
|
1988
1988
|
}
|
|
1989
1989
|
};
|
|
1990
1990
|
//#endregion
|
|
1991
|
-
//#region
|
|
1991
|
+
//#region packages/ui-voice/src/client/index.ts
|
|
1992
1992
|
const inject = [
|
|
1993
1993
|
"conversation",
|
|
1994
1994
|
"conversationEvents",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region packages/llm-tool-call-compat/src/index.ts
|
|
2
2
|
/** Restore metadata omitted as empty strings by some OpenAI-compatible gateways. */
|
|
3
3
|
function normalizeToolCallSseEvent(event, states) {
|
|
4
4
|
if (!event.startsWith("data: ")) return event;
|
|
@@ -10,7 +10,7 @@ import { ReasoningEffortId, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
|
10
10
|
import { resolveSessionPreset } from "@deepseek-ai/dsh-agent-presets";
|
|
11
11
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
12
12
|
import { KNOWN_SESSION_EVENT_TYPES, SessionId, foldRequestHeader, snapshotJsonValue } from "@deepseek-ai/dsh-session";
|
|
13
|
-
//#region
|
|
13
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
14
14
|
var _a$1;
|
|
15
15
|
function $constructor(name, initializer, params) {
|
|
16
16
|
function init(inst, def) {
|
|
@@ -69,7 +69,7 @@ function config(newConfig) {
|
|
|
69
69
|
return globalConfig;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region
|
|
72
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
73
73
|
function getEnumValues(entries) {
|
|
74
74
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
75
75
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -383,7 +383,7 @@ function issue(...args) {
|
|
|
383
383
|
return { ...iss };
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
|
-
//#region
|
|
386
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
387
387
|
const initializer$1 = (inst, def) => {
|
|
388
388
|
inst.name = "$ZodError";
|
|
389
389
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -443,7 +443,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
443
443
|
return fieldErrors;
|
|
444
444
|
}
|
|
445
445
|
//#endregion
|
|
446
|
-
//#region
|
|
446
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
447
447
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
448
448
|
const ctx = _ctx ? {
|
|
449
449
|
..._ctx,
|
|
@@ -557,7 +557,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
557
557
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
558
558
|
};
|
|
559
559
|
//#endregion
|
|
560
|
-
//#region
|
|
560
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
561
561
|
/**
|
|
562
562
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
563
563
|
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
@@ -621,7 +621,7 @@ const boolean$1 = /^(?:true|false)$/i;
|
|
|
621
621
|
const lowercase = /^[^A-Z]*$/;
|
|
622
622
|
const uppercase = /^[^a-z]*$/;
|
|
623
623
|
//#endregion
|
|
624
|
-
//#region
|
|
624
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
625
625
|
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
626
626
|
var _a;
|
|
627
627
|
inst._zod ?? (inst._zod = {});
|
|
@@ -983,7 +983,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
|
|
|
983
983
|
};
|
|
984
984
|
});
|
|
985
985
|
//#endregion
|
|
986
|
-
//#region
|
|
986
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
987
987
|
var Doc = class {
|
|
988
988
|
constructor(args = []) {
|
|
989
989
|
this.content = [];
|
|
@@ -1014,14 +1014,14 @@ var Doc = class {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
1016
|
//#endregion
|
|
1017
|
-
//#region
|
|
1017
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
1018
1018
|
const version = {
|
|
1019
1019
|
major: 4,
|
|
1020
1020
|
minor: 4,
|
|
1021
1021
|
patch: 3
|
|
1022
1022
|
};
|
|
1023
1023
|
//#endregion
|
|
1024
|
-
//#region
|
|
1024
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
1025
1025
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1026
1026
|
var _a;
|
|
1027
1027
|
inst ?? (inst = {});
|
|
@@ -2198,7 +2198,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
}
|
|
2200
2200
|
//#endregion
|
|
2201
|
-
//#region
|
|
2201
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
2202
2202
|
var _a;
|
|
2203
2203
|
var $ZodRegistry = class {
|
|
2204
2204
|
constructor() {
|
|
@@ -2245,7 +2245,7 @@ function registry() {
|
|
|
2245
2245
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
2246
2246
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
2247
2247
|
//#endregion
|
|
2248
|
-
//#region
|
|
2248
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
2249
2249
|
// @__NO_SIDE_EFFECTS__
|
|
2250
2250
|
function _string(Class, params) {
|
|
2251
2251
|
return new Class({
|
|
@@ -2750,7 +2750,7 @@ function _check(fn, params) {
|
|
|
2750
2750
|
return ch;
|
|
2751
2751
|
}
|
|
2752
2752
|
//#endregion
|
|
2753
|
-
//#region
|
|
2753
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
2754
2754
|
function initializeContext(params) {
|
|
2755
2755
|
let target = params?.target ?? "draft-2020-12";
|
|
2756
2756
|
if (target === "draft-4") target = "draft-04";
|
|
@@ -3045,7 +3045,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
3045
3045
|
return finalize(ctx, schema);
|
|
3046
3046
|
};
|
|
3047
3047
|
//#endregion
|
|
3048
|
-
//#region
|
|
3048
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
3049
3049
|
const formatMap = {
|
|
3050
3050
|
guid: "uuid",
|
|
3051
3051
|
url: "uri",
|
|
@@ -3277,7 +3277,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
3277
3277
|
seen.ref = def.innerType;
|
|
3278
3278
|
};
|
|
3279
3279
|
//#endregion
|
|
3280
|
-
//#region
|
|
3280
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
3281
3281
|
const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
3282
3282
|
$ZodISODateTime.init(inst, def);
|
|
3283
3283
|
ZodStringFormat.init(inst, def);
|
|
@@ -3307,7 +3307,7 @@ function duration(params) {
|
|
|
3307
3307
|
return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
|
|
3308
3308
|
}
|
|
3309
3309
|
//#endregion
|
|
3310
|
-
//#region
|
|
3310
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
3311
3311
|
const initializer = (inst, issues) => {
|
|
3312
3312
|
$ZodError.init(inst, issues);
|
|
3313
3313
|
inst.name = "ZodError";
|
|
@@ -3329,7 +3329,7 @@ const initializer = (inst, issues) => {
|
|
|
3329
3329
|
};
|
|
3330
3330
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error });
|
|
3331
3331
|
//#endregion
|
|
3332
|
-
//#region
|
|
3332
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
3333
3333
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
3334
3334
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
3335
3335
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -3343,7 +3343,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
3343
3343
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
3344
3344
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
3345
3345
|
//#endregion
|
|
3346
|
-
//#region
|
|
3346
|
+
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
3347
3347
|
const _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
3348
3348
|
function _installLazyMethods(inst, group, methods) {
|
|
3349
3349
|
const proto = Object.getPrototypeOf(inst);
|
|
@@ -4129,7 +4129,7 @@ function superRefine(fn, params) {
|
|
|
4129
4129
|
return /* @__PURE__ */ _superRefine(fn, params);
|
|
4130
4130
|
}
|
|
4131
4131
|
//#endregion
|
|
4132
|
-
//#region
|
|
4132
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-subagent@0_333a83db5ad7aba5051480205ed90428/node_modules/@deepseek-ai/dsh-subagent/lib/index.js
|
|
4133
4133
|
const DESCRIPTOR_BASE_KEYS = [
|
|
4134
4134
|
"version",
|
|
4135
4135
|
"mode",
|
|
@@ -4298,7 +4298,7 @@ Object.freeze({
|
|
|
4298
4298
|
persona: false
|
|
4299
4299
|
});
|
|
4300
4300
|
//#endregion
|
|
4301
|
-
//#region
|
|
4301
|
+
//#region packages/voice-assistant/src/tool.ts
|
|
4302
4302
|
const VOICE_MESSAGE_SECTION_ORDER = 118;
|
|
4303
4303
|
/**
|
|
4304
4304
|
* Install `send_voice_message` and its guidance into one delegated task Agent scope.
|
|
@@ -4401,7 +4401,7 @@ function installVoiceMessageTool(agentCtx, send, resolveDelegationId) {
|
|
|
4401
4401
|
};
|
|
4402
4402
|
}
|
|
4403
4403
|
//#endregion
|
|
4404
|
-
//#region
|
|
4404
|
+
//#region packages/voice-assistant/src/index.ts
|
|
4405
4405
|
/** Voice-to-Agent driver using ordinary followup, steer and cancel operations. @module @flowingspring/dsh-voice-assistant */
|
|
4406
4406
|
const name = "voice-assistant";
|
|
4407
4407
|
const inject = [
|
|
@@ -10,7 +10,7 @@ import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-sett
|
|
|
10
10
|
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
11
11
|
import { tmpdir } from "node:os";
|
|
12
12
|
import { EdgeTTS } from "node-edge-tts";
|
|
13
|
-
//#region
|
|
13
|
+
//#region packages/voice-local/src/edge-tts.ts
|
|
14
14
|
const EDGE_TTS_VOICE = "zh-CN-XiaoxiaoNeural";
|
|
15
15
|
const DEFAULT_EDGE_TTS_RATE = "+20%";
|
|
16
16
|
/** Edge TTS adapter. Returns the service's MP3 bytes for browser decoding. */
|
|
@@ -47,7 +47,7 @@ function splitSpeechText(text) {
|
|
|
47
47
|
return (normalized.match(/[^。!?!?;;::\n]+[。!?!?;;::]?|[^。!?!?;;::\n]+$/g) ?? [normalized]).map((part) => part.trim()).filter(Boolean);
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region
|
|
50
|
+
//#region packages/voice-local/src/session.ts
|
|
51
51
|
/** Provider session translating local speech events to the shared voice seam. */
|
|
52
52
|
var LocalSession = class {
|
|
53
53
|
backend;
|
|
@@ -246,7 +246,7 @@ function isTerminalTaskStatus(status) {
|
|
|
246
246
|
return status === "completed" || status === "failed" || status === "cancelled" || status === "interrupted";
|
|
247
247
|
}
|
|
248
248
|
//#endregion
|
|
249
|
-
//#region
|
|
249
|
+
//#region packages/voice-local/src/siliconflow-asr.ts
|
|
250
250
|
const WAV_HEADER_BYTES = 44;
|
|
251
251
|
/** Upload one completed PCM utterance to SiliconFlow and return its final transcript. */
|
|
252
252
|
var SiliconFlowAsr = class {
|
|
@@ -306,7 +306,7 @@ function isRecord(value) {
|
|
|
306
306
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
307
307
|
}
|
|
308
308
|
//#endregion
|
|
309
|
-
//#region
|
|
309
|
+
//#region packages/voice-local/src/node-backend.ts
|
|
310
310
|
const INPUT_SAMPLE_RATE = 16e3;
|
|
311
311
|
/** Lightweight PCM silence detector plus SiliconFlow cloud ASR and Edge TTS. */
|
|
312
312
|
var NodeSpeechBackend = class {
|
|
@@ -557,7 +557,7 @@ function errorMessage(error) {
|
|
|
557
557
|
return error instanceof Error ? error.message : String(error);
|
|
558
558
|
}
|
|
559
559
|
//#endregion
|
|
560
|
-
//#region
|
|
560
|
+
//#region packages/voice-local/src/index.ts
|
|
561
561
|
/** Silence-gated SiliconFlow cloud ASR with Edge TTS. */
|
|
562
562
|
const name = "voice-local";
|
|
563
563
|
const inject = ["voice"];
|
|
@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
4
|
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
5
5
|
import WebSocket, { WebSocketServer } from "ws";
|
|
6
|
-
//#region
|
|
6
|
+
//#region packages/voice-web/src/loopback-hostname.ts
|
|
7
7
|
/**
|
|
8
8
|
* Browser-safe, zero-dependency loopback classification shared by the `/api`
|
|
9
9
|
* Host fence and the package's `ctx.connection` state. The predicate stays
|
|
@@ -20,7 +20,7 @@ function isLoopbackHostname(hostname) {
|
|
|
20
20
|
return parts.length === 4 && parts[0] === "127" && parts.every((part) => /^\d{1,3}$/.test(part) && Number(part) <= 255);
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region
|
|
23
|
+
//#region packages/voice-web/src/api-request-trust.ts
|
|
24
24
|
function header(headers, name) {
|
|
25
25
|
if (headers instanceof Headers) return headers.get(name) ?? void 0;
|
|
26
26
|
const value = headers[name];
|
|
@@ -100,7 +100,7 @@ function isTrustedApiRequest(request, trustedHosts) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
|
-
//#region
|
|
103
|
+
//#region packages/voice-web/src/index.ts
|
|
104
104
|
/** Dedicated browser WebSocket carrier for realtime voice audio and events. @module @flowingspring/dsh-voice-web */
|
|
105
105
|
const name = "voice-web";
|
|
106
106
|
const inject = ["voice", "webServer"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { Service } from "@deepseek-ai/cordis";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
|
-
//#region
|
|
4
|
+
//#region packages/voice/src/types.ts
|
|
5
5
|
/**
|
|
6
6
|
* Brand a raw id as a voice-session identity.
|
|
7
7
|
* @param value - raw identity.
|
|
@@ -51,7 +51,7 @@ function VoiceTaskMessageId(value) {
|
|
|
51
51
|
return value;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region
|
|
54
|
+
//#region packages/voice/src/index.ts
|
|
55
55
|
/** Provider-neutral realtime voice session capability seam. @module @flowingspring/dsh-voice */
|
|
56
56
|
/** Provider registry and connected-session coordinator. */
|
|
57
57
|
var VoiceRuntime = class extends Service {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,mEAAmE;AACnE,wBAAgB,KAAK,IAAI,IAAI,CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,mEAAmE;AACnE,MAAM,UAAU,KAAK,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariant.d.ts","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,eAAO,MAAM,IAAI,mBAAmB,CAAA;AACpC,eAAO,MAAM,MAAM,UAAiB,CAAA;AAGpC,qFAAqF;AACrF,eAAO,MAAM,KAAK,GAAI,KAAK,OAAO,KAAG,OAAO,CAAC,MAAM,IAAI,CAAiF,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const name = 'voco-invariant';
|
|
2
|
+
export const inject = ['invariants'];
|
|
3
|
+
/** No runtime invariant: this package is a static patch-list carrier. */
|
|
4
|
+
const install = () => { };
|
|
5
|
+
/** Register invariant ownership. @param ctx - runtime context. @returns disposer. */
|
|
6
|
+
export const apply = (ctx) => Promise.resolve(ctx.invariants.register('@flowingspring/dsh-voco', install));
|
|
7
|
+
//# sourceMappingURL=invariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariant.js","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAA;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,YAAY,CAAC,CAAA;AACpC,yEAAyE;AACzE,MAAM,OAAO,GAAuB,GAAG,EAAE,GAAE,CAAC,CAAA;AAC5C,qFAAqF;AACrF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAY,EAAuB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowingspring/dsh-voco",
|
|
3
3
|
"description": "Persistent voice conversations for DSH with cloud speech recognition, Edge TTS, and background Agent delegation",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.13",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
7
7
|
"dsh",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
"url": "git+https://github.com/lgquan/dsh-voco.git"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
|
-
"main": "
|
|
27
|
-
"types": "
|
|
26
|
+
"main": "lib/index.js",
|
|
27
|
+
"types": "lib/types/index.d.ts",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./
|
|
31
|
-
"default": "./
|
|
30
|
+
"types": "./lib/types/index.d.ts",
|
|
31
|
+
"default": "./lib/index.js"
|
|
32
32
|
},
|
|
33
33
|
"./client": {
|
|
34
|
-
"default": "./
|
|
34
|
+
"default": "./lib/client.js"
|
|
35
35
|
},
|
|
36
36
|
"./invariant": {
|
|
37
|
-
"types": "./
|
|
38
|
-
"default": "./
|
|
37
|
+
"types": "./lib/types/invariant.d.ts",
|
|
38
|
+
"default": "./lib/invariant.js"
|
|
39
39
|
},
|
|
40
|
-
"./llm-tool-call-compat": "./
|
|
41
|
-
"./voice": "./
|
|
42
|
-
"./voice-local": "./
|
|
43
|
-
"./voice-assistant": "./
|
|
44
|
-
"./voice-web": "./
|
|
40
|
+
"./llm-tool-call-compat": "./lib/plugins/llm-tool-call-compat.js",
|
|
41
|
+
"./voice": "./lib/plugins/voice.js",
|
|
42
|
+
"./voice-local": "./lib/plugins/voice-local.js",
|
|
43
|
+
"./voice-assistant": "./lib/plugins/voice-assistant.js",
|
|
44
|
+
"./voice-web": "./lib/plugins/voice-web.js",
|
|
45
45
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
@@ -50,19 +50,14 @@
|
|
|
50
50
|
"node": "^22.19.0 || >=24.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build": "tsc -b &&
|
|
53
|
+
"build": "tsc -b && node scripts/copy-types.mjs && tsdown",
|
|
54
54
|
"prepare": "pnpm run build",
|
|
55
55
|
"test": "vitest run",
|
|
56
56
|
"typecheck": "tsc -b"
|
|
57
57
|
},
|
|
58
58
|
"files": [
|
|
59
59
|
"cordis.patch.yml",
|
|
60
|
-
"
|
|
61
|
-
"packages/voice-app/lib/invariant.js",
|
|
62
|
-
"packages/voice-app/lib/client.js",
|
|
63
|
-
"packages/voice-app/lib/client.js.map",
|
|
64
|
-
"packages/voice-app/lib/plugins/*.js",
|
|
65
|
-
"packages/voice-app/lib/types/**/*.d.ts"
|
|
60
|
+
"lib"
|
|
66
61
|
],
|
|
67
62
|
"dependencies": {
|
|
68
63
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|