dsh-dafeiyu-emotion 0.2.4 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.5
4
+
5
+ - Exported the Schemastery `Config` schema so DSH can persist setting changes from the panel.
6
+ - Marked every config field volatile, matching the DSH settings service contract.
7
+ - 0.2.4 shipped the settings UI; on hosts that require a registered volatile schema, saving failed. Install 0.2.5 for the full read/write path.
8
+
3
9
  ## 0.2.4
4
10
 
5
11
  - Added a full settings card for DSH's plugin settings, with live status for lightweight and enhanced modes.
package/README.md CHANGED
@@ -111,9 +111,9 @@ dsh plugin --profile desktop add github:LiDu-china/dsh-dafeiyu-emotion
111
111
  ### 通过 Release tarball
112
112
 
113
113
  ```bash
114
- curl -L -o dsh-dafeiyu-emotion-0.2.4.tgz \
115
- https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/download/v0.2.4/dsh-dafeiyu-emotion-0.2.4.tgz
116
- dsh plugin --profile desktop add "D:/path/to/dsh-dafeiyu-emotion-0.2.4.tgz"
114
+ curl -L -o dsh-dafeiyu-emotion-0.2.5.tgz \
115
+ https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/download/v0.2.5/dsh-dafeiyu-emotion-0.2.5.tgz
116
+ dsh plugin --profile desktop add "D:/path/to/dsh-dafeiyu-emotion-0.2.5.tgz"
117
117
  ```
118
118
 
119
119
  > DSH Desktop 的 profile 由 Electron 应用管理;命令行安装请使用桌面应用自带的 `dsh` 命令。
@@ -72,7 +72,7 @@ https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/download/v0.2.3/dsh-d
72
72
  dsh plugin --profile desktop add dsh-dafeiyu-emotion
73
73
  ```
74
74
 
75
- Published as `dsh-dafeiyu-emotion@0.2.4` on npm. The 1024Store entry refreshes its one-click install automatically. GitHub-source and Release-tarball installs remain available as fallbacks.
75
+ Published as `dsh-dafeiyu-emotion@0.2.5` on npm. The 1024Store entry refreshes its one-click install automatically. GitHub-source and Release-tarball installs remain available as fallbacks.
76
76
 
77
77
  ## Privacy
78
78
 
@@ -0,0 +1,14 @@
1
+ ## 设置页与侧边栏
2
+
3
+ - 新增 DSH 插件设置卡片:启用/停用、识别语言、VoiceSense 目录、Python 路径、录音上限、启动/分析超时。
4
+ - 安装 Better Sidebar 后,可在右侧边栏 `+` 菜单固定「情绪耳朵」,在对话旁边直接调整。
5
+ - 顶部实时显示轻量模式、增强模式、模型加载中、后端目录缺失或等待 Voice Input。
6
+ - 保存后立即写入 DSH 设置;路径或超时变化时自动重启语音 worker。
7
+
8
+ ## 安装
9
+
10
+ ```bash
11
+ dsh plugin --profile desktop add dsh-dafeiyu-emotion
12
+ ```
13
+
14
+ 完整变更见 [CHANGELOG](https://github.com/LiDu-china/dsh-dafeiyu-emotion/blob/main/CHANGELOG.md)。
@@ -0,0 +1,19 @@
1
+ ## 设置页与侧边栏
2
+
3
+ - 新增 DSH 插件设置卡片:启用/停用、识别语言、VoiceSense 目录、Python 路径、录音上限、启动/分析超时。
4
+ - 安装 Better Sidebar 后,可在右侧边栏 `+` 菜单固定「情绪耳朵」,在对话旁边直接调整。
5
+ - 顶部实时显示轻量模式、增强模式、模型加载中、后端目录缺失或等待 Voice Input。
6
+ - 保存后立即写入 DSH 设置;路径或超时变化时自动重启语音 worker。
7
+
8
+ ## 0.2.5 修复
9
+
10
+ - 导出 DSH 所需的 Schemastery `Config` schema,并把每个字段标记为 volatile。
11
+ - 0.2.4 的设置面板可以显示,但在要求注册 schema 的宿主上保存会失败;0.2.5 修复完整读写链路。
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ dsh plugin --profile desktop add dsh-dafeiyu-emotion
17
+ ```
18
+
19
+ 完整变更见 [CHANGELOG](https://github.com/LiDu-china/dsh-dafeiyu-emotion/blob/main/CHANGELOG.md)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-dafeiyu-emotion",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "大肥鱼语音情绪耳朵:听语气、识别情绪,并让 DSH 按对方当下的状态自然回复。 · Voice + emotion-aware companion for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -65,6 +65,7 @@
65
65
  "test": "node --check src/index.js && node --check lib/client.js && node --test scripts/test-shortcut-registration.mjs scripts/test-delivery-policy.mjs scripts/test-analyze-handler.mjs scripts/test-config-handler.mjs scripts/test-client-registration.mjs"
66
66
  },
67
67
  "dependencies": {
68
+ "@deepseek-ai/schemastery": "3.18.5",
68
69
  "dsh-dafeiyu": "0.1.23"
69
70
  },
70
71
  "dsh": {
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ import { createInterface } from 'node:readline'
5
5
  import { tmpdir } from 'node:os'
6
6
  import { dirname, join, resolve } from 'node:path'
7
7
  import { fileURLToPath } from 'node:url'
8
+ import Schema from '@deepseek-ai/schemastery'
8
9
 
9
10
  export const name = 'dsh-dafeiyu-emotion'
10
11
  export const inject = ['webServer']
@@ -30,6 +31,41 @@ const DEFAULTS = Object.freeze({
30
31
  const CONFIG_FIELDS = new Set(Object.keys(DEFAULTS))
31
32
  const LANGUAGES = new Set(['zh', 'en', 'auto'])
32
33
 
34
+ export const Config = Schema.object({
35
+ enabled: Schema.boolean().default(true).description('启用情绪耳朵'),
36
+ backendRoot: Schema.string().default('').description('VoiceSense 项目目录'),
37
+ pythonPath: Schema.string().default('').description('Python 解释器路径'),
38
+ language: Schema.union([
39
+ Schema.const('zh').description('中文'),
40
+ Schema.const('en').description('English'),
41
+ Schema.const('auto').description('自动'),
42
+ ]).default('zh').description('识别语言'),
43
+ maxAudioBytes: Schema.number()
44
+ .min(256 * 1024)
45
+ .max(32 * 1024 * 1024)
46
+ .step(1024 * 1024)
47
+ .default(12 * 1024 * 1024)
48
+ .description('单次录音上限(字节)'),
49
+ startupTimeoutMs: Schema.number()
50
+ .min(10000)
51
+ .max(600000)
52
+ .step(5000)
53
+ .default(180000)
54
+ .description('后端启动超时(毫秒)'),
55
+ requestTimeoutMs: Schema.number()
56
+ .min(10000)
57
+ .max(600000)
58
+ .step(5000)
59
+ .default(180000)
60
+ .description('单次分析超时(毫秒)'),
61
+ }).description('大肥鱼语音情绪耳朵')
62
+
63
+ // DSH settings only exposes fields marked volatile, and the settings panel
64
+ // writes through the same projection. Mark every field, not the root object.
65
+ for (const [key, field] of Object.entries(Config.dict)) {
66
+ Config.dict[key] = field.volatile()
67
+ }
68
+
33
69
  const EMOTION_ZH = Object.freeze({
34
70
  happy: '喜悦',
35
71
  sad: '低落',