@lifeaitools/clauth 1.5.62 → 1.5.64

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/install.ps1 CHANGED
@@ -1,109 +1,109 @@
1
- # clauth installer - Windows
2
- # Private repo - run locally:
3
- # cd C:\Dev\clauth && git pull && .\install.ps1
4
-
5
- $ErrorActionPreference = "Stop"
6
- $REPO = "https://github.com/LIFEAI/clauth.git"
7
- $DIR = "$env:USERPROFILE\.clauth"
8
-
9
- # Check git
10
- try { git --version | Out-Null } catch {
11
- Write-Host ""
12
- Write-Host " x git is required." -ForegroundColor Red
13
- Write-Host " Install from https://git-scm.com then re-run this script."
14
- Write-Host ""
15
- exit 1
16
- }
17
-
18
- # Check Node
19
- try { node --version | Out-Null } catch {
20
- Write-Host ""
21
- Write-Host " x Node.js v18+ is required." -ForegroundColor Red
22
- Write-Host " Install from https://nodejs.org then re-run this script."
23
- Write-Host ""
24
- exit 1
25
- }
26
-
27
- # Check cloudflared (soft warning - not required for install)
28
- if (-not (Get-Command cloudflared -ErrorAction SilentlyContinue)) {
29
- Write-Host " Note: cloudflared not found. Install after setup for claude.ai web integration." -ForegroundColor Yellow
30
- Write-Host " winget install Cloudflare.cloudflared" -ForegroundColor Gray
31
- Write-Host ""
32
- }
33
-
34
- # Skip bootstrap if CLAUTH npm package is already installed globally
35
- $alreadyInstalled = $false
36
- try {
37
- $ver = & npm list -g @lifeaitools/clauth --depth=0 2>$null | Select-String "@lifeaitools/clauth"
38
- if ($ver) { $alreadyInstalled = $true }
39
- } catch { }
40
-
41
- if ($alreadyInstalled) {
42
- Write-Host " clauth already installed globally - skipping bootstrap." -ForegroundColor Green
43
- } else {
44
- # Clone or update
45
- if (Test-Path "$DIR\.git") {
46
- Write-Host " Updating clauth..."
47
- Set-Location $DIR; git pull --quiet
48
- } else {
49
- Write-Host " Cloning clauth..."
50
- git clone --quiet $REPO $DIR
51
- }
52
-
53
- # Run compiled bootstrap binary
54
- $bootstrap = "$DIR\scripts\bin\bootstrap-win.exe"
55
- if (-not (Test-Path $bootstrap)) {
56
- Write-Host " x Bootstrap binary not found at $bootstrap" -ForegroundColor Red
57
- exit 1
58
- }
59
-
60
- Set-Location $DIR
61
- & $bootstrap
62
- }
63
-
64
- # Register autostart - idempotent, runs every install/update
65
- # Primary: Task Scheduler (preferred - supports delay and OS-managed restarts)
66
- # Fallback: Startup folder shortcut (fully functional - autostart.ps1 has its own crash-recovery loop)
67
- $autostartScript = "$env:APPDATA\clauth\autostart.ps1"
68
- $taskName = "CLAUTH Daemon"
69
-
70
- if (Test-Path $autostartScript) {
71
- Write-Host ""
72
- Write-Host " Registering autostart..." -ForegroundColor Cyan
73
-
74
- $registered = $false
75
-
76
- # Try Task Scheduler first
77
- try {
78
- Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
79
- $action = New-ScheduledTaskAction -Execute "powershell.exe" `
80
- -Argument "-WindowStyle Hidden -ExecutionPolicy Bypass -File `"$autostartScript`""
81
- $trigger = New-ScheduledTaskTrigger -AtLogOn
82
- $settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
83
- Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger `
84
- -Settings $settings -RunLevel Limited -Force -ErrorAction Stop | Out-Null
85
- Write-Host " + Task Scheduler: '$taskName' registered (triggers at logon)." -ForegroundColor Green
86
- $registered = $true
87
- } catch { }
88
-
89
- # Fallback: Startup folder - valid solution, autostart.ps1 handles crash recovery internally
90
- if (-not $registered) {
91
- $startupDir = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
92
- $shortcut = "$startupDir\clauth-autostart.lnk"
93
- $wsh = New-Object -ComObject WScript.Shell
94
- $lnk = $wsh.CreateShortcut($shortcut)
95
- $lnk.TargetPath = "powershell.exe"
96
- # 15s delay baked in so profile is loaded before daemon starts
97
- $lnk.Arguments = "-WindowStyle Hidden -ExecutionPolicy Bypass -Command `"Start-Sleep 15; & '$autostartScript'`""
98
- $lnk.WorkingDirectory = "$env:APPDATA\clauth"
99
- $lnk.WindowStyle = 7
100
- $lnk.Save()
101
- Write-Host " + Autostart registered via Startup folder (15s delay, crash-recovery loop active)." -ForegroundColor Green
102
- }
103
- } else {
104
- Write-Host ""
105
- Write-Host " ! autostart.ps1 not found - skipping autostart registration." -ForegroundColor Yellow
106
- Write-Host " Run: clauth autostart install" -ForegroundColor Gray
107
- }
108
-
109
- exit $LASTEXITCODE
1
+ # clauth installer - Windows
2
+ # Private repo - run locally:
3
+ # cd C:\Dev\clauth && git pull && .\install.ps1
4
+
5
+ $ErrorActionPreference = "Stop"
6
+ $REPO = "https://github.com/LIFEAI/clauth.git"
7
+ $DIR = "$env:USERPROFILE\.clauth"
8
+
9
+ # Check git
10
+ try { git --version | Out-Null } catch {
11
+ Write-Host ""
12
+ Write-Host " x git is required." -ForegroundColor Red
13
+ Write-Host " Install from https://git-scm.com then re-run this script."
14
+ Write-Host ""
15
+ exit 1
16
+ }
17
+
18
+ # Check Node
19
+ try { node --version | Out-Null } catch {
20
+ Write-Host ""
21
+ Write-Host " x Node.js v18+ is required." -ForegroundColor Red
22
+ Write-Host " Install from https://nodejs.org then re-run this script."
23
+ Write-Host ""
24
+ exit 1
25
+ }
26
+
27
+ # Check cloudflared (soft warning - not required for install)
28
+ if (-not (Get-Command cloudflared -ErrorAction SilentlyContinue)) {
29
+ Write-Host " Note: cloudflared not found. Install after setup for claude.ai web integration." -ForegroundColor Yellow
30
+ Write-Host " winget install Cloudflare.cloudflared" -ForegroundColor Gray
31
+ Write-Host ""
32
+ }
33
+
34
+ # Skip bootstrap if CLAUTH npm package is already installed globally
35
+ $alreadyInstalled = $false
36
+ try {
37
+ $ver = & npm list -g @lifeaitools/clauth --depth=0 2>$null | Select-String "@lifeaitools/clauth"
38
+ if ($ver) { $alreadyInstalled = $true }
39
+ } catch { }
40
+
41
+ if ($alreadyInstalled) {
42
+ Write-Host " clauth already installed globally - skipping bootstrap." -ForegroundColor Green
43
+ } else {
44
+ # Clone or update
45
+ if (Test-Path "$DIR\.git") {
46
+ Write-Host " Updating clauth..."
47
+ Set-Location $DIR; git pull --quiet
48
+ } else {
49
+ Write-Host " Cloning clauth..."
50
+ git clone --quiet $REPO $DIR
51
+ }
52
+
53
+ # Run compiled bootstrap binary
54
+ $bootstrap = "$DIR\scripts\bin\bootstrap-win.exe"
55
+ if (-not (Test-Path $bootstrap)) {
56
+ Write-Host " x Bootstrap binary not found at $bootstrap" -ForegroundColor Red
57
+ exit 1
58
+ }
59
+
60
+ Set-Location $DIR
61
+ & $bootstrap
62
+ }
63
+
64
+ # Register autostart - idempotent, runs every install/update
65
+ # Primary: Task Scheduler (preferred - supports delay and OS-managed restarts)
66
+ # Fallback: Startup folder shortcut (fully functional - autostart.ps1 has its own crash-recovery loop)
67
+ $autostartScript = "$env:APPDATA\clauth\autostart.ps1"
68
+ $taskName = "CLAUTH Daemon"
69
+
70
+ if (Test-Path $autostartScript) {
71
+ Write-Host ""
72
+ Write-Host " Registering autostart..." -ForegroundColor Cyan
73
+
74
+ $registered = $false
75
+
76
+ # Try Task Scheduler first
77
+ try {
78
+ Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
79
+ $action = New-ScheduledTaskAction -Execute "powershell.exe" `
80
+ -Argument "-WindowStyle Hidden -ExecutionPolicy Bypass -File `"$autostartScript`""
81
+ $trigger = New-ScheduledTaskTrigger -AtLogOn
82
+ $settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
83
+ Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger `
84
+ -Settings $settings -RunLevel Limited -Force -ErrorAction Stop | Out-Null
85
+ Write-Host " + Task Scheduler: '$taskName' registered (triggers at logon)." -ForegroundColor Green
86
+ $registered = $true
87
+ } catch { }
88
+
89
+ # Fallback: Startup folder - valid solution, autostart.ps1 handles crash recovery internally
90
+ if (-not $registered) {
91
+ $startupDir = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
92
+ $shortcut = "$startupDir\clauth-autostart.lnk"
93
+ $wsh = New-Object -ComObject WScript.Shell
94
+ $lnk = $wsh.CreateShortcut($shortcut)
95
+ $lnk.TargetPath = "powershell.exe"
96
+ # 15s delay baked in so profile is loaded before daemon starts
97
+ $lnk.Arguments = "-WindowStyle Hidden -ExecutionPolicy Bypass -Command `"Start-Sleep 15; & '$autostartScript'`""
98
+ $lnk.WorkingDirectory = "$env:APPDATA\clauth"
99
+ $lnk.WindowStyle = 7
100
+ $lnk.Save()
101
+ Write-Host " + Autostart registered via Startup folder (15s delay, crash-recovery loop active)." -ForegroundColor Green
102
+ }
103
+ } else {
104
+ Write-Host ""
105
+ Write-Host " ! autostart.ps1 not found - skipping autostart registration." -ForegroundColor Yellow
106
+ Write-Host " Run: clauth autostart install" -ForegroundColor Gray
107
+ }
108
+
109
+ exit $LASTEXITCODE
package/install.sh CHANGED
@@ -1,49 +1,49 @@
1
- #!/usr/bin/env bash
2
- # clauth installer
3
- set -e
4
-
5
- REPO="https://github.com/LIFEAI/clauth.git"
6
- DIR="$HOME/.clauth"
7
-
8
- # Check git
9
- if ! command -v git &>/dev/null; then
10
- echo ""; echo " x git is required."
11
- echo " Install git from https://git-scm.com then re-run this script."; echo ""
12
- exit 1
13
- fi
14
-
15
- # Check Node
16
- if ! command -v node &>/dev/null; then
17
- echo ""; echo " x Node.js v18+ is required."
18
- echo " Install from https://nodejs.org then re-run this script."; echo ""
19
- exit 1
20
- fi
21
-
22
- # Check cloudflared (soft warning)
23
- if ! command -v cloudflared &>/dev/null; then
24
- echo " Note: cloudflared not found. Install after setup for claude.ai web integration."
25
- if [[ "$OSTYPE" == "darwin"* ]]; then
26
- echo " brew install cloudflare/cloudflare/cloudflared"
27
- else
28
- echo " https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/"
29
- fi
30
- echo ""
31
- fi
32
-
33
- # Clone or update
34
- if [ -d "$DIR/.git" ]; then
35
- echo " Updating clauth..."; cd "$DIR" && git pull --quiet
36
- else
37
- echo " Cloning clauth..."; git clone --quiet "$REPO" "$DIR"
38
- fi
39
-
40
- # Run compiled bootstrap
41
- UNAME=$(uname -s | tr '[:upper:]' '[:lower:]')
42
- if [[ "$UNAME" == *"darwin"* ]]; then
43
- BOOTSTRAP="$DIR/scripts/bin/bootstrap-macos"
44
- else
45
- BOOTSTRAP="$DIR/scripts/bin/bootstrap-linux"
46
- fi
47
-
48
- chmod +x "$BOOTSTRAP"
49
- cd "$DIR" && "$BOOTSTRAP"
1
+ #!/usr/bin/env bash
2
+ # clauth installer
3
+ set -e
4
+
5
+ REPO="https://github.com/LIFEAI/clauth.git"
6
+ DIR="$HOME/.clauth"
7
+
8
+ # Check git
9
+ if ! command -v git &>/dev/null; then
10
+ echo ""; echo " x git is required."
11
+ echo " Install git from https://git-scm.com then re-run this script."; echo ""
12
+ exit 1
13
+ fi
14
+
15
+ # Check Node
16
+ if ! command -v node &>/dev/null; then
17
+ echo ""; echo " x Node.js v18+ is required."
18
+ echo " Install from https://nodejs.org then re-run this script."; echo ""
19
+ exit 1
20
+ fi
21
+
22
+ # Check cloudflared (soft warning)
23
+ if ! command -v cloudflared &>/dev/null; then
24
+ echo " Note: cloudflared not found. Install after setup for claude.ai web integration."
25
+ if [[ "$OSTYPE" == "darwin"* ]]; then
26
+ echo " brew install cloudflare/cloudflare/cloudflared"
27
+ else
28
+ echo " https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/"
29
+ fi
30
+ echo ""
31
+ fi
32
+
33
+ # Clone or update
34
+ if [ -d "$DIR/.git" ]; then
35
+ echo " Updating clauth..."; cd "$DIR" && git pull --quiet
36
+ else
37
+ echo " Cloning clauth..."; git clone --quiet "$REPO" "$DIR"
38
+ fi
39
+
40
+ # Run compiled bootstrap
41
+ UNAME=$(uname -s | tr '[:upper:]' '[:lower:]')
42
+ if [[ "$UNAME" == *"darwin"* ]]; then
43
+ BOOTSTRAP="$DIR/scripts/bin/bootstrap-macos"
44
+ else
45
+ BOOTSTRAP="$DIR/scripts/bin/bootstrap-linux"
46
+ fi
47
+
48
+ chmod +x "$BOOTSTRAP"
49
+ cd "$DIR" && "$BOOTSTRAP"
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@lifeaitools/clauth",
3
- "version": "1.5.62",
4
- "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
- "type": "module",
6
- "bin": {
7
- "clauth": "./cli/index.js"
8
- },
9
- "scripts": {
10
- "build": "bash scripts/build.sh",
11
- "postinstall": "node scripts/postinstall.js",
12
- "worker:start": "node cli/index.js serve",
13
- "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
14
- "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
15
- },
16
- "dependencies": {
17
- "chalk": "^5.3.0",
18
- "commander": "^12.1.0",
19
- "conf": "^13.0.0",
20
- "inquirer": "^10.1.0",
21
- "node-fetch": "^3.3.2",
22
- "ora": "^8.1.0",
23
- "@vscode/ripgrep": "^1.15.9",
24
- "fast-glob": "^3.3.2"
25
- },
26
- "engines": {
27
- "node": ">=18.0.0"
28
- },
29
- "keywords": [
30
- "lifeai",
31
- "credentials",
32
- "vault",
33
- "cli",
34
- "prt"
35
- ],
36
- "author": "Dave Ladouceur <dave@life.ai>",
37
- "license": "MIT",
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/LIFEAI/clauth.git"
41
- },
42
- "devDependencies": {
43
- "javascript-obfuscator": "^5.3.0"
44
- },
45
- "files": [
46
- "cli/",
47
- "scripts/bin/",
48
- "scripts/bootstrap.cjs",
49
- "scripts/build.sh",
50
- "scripts/postinstall.js",
51
- "supabase/",
52
- ".clauth-skill/",
53
- "install.sh",
54
- "install.ps1",
55
- "README.md"
56
- ],
57
- "publishConfig": {
58
- "access": "public"
59
- },
60
- "homepage": "https://github.com/LIFEAI/clauth"
61
- }
1
+ {
2
+ "name": "@lifeaitools/clauth",
3
+ "version": "1.5.64",
4
+ "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
+ "type": "module",
6
+ "bin": {
7
+ "clauth": "./cli/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "bash scripts/build.sh",
11
+ "postinstall": "node scripts/postinstall.js",
12
+ "worker:start": "node cli/index.js serve",
13
+ "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
14
+ "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
15
+ },
16
+ "dependencies": {
17
+ "chalk": "^5.3.0",
18
+ "commander": "^12.1.0",
19
+ "conf": "^13.0.0",
20
+ "inquirer": "^10.1.0",
21
+ "node-fetch": "^3.3.2",
22
+ "ora": "^8.1.0",
23
+ "@vscode/ripgrep": "^1.15.9",
24
+ "fast-glob": "^3.3.2"
25
+ },
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "keywords": [
30
+ "lifeai",
31
+ "credentials",
32
+ "vault",
33
+ "cli",
34
+ "prt"
35
+ ],
36
+ "author": "Dave Ladouceur <dave@life.ai>",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/LIFEAI/clauth.git"
41
+ },
42
+ "devDependencies": {
43
+ "javascript-obfuscator": "^5.3.0"
44
+ },
45
+ "files": [
46
+ "cli/",
47
+ "scripts/bin/",
48
+ "scripts/bootstrap.cjs",
49
+ "scripts/build.sh",
50
+ "scripts/postinstall.js",
51
+ "supabase/",
52
+ ".clauth-skill/",
53
+ "install.sh",
54
+ "install.ps1",
55
+ "README.md"
56
+ ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "homepage": "https://github.com/LIFEAI/clauth"
61
+ }
File without changes
File without changes