claudemesh-cli 1.0.0-alpha.32 → 1.0.0-alpha.33

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.
@@ -3488,7 +3488,7 @@ __export(exports_urls, {
3488
3488
  VERSION: () => VERSION,
3489
3489
  URLS: () => URLS
3490
3490
  });
3491
- var URLS, VERSION = "1.0.0-alpha.32", env;
3491
+ var URLS, VERSION = "1.0.0-alpha.33", env;
3492
3492
  var init_urls = __esm(() => {
3493
3493
  URLS = {
3494
3494
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -4421,8 +4421,10 @@ async function resolveClient(to) {
4421
4421
  };
4422
4422
  }
4423
4423
  const nameLower = target.toLowerCase();
4424
+ const candidates = [];
4424
4425
  for (const c of targetClients) {
4425
4426
  const peers = await c.listPeers();
4427
+ candidates.push({ mesh: c.meshSlug, peers });
4426
4428
  const match = peers.find((p) => p.displayName.toLowerCase() === nameLower);
4427
4429
  if (match)
4428
4430
  return { client: c, targetSpec: match.pubkey };
@@ -4433,13 +4435,11 @@ async function resolveClient(to) {
4433
4435
  return { client: c, targetSpec: partials[0].pubkey };
4434
4436
  }
4435
4437
  }
4436
- if (targetClients.length === 1) {
4437
- return { client: targetClients[0], targetSpec: target };
4438
- }
4438
+ const known = candidates.flatMap((c) => c.peers.map((p) => `${c.mesh}/${p.displayName}`));
4439
4439
  return {
4440
4440
  client: null,
4441
4441
  targetSpec: target,
4442
- error: `peer "${target}" not found in any mesh (joined: ${clients2.map((c) => c.meshSlug).join(", ")})`
4442
+ error: `peer "${target}" not found. ` + (known.length ? `Known peers: ${known.slice(0, 10).join(", ")}${known.length > 10 ? ", …" : ""}` : "No connected peers on your mesh(es). Use pubkey hex, @group, or * for broadcast.")
4443
4443
  };
4444
4444
  }
4445
4445
  async function resolvePeerName(client, pubkey) {
@@ -4795,6 +4795,9 @@ ${manifest.allowed_tools.map((t) => ` - ${t}`).join(`
4795
4795
  sections.push(`${header}
4796
4796
  No peers connected.`);
4797
4797
  } else {
4798
+ const pubkeyCounts = new Map;
4799
+ for (const p of peers)
4800
+ pubkeyCounts.set(p.pubkey, (pubkeyCounts.get(p.pubkey) ?? 0) + 1);
4798
4801
  const peerLines = peers.map((p) => {
4799
4802
  const summary = p.summary ? ` — "${p.summary}"` : "";
4800
4803
  const groupsStr = p.groups?.length ? ` [${p.groups.map((g) => `@${g.name}${g.role ? ":" + g.role : ""}`).join(", ")}]` : "";
@@ -4812,7 +4815,9 @@ No peers connected.`);
4812
4815
  const profileAvatar = p.profile?.avatar ? `${p.profile.avatar} ` : "";
4813
4816
  const profileTitle = p.profile?.title ? ` (${p.profile.title})` : "";
4814
4817
  const hiddenTag = p.visible === false ? " [hidden]" : "";
4815
- return `- ${profileAvatar}**${p.displayName}**${profileTitle} [${p.status}]${localityTag}${hiddenTag}${groupsStr}${metaStr} (${p.pubkey.slice(0, 12)}…)${cwdStr}${summary}`;
4818
+ const sameKeyCount = pubkeyCounts.get(p.pubkey) ?? 1;
4819
+ const sameKeyTag = sameKeyCount > 1 ? ` [shares key with ${sameKeyCount - 1} other session(s)]` : "";
4820
+ return `- ${profileAvatar}**${p.displayName}**${profileTitle} [${p.status}]${localityTag}${hiddenTag}${sameKeyTag}${groupsStr}${metaStr} (${p.pubkey.slice(0, 12)}…)${cwdStr}${summary}`;
4816
4821
  });
4817
4822
  sections.push(`${header}
4818
4823
  ${peerLines.join(`
@@ -6522,4 +6527,4 @@ startMcpServer().catch((err) => {
6522
6527
  process.exit(1);
6523
6528
  });
6524
6529
 
6525
- //# debugId=1491A1F07755C64D64756E2164756E21
6530
+ //# debugId=176161E2F9EDE48B64756E2164756E21