@lifeaitools/clauth 1.30.21 → 1.30.23

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.
@@ -0,0 +1,54 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import vm from 'node:vm';
4
+ import { spawn } from 'node:child_process';
5
+ import path from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const here = path.dirname(fileURLToPath(import.meta.url));
9
+ const cliEntry = path.join(here, 'index.js');
10
+ const PORT = 52499;
11
+
12
+ function waitForPort(url, timeoutMs) {
13
+ const deadline = Date.now() + timeoutMs;
14
+ const attempt = async () => {
15
+ try {
16
+ const r = await fetch(url);
17
+ if (r.ok) return true;
18
+ } catch {}
19
+ if (Date.now() > deadline) throw new Error('timed out waiting for ' + url);
20
+ await new Promise((r) => setTimeout(r, 200));
21
+ return attempt();
22
+ };
23
+ return attempt();
24
+ }
25
+
26
+ // Regression coverage for the 2026-08-06 incident: a stray tool-authoring
27
+ // artifact ("[char]0x2192" -- PowerShell character-literal syntax, never
28
+ // evaluated because it was written inside a single-quoted PowerShell string)
29
+ // landed as literal text inside the embedded dashboard <script> block. That
30
+ // produced a real SyntaxError in every browser that loaded the page, so the
31
+ // ENTIRE inline script failed to parse -- meaning unlock(), unlockWrites(),
32
+ // runSupervisorSurface(), and every other function on the page silently
33
+ // never existed. `node --check` on serve.js itself never catches this class
34
+ // of bug: the broken text lives inside a JS string/template FOR the browser,
35
+ // which is opaque to Node's own parser. This test extracts the actual served
36
+ // script -- the same bytes a real browser executes -- and parses it for real.
37
+ test('the served dashboard script has no syntax errors (would have caught the 2026-08-06 incident)', async () => {
38
+ const child = spawn(process.execPath, [cliEntry, 'serve', 'start', '--isolated', '--port', String(PORT)], {
39
+ stdio: 'ignore',
40
+ windowsHide: true,
41
+ });
42
+ try {
43
+ await waitForPort('http://127.0.0.1:' + PORT + '/ping', 15000);
44
+ const html = await fetch('http://127.0.0.1:' + PORT + '/').then((r) => r.text());
45
+ const start = html.indexOf('<script>');
46
+ const end = html.lastIndexOf('</script>');
47
+ assert.ok(start !== -1 && end !== -1, 'expected an inline <script> block in the served dashboard');
48
+ const js = html.slice(start + 8, end);
49
+ assert.doesNotThrow(() => new vm.Script(js), 'the served dashboard script must be syntactically valid JavaScript');
50
+ } finally {
51
+ await fetch('http://127.0.0.1:' + PORT + '/shutdown').catch(() => {});
52
+ child.kill();
53
+ }
54
+ });
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
- {
2
- "name": "@lifeaitools/clauth",
3
- "version": "1.30.21",
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
- "test": "node --test cli/commands/scrub.test.js cli/api.classify.test.js cli/supervisor-registry.test.js cli/supervisor-ui.test.js test/studio-debug.test.mjs test/dashboard-key-generator.test.mjs && node test-auth-verdict.mjs",
12
- "test:studio-debug": "node --test test/studio-debug.test.mjs",
13
- "test:agent-pool": "node test/agent-pool.test.mjs",
14
- "test:call-agent-10": "node test/call-agent-10-skills.test.mjs",
15
- "test:call-agent-guard": "node test/call-agent-guard.test.mjs",
16
- "test:tintin-settings": "node test/tintin-settings.test.mjs",
17
- "postinstall": "node scripts/postinstall.js",
18
- "worker:start": "node cli/index.js serve",
19
- "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
20
- "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
21
- },
22
- "dependencies": {
23
- "@vscode/ripgrep": "^1.15.9",
24
- "chalk": "^5.3.0",
25
- "commander": "^12.1.0",
26
- "conf": "^13.0.0",
27
- "fast-glob": "^3.3.2",
28
- "inquirer": "^10.1.0",
29
- "node-fetch": "^3.3.2",
30
- "ora": "^8.1.0",
31
- "regen-root": "file:../../regen-root.wt/x-claude-sv",
32
- "typescript": "^5.9.3"
33
- },
34
- "engines": {
35
- "node": ">=18.0.0"
36
- },
37
- "keywords": [
38
- "lifeai",
39
- "credentials",
40
- "vault",
41
- "cli",
42
- "prt"
43
- ],
44
- "author": "Dave Ladouceur <dave@life.ai>",
45
- "license": "MIT",
46
- "repository": {
47
- "type": "git",
48
- "url": "https://github.com/LIFEAI/clauth.git"
49
- },
50
- "devDependencies": {
51
- "javascript-obfuscator": "^5.3.0"
52
- },
53
- "files": [
54
- "cli/",
55
- "scripts/bin/",
56
- "scripts/bootstrap.cjs",
57
- "scripts/build.sh",
58
- "scripts/postinstall.js",
59
- "supabase/",
60
- ".clauth-skill/",
61
- "install.sh",
62
- "install.ps1",
63
- "README.md"
64
- ],
65
- "publishConfig": {
66
- "access": "public"
67
- },
68
- "homepage": "https://github.com/LIFEAI/clauth"
69
- }
1
+ {
2
+ "name": "@lifeaitools/clauth",
3
+ "version": "1.30.23",
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
+ "test": "node --test cli/commands/scrub.test.js cli/api.classify.test.js cli/supervisor-registry.test.js cli/supervisor-ui.test.js cli/served-script-syntax.test.mjs test/studio-debug.test.mjs test/dashboard-key-generator.test.mjs && node test-auth-verdict.mjs",
12
+ "test:studio-debug": "node --test test/studio-debug.test.mjs",
13
+ "test:agent-pool": "node test/agent-pool.test.mjs",
14
+ "test:call-agent-10": "node test/call-agent-10-skills.test.mjs",
15
+ "test:call-agent-guard": "node test/call-agent-guard.test.mjs",
16
+ "test:tintin-settings": "node test/tintin-settings.test.mjs",
17
+ "postinstall": "node scripts/postinstall.js",
18
+ "worker:start": "node cli/index.js serve",
19
+ "worker:stop": "curl -s http://127.0.0.1:52437/shutdown 2>nul || taskkill /F /IM cloudflared.exe 2>nul & exit 0",
20
+ "worker:restart": "npm run worker:stop && timeout /t 3 /nobreak >nul && npm run worker:start"
21
+ },
22
+ "dependencies": {
23
+ "@vscode/ripgrep": "^1.15.9",
24
+ "chalk": "^5.3.0",
25
+ "commander": "^12.1.0",
26
+ "conf": "^13.0.0",
27
+ "fast-glob": "^3.3.2",
28
+ "inquirer": "^10.1.0",
29
+ "node-fetch": "^3.3.2",
30
+ "ora": "^8.1.0",
31
+ "regen-root": "file:../../regen-root.wt/x-claude-sv",
32
+ "typescript": "^5.9.3"
33
+ },
34
+ "engines": {
35
+ "node": ">=18.0.0"
36
+ },
37
+ "keywords": [
38
+ "lifeai",
39
+ "credentials",
40
+ "vault",
41
+ "cli",
42
+ "prt"
43
+ ],
44
+ "author": "Dave Ladouceur <dave@life.ai>",
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/LIFEAI/clauth.git"
49
+ },
50
+ "devDependencies": {
51
+ "javascript-obfuscator": "^5.3.0"
52
+ },
53
+ "files": [
54
+ "cli/",
55
+ "scripts/bin/",
56
+ "scripts/bootstrap.cjs",
57
+ "scripts/build.sh",
58
+ "scripts/postinstall.js",
59
+ "supabase/",
60
+ ".clauth-skill/",
61
+ "install.sh",
62
+ "install.ps1",
63
+ "README.md"
64
+ ],
65
+ "publishConfig": {
66
+ "access": "public"
67
+ },
68
+ "homepage": "https://github.com/LIFEAI/clauth"
69
+ }
Binary file
Binary file
Binary file