@lifeaitools/clauth 1.5.80 → 1.5.81
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/cli/commands/serve.js +30 -24
- package/package.json +61 -61
package/cli/commands/serve.js
CHANGED
|
@@ -3687,37 +3687,43 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
|
|
|
3687
3687
|
return ok(res, { status: tunnelStatus });
|
|
3688
3688
|
}
|
|
3689
3689
|
|
|
3690
|
-
// POST /launch-ccandme —
|
|
3690
|
+
// POST /launch-ccandme — open a new CCandMe WezTerm window without killing existing sessions
|
|
3691
3691
|
if (method === "POST" && reqPath === "/launch-ccandme") {
|
|
3692
3692
|
if (lockedGuard(res)) return;
|
|
3693
3693
|
try {
|
|
3694
3694
|
const { spawn } = await import("child_process");
|
|
3695
|
-
const
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3695
|
+
const { existsSync, readFileSync, writeFileSync } = await import("fs");
|
|
3696
|
+
|
|
3697
|
+
// Locate WezTerm
|
|
3698
|
+
const wezCandidates = [
|
|
3699
|
+
"C:/Program Files/WezTerm/wezterm.exe",
|
|
3700
|
+
"C:/Program Files (x86)/WezTerm/wezterm.exe",
|
|
3701
|
+
process.env.WEZTERM_EXE,
|
|
3702
|
+
].filter(Boolean);
|
|
3703
|
+
const wezExe = wezCandidates.find(existsSync) || "wezterm";
|
|
3704
|
+
|
|
3705
|
+
// Render the lua config from the CCandMe template (skip the kill-existing step)
|
|
3706
|
+
const CCANDME_DIR = "C:/Dev/CCandMe";
|
|
3707
|
+
const WORK_DIR = "C:/Dev/regen-root";
|
|
3708
|
+
const templatePath = path.join(CCANDME_DIR, "templates", "wezterm.lua");
|
|
3709
|
+
const luaOutPath = path.join(CCANDME_DIR, ".ccandme-wezterm.lua");
|
|
3710
|
+
|
|
3711
|
+
if (existsSync(templatePath)) {
|
|
3712
|
+
const lua = readFileSync(templatePath, "utf8")
|
|
3713
|
+
.replaceAll("__SUPERVISOR_DIR__", CCANDME_DIR.replace(/\//g, "\\\\"))
|
|
3714
|
+
.replaceAll("__WORK_DIR__", WORK_DIR.replace(/\//g, "\\\\"))
|
|
3715
|
+
.replaceAll("__WORKSPACE__", "ccandme")
|
|
3716
|
+
.replaceAll("__CLAUDE_CMD__", "claude")
|
|
3717
|
+
.replaceAll("__CODEX_CMD__", "codex")
|
|
3718
|
+
.replaceAll("__PACKAGE_ROOT__", CCANDME_DIR.replace(/\//g, "\\\\"));
|
|
3719
|
+
writeFileSync(luaOutPath, lua, "utf8");
|
|
3710
3720
|
}
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
}
|
|
3716
|
-
const child = spawn(cmd, args, {
|
|
3721
|
+
|
|
3722
|
+
// Launch WezTerm with the CCandMe config — no kill of existing sessions
|
|
3723
|
+
const luaArg = existsSync(luaOutPath) ? luaOutPath : path.join(CCANDME_DIR, ".ccandme-wezterm.lua");
|
|
3724
|
+
const child = spawn(wezExe, ["--config-file", luaArg, "start"], {
|
|
3717
3725
|
detached: true,
|
|
3718
3726
|
stdio: "ignore",
|
|
3719
|
-
windowsHide: false,
|
|
3720
|
-
shell: process.platform === "win32" && cmd === "cmd.exe" ? false : true,
|
|
3721
3727
|
});
|
|
3722
3728
|
child.unref();
|
|
3723
3729
|
return ok(res, { ok: true, message: "CCandMe launched" });
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lifeaitools/clauth",
|
|
3
|
-
"version": "1.5.
|
|
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.81",
|
|
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
|
+
}
|