dsh-voice 0.3.0 → 0.3.2

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  [中文](README.md)
2
2
 
3
+ ![npm](https://img.shields.io/npm/v/dsh-voice) ![downloads](https://img.shields.io/npm/dm/dsh-voice) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-voice) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-voice?style=social)
4
+
3
5
  # dsh-voice
4
6
 
5
7
  [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
@@ -12,7 +14,7 @@ DSH (DeepSeek Harness) voice plugin pair: let the agent **speak and listen**.
12
14
 
13
15
  ## Compatibility
14
16
 
15
- Verified against `@deepseek-ai/dsh@0.1.1-rc.2` on 2026-08-26. Built for the cordis patch-bundle plugin model (`cordis.patch.yml` + `dsh.bundle.patch`). No runtime imports of `@deepseek-ai/*` internals.
17
+ Verified against `@deepseek-ai/dsh@0.1.2-alpha.2` on 2026-08-31. Built for the cordis patch-bundle plugin model (`cordis.patch.yml` + `dsh.bundle.patch`). No runtime imports of `@deepseek-ai/*` internals.
16
18
 
17
19
  ## Installation
18
20
 
@@ -72,9 +74,10 @@ voice_list {}
72
74
 
73
75
  ```bash
74
76
  pnpm install
75
- pnpm test # build + 31 tests, including a real-synthesis integration test
77
+ pnpm test # build + offline unit tests with mocked TTS/ASR
78
+ pnpm test:integration # opt-in real edge-tts request; network and assertion errors fail
76
79
  ```
77
80
 
78
81
  ## License
79
82
 
80
- MIT
83
+ MIT
package/README.md CHANGED
@@ -17,7 +17,7 @@ DSH(DeepSeek Harness)语音双件套插件:让 agent **会说话、能听
17
17
 
18
18
  ## 兼容性
19
19
 
20
- 在 `@deepseek-ai/dsh@0.1.1-rc.2` 上验证(2026-08-26)。遵循 cordis 组合包补丁模型(`cordis.patch.yml` + `dsh.bundle.patch`),运行时不 import 任何 `@deepseek-ai/*` 内部模块。
20
+ 在 `@deepseek-ai/dsh@0.1.2-alpha.2` 上验证(2026-08-31)。遵循 cordis 组合包补丁模型(`cordis.patch.yml` + `dsh.bundle.patch`),运行时不 import 任何 `@deepseek-ai/*` 内部模块。
21
21
 
22
22
  ## 安装
23
23
 
@@ -77,9 +77,10 @@ voice_list {}
77
77
 
78
78
  ```bash
79
79
  pnpm install
80
- pnpm test # 构建 + 31 个测试(含真实合成集成测试)
80
+ pnpm test # 构建 + 离线单元测试(使用模拟的 TTS/ASR)
81
+ pnpm test:integration # 显式联网,调用真实 edge-tts;网络或断言失败均报错
81
82
  ```
82
83
 
83
84
  ## License
84
85
 
85
- MIT
86
+ MIT
package/lib/tools.js CHANGED
@@ -194,14 +194,16 @@ export function buildVoiceTools(config, deps = {}) {
194
194
  language: optionalString(args, 'language'),
195
195
  prompt: optionalString(args, 'prompt'),
196
196
  }, fetchImpl ?? globalThis.fetch, timeout);
197
- let transcriptFile = null;
197
+ let transcriptFile = '';
198
198
  const output = optionalString(args, 'output');
199
199
  if (output !== undefined) {
200
200
  const target = resolveOutputPath(output, '', cfg.overwrite);
201
201
  writeFileSync(target, text, 'utf8');
202
202
  transcriptFile = target;
203
203
  }
204
- return { text, model, language: optionalString(args, 'language') ?? null, audio: audioPath, transcriptFile };
204
+ // The output schema declares these as strings never return null, or
205
+ // dsh rejects the whole tool result (issue #1).
206
+ return { text, model, language: optionalString(args, 'language') ?? '', audio: audioPath, transcriptFile };
205
207
  },
206
208
  timeoutMs: timeout + 10000,
207
209
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-voice",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "DSH 语音双件套插件:voice_tts(edge-tts 协议零成本微软神经语音合成)/ voice_stt(OpenAI 兼容 ASR 语音转文字)/ voice_list(音色列表),原生 WebSocket + 插件级代理。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -22,7 +22,8 @@
22
22
  "scripts": {
23
23
  "build": "tsc -p tsconfig.json",
24
24
  "typecheck": "tsc -p tsconfig.json --noEmit",
25
- "test": "pnpm run build && node --test \"test/*.test.mjs\"",
25
+ "test": "pnpm run build && node --test \"test/*.test.mjs\"",
26
+ "test:integration": "pnpm run build && node --test \"integration/*.test.mjs\"",
26
27
  "prepublishOnly": "pnpm run build"
27
28
  },
28
29
  "dsh": {
@@ -42,7 +43,7 @@
42
43
  ],
43
44
  "license": "MIT",
44
45
  "engines": {
45
- "node": ">=22"
46
+ "node": ">=22.19.0"
46
47
  },
47
48
  "dependencies": {
48
49
  "https-proxy-agent": "^9.1.0",