dsh-snowbreak-heimdall 3.0.3 → 3.0.4
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.md +3 -3
- package/SHA256SUMS.txt +4 -4
- package/lib/client.js +19 -24
- package/lib/index.js +68 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
## 当前状态
|
|
9
9
|
|
|
10
|
-
- 插件:`dsh-snowbreak-heimdall@3.0.
|
|
10
|
+
- 插件:`dsh-snowbreak-heimdall@3.0.4`,profile `desktop` 已启用。
|
|
11
11
|
- 当前运行:`142164e9…9555`
|
|
12
12
|
- `reapply=false`,这一版已经应用完成;**不需要再退出或重写 asar**。
|
|
13
|
-
-
|
|
13
|
+
- **DSH 右下角提示**:安装后客户端刷新/下次启动时检测源码层状态;未接入时显示「需要完全退出 DSH」的小窗提醒,可手动关闭。
|
|
14
14
|
- `探索未至之境` → `接入零区`
|
|
15
15
|
- DSH 鲸鱼图标 → 世界树 mark
|
|
16
16
|
- `预览版` → `战术预览`
|
|
@@ -100,7 +100,7 @@ DSH 完全退出后,helper 启动 **PowerShell WPF WS_POPUP**:
|
|
|
100
100
|
不是“复制文件夹后双击即用”。对方需要:
|
|
101
101
|
|
|
102
102
|
1. 同版本 DSH `0.2.2-rc.1`(补丁锚点按该版本校验,其他版本会拒绝写入)。
|
|
103
|
-
2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.0.
|
|
103
|
+
2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.0.4`;安装后启用插件。
|
|
104
104
|
也可以手动把包安装到 profile 后加入 `dsh.profile.bundles`。
|
|
105
105
|
3. 启用插件,然后完整退出 DSH;helper 才会写入源码层。
|
|
106
106
|
4. Windows 用户;DSH 安装目录可写(默认 `%LOCALAPPDATA%\Programs\DeepSeek Harness`,自定义路径可设 `HEIMDALL_TARGET` / `HEIMDALL_RESOURCES`)。
|
package/SHA256SUMS.txt
CHANGED
|
@@ -41,15 +41,15 @@ aef34c1fed4a009a78955f5316b999bbd157fd082d7441d34852d32f0a481c28 *assets\source\
|
|
|
41
41
|
1591f7b426d79f71440d4d9c93518de14c88d5b69610beea03a2ecac5c3ac958 *assets\source\welcome-mark-light.png
|
|
42
42
|
2a0b4b9c68d5f4b87bb8fbb768a1933c40394fe4e6f23c144fae88052ebe4a02 *cordis.patch.yml
|
|
43
43
|
065af22a9be00dc76ce08bc647814d33da2779e937db6c5fa4ea0dcb8c65caa9 *icon.svg
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
7370fd8aafe94e11442f61b8f4c2f272ef8f817adf217ee1f460516bec1f4067 *lib\client.js
|
|
45
|
+
f2ac5f0991bcf6717a15b9ffd9b34cf1441c1b51bda72dfe8c1d3a47565f61f0 *lib\index.js
|
|
46
46
|
0794a24c333ef529e56c6eb7b1dee62f4f5b8da1c56fe001885824ce2a3f8b2f *LICENSE
|
|
47
47
|
de949631618eb48bf5cd6c06698a28214c8e9cb4bca23d298cd89462f4fb260e *locale\en.json
|
|
48
48
|
e931cfb8c9b64aa4e01363e603537afee392e8309fe07daaff3e07e028ab8010 *locale\zh.json
|
|
49
|
-
|
|
49
|
+
22b04215670159d1a980f082f8c4ef78bb1d840de0750460fa941bfcc6b042f4 *package.json
|
|
50
50
|
8fa6aff9fa2ab7eb11cc813c7ed9cda2b9ae7757c039aad8d71d5b56b5b683d9 *patch\asar.py
|
|
51
51
|
771e160fc006714e373735a635638d33644eb686e0c7b41478262c136ad70710 *patch\patcher.py
|
|
52
|
-
|
|
52
|
+
20efbde7c2a613729fc179abdec91c4f5e8b6e5b87e6b82001620bf6855a3c5d *README.md
|
|
53
53
|
8978acd5618d9148ca20804d823af6decb0b20af4569b39e8a641f559277db0c *TEST-REPORT.md
|
|
54
54
|
73ac5fa42ee7de25615deb7315de7e2609f76b52e636b6a03397c7203bf17bc2 *tools\build_assets.py
|
|
55
55
|
a8c0badcd2e0cac12cf03528a892c51ec1e6cbde0352ebfb5d5243cbe1f59f8e *tools\build_client.py
|
package/lib/client.js
CHANGED
|
@@ -83,50 +83,45 @@ window.__ModuleLoader__.load({
|
|
|
83
83
|
animation: hm-startup-scan 3.2s linear infinite;
|
|
84
84
|
}
|
|
85
85
|
#hm-pending {
|
|
86
|
-
position: fixed;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
color: #E6EEF5;
|
|
86
|
+
position: fixed; right: 20px; bottom: 20px; z-index: 2147483003;
|
|
87
|
+
width: min(440px, calc(100vw - 40px)); pointer-events: auto;
|
|
88
|
+
border: 1px solid #2C3A46; border-radius: 2px; background: #0B1118;
|
|
89
|
+
color: #E6EEF5; box-shadow: 0 0 0 1px rgba(0,0,0,.24), 0 18px 50px rgba(0,0,0,.45);
|
|
91
90
|
font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
|
|
92
91
|
}
|
|
93
|
-
#hm-pending .hm-p-card {
|
|
94
|
-
width: min(560px, calc(100vw - 48px)); border: 1px solid #2C3A46;
|
|
95
|
-
border-radius: 2px; background: #0B1118;
|
|
96
|
-
box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 24px 80px rgba(0,0,0,.55);
|
|
97
|
-
}
|
|
92
|
+
#hm-pending .hm-p-card { width: 100%; border: 0; background: transparent; box-shadow: none; }
|
|
98
93
|
#hm-pending .hm-p-head {
|
|
99
94
|
display: flex; align-items: center; justify-content: space-between;
|
|
100
|
-
height:
|
|
95
|
+
height: 30px; padding: 0 12px; border-bottom: 1px solid #263440;
|
|
101
96
|
font-family: "Bahnschrift", "Segoe UI", sans-serif;
|
|
102
97
|
font-size: 8px; letter-spacing: .2em; color: #7E8E9E;
|
|
103
98
|
}
|
|
104
|
-
#hm-pending .hm-p-body { padding:
|
|
99
|
+
#hm-pending .hm-p-body { padding: 14px 16px 16px; }
|
|
105
100
|
#hm-pending .hm-p-kicker {
|
|
106
101
|
font-family: "Bahnschrift", "Segoe UI", sans-serif;
|
|
107
|
-
font-size:
|
|
102
|
+
font-size: 8px; letter-spacing: .22em; color: #7FB2D0; margin-bottom: 7px;
|
|
108
103
|
}
|
|
109
104
|
#hm-pending .hm-p-title {
|
|
110
|
-
margin: 0; font-size:
|
|
111
|
-
line-height: 1.
|
|
105
|
+
margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .02em;
|
|
106
|
+
line-height: 1.45; color: #E6EEF5;
|
|
112
107
|
}
|
|
113
108
|
#hm-pending .hm-p-text {
|
|
114
|
-
margin:
|
|
109
|
+
margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: #AAB8C5;
|
|
115
110
|
}
|
|
116
111
|
#hm-pending .hm-p-env {
|
|
117
|
-
display: flex; flex-wrap: wrap; gap:
|
|
118
|
-
padding: 10px
|
|
119
|
-
font-size:
|
|
112
|
+
display: flex; flex-wrap: wrap; gap: 4px 7px; margin-top: 11px;
|
|
113
|
+
padding: 8px 10px; border: 1px solid #263440; background: #0F1720;
|
|
114
|
+
font-size: 10px; color: #7E8E9E;
|
|
120
115
|
}
|
|
121
116
|
#hm-pending .hm-p-env b { color: #D97745; font-weight: 500; }
|
|
122
117
|
#hm-pending .hm-p-actions {
|
|
123
|
-
display: flex; justify-content: flex-end; margin-top:
|
|
118
|
+
display: flex; justify-content: flex-end; margin-top: 12px;
|
|
124
119
|
}
|
|
125
120
|
#hm-pending button {
|
|
126
|
-
width: auto; height:
|
|
121
|
+
width: auto; height: 30px; padding: 0 14px; border: 1px solid #D97745;
|
|
127
122
|
background: #D97745; color: #0A0F14; cursor: pointer; border-radius: 1px;
|
|
128
123
|
font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
|
|
129
|
-
font-size:
|
|
124
|
+
font-size: 11px; font-weight: 600;
|
|
130
125
|
}
|
|
131
126
|
@keyframes hm-startup-sweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }
|
|
132
127
|
@keyframes hm-startup-scan { 0% { top: 12%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: .7; } 100% { top: 76%; opacity: 0; } }
|
|
@@ -150,8 +145,8 @@ window.__ModuleLoader__.load({
|
|
|
150
145
|
#hm-startup .hm-start-kicker { color: #2F6A8E; }
|
|
151
146
|
#hm-startup .hm-start-meta, #hm-startup .hm-start-foot { color: #71808E; }
|
|
152
147
|
#hm-startup .hm-start-meta b { color: #A9481F; }
|
|
153
|
-
#hm-pending { border-color: #C8D3DD; background:
|
|
154
|
-
#hm-pending .hm-p-card { border-color:
|
|
148
|
+
#hm-pending { border-color: #C8D3DD; background: #F7F9FB; color: #101820; }
|
|
149
|
+
#hm-pending .hm-p-card { border-color: transparent; background: transparent; }
|
|
155
150
|
#hm-pending .hm-p-head { border-color: #D2DCE4; color: #71808E; }
|
|
156
151
|
#hm-pending .hm-p-kicker { color: #2F6A8E; }
|
|
157
152
|
#hm-pending .hm-p-title { color: #101820; }
|
package/lib/index.js
CHANGED
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
import fs from 'node:fs';
|
|
11
11
|
import os from 'node:os';
|
|
12
12
|
import path from 'node:path';
|
|
13
|
+
import { createRequire } from 'node:module';
|
|
13
14
|
import { spawn } from 'node:child_process';
|
|
14
15
|
import { fileURLToPath } from 'node:url';
|
|
15
16
|
|
|
17
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
18
|
+
|
|
16
19
|
const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
|
17
|
-
const VERSION = '3.0.
|
|
20
|
+
const VERSION = '3.0.4';
|
|
18
21
|
const INSTALL = path.join(process.env.LOCALAPPDATA || '', 'Programs', 'DeepSeek Harness');
|
|
19
22
|
const DEFAULT_RESOURCES = process.env.HEIMDALL_RESOURCES
|
|
20
23
|
|| (typeof process.resourcesPath === 'string' && /[\\/]resources$/i.test(process.resourcesPath)
|
|
@@ -261,11 +264,74 @@ function showRestartPrompt() {
|
|
|
261
264
|
}
|
|
262
265
|
}
|
|
263
266
|
|
|
267
|
+
function injectedRestartNoticeScript() {
|
|
268
|
+
const platform = process.platform + ' ' + process.arch;
|
|
269
|
+
return `(() => {
|
|
270
|
+
if (document.getElementById('hm-restart-notice')) return;
|
|
271
|
+
const css = [
|
|
272
|
+
'#hm-restart-notice{position:fixed;right:20px;bottom:20px;z-index:2147483003;width:min(440px,calc(100vw - 40px));',
|
|
273
|
+
'border:1px solid #2C3A46;border-radius:2px;background:#0B1118;color:#E6EEF5;',
|
|
274
|
+
'box-shadow:0 0 0 1px rgba(0,0,0,.24),0 18px 50px rgba(0,0,0,.45);',
|
|
275
|
+
'font-family:"Noto Sans SC","Microsoft YaHei UI","Microsoft YaHei","Segoe UI",sans-serif;}',
|
|
276
|
+
'#hm-restart-notice .hm-r-head{display:flex;align-items:center;justify-content:space-between;height:30px;padding:0 12px;',
|
|
277
|
+
'border-bottom:1px solid #263440;font:8px "Bahnschrift","Segoe UI",sans-serif;letter-spacing:.2em;color:#7E8E9E;}',
|
|
278
|
+
'#hm-restart-notice .hm-r-body{padding:14px 16px 16px;}',
|
|
279
|
+
'#hm-restart-notice .hm-r-kicker{font:8px "Bahnschrift","Segoe UI",sans-serif;letter-spacing:.22em;color:#7FB2D0;margin-bottom:7px;}',
|
|
280
|
+
'#hm-restart-notice .hm-r-title{margin:0;font-size:17px;font-weight:600;line-height:1.45;color:#E6EEF5;}',
|
|
281
|
+
'#hm-restart-notice .hm-r-text{margin:8px 0 0;font-size:12px;line-height:1.7;color:#AAB8C5;}',
|
|
282
|
+
'#hm-restart-notice .hm-r-env{display:flex;flex-wrap:wrap;gap:4px 7px;margin-top:11px;padding:8px 10px;',
|
|
283
|
+
'border:1px solid #263440;background:#0F1720;font-size:10px;color:#7E8E9E;}',
|
|
284
|
+
'#hm-restart-notice .hm-r-env b{color:#D97745;font-weight:500;}',
|
|
285
|
+
'#hm-restart-notice .hm-r-actions{display:flex;justify-content:flex-end;margin-top:12px;}',
|
|
286
|
+
'#hm-restart-notice button{height:30px;padding:0 14px;border:1px solid #D97745;background:#D97745;color:#0A0F14;',
|
|
287
|
+
'cursor:pointer;border-radius:1px;font:600 11px "Microsoft YaHei UI","Segoe UI",sans-serif;}'
|
|
288
|
+
].join('');
|
|
289
|
+
const style = document.createElement('style');
|
|
290
|
+
style.textContent = css;
|
|
291
|
+
document.head.appendChild(style);
|
|
292
|
+
const el = document.createElement('section');
|
|
293
|
+
el.id = 'hm-restart-notice';
|
|
294
|
+
el.setAttribute('role', 'status');
|
|
295
|
+
el.innerHTML = '<div class="hm-r-head"><span>HEIMDALL // RESTART REQUIRED</span><span>SOURCE LAYER</span></div>'
|
|
296
|
+
+ '<div class="hm-r-body">'
|
|
297
|
+
+ '<div class="hm-r-kicker">环境检测:源码层尚未接入</div>'
|
|
298
|
+
+ '<h2 class="hm-r-title">安装完成,需要完全退出 DSH</h2>'
|
|
299
|
+
+ '<p class="hm-r-text">当前 DSH 仍在运行,皮肤还没有写入。请完全退出 DSH(托盘退出或退出程序,不是关闭窗口),下一次启动才会应用加载画面、主题、菜单和图标。</p>'
|
|
300
|
+
+ '<div class="hm-r-env"><span>平台:<b>${platform}</b></span><span>源码层:<b>未接入</b></span><span>操作:<b>完全退出 DSH</b></span></div>'
|
|
301
|
+
+ '<div class="hm-r-actions"><button type="button">我知道了</button></div>'
|
|
302
|
+
+ '</div>';
|
|
303
|
+
document.body.appendChild(el);
|
|
304
|
+
el.querySelector('button').addEventListener('click', () => el.remove());
|
|
305
|
+
})()`;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function showInjectedRestartNotice() {
|
|
309
|
+
try {
|
|
310
|
+
const state = readState();
|
|
311
|
+
if (state.status === 'patched') return;
|
|
312
|
+
const electron = requireFromHere('electron');
|
|
313
|
+
const windows = electron && electron.BrowserWindow ? electron.BrowserWindow.getAllWindows() : [];
|
|
314
|
+
if (!windows.length) {
|
|
315
|
+
log('no BrowserWindow for restart notice');
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const script = injectedRestartNoticeScript();
|
|
319
|
+
for (const win of windows) {
|
|
320
|
+
win.webContents.executeJavaScript(script, true).catch((error) => {
|
|
321
|
+
log('restart notice inject failed: ' + error.message);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
log('restart notice injected');
|
|
325
|
+
} catch (error) {
|
|
326
|
+
log('restart notice unavailable: ' + error.message);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
264
330
|
export function apply(ctx) {
|
|
265
331
|
try {
|
|
266
332
|
fs.mkdirSync(STATE_DIR, { recursive: true });
|
|
267
333
|
writeState({ desired: 'on', pluginVersion: VERSION });
|
|
268
|
-
|
|
334
|
+
showInjectedRestartNotice();
|
|
269
335
|
arm();
|
|
270
336
|
if (ctx && typeof ctx.effect === 'function') {
|
|
271
337
|
ctx.effect(() => () => {
|