dsh-snowbreak-heimdall 3.5.1 → 3.5.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/lib/index.js CHANGED
@@ -17,7 +17,7 @@ import { fileURLToPath } from 'node:url';
17
17
  const requireFromHere = createRequire(import.meta.url);
18
18
 
19
19
  const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
20
- const VERSION = '3.5.1';
20
+ const VERSION = '3.5.2';
21
21
  let restartPrompted = false;
22
22
  const INSTALL = path.join(process.env.LOCALAPPDATA || '', 'Programs', 'DeepSeek Harness');
23
23
  const DEFAULT_RESOURCES = process.env.HEIMDALL_RESOURCES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-snowbreak-heimdall",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "《尘白禁区》海姆达尔终端 / 世界树公司源码级皮肤:加载画面、双主题、菜单/侧栏/图标,插件仅在加载后播放启动动画。Windows / DSH 0.2.2-rc.x。",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/patch/patcher.py CHANGED
@@ -1241,31 +1241,17 @@ def sync(target, skip_wait=False, wait_pid=0):
1241
1241
  if not skip_wait:
1242
1242
  log("waiting for DSH host pid %s" % (wait_pid or "unknown"))
1243
1243
  waited = wait_for_pid(wait_pid)
1244
- if waited:
1245
- time.sleep(3)
1246
- absent = 0
1247
- for _ in range(300):
1248
- if dsh_running():
1249
- absent = 0
1250
- else:
1251
- absent += 1
1252
- if absent >= 2:
1253
- break
1244
+ if not waited:
1245
+ # Unknown host pid: fall back to a bounded wait, never unbounded.
1246
+ log("host pid unknown; waiting for DSH to disappear (bounded)")
1247
+ deadline = time.time() + 300
1248
+ while dsh_running() and time.time() < deadline:
1254
1249
  time.sleep(2)
1255
- else:
1256
- # Fallback for an old helper or a process handle we cannot open.
1257
- absent = 0
1258
- for _ in range(10800):
1259
- if dsh_running():
1260
- absent = 0
1261
- else:
1262
- absent += 1
1263
- if absent >= 2:
1264
- break
1265
- time.sleep(2)
1266
- else:
1267
- log("wait timed out")
1268
- return 1
1250
+ # Do not require an empty DSH process list here. The restart script
1251
+ # relaunches as soon as the layer is written, so insisting on "no DSH
1252
+ # running" can hold sync.lock forever and trap the user in a restart
1253
+ # loop. wait_unlocked() below already retries a busy archive.
1254
+ time.sleep(1.5)
1269
1255
  if not wait_unlocked(target, 180):
1270
1256
  log("archive stayed locked")
1271
1257
  return 3