shennian 0.2.18 → 0.2.20

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.
@@ -13,13 +13,16 @@ export function restartCurrentDaemonAfterUpgrade(deps = {}) {
13
13
  const spawnFn = deps.spawn ?? spawn;
14
14
  const execSyncFn = deps.execSync ?? execSync;
15
15
  if (platform === 'win32') {
16
- const command = env.ComSpec || 'cmd.exe';
17
- const delayedStart = [
18
- 'timeout /t 2 /nobreak >nul',
19
- 'wscript "%USERPROFILE%\\.shennian\\autostart.vbs"',
20
- ].join(' & ');
16
+ const launcherPath = '%USERPROFILE%\\.shennian\\autostart.vbs';
17
+ const delayedStart = `Start-Sleep -Seconds 2; Start-Process -WindowStyle Hidden -FilePath wscript.exe -ArgumentList '${launcherPath}'`;
21
18
  try {
22
- const child = spawnFn(command, ['/d', '/s', '/c', `"${delayedStart}"`], {
19
+ const child = spawnFn('powershell.exe', [
20
+ '-NoProfile',
21
+ '-WindowStyle',
22
+ 'Hidden',
23
+ '-Command',
24
+ delayedStart,
25
+ ], {
23
26
  detached: true,
24
27
  stdio: 'ignore',
25
28
  windowsHide: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shennian",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "description": "Shennian — AI Agent Mobile Console CLI",
5
5
  "type": "module",
6
6
  "bin": {