dsh-autorestart 0.8.4 → 0.8.6

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/README.md +465 -40
  3. package/assets/icon-9c245e5b.ico +0 -0
  4. package/assets/icon-rescue-1902bb15.ico +0 -0
  5. package/assets/icon-rescue-1902bb15.png +0 -0
  6. package/client.js +3002 -170
  7. package/cordis.patch.yml +12 -0
  8. package/docs/README.zh.md +231 -23
  9. package/docs/platform-matrix.md +171 -55
  10. package/docs/real-machine-verification-0.8.6.md +202 -0
  11. package/index.js +13272 -8513
  12. package/lib/autostart-advice.js +31 -2
  13. package/lib/backup.js +2768 -21
  14. package/lib/checkpoint.js +214 -7
  15. package/lib/cookie-clear.js +260 -0
  16. package/lib/lifecycle.js +23 -40
  17. package/lib/plugin-compare.js +499 -0
  18. package/lib/plugin-failure.js +382 -0
  19. package/lib/plugin-recover.js +1557 -0
  20. package/lib/plugin-watch.js +213 -0
  21. package/lib/rescue-paths.js +982 -56
  22. package/lib/restart-phase.js +5 -0
  23. package/lib/restart-verdict.js +379 -0
  24. package/lib/restart.js +244 -7
  25. package/lib/scheduler-capability.js +19 -3
  26. package/lib/sleep.js +190 -29
  27. package/lib/watchdog-disarm.js +46 -2
  28. package/lib/watchdog-schedule.js +834 -17
  29. package/lib/watchdog-tier.js +8 -1
  30. package/lib/watchdog.js +1222 -47
  31. package/locale/en.json +175 -68
  32. package/locale/zh.json +175 -68
  33. package/package.json +3 -2
  34. package/screenshots.json +6 -6
  35. package/scripts/README.md +6 -3
  36. package/scripts/build-icon.mjs +998 -0
  37. package/scripts/clear-dsh-auth-cookies.mjs +257 -0
  38. package/scripts/emergency-disable.sh +69 -2
  39. package/scripts/emergency-toggle.ps1 +85 -69
  40. package/scripts/rescue-strings.zh.json +36 -18
  41. package/scripts/restore-profile.ps1 +182 -1
  42. package/scripts/watchdog.mjs +432 -79
@@ -87,7 +87,14 @@ export function detectWatchdogCapabilities({ platform = process.platform, exec =
87
87
  hasSchtasks: windows ? commandWorks(exec, 'schtasks', ['/?']) : false,
88
88
  hasSystemdRun: windows ? false : commandWorks(exec, 'systemd-run', ['--version']),
89
89
  hasAt: windows ? false : commandWorks(exec, 'at', ['--version']),
90
- canDetach: windows ? false : commandWorks(exec, 'setsid', ['--version']),
90
+ // A REAL RUN, NOT A VERSION STRING (2026-11-02): `setsid --version` is a
91
+ // util-linux answer. BusyBox's `setsid` has no such flag and exits non-zero,
92
+ // so the old probe reported "this machine cannot detach a process" on a
93
+ // machine where `setsid` works perfectly — and the watchdog silently lost
94
+ // its only tier. `setsid true` asks the question that actually matters: can
95
+ // a command be put into its own session here? (`true` does nothing, so
96
+ // nothing is left behind either way.)
97
+ canDetach: windows ? false : commandWorks(exec, 'setsid', ['true']),
91
98
  };
92
99
  }
93
100