claudemesh-cli 1.34.3 → 1.34.5

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.
@@ -104,7 +104,7 @@ __export(exports_urls, {
104
104
  VERSION: () => VERSION,
105
105
  URLS: () => URLS
106
106
  });
107
- var URLS, VERSION = "1.34.3", env;
107
+ var URLS, VERSION = "1.34.5", env;
108
108
  var init_urls = __esm(() => {
109
109
  URLS = {
110
110
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -18480,12 +18480,21 @@ ${mf.allowed_tools.map((t) => ` - ${t}`).join(`
18480
18480
  } catch {}
18481
18481
  }
18482
18482
  });
18483
+ const WELCOME_GRACE_FAST_MS = 5000;
18484
+ const WELCOME_GRACE_SLOW_MS = 15000;
18485
+ server.oninitialized = () => {
18486
+ mcpLog("server_initialized");
18487
+ setTimeout(() => {
18488
+ mcpLog("welcome_attempt", { lane: "fast", grace_ms: WELCOME_GRACE_FAST_MS });
18489
+ emitMeshWelcome(server, mcpLog);
18490
+ }, WELCOME_GRACE_FAST_MS);
18491
+ setTimeout(() => {
18492
+ mcpLog("welcome_attempt", { lane: "slow", grace_ms: WELCOME_GRACE_SLOW_MS });
18493
+ emitMeshWelcome(server, mcpLog);
18494
+ }, WELCOME_GRACE_SLOW_MS);
18495
+ };
18483
18496
  const transport = new StdioServerTransport;
18484
18497
  await server.connect(transport);
18485
- const WELCOME_DELAY_MS = 5000;
18486
- setTimeout(() => {
18487
- emitMeshWelcome(server, mcpLog);
18488
- }, WELCOME_DELAY_MS);
18489
18498
  const keepalive = setInterval(() => {}, 1000);
18490
18499
  const shutdown = () => {
18491
18500
  clearInterval(keepalive);
@@ -18522,9 +18531,21 @@ async function emitMeshWelcome(server, mcpLog) {
18522
18531
  const { status, body } = await daemonGet(path2, { sessionToken });
18523
18532
  if (status === 200 && Array.isArray(body?.peers)) {
18524
18533
  const peers = body.peers;
18525
- const real = peers.filter((p) => p.peerRole !== "control-plane" && p.pubkey !== selfSessionPubkey);
18534
+ const real = peers.filter((p) => {
18535
+ const channel = String(p.channel ?? "");
18536
+ const peerRole = String(p.peerRole ?? "");
18537
+ const isInfra = channel === "claudemesh-daemon" || peerRole === "control-plane";
18538
+ if (isInfra)
18539
+ return false;
18540
+ if (selfSessionPubkey && p.pubkey === selfSessionPubkey)
18541
+ return false;
18542
+ return true;
18543
+ });
18526
18544
  peerCount = real.length;
18527
18545
  peerNames = real.map((p) => String(p.displayName ?? "unknown")).filter((n, i, arr) => arr.indexOf(n) === i).slice(0, 5);
18546
+ mcpLog("welcome_peers_resolved", { total: peers.length, real: real.length });
18547
+ } else {
18548
+ mcpLog("welcome_peers_status", { status });
18528
18549
  }
18529
18550
  } catch (e) {
18530
18551
  mcpLog("welcome_peers_lookup_failed", { err: String(e) });
@@ -20637,4 +20658,4 @@ main().catch((err) => {
20637
20658
  process.exit(EXIT.INTERNAL_ERROR);
20638
20659
  });
20639
20660
 
20640
- //# debugId=1E35EC1C4AC8296064756E2164756E21
20661
+ //# debugId=EF9DE01AAAC037BD64756E2164756E21