@lifeaitools/clauth 1.30.22 → 1.30.24

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 (40) hide show
  1. package/.clauth-skill/SKILL.md +111 -111
  2. package/README.md +25 -0
  3. package/cli/api.classify.test.js +75 -75
  4. package/cli/assets/codevelop/launcher-active.cmd.template +20 -20
  5. package/cli/assets/codevelop/launcher-static.cmd.template +7 -7
  6. package/cli/assets/codevelop/windows-terminal.profiles.json +48 -48
  7. package/cli/assets/watchdog.ps1 +42 -42
  8. package/cli/commands/agent-cron.js +396 -396
  9. package/cli/commands/agent-pool.js +1962 -1962
  10. package/cli/commands/codevelop.js +1190 -1190
  11. package/cli/commands/doctor.js +302 -302
  12. package/cli/commands/install.js +10 -10
  13. package/cli/commands/invite.js +175 -175
  14. package/cli/commands/join.js +179 -179
  15. package/cli/commands/npm.js +182 -182
  16. package/cli/commands/scrub.js +327 -327
  17. package/cli/commands/scrub.test.js +115 -115
  18. package/cli/commands/serve.js +43 -86
  19. package/cli/commands/watchdog.js +209 -209
  20. package/cli/conf-path.js +21 -21
  21. package/cli/enrollment-script.js +82 -82
  22. package/cli/fingerprint.js +143 -143
  23. package/cli/index.js +1053 -1053
  24. package/cli/lib/fs-git.js +282 -282
  25. package/cli/recovery.js +101 -101
  26. package/cli/studio-debug.js +1095 -1095
  27. package/cli/supervisor-registry.js +594 -589
  28. package/cli/supervisor-registry.test.js +397 -397
  29. package/cli/supervisor-ui.test.js +5 -83
  30. package/cli/watchdog-registry.js +209 -209
  31. package/cli/watchdog-registry.test.js +89 -89
  32. package/install.ps1 +21 -21
  33. package/package.json +2 -2
  34. package/scripts/bin/bootstrap-linux +0 -0
  35. package/scripts/bin/bootstrap-macos +0 -0
  36. package/scripts/bin/bootstrap-win.exe +0 -0
  37. package/supabase/migrations/001_clauth_schema.sql +12 -12
  38. package/supabase/migrations/003_clauth_config.sql +13 -13
  39. package/supabase/migrations/003_machine_enrollments.sql +39 -39
  40. package/cli/served-script-syntax.test.mjs +0 -54
@@ -1,42 +1,42 @@
1
- # clauth-watchdog.ps1
2
- # Monitors clauth daemon on port 52437. Restarts it if not responding.
3
- # Installed by: npm install -g @lifeaitools/clauth
4
- # Managed by: clauth watchdog [install|uninstall|status]
5
-
6
- $clauth = "$env:APPDATA\npm\clauth.cmd"
7
- $logFile = "$env:APPDATA\clauth\watchdog.log"
8
- $pingUrl = "http://127.0.0.1:52437/ping"
9
- $interval = 15
10
-
11
- function Write-Log($msg) {
12
- $ts = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
13
- $line = "[$ts] $msg"
14
- Add-Content -Path $logFile -Value $line -ErrorAction SilentlyContinue
15
- }
16
-
17
- Write-Log "Watchdog started (PID $PID, clauth=$clauth)"
18
-
19
- while ($true) {
20
- $alive = $false
21
- try {
22
- $r = Invoke-WebRequest -Uri $pingUrl -TimeoutSec 3 -UseBasicParsing -ErrorAction Stop
23
- if ($r.StatusCode -eq 200) { $alive = $true }
24
- } catch { }
25
-
26
- if (-not $alive) {
27
- Write-Log "Daemon not responding — restarting..."
28
- Start-Process -FilePath "cmd.exe" `
29
- -ArgumentList "/c `"$clauth`" serve start" `
30
- -WindowStyle Hidden
31
- Start-Sleep -Seconds 5
32
- try {
33
- $r = Invoke-WebRequest -Uri $pingUrl -TimeoutSec 5 -UseBasicParsing -ErrorAction Stop
34
- if ($r.StatusCode -eq 200) { Write-Log "Daemon restarted OK." }
35
- else { Write-Log "WARNING: Daemon still not responding." }
36
- } catch {
37
- Write-Log "WARNING: Daemon still not responding after restart."
38
- }
39
- }
40
-
41
- Start-Sleep -Seconds $interval
42
- }
1
+ # clauth-watchdog.ps1
2
+ # Monitors clauth daemon on port 52437. Restarts it if not responding.
3
+ # Installed by: npm install -g @lifeaitools/clauth
4
+ # Managed by: clauth watchdog [install|uninstall|status]
5
+
6
+ $clauth = "$env:APPDATA\npm\clauth.cmd"
7
+ $logFile = "$env:APPDATA\clauth\watchdog.log"
8
+ $pingUrl = "http://127.0.0.1:52437/ping"
9
+ $interval = 15
10
+
11
+ function Write-Log($msg) {
12
+ $ts = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
13
+ $line = "[$ts] $msg"
14
+ Add-Content -Path $logFile -Value $line -ErrorAction SilentlyContinue
15
+ }
16
+
17
+ Write-Log "Watchdog started (PID $PID, clauth=$clauth)"
18
+
19
+ while ($true) {
20
+ $alive = $false
21
+ try {
22
+ $r = Invoke-WebRequest -Uri $pingUrl -TimeoutSec 3 -UseBasicParsing -ErrorAction Stop
23
+ if ($r.StatusCode -eq 200) { $alive = $true }
24
+ } catch { }
25
+
26
+ if (-not $alive) {
27
+ Write-Log "Daemon not responding — restarting..."
28
+ Start-Process -FilePath "cmd.exe" `
29
+ -ArgumentList "/c `"$clauth`" serve start" `
30
+ -WindowStyle Hidden
31
+ Start-Sleep -Seconds 5
32
+ try {
33
+ $r = Invoke-WebRequest -Uri $pingUrl -TimeoutSec 5 -UseBasicParsing -ErrorAction Stop
34
+ if ($r.StatusCode -eq 200) { Write-Log "Daemon restarted OK." }
35
+ else { Write-Log "WARNING: Daemon still not responding." }
36
+ } catch {
37
+ Write-Log "WARNING: Daemon still not responding after restart."
38
+ }
39
+ }
40
+
41
+ Start-Sleep -Seconds $interval
42
+ }