dsh-snowbreak-heimdall 3.0.1 → 3.0.3

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 CHANGED
@@ -7,10 +7,10 @@
7
7
 
8
8
  ## 当前状态
9
9
 
10
- - 插件:`dsh-snowbreak-heimdall@3.0.1`,profile `desktop` 已启用。
10
+ - 插件:`dsh-snowbreak-heimdall@3.0.3`,profile `desktop` 已启用。
11
11
  - 当前运行:`142164e9…9555`
12
12
  - `reapply=false`,这一版已经应用完成;**不需要再退出或重写 asar**。
13
- - 当前版本已把主界面剩余的 DSH 原生内容换掉:
13
+ - **安装/启用后立即弹出原生 Windows 提示**:检测平台与 DSH 运行状态,提示「需要完全退出 DSH」;不依赖前端 HMR,客户端未刷新也会弹。
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.1`;安装后启用插件。
103
+ 2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.0.3`;安装后启用插件。
104
104
  也可以手动把包安装到 profile 后加入 `dsh.profile.bundles`。
105
105
  3. 启用插件,然后完整退出 DSH;helper 才会写入源码层。
106
106
  4. Windows 用户;DSH 安装目录可写(默认 `%LOCALAPPDATA%\Programs\DeepSeek Harness`,自定义路径可设 `HEIMDALL_TARGET` / `HEIMDALL_RESOURCES`)。
@@ -177,3 +177,5 @@ snowbreak-heimdall/
177
177
 
178
178
 
179
179
 
180
+
181
+
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
- 67fb090954b1d63521e8838b519bf82ce01a7fa4a36e2bd653accdcd6e789740 *lib\client.js
45
- 9612a760064aaf72e59763272b5e7f823cd37a380f64dcd3fc0a2bd411b7ce60 *lib\index.js
44
+ ee9d6f7d37e0651950c9e7434060e784df0243165b0dfe64533436fe337ce8c9 *lib\client.js
45
+ 1819e609788e3b8820a2e704bc5433975c5e78e3b3e9f1a23ae3a567aced5d39 *lib\index.js
46
46
  0794a24c333ef529e56c6eb7b1dee62f4f5b8da1c56fe001885824ce2a3f8b2f *LICENSE
47
47
  de949631618eb48bf5cd6c06698a28214c8e9cb4bca23d298cd89462f4fb260e *locale\en.json
48
48
  e931cfb8c9b64aa4e01363e603537afee392e8309fe07daaff3e07e028ab8010 *locale\zh.json
49
- 3a2c4f171864b124dbefbc62cd4669eca835cca5b3de9d5fba56e6d6c0e1b57e *package.json
49
+ 6191b2f74eaa5609a6c7adde58bc8e6a27d8dab16701f4a0d9183d0580dd1a21 *package.json
50
50
  8fa6aff9fa2ab7eb11cc813c7ed9cda2b9ae7757c039aad8d71d5b56b5b683d9 *patch\asar.py
51
51
  771e160fc006714e373735a635638d33644eb686e0c7b41478262c136ad70710 *patch\patcher.py
52
- 9466799d0b23c78e555660cd3c9a0d63553eb961a491029da05a90fc5198c6bc *README.md
52
+ b837f61e277dfe26fde48590d3c1b85bf6a23ce1683c0c9967294eb30a5f8c5c *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,23 +83,50 @@ window.__ModuleLoader__.load({
83
83
  animation: hm-startup-scan 3.2s linear infinite;
84
84
  }
85
85
  #hm-pending {
86
- position: fixed; right: 20px; bottom: 20px; z-index: 2147483001;
87
- width: min(420px, calc(100vw - 40px)); pointer-events: auto;
88
- border: 1px solid #2C3A46; border-radius: 2px; background: #10161E;
89
- color: #E6EEF5; font-family: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
90
- box-shadow: 0 0 0 1px rgba(0,0,0,.24);
86
+ position: fixed; inset: 0; z-index: 2147483002; display: flex;
87
+ align-items: center; justify-content: center; pointer-events: auto;
88
+ background: rgba(3, 6, 10, .74);
89
+ -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
90
+ color: #E6EEF5;
91
+ font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
92
+ }
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);
91
97
  }
92
98
  #hm-pending .hm-p-head {
93
99
  display: flex; align-items: center; justify-content: space-between;
94
- height: 30px; padding: 0 10px; border-bottom: 1px solid #263440;
100
+ height: 34px; padding: 0 14px; border-bottom: 1px solid #263440;
95
101
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
96
102
  font-size: 8px; letter-spacing: .2em; color: #7E8E9E;
97
103
  }
98
- #hm-pending .hm-p-body { padding: 10px 12px 12px; font-size: 12px; line-height: 1.7; color: #AAB8C5; }
99
- #hm-pending .hm-p-body b { color: #D97745; font-weight: 600; }
104
+ #hm-pending .hm-p-body { padding: 22px 24px 24px; }
105
+ #hm-pending .hm-p-kicker {
106
+ font-family: "Bahnschrift", "Segoe UI", sans-serif;
107
+ font-size: 9px; letter-spacing: .26em; color: #7FB2D0; margin-bottom: 10px;
108
+ }
109
+ #hm-pending .hm-p-title {
110
+ margin: 0; font-size: 24px; font-weight: 600; letter-spacing: .04em;
111
+ line-height: 1.35; color: #E6EEF5;
112
+ }
113
+ #hm-pending .hm-p-text {
114
+ margin: 12px 0 0; font-size: 13px; line-height: 1.8; color: #AAB8C5;
115
+ }
116
+ #hm-pending .hm-p-env {
117
+ display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 16px;
118
+ padding: 10px 12px; border: 1px solid #263440; background: #0F1720;
119
+ font-size: 11px; color: #7E8E9E;
120
+ }
121
+ #hm-pending .hm-p-env b { color: #D97745; font-weight: 500; }
122
+ #hm-pending .hm-p-actions {
123
+ display: flex; justify-content: flex-end; margin-top: 20px;
124
+ }
100
125
  #hm-pending button {
101
- width: 22px; height: 22px; padding: 0; border: 1px solid #263440;
102
- background: transparent; color: #7E8E9E; cursor: pointer; border-radius: 1px;
126
+ width: auto; height: 34px; padding: 0 18px; border: 1px solid #D97745;
127
+ background: #D97745; color: #0A0F14; cursor: pointer; border-radius: 1px;
128
+ font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
129
+ font-size: 12px; font-weight: 600;
103
130
  }
104
131
  @keyframes hm-startup-sweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }
105
132
  @keyframes hm-startup-scan { 0% { top: 12%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: .7; } 100% { top: 76%; opacity: 0; } }
@@ -123,11 +150,15 @@ window.__ModuleLoader__.load({
123
150
  #hm-startup .hm-start-kicker { color: #2F6A8E; }
124
151
  #hm-startup .hm-start-meta, #hm-startup .hm-start-foot { color: #71808E; }
125
152
  #hm-startup .hm-start-meta b { color: #A9481F; }
126
- #hm-pending { border-color: #C8D3DD; background: #F7F9FB; color: #101820; }
153
+ #hm-pending { border-color: #C8D3DD; background: rgba(232, 238, 243, .78); color: #101820; }
154
+ #hm-pending .hm-p-card { border-color: #C8D3DD; background: #F7F9FB; }
127
155
  #hm-pending .hm-p-head { border-color: #D2DCE4; color: #71808E; }
128
- #hm-pending .hm-p-body { color: #465665; }
129
- #hm-pending .hm-p-body b { color: #A9481F; }
130
- #hm-pending button { border-color: #C8D3DD; color: #71808E; }
156
+ #hm-pending .hm-p-kicker { color: #2F6A8E; }
157
+ #hm-pending .hm-p-title { color: #101820; }
158
+ #hm-pending .hm-p-text { color: #465665; }
159
+ #hm-pending .hm-p-env { border-color: #D2DCE4; background: #EEF3F7; color: #71808E; }
160
+ #hm-pending .hm-p-env b { color: #A9481F; }
161
+ #hm-pending button { border-color: #A9481F; background: #A9481F; color: #F7F9FB; }
131
162
  }
132
163
  @media (prefers-reduced-motion: reduce) {
133
164
  #hm-startup, #hm-startup * { animation: none !important; }
@@ -137,18 +168,18 @@ window.__ModuleLoader__.load({
137
168
  function Startup() {
138
169
  const [done, setDone] = useState(false);
139
170
  const [notice, setNotice] = useState(false);
171
+ const platform = /Win/i.test(navigator.platform || navigator.userAgent || '') ? 'Windows' : (navigator.platform || '未知平台');
140
172
  useEffect(() => {
141
173
  const reduced = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
174
+ const sourceActive = () => document.documentElement.getAttribute('data-heimdall-source') === 'active';
175
+ if (!sourceActive()) setNotice(true);
142
176
  const timer = setTimeout(() => {
143
177
  setDone(true);
144
- setNotice(document.documentElement.getAttribute('data-heimdall-source') !== 'active');
145
178
  }, reduced ? 650 : 2500);
146
179
  let observer = null;
147
180
  try {
148
181
  observer = new MutationObserver(() => {
149
- if (document.documentElement.getAttribute('data-heimdall-source') === 'active') {
150
- setNotice(false);
151
- }
182
+ if (sourceActive()) { setNotice(false); setDone(true); }
152
183
  });
153
184
  observer.observe(document.documentElement, {
154
185
  attributes: true, attributeFilter: ['data-heimdall-source'],
@@ -160,7 +191,7 @@ window.__ModuleLoader__.load({
160
191
  };
161
192
  }, []);
162
193
  if (done && !notice) return null;
163
- const overlay = done ? null : h('div', { id: 'hm-startup', 'aria-hidden': 'true' },
194
+ const overlay = done || notice ? null : h('div', { id: 'hm-startup', 'aria-hidden': 'true' },
164
195
  h('span', { className: 'hm-start-scan' }),
165
196
  h('div', { className: 'hm-start-inner' },
166
197
  h('span', { className: 'hm-start-mark' }),
@@ -179,17 +210,30 @@ window.__ModuleLoader__.load({
179
210
  h('span', null, 'HM-04 · SECURE LINK')
180
211
  )
181
212
  );
182
- const pending = done && notice ? h('section', { id: 'hm-pending', role: 'status' },
183
- h('div', { className: 'hm-p-head' },
184
- h('span', null, 'HEIMDALL // SOURCE LAYER'),
185
- h('button', {
186
- type: 'button', 'aria-label': '关闭提示',
187
- onClick: () => setNotice(false),
188
- }, '×')
189
- ),
190
- h('div', { className: 'hm-p-body' },
191
- h('b', null, '源码层尚未接入。'),
192
- ' 请完全退出 DSH 一次;本地 helper 会在退出后写入加载画面、主题、菜单与图标,再重新打开即可。'
213
+ const pending = notice ? h('section', { id: 'hm-pending', role: 'alertdialog', 'aria-modal': 'true' },
214
+ h('div', { className: 'hm-p-card' },
215
+ h('div', { className: 'hm-p-head' },
216
+ h('span', null, 'HEIMDALL // RESTART REQUIRED'),
217
+ h('span', null, 'SOURCE LAYER')
218
+ ),
219
+ h('div', { className: 'hm-p-body' },
220
+ h('div', { className: 'hm-p-kicker' }, '环境检测:源码层尚未接入'),
221
+ h('h2', { className: 'hm-p-title' }, '安装完成,需要完全退出 DSH'),
222
+ h('p', { className: 'hm-p-text' },
223
+ '当前 DSH 仍在运行,皮肤还没有写入。请完整退出 DSH(托盘退出或退出程序,不是关闭窗口),下一次启动才会应用加载画面、主题、菜单和图标。'
224
+ ),
225
+ h('div', { className: 'hm-p-env' },
226
+ h('span', null, '平台:', h('b', null, platform)),
227
+ h('span', null, '源码层:', h('b', null, '未接入')),
228
+ h('span', null, '操作:', h('b', null, '完全退出 DSH 后重新打开'))
229
+ ),
230
+ h('div', { className: 'hm-p-actions' },
231
+ h('button', {
232
+ type: 'button',
233
+ onClick: () => { setNotice(false); setDone(true); },
234
+ }, '我知道了')
235
+ )
236
+ )
193
237
  )
194
238
  ) : null;
195
239
  return h(React.Fragment, null, h('style', null, CSS), overlay, pending);
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ import { spawn } from 'node:child_process';
14
14
  import { fileURLToPath } from 'node:url';
15
15
 
16
16
  const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
17
- const VERSION = '3.0.1';
17
+ const VERSION = '3.0.3';
18
18
  const INSTALL = path.join(process.env.LOCALAPPDATA || '', 'Programs', 'DeepSeek Harness');
19
19
  const DEFAULT_RESOURCES = process.env.HEIMDALL_RESOURCES
20
20
  || (typeof process.resourcesPath === 'string' && /[\\/]resources$/i.test(process.resourcesPath)
@@ -222,10 +222,50 @@ function arm() {
222
222
  }
223
223
  }
224
224
 
225
+ function psQuote(value) {
226
+ return "'" + String(value).replace(/'/g, "''") + "'";
227
+ }
228
+
229
+ function showRestartPrompt() {
230
+ try {
231
+ const state = readState();
232
+ if (state.status === 'patched') return;
233
+ const marker = path.join(STATE_DIR, 'restart-prompt.pid');
234
+ if (fs.existsSync(marker) && fs.readFileSync(marker, 'utf8').trim() === String(process.pid)) return;
235
+ fs.mkdirSync(STATE_DIR, { recursive: true });
236
+ fs.writeFileSync(marker, String(process.pid), 'utf8');
237
+ const text = [
238
+ '安装完成。源码层尚未接入。',
239
+ '',
240
+ '平台:' + process.platform + ' ' + process.arch,
241
+ 'DSH:' + (process.versions.electron || 'Electron'),
242
+ '',
243
+ '请完全退出 DSH(托盘退出,不是关闭窗口),再重新打开。',
244
+ '退出后 helper 会写入加载画面、主题、菜单与图标。',
245
+ ].join('\n');
246
+ const script = "Add-Type -AssemblyName PresentationFramework; "
247
+ + "[System.Windows.MessageBox]::Show(" + psQuote(text)
248
+ + ", '海姆达尔终端 // 需要重启', 'OK', 'Warning') | Out-Null";
249
+ const encoded = Buffer.from(script, 'utf16le').toString('base64');
250
+ const powershell = path.join(
251
+ process.env.SystemRoot || 'C:\\Windows',
252
+ 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe',
253
+ );
254
+ const child = spawn(powershell, [
255
+ '-NoProfile', '-STA', '-WindowStyle', 'Hidden', '-EncodedCommand', encoded,
256
+ ], { detached: true, stdio: 'ignore', windowsHide: true });
257
+ child.unref();
258
+ log('restart prompt shown');
259
+ } catch (error) {
260
+ log('restart prompt failed: ' + error.message);
261
+ }
262
+ }
263
+
225
264
  export function apply(ctx) {
226
265
  try {
227
266
  fs.mkdirSync(STATE_DIR, { recursive: true });
228
267
  writeState({ desired: 'on', pluginVersion: VERSION });
268
+ showRestartPrompt();
229
269
  arm();
230
270
  if (ctx && typeof ctx.effect === 'function') {
231
271
  ctx.effect(() => () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-snowbreak-heimdall",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "《尘白禁区》海姆达尔终端 / 世界树公司源码级皮肤:加载画面、双主题、菜单/侧栏/图标,插件仅在加载后播放启动动画。Windows / DSH 0.2.2-rc.1。",
5
5
  "type": "module",
6
6
  "license": "MIT",