claudemesh-cli 1.34.5 → 1.34.6

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.5", env;
107
+ var URLS, VERSION = "1.34.6", env;
108
108
  var init_urls = __esm(() => {
109
109
  URLS = {
110
110
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -18480,18 +18480,16 @@ ${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;
18483
+ const WELCOME_GRACE_MS = 3000;
18484
+ let welcomeSent = false;
18485
18485
  server.oninitialized = () => {
18486
18486
  mcpLog("server_initialized");
18487
+ if (welcomeSent)
18488
+ return;
18489
+ welcomeSent = true;
18487
18490
  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
18491
  emitMeshWelcome(server, mcpLog);
18494
- }, WELCOME_GRACE_SLOW_MS);
18492
+ }, WELCOME_GRACE_MS);
18495
18493
  };
18496
18494
  const transport = new StdioServerTransport;
18497
18495
  await server.connect(transport);
@@ -18604,10 +18602,10 @@ async function emitMeshWelcome(server, mcpLog) {
18604
18602
  self_session_pubkey: selfSessionPubkey ?? "",
18605
18603
  self_role: selfRole ?? "",
18606
18604
  mesh_slug: selfMeshSlug ?? "",
18607
- peer_count: peerCount >= 0 ? peerCount : null,
18608
- peer_names: peerNames,
18609
- unread_count: inboxItems.length,
18610
- latest_message_ids: inboxItems.slice(0, 10).map((it) => String(it.id ?? ""))
18605
+ peer_count: peerCount >= 0 ? String(peerCount) : "",
18606
+ peer_names: JSON.stringify(peerNames),
18607
+ unread_count: String(inboxItems.length),
18608
+ latest_message_ids: JSON.stringify(inboxItems.slice(0, 10).map((it) => String(it.id ?? "")))
18611
18609
  }
18612
18610
  }
18613
18611
  });
@@ -20658,4 +20656,4 @@ main().catch((err) => {
20658
20656
  process.exit(EXIT.INTERNAL_ERROR);
20659
20657
  });
20660
20658
 
20661
- //# debugId=EF9DE01AAAC037BD64756E2164756E21
20659
+ //# debugId=944F6ED12781882C64756E2164756E21