@lifeaitools/clauth 1.5.71 → 1.5.73

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.
@@ -855,8 +855,9 @@ function dashboardHtml(port, whitelist, isStaged = false) {
855
855
  </div>
856
856
 
857
857
  <div class="mcp-setup" id="mcp-setup-panel">
858
- <div class="mcp-setup-title">claude.ai MCP Integration</div>
858
+ <div class="mcp-setup-title">claude.ai MCP Connectors</div>
859
859
  <div class="oauth-fields">
860
+ <div style="font-size:.7rem;color:#64748b;margin-bottom:6px;border-bottom:1px solid #1e3a5f;padding-bottom:6px">Tunnel-based (require tunnel running)</div>
860
861
  <div class="mcp-row">
861
862
  <span class="mcp-label">Clauth</span>
862
863
  <span class="mcp-val" id="mcp-url">—</span>
@@ -867,6 +868,28 @@ function dashboardHtml(port, whitelist, isStaged = false) {
867
868
  <span class="mcp-val" id="mcp-gws-url">—</span>
868
869
  <button class="mcp-copy" onclick="copyMcp('mcp-gws-url')">copy</button>
869
870
  </div>
871
+ <div class="mcp-row">
872
+ <span class="mcp-label">FS</span>
873
+ <span class="mcp-val" id="mcp-fs-url">—</span>
874
+ <button class="mcp-copy" onclick="copyMcp('mcp-fs-url')">copy</button>
875
+ </div>
876
+ <div class="mcp-row">
877
+ <span class="mcp-label">Talk with CLI</span>
878
+ <span class="mcp-val" id="mcp-chitchat-url">—</span>
879
+ <button class="mcp-copy" onclick="copyMcp('mcp-chitchat-url')">copy</button>
880
+ </div>
881
+ <div style="font-size:.7rem;color:#64748b;margin:8px 0 6px;border-bottom:1px solid #1e3a5f;padding-bottom:6px">Direct servers (always available)</div>
882
+ <div class="mcp-row">
883
+ <span class="mcp-label">Regen Media</span>
884
+ <span class="mcp-val" id="mcp-media-url">https://media.regendevcorp.com/mcp</span>
885
+ <button class="mcp-copy" onclick="copyMcp('mcp-media-url')">copy</button>
886
+ </div>
887
+ <div class="mcp-row">
888
+ <span class="mcp-label">Web Research</span>
889
+ <span class="mcp-val" id="mcp-research-url">https://research.regendevcorp.com/mcp</span>
890
+ <button class="mcp-copy" onclick="copyMcp('mcp-research-url')">copy</button>
891
+ </div>
892
+ <div style="font-size:.7rem;color:#64748b;margin:8px 0 6px;border-bottom:1px solid #1e3a5f;padding-bottom:6px">OAuth credentials (tunnel connectors only)</div>
870
893
  <div class="mcp-row">
871
894
  <span class="mcp-label">Client ID</span>
872
895
  <span class="mcp-val" id="mcp-client-id">—</span>
@@ -1958,13 +1981,19 @@ async function toggleMcpSetup() {
1958
1981
  if (isOpen) {
1959
1982
  try {
1960
1983
  const m = await fetch(BASE + "/mcp-setup").then(r => r.json());
1961
- document.getElementById("mcp-url").textContent = m.url || "(tunnel not running)";
1962
- document.getElementById("mcp-gws-url").textContent = m.gwsUrl || "(tunnel not running)";
1984
+ const noTunnel = "(tunnel not running)";
1985
+ document.getElementById("mcp-url").textContent = m.url || noTunnel;
1986
+ document.getElementById("mcp-gws-url").textContent = m.gwsUrl || noTunnel;
1987
+ document.getElementById("mcp-fs-url").textContent = m.fsUrl || noTunnel;
1988
+ document.getElementById("mcp-chitchat-url").textContent = m.chitchatUrl || noTunnel;
1963
1989
  document.getElementById("mcp-client-id").textContent = m.clientId || "—";
1964
1990
  document.getElementById("mcp-client-secret").textContent = m.clientSecret || "—";
1965
1991
  } catch {
1966
- document.getElementById("mcp-url").textContent = "(error fetching)";
1967
- document.getElementById("mcp-gws-url").textContent = "(error fetching)";
1992
+ const noTunnel = "(error fetching)";
1993
+ document.getElementById("mcp-url").textContent = noTunnel;
1994
+ document.getElementById("mcp-gws-url").textContent = noTunnel;
1995
+ document.getElementById("mcp-fs-url").textContent = noTunnel;
1996
+ document.getElementById("mcp-chitchat-url").textContent = noTunnel;
1968
1997
  }
1969
1998
  }
1970
1999
  }
@@ -2341,24 +2370,45 @@ async function wizRunCreateTunnel() {
2341
2370
  // Step: MCP setup in claude.ai
2342
2371
  async function wizShowMcpSetup(hostname) {
2343
2372
  wizStep = "mcp_setup";
2344
- const clauthUrl = \`https://\${hostname}/clauth\`;
2345
- const gwsUrl = \`https://\${hostname}/gws\`;
2346
-
2373
+ const base = \`https://\${hostname}\`;
2347
2374
  const mcpData = await apiFetch("/mcp-setup");
2348
2375
 
2349
2376
  renderWizBody(\`
2350
- <div class="wiz-desc">Add two MCP connectors in claude.ai one for Clauth, one for GWS:</div>
2377
+ <div class="wiz-desc">Add these MCP connectors in claude.ai Integrations:</div>
2351
2378
  <div style="display:flex;flex-direction:column;gap:8px;margin-top:10px">
2379
+ <div style="font-size:.7rem;color:#64748b;border-bottom:1px solid #1e3a5f;padding-bottom:4px">Tunnel-based (require tunnel running)</div>
2352
2380
  <div class="mcp-row">
2353
- <span class="mcp-label">Clauth URL</span>
2354
- <span class="mcp-val" id="wiz-mcp-url">\${clauthUrl}</span>
2381
+ <span class="mcp-label">Clauth</span>
2382
+ <span class="mcp-val" id="wiz-mcp-url">\${base}/clauth</span>
2355
2383
  <button class="mcp-copy" onclick="wizCopy('wiz-mcp-url',this)">copy</button>
2356
2384
  </div>
2357
2385
  <div class="mcp-row">
2358
- <span class="mcp-label">GWS URL</span>
2359
- <span class="mcp-val" id="wiz-mcp-gws">\${gwsUrl}</span>
2386
+ <span class="mcp-label">GWS</span>
2387
+ <span class="mcp-val" id="wiz-mcp-gws">\${base}/gws</span>
2360
2388
  <button class="mcp-copy" onclick="wizCopy('wiz-mcp-gws',this)">copy</button>
2361
2389
  </div>
2390
+ <div class="mcp-row">
2391
+ <span class="mcp-label">FS</span>
2392
+ <span class="mcp-val" id="wiz-mcp-fs">\${base}/fs</span>
2393
+ <button class="mcp-copy" onclick="wizCopy('wiz-mcp-fs',this)">copy</button>
2394
+ </div>
2395
+ <div class="mcp-row">
2396
+ <span class="mcp-label">Talk with CLI</span>
2397
+ <span class="mcp-val" id="wiz-mcp-chitchat">\${base}/chitchat</span>
2398
+ <button class="mcp-copy" onclick="wizCopy('wiz-mcp-chitchat',this)">copy</button>
2399
+ </div>
2400
+ <div style="font-size:.7rem;color:#64748b;margin-top:6px;border-bottom:1px solid #1e3a5f;padding-bottom:4px">Direct servers (always available)</div>
2401
+ <div class="mcp-row">
2402
+ <span class="mcp-label">Regen Media</span>
2403
+ <span class="mcp-val" id="wiz-mcp-media">https://media.regendevcorp.com/mcp</span>
2404
+ <button class="mcp-copy" onclick="wizCopy('wiz-mcp-media',this)">copy</button>
2405
+ </div>
2406
+ <div class="mcp-row">
2407
+ <span class="mcp-label">Web Research</span>
2408
+ <span class="mcp-val" id="wiz-mcp-research">https://research.regendevcorp.com/mcp</span>
2409
+ <button class="mcp-copy" onclick="wizCopy('wiz-mcp-research',this)">copy</button>
2410
+ </div>
2411
+ <div style="font-size:.7rem;color:#64748b;margin-top:6px;border-bottom:1px solid #1e3a5f;padding-bottom:4px">OAuth credentials (tunnel connectors only)</div>
2362
2412
  <div class="mcp-row">
2363
2413
  <span class="mcp-label">Client ID</span>
2364
2414
  <span class="mcp-val" id="wiz-mcp-cid">\${mcpData?.clientId || '(unlock required)'}</span>
@@ -2374,7 +2424,7 @@ async function wizShowMcpSetup(hostname) {
2374
2424
  Paste into <a class="wiz-link" href="https://claude.ai/settings/integrations" target="_blank">claude.ai → Settings → Integrations</a>
2375
2425
  </div>
2376
2426
  <div style="margin-top:8px;font-size:.78rem;color:#64748b">
2377
- Same Client ID/Secret for both connectors.
2427
+ Same Client ID/Secret for all tunnel connectors. Direct servers need no credentials.
2378
2428
  </div>
2379
2429
  \`, [], [
2380
2430
  \`<button class="btn-wiz-primary" onclick="window.open('https://claude.ai/settings/integrations','_blank');wizShowTest()">I've Added It — Test Now</button>\`,
@@ -3590,6 +3640,8 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
3590
3640
  return ok(res, {
3591
3641
  url: base ? `${base}/clauth` : null,
3592
3642
  gwsUrl: base ? `${base}/gws` : null,
3643
+ fsUrl: base ? `${base}/fs` : null,
3644
+ chitchatUrl: base ? `${base}/chitchat` : null,
3593
3645
  note: "OAuth 2.1 public client — Claude registers dynamically, no client_secret needed",
3594
3646
  });
3595
3647
  }
@@ -3716,6 +3768,29 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
3716
3768
  return;
3717
3769
  }
3718
3770
 
3771
+ // POST /chitchat/send — send a message to an active chitchat session's inbox (REST mirror of MCP chitchat_send)
3772
+ if (method === "POST" && reqPath === "/chitchat/send") {
3773
+ let body = "";
3774
+ req.on("data", d => body += d);
3775
+ req.on("end", () => {
3776
+ try {
3777
+ const { session_id, message } = JSON.parse(body || "{}");
3778
+ if (!session_id || !message) {
3779
+ res.writeHead(400, { "Content-Type": "application/json", ...CORS });
3780
+ return res.end(JSON.stringify({ error: "session_id and message required" }));
3781
+ }
3782
+ const result = sendChitchatMessage(session_id, message);
3783
+ const status = result.error === 'not_found' ? 404 : result.error ? 400 : 200;
3784
+ res.writeHead(status, { "Content-Type": "application/json", ...CORS });
3785
+ res.end(JSON.stringify(result));
3786
+ } catch {
3787
+ res.writeHead(400, { "Content-Type": "application/json", ...CORS });
3788
+ res.end(JSON.stringify({ error: "invalid JSON" }));
3789
+ }
3790
+ });
3791
+ return;
3792
+ }
3793
+
3719
3794
  // POST /terminal/start — start a named terminal session
3720
3795
  if (method === "POST" && reqPath === "/terminal/start") {
3721
3796
  let body = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "1.5.71",
3
+ "version": "1.5.73",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {