dsh-composer-ux 0.16.0 → 0.16.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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.16.1] — 2026-09-30(把桌面重启从「查文本的测试」升级成「真跑一遍」)
6
+
7
+ 0.16.0 的测试断言是在**助手源码字符串**里找关键字 —— 这一版之前已经栽过三次同类问题
8
+ (FN / FO / D:注释掉一行、或在别处加一处同类代码,查文本的断言照样能过)。
9
+
10
+ 新增套件 `test/restart-helper-desktop.mjs`(**第 24 个套件**):注入假的 `child_process` /
11
+ `fs` / `net`,**真的执行**助手源码,只认副作用 ——
12
+
13
+ - 只杀壳、只给 `/PID`(❌ 不带 `/T`、❌ 不按映像名扫);
14
+ - 先探 `tasklist` 再重建,且旧宿主还活着时反复探测、超时后仍然重建;
15
+ - 重建时子进程环境里**真的**没有 `ELECTRON_RUN_AS_NODE`(这是最容易写错的一步);
16
+ - web 形态一个进程都不杀,照旧重拉同一条命令。
17
+
18
+ 写这条套件的过程本身就证明它有价值:第一次跑就抓出两处**只有真跑才会暴露**的问题
19
+ (我原以为"查文本"能覆盖的那些点其实没被覆盖)。
20
+
21
+ ## 验证
22
+
23
+ - `npm test`:**24 个套件 2379 passed / 0 failed**。
24
+ - 变异:**164/164**(本次没动 `src/`,变异集合不变)。
25
+
5
26
  ## [0.16.0] — 2026-09-30(桌面重启改成「连壳一起换掉」—— 不再弹那个恢复框)
6
27
 
7
28
  前置事实(0.15.5 修好命令行之后发现的):桌面壳把宿主子进程的 close **一律**判成失败
package/README.md CHANGED
@@ -640,7 +640,7 @@ node build.mjs # 产出 lib/index.js + lib/client.js
640
640
  # ⚠️ 宿主半会**内联** schemastery / cosmokit:
641
641
  # 优先用 DSH 检出里的 vendor 副本,检出不在时退到 node_modules
642
642
  # 里同版本的 npm 包(两者逐字节相同)——CI 上走的就是退路
643
- npm test # 23 个套件;当前 2368 passed, 0 failed(2026-09-29 实测;CI 三平台同样全绿)
643
+ npm test # 24 个套件;当前 2379 passed, 0 failed(2026-09-29 实测;CI 三平台同样全绿)
644
644
  # 走 scripts/run-tests.mjs:顺带把"多少套件/多少条"记进 test/.last-run.json
645
645
  npm run test:mutations # 手动跑:变异测试,证明那套护栏真的在咬人(164 条,须单独跑)
646
646
  # 同样记录结果,供下面的文档门禁核对
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-composer-ux",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "DSH Web 输入体验增强插件:可配置发送/换行键位 + 自定义输入框右键菜单 + 面板尺寸记忆 + 快捷指令(分类 / 跨分类移动 / 关·每次·仅首次三种插入模式 / 存 ~/.dsh/quick-prompts.json)+ 提示词优化(0.11.1 起工具行有独立「优化」按钮、带秒表与斜杠命令保护、写回前比对草稿) + OpenCode 会话请求头 + Windows 默认终端切换(把模型的 PowerShell 工具换成 Git Bash)+ 官方持久终端六件套(terminal_open/read/send/signal/close/list,常驻挂载 + 缺包自检退化,见 cordis.patch.yml)+ 统计行缓存命中三位小数 + 输入框下方极简金额胶囊(点开看本会话费用与峰谷状态)+ 设置页「金额」栏:按模型改高峰/空闲单价(留空即官方价)、法定节假日(0.11.0 起自动获取国务院办公厅安排,手填则整份覆盖)、峰谷切换提醒、DeepSeek 账号余额、一键同步官方价与第三方价目(models.dev)、非 DeepSeek 模型定价;价格带生效时间的历史档,每笔用量按发生时刻的价目结算;设置页另有「计价说明」一块(刊例价快照 / 价格档 / 峰谷判定 / 非 DeepSeek 口径) + 设置页抬头一键重启 DSH(助手进程 + 等端口 + 隐藏控制台)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "scripts": {
56
56
  "build": "node build.mjs",
57
- "test:suites": "node test/host-header-mirror.mjs && node test/host-settings-generations.mjs && node test/quick-commands.mjs && node test/quick-store.mjs && node test/terminal-policy.mjs && node test/terminal-mount.mjs && node test/stats-line.mjs && node test/stats-dom.mjs && node test/pricing.mjs && node test/usage-fold.mjs && node test/price-sync.mjs && node test/official-pricing.mjs && node test/balance.mjs && node test/holiday-sync.mjs && node test/client-registration.mjs && node test/settings-render.mjs && node test/cost-panel-render.mjs && node test/settings-service-adopt.mjs && node test/optimize-ledger.mjs && node test/optimize-state.mjs && node test/optimize-tools.mjs && node test/panel-split-render.mjs && node test/restart-screen.mjs",
57
+ "test:suites": "node test/host-header-mirror.mjs && node test/host-settings-generations.mjs && node test/quick-commands.mjs && node test/quick-store.mjs && node test/terminal-policy.mjs && node test/terminal-mount.mjs && node test/stats-line.mjs && node test/stats-dom.mjs && node test/pricing.mjs && node test/usage-fold.mjs && node test/price-sync.mjs && node test/official-pricing.mjs && node test/balance.mjs && node test/holiday-sync.mjs && node test/client-registration.mjs && node test/settings-render.mjs && node test/cost-panel-render.mjs && node test/settings-service-adopt.mjs && node test/optimize-ledger.mjs && node test/optimize-state.mjs && node test/optimize-tools.mjs && node test/panel-split-render.mjs && node test/restart-helper-desktop.mjs && node test/restart-screen.mjs",
58
58
  "test": "node scripts/run-tests.mjs",
59
59
  "test:mutations": "node scripts/run-mutations.mjs",
60
60
  "typecheck": "tsc --noEmit",