dsh-snowbreak-heimdall 3.1.8 → 3.2.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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## 当前状态
9
9
 
10
- - 插件:`dsh-snowbreak-heimdall@3.1.8`,profile `desktop` 已启用。
10
+ - 插件:`dsh-snowbreak-heimdall@3.2.1`,profile `desktop` 已启用。
11
11
  - 当前运行:`142164e9…9555`
12
12
  - `reapply=false`,这一版已经应用完成;**不需要再退出或重写 asar**。
13
13
  - **安装/启用后先确认再重启**:Host 检测到源码层未接入时弹「现在重启 DSH?」,选「是」才关闭当前 DSH、等待 helper 写入源码层,再自动启动 DSH;选「否」不重启。重启过程不弹进度窗。
@@ -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.1.8`;安装后启用插件。
103
+ 2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.2.1`;安装后启用插件。
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
@@ -22,6 +22,7 @@ b4019a637dc144f90d50336960a4e83531cf87ff94d1951dc0671ece70c333a5 *assets\preview
22
22
  b5f2ff21b67a6a0c178d251af49331319eb42e9e140e279e391edda30112bf47 *assets\previews\ui-chrome.png
23
23
  3ebaa8c085365385745ec2ceac437970a146581487c89ae4e4b4e4e15a5c5ec5 *assets\source\brand-client.js
24
24
  12ea3ea272ae13b66f2875c42d466053516588057bb90775499e0fdb575fe624 *assets\source\client-template.js
25
+ 54fc8e9c7394fc84dad497500021784d639d835bfa7e10abe39f04ab7f21f584 *assets\source\confirm-mark.png
25
26
  f97fb8cb96c579159c4b5d6d1b0f1a767ead9895b71cfaa5aaa7c4248a3938ad *assets\source\hm-mark-blue.png
26
27
  aef34c1fed4a009a78955f5316b999bbd157fd082d7441d34852d32f0a481c28 *assets\source\hm-mark-ink.png
27
28
  1591f7b426d79f71440d4d9c93518de14c88d5b69610beea03a2ecac5c3ac958 *assets\source\hm-mark-light.png
@@ -32,6 +33,7 @@ b7326e8f747b124547f19b8bbbf16ecb8d020778b360df28a7fec14efc55624c *assets\source\
32
33
  ff37ef4ee56454e42d2d47cdbbdc634c6b0b34e43817d4139ef7831b049714ec *assets\source\mark-color.png
33
34
  105b2913a0232daf52793edf7531b27b1fa2830aa861d1e6c97e60e4f5bbd7d7 *assets\source\progress.ps1
34
35
  907e1fe64e8f47073073783c6b0b772264736c7717090100c36e848a7f582679 *assets\source\restart-confirm.hta
36
+ 136e735fa49f5ba8b54425a70e6786b97b32627bc637a384e2a388fb066e01a9 *assets\source\restart-confirm.ps1
35
37
  c82cfaafcb317919e117d7f9983bb6230a69adf5356d78c2bb3f2bf2016b79df *assets\source\shell.css
36
38
  724f25bb1908f43180c7330669767dca05cbd61d3aee4b65401949a16e3c4a2d *assets\source\shell.js
37
39
  f39417379634fd601613323bf56c0226bf135a41e153b90929627edc89b1edfe *assets\source\update.css
@@ -43,14 +45,14 @@ aef34c1fed4a009a78955f5316b999bbd157fd082d7441d34852d32f0a481c28 *assets\source\
43
45
  2a0b4b9c68d5f4b87bb8fbb768a1933c40394fe4e6f23c144fae88052ebe4a02 *cordis.patch.yml
44
46
  065af22a9be00dc76ce08bc647814d33da2779e937db6c5fa4ea0dcb8c65caa9 *icon.svg
45
47
  7370fd8aafe94e11442f61b8f4c2f272ef8f817adf217ee1f460516bec1f4067 *lib\client.js
46
- 8c608b7e458ae5e0a2d3dce52de383316fb69d5ff0a3228de6c68f90412148a3 *lib\index.js
48
+ eb7f4ab91f6be1b0e475d5055e0b7fbe4fd8586711d1f9cc1e940700a7c548fd *lib\index.js
47
49
  0794a24c333ef529e56c6eb7b1dee62f4f5b8da1c56fe001885824ce2a3f8b2f *LICENSE
48
50
  de949631618eb48bf5cd6c06698a28214c8e9cb4bca23d298cd89462f4fb260e *locale\en.json
49
51
  e931cfb8c9b64aa4e01363e603537afee392e8309fe07daaff3e07e028ab8010 *locale\zh.json
50
- 48dfb82efb5ecf183d8a9c21e411deb9fbddfeff5f44919db11e51920c050df7 *package.json
52
+ 6db86da540fb1c3f57e424cee164eef6f77925a1bd7acf5896bd920585db119b *package.json
51
53
  8fa6aff9fa2ab7eb11cc813c7ed9cda2b9ae7757c039aad8d71d5b56b5b683d9 *patch\asar.py
52
- c9400731101b46a609b9318b8da85e2dfb00ceaa2d65c7e69f7d513c549b0e3c *patch\patcher.py
53
- 9e46d8adc9faed9f6db07663947989f810d5584b6c7ce95cf61367cb4e793c81 *README.md
54
+ 6c74b475bddb26d67491c1a72563764f0a8e3f15845572b2427642a17459639a *patch\patcher.py
55
+ 96ebd6b7bf9078c0892a3652451e9ea0109b3eefea838ed81e2246340026586e *README.md
54
56
  8978acd5618d9148ca20804d823af6decb0b20af4569b39e8a641f559277db0c *TEST-REPORT.md
55
57
  73ac5fa42ee7de25615deb7315de7e2609f76b52e636b6a03397c7203bf17bc2 *tools\build_assets.py
56
58
  a8c0badcd2e0cac12cf03528a892c51ec1e6cbde0352ebfb5d5243cbe1f59f8e *tools\build_client.py
Binary file
@@ -0,0 +1,134 @@
1
+ param([string]$RestartScript = '')
2
+
3
+ Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase
4
+ $xaml = @'
5
+
6
+ <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
7
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
8
+ Title="海姆达尔终端 · 源码层覆盖"
9
+ Width="760" Height="520"
10
+ WindowStyle="None" ResizeMode="NoResize"
11
+ WindowStartupLocation="CenterScreen"
12
+ Topmost="True" ShowInTaskbar="True"
13
+ Background="#05080C" Foreground="#E6EEF5"
14
+ FontFamily="Microsoft YaHei UI" UseLayoutRounding="True" SnapsToDevicePixels="True">
15
+ <Grid>
16
+ <Grid.RowDefinitions>
17
+ <RowDefinition Height="Auto"/>
18
+ <RowDefinition Height="Auto"/>
19
+ <RowDefinition Height="Auto"/>
20
+ <RowDefinition Height="*"/>
21
+ <RowDefinition Height="Auto"/>
22
+ </Grid.RowDefinitions>
23
+
24
+ <Image x:Name="Watermark" Grid.RowSpan="5" Width="340" Height="212" HorizontalAlignment="Right" VerticalAlignment="Bottom"
25
+ Opacity="0.07" Margin="0,0,18,18" Stretch="Uniform" IsHitTestVisible="False"/>
26
+
27
+ <Grid Grid.Row="0" Margin="30,24,30,0">
28
+ <Grid.ColumnDefinitions>
29
+ <ColumnDefinition Width="68"/>
30
+ <ColumnDefinition Width="*"/>
31
+ <ColumnDefinition Width="150"/>
32
+ </Grid.ColumnDefinitions>
33
+ <Image x:Name="Logo" Width="56" Height="36" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform"/>
34
+ <StackPanel Grid.Column="1" Margin="12,0,0,0">
35
+ <TextBlock x:Name="Org" Text="YGGDRASIL CORPORATION // HEIMDALL FORCE" FontSize="10" Foreground="#7FB2D0"/>
36
+ <TextBlock x:Name="HeroTitle" Text="海姆达尔终端" FontSize="30" FontWeight="Bold" Foreground="#E6EEF5" Margin="0,2,0,0"/>
37
+ <TextBlock x:Name="Mode" Text="SOURCE LAYER // 源码层覆盖" FontSize="11" Foreground="#7E8E9E" Margin="0,2,0,0"/>
38
+ </StackPanel>
39
+ <StackPanel Grid.Column="2" HorizontalAlignment="Right">
40
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
41
+ <TextBlock x:Name="Pct" Text="0" FontSize="52" FontWeight="Light" Foreground="#E6EEF5"/>
42
+ <TextBlock Text="%" FontSize="16" Foreground="#7FB2D0" VerticalAlignment="Top" Margin="2,8,0,0"/>
43
+ </StackPanel>
44
+ <TextBlock Text="LINK INTEGRITY" FontSize="9" Foreground="#7E8E9E" HorizontalAlignment="Right" Margin="0,2,0,0"/>
45
+ </StackPanel>
46
+ </Grid>
47
+
48
+ <Grid x:Name="Rail" Grid.Row="1" Margin="30,18,30,0" Height="2">
49
+ <Rectangle Fill="#263440"/>
50
+ <Rectangle x:Name="Bar" Fill="#D97745" HorizontalAlignment="Left" Width="0"/>
51
+ </Grid>
52
+
53
+ <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="30,14,30,0">
54
+ <Rectangle x:Name="Dot" Width="6" Height="6" Fill="#D97745" Margin="0,6,10,0"/>
55
+ <TextBlock x:Name="Stage" Text="WAIT" Width="90" FontSize="10" Foreground="#D97745"/>
56
+ <TextBlock x:Name="Status" Text="正在等待 DSH 完全退出…" FontSize="14" Foreground="#B7C4CF" TextTrimming="CharacterEllipsis"/>
57
+ </StackPanel>
58
+
59
+ <StackPanel x:Name="Steps" Grid.Row="3" Margin="30,18,30,0"/>
60
+
61
+ <Grid Grid.Row="4" Margin="30,0,30,18">
62
+ <TextBlock Text="HM-04 // ANALYST-04" FontSize="9" Foreground="#7E8E9E" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
63
+ <TextBlock x:Name="Note" Text="请勿关闭此窗口" FontSize="9" Foreground="#7FB2D0" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
64
+ </Grid>
65
+
66
+ <Grid x:Name="Complete" Grid.RowSpan="5" Background="#05080C" Visibility="Collapsed">
67
+ <Image x:Name="CompleteWatermark" Width="340" Height="212" HorizontalAlignment="Right" VerticalAlignment="Bottom"
68
+ Opacity="0.06" Margin="0,0,18,18" Stretch="Uniform" IsHitTestVisible="False"/>
69
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
70
+ <Border Width="130" Height="130" CornerRadius="65" BorderBrush="#7FB2D0" BorderThickness="1" Background="#05080C" HorizontalAlignment="Center">
71
+ <Image x:Name="CompleteLogo" Width="64" Height="40" Stretch="Uniform"/>
72
+ </Border>
73
+ <TextBlock x:Name="Kicker" Text="LINK CLOSED // 覆盖完成" FontSize="10" Foreground="#7FB2D0" HorizontalAlignment="Center" Margin="0,18,0,0"/>
74
+ <TextBlock x:Name="CompleteTitle" Text="接入链路已闭合" FontSize="34" FontWeight="Bold" Foreground="#E6EEF5" HorizontalAlignment="Center" Margin="0,8,0,0"/>
75
+ <TextBlock x:Name="CompleteMeta" Text="HM-04 · ANALYST-04 · CLEARANCE A · ZERO ZONE" FontSize="10" Foreground="#7E8E9E" HorizontalAlignment="Center" Margin="0,8,0,0"/>
76
+ <Button x:Name="Launch" Width="300" Height="58" Margin="0,26,0,0" HorizontalAlignment="Center"
77
+ Background="#D97745" Foreground="#0A0F14" BorderThickness="0" Cursor="Hand">
78
+ <StackPanel>
79
+ <TextBlock Text="启动终端" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center"/>
80
+ <TextBlock Text="LAUNCH DSH" FontSize="9" HorizontalAlignment="Center" Margin="0,2,0,0"/>
81
+ </StackPanel>
82
+ </Button>
83
+ <Button x:Name="Later" Width="300" Height="38" Margin="0,10,0,0" HorizontalAlignment="Center"
84
+ Background="#141C24" Foreground="#AAB8C5" BorderBrush="#2C3A46" BorderThickness="1"
85
+ Content="稍后" FontSize="13"/>
86
+
87
+ <TextBlock x:Name="CompleteNote" Text="点击后启动 DeepSeek Harness,当前窗口会自动关闭" FontSize="9" Foreground="#7E8E9E" HorizontalAlignment="Center" Margin="0,12,0,0"/>
88
+ </StackPanel>
89
+ </Grid>
90
+
91
+ <Grid x:Name="Failure" Grid.RowSpan="5" Background="#05080C" Visibility="Collapsed">
92
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="640">
93
+ <TextBlock Text="接入链路中断" FontSize="28" FontWeight="Bold" Foreground="#E39797" HorizontalAlignment="Center"/>
94
+ <TextBlock x:Name="ErrorText" Text="" FontSize="14" Foreground="#B7C4CF" TextWrapping="Wrap" TextAlignment="Center" Margin="0,18,0,0"/>
95
+ <Button x:Name="CloseError" Width="120" Height="38" Margin="0,24,0,0" HorizontalAlignment="Center"
96
+ Background="#141C24" Foreground="#E6EEF5" BorderBrush="#263440" BorderThickness="1" Content="关闭"/>
97
+ </StackPanel>
98
+ </Grid>
99
+
100
+ <Border Grid.RowSpan="5" BorderBrush="#263440" BorderThickness="1" Margin="7" IsHitTestVisible="False"/>
101
+ </Grid>
102
+ </Window>
103
+ '@
104
+
105
+ $window = [Windows.Markup.XamlReader]::Parse($xaml)
106
+ $logo = '__LOGO__'
107
+ $window.FindName('Logo').Source = New-Object Windows.Media.Imaging.BitmapImage([Uri]$logo)
108
+ $window.FindName('CompleteLogo').Source = New-Object Windows.Media.Imaging.BitmapImage([Uri]$logo)
109
+ $window.FindName('Watermark').Source = New-Object Windows.Media.Imaging.BitmapImage([Uri]$logo)
110
+ $window.FindName('CompleteWatermark').Source = New-Object Windows.Media.Imaging.BitmapImage([Uri]$logo)
111
+ $window.FindName('Pct').Text = '100'
112
+ $window.FindName('Stage').Text = 'READY'
113
+ $window.FindName('Status').Text = '源码层尚未接入'
114
+ $window.FindName('Steps').Visibility = 'Collapsed'
115
+ $window.FindName('Kicker').Text = 'RESTART REQUIRED // 需要重启'
116
+ $window.FindName('CompleteTitle').Text = '安装完成,需要重启'
117
+ $window.FindName('CompleteMeta').Text = '源码层尚未接入 · 完全退出 DSH 后写入'
118
+ $window.FindName('CompleteNote').Text = '点击「现在重启」后关闭 DSH,应用源码层并自动重新启动'
119
+ $window.FindName('Complete').Visibility = 'Visible'
120
+
121
+ $launch = $window.FindName('Launch')
122
+ $launch.Content = '现在重启'
123
+ $laterButton = $window.FindName('Later')
124
+ $script:doRestart = $false
125
+ $launch.Add_Click({
126
+ $script:doRestart = $true
127
+ $window.Close()
128
+ })
129
+ $laterButton.Add_Click({ $window.Close() })
130
+ [void]$window.ShowDialog()
131
+
132
+ if ($script:doRestart -and $RestartScript -and (Test-Path -LiteralPath $RestartScript)) {
133
+ & $RestartScript
134
+ }
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.1.8';
20
+ const VERSION = '3.2.1';
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
@@ -369,21 +369,37 @@ function writeRestartScript() {
369
369
  function askRestartConfirmation(restartScript) {
370
370
  if (!restartScript) return;
371
371
  try {
372
- const templatePath = path.join(ROOT, 'assets', 'source', 'restart-confirm.hta');
373
- let html = fs.readFileSync(templatePath, 'utf8').replace(/^\uFEFF/, '');
374
- const command = 'powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "'
375
- + restartScript.replace(/\\/g, '/') + '"';
376
- html = html.replace('__RESTART_COMMAND__', command.replace(/'/g, "\\'"));
377
- const backgroundSource = path.join(ROOT, 'assets', 'previews', 'loading-dark.png');
378
- fs.copyFileSync(backgroundSource, path.join(STATE_DIR, 'loading-dark.png'));
379
- html = html.replace('__BACKGROUND__', 'loading-dark.png');
380
- const file = path.join(STATE_DIR, 'restart-confirm.hta');
381
- fs.writeFileSync(file, '\ufeff' + html, 'utf8');
382
- const mshta = path.join(
372
+ const templatePath = path.join(ROOT, 'assets', 'source', 'restart-confirm.ps1');
373
+ let script = fs.readFileSync(templatePath, 'utf8').replace(/^\uFEFF/, '');
374
+ const background = path.join(ROOT, 'assets', 'previews', 'loading-dark.png').replace(/\\/g, '/');
375
+ script = script.replace('__BACKGROUND__', background);
376
+ const mark = path.join(ROOT, 'assets', 'source', 'confirm-mark.png').replace(/\\/g, '/');
377
+ script = script.replace('__MARK__', mark);
378
+ const logo = path.join(ROOT, 'assets', 'source', 'hm-mark-light.png').replace(/\\/g, '/');
379
+ script = script.replace('__LOGO__', logo);
380
+ const confirmPath = path.join(STATE_DIR, 'restart-confirm.ps1');
381
+ fs.writeFileSync(confirmPath, '\ufeff' + script, 'utf8');
382
+
383
+ const powershell = path.join(
383
384
  process.env.SystemRoot || 'C:\\Windows',
384
- 'System32', 'mshta.exe',
385
+ 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe',
385
386
  );
386
- const child = spawn(mshta, [file], {
387
+ const pythonw = stageRuntime();
388
+ if (!pythonw) throw new Error('python runtime not found');
389
+ const launcher = path.join(STATE_DIR, 'launch-confirm.py');
390
+ const lines = [
391
+ 'import subprocess',
392
+ 'subprocess.Popen([',
393
+ ' r"' + powershell + '",',
394
+ ' "-NoProfile", "-NonInteractive", "-STA",',
395
+ ' "-ExecutionPolicy", "Bypass",',
396
+ ' "-File", r"' + confirmPath + '",',
397
+ ' "-RestartScript", r"' + restartScript + '",',
398
+ '], creationflags=0x08000000)',
399
+ '',
400
+ ];
401
+ fs.writeFileSync(launcher, lines.join('\n'), 'utf8');
402
+ const child = spawn(pythonw, [launcher], {
387
403
  detached: true, stdio: 'ignore',
388
404
  });
389
405
  child.unref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-snowbreak-heimdall",
3
- "version": "3.1.8",
3
+ "version": "3.2.1",
4
4
  "description": "《尘白禁区》海姆达尔终端 / 世界树公司源码级皮肤:加载画面、双主题、菜单/侧栏/图标,插件仅在加载后播放启动动画。Windows / DSH 0.2.2-rc.1。",
5
5
  "type": "module",
6
6
  "license": "MIT",