dsh-session-superagent 0.9.271 → 0.9.272

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,30 @@
2
2
 
3
3
  格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.9.272] - 2026-11-06 —— 界面更新补上真实 DSH CLI 入口
6
+
7
+ ### 修复 mock 全绿但真机 `cli_not_found`
8
+
9
+ 0.9.271 的 CLI 候选漏掉了本机 asar 内的官方入口,直接调用 `resolveDshCommand({})`
10
+ 会返回 `cli_not_found`。现在补充 `DSH_PROFILE_DIR / DSH_HOME / resourcesPath` 对应的:
11
+
12
+ ```text
13
+ app.asar/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js
14
+ ```
15
+
16
+ Electron 实测解析成功:`profile=desktop`,可执行文件为 DSH 自己的 Electron,
17
+ 参数指向上述官方 `bin.js`。该 `bin.js --help` 也已真实运行成功。
18
+
19
+ ### 证据
20
+
21
+ ```
22
+ 更新路由定向 → 20/20
23
+ npm test → 571/571
24
+ 真实 Electron CLI 解析与 bin.js --help → 通过(未执行 plugin add)
25
+ ```
26
+
27
+ 只验证入口可执行性,没有真实安装,没有重启。
28
+
5
29
  ## [0.9.271] - 2026-11-06 —— 界面内安装更新 + Toast/响应式真实验收 39/39
6
30
 
7
31
  ### 设置页可以直接安装更新
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <img src="assets/icon-180.png" width="88" height="88" alt="">
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Version](https://img.shields.io/badge/version-0.9.271-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.272-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
7
7
  [![npm](https://img.shields.io/npm/v/dsh-session-superagent.svg)](https://www.npmjs.com/package/dsh-session-superagent)
8
8
  [![dsh](https://img.shields.io/badge/DeepSeek%20Harness-plugin-orange.svg)](https://github.com/topics/dsh-plugin)
9
9
  [![awesome](https://img.shields.io/badge/awesome-dsh--plugin-%E2%9C%93-success.svg)](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
@@ -148,7 +148,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
148
148
  ## 开发
149
149
 
150
150
  ```sh
151
- npm test # 570 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
151
+ npm test # 571 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
152
152
  ```
153
153
 
154
154
  ### 工具输出:文本给人和 agent,JSON 给程序
@@ -208,7 +208,7 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
208
208
 
209
209
 
210
210
  ```bash
211
- npm test # 570 项单测(带离线开关,约 1.6 秒)
211
+ npm test # 571 项单测(带离线开关,约 1.6 秒)
212
212
  node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
213
213
  node scripts/preflight.mjs # 41 项门禁(含上面两条,外加 profile 一致性、路由面、包内容)
214
214
  node scripts/render-preview.mjs preview.html # 双主题静态预览,直接浏览器打开
package/client.js CHANGED
@@ -379,7 +379,7 @@ window.__ModuleLoader__.load({
379
379
  }
380
380
 
381
381
  // 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
382
- const CLIENT_VERSION = '0.9.271'
382
+ const CLIENT_VERSION = '0.9.272'
383
383
  let BASE = '/session-superagent'
384
384
  /**
385
385
  * 挑「最新的那个服务端实例」。
package/lib/index.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
 
49
49
  export const name = 'dsh-session-superagent'
50
50
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
51
- export const SERVER_VERSION = '0.9.271'
51
+ export const SERVER_VERSION = '0.9.272'
52
52
  export const inject = ['tools', 'agents', 'webServer']
53
53
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
54
54
  // 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
package/lib/update.js CHANGED
@@ -79,6 +79,23 @@ function layoutCandidates(resourcesPath, execPath, platform) {
79
79
  return roots.map((root) => join(root, 'runtime', 'cli', 'bin', name))
80
80
  }
81
81
 
82
+ /** Official @deepseek-ai/dsh bin.js inside the installed asar; Electron can execute it directly. */
83
+ function cliJsCandidates(resourcesPath, execPath, env) {
84
+ const relative = ['app.asar', 'dsh', 'node_modules', '@deepseek-ai', 'dsh', 'lib', 'bin.js']
85
+ const roots = []
86
+ for (const root of [resourcesPath, execPath ? join(dirname(execPath), 'resources') : null]) {
87
+ if (root && !roots.includes(root)) roots.push(root)
88
+ }
89
+ const installRoots = []
90
+ if (env.DSH_PROFILE_DIR) installRoots.push(resolve(env.DSH_PROFILE_DIR, '..', '..', '..'))
91
+ if (env.DSH_HOME) installRoots.push(resolve(env.DSH_HOME, '..'))
92
+ const candidates = roots.map((root) => join(root, ...relative))
93
+ for (const root of installRoots) {
94
+ if (root) candidates.push(join(root, 'Desktop', 'resources', ...relative))
95
+ }
96
+ return candidates
97
+ }
98
+
82
99
  /**
83
100
  * Convert the standard Windows dsh.cmd wrapper into its direct Electron form.
84
101
  * This preserves shell:false even on Node versions that refuse to spawn .cmd.
@@ -120,6 +137,7 @@ export function resolveDshCommand(options = {}) {
120
137
  if (typeof env.DSH_CLI_PATH === 'string' && env.DSH_CLI_PATH.trim()) add(env.DSH_CLI_PATH.trim(), 'DSH_CLI_PATH')
121
138
  for (const path of pathCandidates(env, platform)) add(path, 'PATH')
122
139
  for (const path of layoutCandidates(resourcesPath, execPath, platform)) add(path, 'DSH installation')
140
+ for (const path of cliJsCandidates(resourcesPath, execPath, env)) add(path, 'DSH installation CLI JS')
123
141
 
124
142
  let unsupported = false
125
143
  for (const candidate of candidates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.271",
3
+ "version": "0.9.272",
4
4
  "description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",