@lifeaitools/clauth 1.5.54 → 1.5.56

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.
@@ -4774,16 +4774,14 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
4774
4774
  }
4775
4775
  }
4776
4776
 
4777
- // Unknown route — don't count browser/MCP noise as auth failures
4778
- const isBenign = reqPath.startsWith("/.well-known/") || [
4779
- "/favicon.ico", "/robots.txt", "/apple-touch-icon.png", "/apple-touch-icon-precomposed.png",
4780
- "/sse", "/mcp", "/gws", "/clauth", "/message", "/register", "/authorize", "/token", "/shutdown", "/restart",
4781
- ].includes(reqPath);
4782
- if (isBenign) {
4783
- res.writeHead(404, { "Content-Type": "application/json", ...CORS });
4784
- return res.end(JSON.stringify({ error: "Not found" }));
4785
- }
4786
- return strike(res, 404, `Unknown endpoint: ${reqPath}`);
4777
+ // Unknown route — a wrong URL is not an auth failure. Log it, return 404,
4778
+ // but do NOT increment failCount (which locks the vault at MAX_FAILS).
4779
+ // Auth failures (wrong password, wrong token) still strike via /auth and /get/:service.
4780
+ try {
4781
+ fs.appendFileSync(LOG_FILE, `[${new Date().toISOString()}] 404 ${method} ${reqPath}\n`);
4782
+ } catch {}
4783
+ res.writeHead(404, { "Content-Type": "application/json", ...CORS });
4784
+ return res.end(JSON.stringify({ error: `Unknown endpoint: ${reqPath}` }));
4787
4785
  });
4788
4786
 
4789
4787
  // OAuth 2.1 public client — no static credentials to expose
package/cli/index.js CHANGED
@@ -11,6 +11,7 @@ import { getMachineHash, deriveToken, deriveSeedHash } from "./fingerprint.js";
11
11
  import * as api from "./api.js";
12
12
  import os from "os";
13
13
  import fs from "fs";
14
+ import path from "path";
14
15
 
15
16
  const config = new Conf(getConfOptions());
16
17
  const VERSION = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
@@ -636,7 +637,7 @@ tunnelCmd
636
637
  // ──────────────────────────────────────────────
637
638
  program
638
639
  .command("chitchat")
639
- .description("Join a chitchat collab session — opens claude interactively")
640
+ .description("Join a chitchat collab session — auto-starts /rdc:collab via claude -p")
640
641
  .requiredOption("--session <id>", "Session ID from claude.ai")
641
642
  .action(async (opts) => {
642
643
  const id = opts.session;
@@ -651,25 +652,35 @@ program
651
652
  console.error(`\n ✗ Daemon not reachable at http://127.0.0.1:52437 — is clauth running?\n`);
652
653
  process.exit(1);
653
654
  }
654
- console.log(chalk.cyan(`
655
- ┌─────────────────────────────────────────────────┐
656
- │ rdc:collab session ready │
657
- │ │
658
- │ Session: ${id} │
659
- │ │
660
- │ Type this in Claude Code: │
661
- │ /rdc:collab --session ${id.slice(0,8)}... │
662
- └─────────────────────────────────────────────────┘
663
- `));
664
- console.log(chalk.yellow(` /rdc:collab --session ${id}\n`));
665
- // Launch claude interactively in this terminal
666
- const { spawn } = await import("child_process");
667
- const proc = spawn("claude", [], {
668
- stdio: "inherit",
669
- cwd: "C:/Dev/regen-root",
655
+ console.log(chalk.cyan(`\n [collab] session ${id} — starting /rdc:collab...\n`));
656
+
657
+ // Find claude binary (same candidates as daemon)
658
+ const { execSync: es, spawn } = await import("child_process");
659
+ let claudeBin = null;
660
+ for (const c of [
661
+ process.env.CLAUDE_BIN,
662
+ path.join(process.env.APPDATA || '', 'npm', 'claude.cmd'),
663
+ path.join(process.env.APPDATA || '', 'npm', 'claude'),
664
+ 'claude',
665
+ ].filter(Boolean)) {
666
+ try { es(`"${c}" --version`, { stdio: 'ignore', timeout: 3000 }); claudeBin = c; break; } catch {}
667
+ }
668
+ if (!claudeBin) {
669
+ console.error(' ✗ claude CLI not found — is @anthropic-ai/claude-code installed globally?');
670
+ process.exit(1);
671
+ }
672
+
673
+ // Auto-invoke /rdc:collab skill with streaming output to this terminal
674
+ const proc = spawn(claudeBin, [
675
+ '-p', `/rdc:collab --session ${id}`,
676
+ '--dangerously-skip-permissions',
677
+ ], {
678
+ stdio: 'inherit',
679
+ cwd: 'C:/Dev/regen-root',
670
680
  shell: true,
671
681
  });
672
- proc.on("exit", (code) => process.exit(code ?? 0));
682
+ proc.on('error', e => { console.error(` ✗ spawn error: ${e.message}`); process.exit(1); });
683
+ proc.on('exit', code => process.exit(code ?? 0));
673
684
  });
674
685
 
675
686
  // ──────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "1.5.54",
3
+ "version": "1.5.56",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {