@lifeaitools/clauth 1.5.0 → 1.5.2

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.
@@ -2362,6 +2362,22 @@ async function updateBuildStatus() {
2362
2362
  }
2363
2363
  setInterval(updateBuildStatus, 10000);
2364
2364
 
2365
+ // Detect daemon restart (PID change) and reload so boot() runs fresh.
2366
+ // Without this, an old tab stays in main-view after restart, sees tunnel
2367
+ // as not_started (vault locked), and gets stuck showing "checking tunnel".
2368
+ let _watchedPid = null;
2369
+ setInterval(async () => {
2370
+ try {
2371
+ const p = await fetch(BASE + "/ping").then(r => r.json());
2372
+ if (_watchedPid && p.pid !== _watchedPid) { window.location.reload(); return; }
2373
+ _watchedPid = p.pid;
2374
+ // Also recover if vault became locked on us (e.g. user locked from another tab)
2375
+ if (p.locked && document.getElementById("main-view").style.display !== "none") {
2376
+ window.location.reload();
2377
+ }
2378
+ } catch {}
2379
+ }, 5000);
2380
+
2365
2381
  boot();
2366
2382
  </script>
2367
2383
  </body>
@@ -3436,7 +3452,7 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
3436
3452
  if (fs.existsSync(autostartDir)) {
3437
3453
  try {
3438
3454
  const pwEscaped = pw.replace(/'/g, "''");
3439
- const psExpr = `[Convert]::ToBase64String([Security.Cryptography.ProtectedData]::Protect([Text.Encoding]::UTF8.GetBytes('${pwEscaped}'),$null,'CurrentUser'))`;
3455
+ const psExpr = `Add-Type -AssemblyName System.Security; [Convert]::ToBase64String([Security.Cryptography.ProtectedData]::Protect([Text.Encoding]::UTF8.GetBytes('${pwEscaped}'),$null,'CurrentUser'))`;
3440
3456
  const psExe = process.env.SystemRoot
3441
3457
  ? `${process.env.SystemRoot}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`
3442
3458
  : "powershell.exe";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {