claudemesh-cli 1.20.1 → 1.21.1

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.
@@ -88,7 +88,7 @@ __export(exports_urls, {
88
88
  VERSION: () => VERSION,
89
89
  URLS: () => URLS
90
90
  });
91
- var URLS, VERSION = "1.20.1", env;
91
+ var URLS, VERSION = "1.21.1", env;
92
92
  var init_urls = __esm(() => {
93
93
  URLS = {
94
94
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -398,7 +398,6 @@ var init_client = __esm(() => {
398
398
  var exports_my = {};
399
399
  __export(exports_my, {
400
400
  revokeSession: () => revokeSession,
401
- reslugMesh: () => reslugMesh,
402
401
  renameMesh: () => renameMesh,
403
402
  getProfile: () => getProfile,
404
403
  getMeshes: () => getMeshes,
@@ -415,15 +414,7 @@ async function getMeshes(token) {
415
414
  async function createMesh(token, body) {
416
415
  return post("/api/my/meshes", body, token);
417
416
  }
418
- async function renameMesh(token, slug, newName) {
419
- return request({
420
- path: `/api/cli/meshes/${slug}`,
421
- method: "PATCH",
422
- body: { name: newName },
423
- token
424
- });
425
- }
426
- async function reslugMesh(token, oldSlug, newSlug) {
417
+ async function renameMesh(token, oldSlug, newSlug) {
427
418
  return request({
428
419
  path: `/api/cli/meshes/${oldSlug}`,
429
420
  method: "PATCH",
@@ -3667,15 +3658,14 @@ async function runLaunchWizard(opts) {
3667
3658
  spinner.stop();
3668
3659
  const choice = await menuSelect({
3669
3660
  title: "Select mesh",
3670
- items: opts.meshes.map((m) => m.name && m.name !== m.slug ? `${m.name} \x1B[2m(${m.slug})\x1B[0m` : m.slug),
3661
+ items: opts.meshes.map((m) => m.slug),
3671
3662
  row
3672
3663
  });
3673
3664
  mesh = opts.meshes[choice];
3674
3665
  for (let i = 0;i < opts.meshes.length + 1; i++) {
3675
3666
  writeCentered(row + i, " ");
3676
3667
  }
3677
- const meshLabel = mesh.name && mesh.name !== mesh.slug ? `${mesh.name} (${mesh.slug})` : mesh.slug;
3678
- writeCentered(row, `Mesh ${green("✓")} ${meshLabel}`);
3668
+ writeCentered(row, `Mesh ${green("✓")} ${mesh.slug}`);
3679
3669
  spinner.start();
3680
3670
  row++;
3681
3671
  }
@@ -4392,29 +4382,17 @@ var init_create = __esm(() => {
4392
4382
  });
4393
4383
 
4394
4384
  // src/services/mesh/rename.ts
4395
- async function renameMesh2(slug, newName) {
4385
+ async function renameMesh2(oldSlug, newSlug) {
4396
4386
  const auth = getStoredToken();
4397
4387
  if (!auth)
4398
4388
  throw new Error("Not signed in");
4399
- await exports_my.renameMesh(auth.session_token, slug, newName);
4389
+ return await exports_my.renameMesh(auth.session_token, oldSlug, newSlug);
4400
4390
  }
4401
4391
  var init_rename = __esm(() => {
4402
4392
  init_facade3();
4403
4393
  init_facade6();
4404
4394
  });
4405
4395
 
4406
- // src/services/mesh/reslug.ts
4407
- async function reslugMesh2(oldSlug, newSlug) {
4408
- const auth = getStoredToken();
4409
- if (!auth)
4410
- throw new Error("Not signed in");
4411
- return await exports_my.reslugMesh(auth.session_token, oldSlug, newSlug);
4412
- }
4413
- var init_reslug = __esm(() => {
4414
- init_facade3();
4415
- init_facade6();
4416
- });
4417
-
4418
4396
  // src/services/mesh/leave.ts
4419
4397
  function leaveMesh(slug) {
4420
4398
  return removeMeshConfig(slug);
@@ -4456,7 +4434,6 @@ var init_facade10 = __esm(() => {
4456
4434
  init_list();
4457
4435
  init_create();
4458
4436
  init_rename();
4459
- init_reslug();
4460
4437
  init_leave();
4461
4438
  init_join();
4462
4439
  init_resolve_target();
@@ -5059,7 +5036,7 @@ async function deleteMesh(slug, opts = {}) {
5059
5036
  }
5060
5037
  render.section("select mesh to remove");
5061
5038
  config.meshes.forEach((m, i) => {
5062
- process.stdout.write(` ${bold(String(i + 1) + ")")} ${clay(m.slug)} ${dim("(" + m.name + ")")}
5039
+ process.stdout.write(` ${bold(String(i + 1) + ")")} ${clay(m.slug)}
5063
5040
  `);
5064
5041
  });
5065
5042
  render.blank();
@@ -5157,58 +5134,9 @@ var exports_rename = {};
5157
5134
  __export(exports_rename, {
5158
5135
  rename: () => rename
5159
5136
  });
5160
- async function rename(slug, newName) {
5161
- const auth = getStoredToken();
5162
- if (!auth) {
5163
- console.error(` ${icons.cross} Renaming a mesh requires a claudemesh.com account session.`);
5164
- console.error(` ${dim("Joining via invite signs you in to the mesh, not to a web account.")}`);
5165
- console.error(` ${dim("Run")} ${bold("claudemesh login")} ${dim("first, then retry, or rename from the dashboard:")}`);
5166
- console.error(` https://claudemesh.com/dashboard`);
5167
- return EXIT.AUTH_FAILED;
5168
- }
5169
- try {
5170
- await renameMesh2(slug, newName);
5171
- const cfg = readConfig();
5172
- const local = cfg.meshes.find((m) => m.slug === slug);
5173
- if (local)
5174
- setMeshConfig(slug, { ...local, name: newName });
5175
- console.log(` ${green(icons.check)} Renamed "${slug}" to "${newName}"`);
5176
- console.log(` ${dim('(slug stays "' + slug + '" — only the display name changed)')}`);
5177
- return EXIT.SUCCESS;
5178
- } catch (err) {
5179
- if (err instanceof ApiError) {
5180
- const body = err.body;
5181
- const detail = body?.error ?? err.statusText;
5182
- console.error(` ${icons.cross} ${detail}`);
5183
- if (err.status === 401)
5184
- return EXIT.AUTH_FAILED;
5185
- if (err.status === 403)
5186
- return EXIT.PERMISSION_DENIED;
5187
- if (err.status === 404)
5188
- return EXIT.NOT_FOUND;
5189
- return EXIT.INTERNAL_ERROR;
5190
- }
5191
- console.error(` ${icons.cross} Failed: ${err instanceof Error ? err.message : err}`);
5192
- return EXIT.INTERNAL_ERROR;
5193
- }
5194
- }
5195
- var init_rename2 = __esm(() => {
5196
- init_facade10();
5197
- init_facade6();
5198
- init_facade3();
5199
- init_facade();
5200
- init_styles();
5201
- init_exit_codes();
5202
- });
5203
-
5204
- // src/commands/slug.ts
5205
- var exports_slug = {};
5206
- __export(exports_slug, {
5207
- slug: () => slug
5208
- });
5209
- async function slug(oldSlug, newSlug) {
5137
+ async function rename(oldSlug, newSlug) {
5210
5138
  if (!oldSlug || !newSlug) {
5211
- console.error(` ${icons.cross} Usage: ${bold("claudemesh slug")} <old-slug> <new-slug>`);
5139
+ console.error(` ${icons.cross} Usage: ${bold("claudemesh rename")} <old-slug> <new-slug>`);
5212
5140
  return EXIT.INVALID_ARGS;
5213
5141
  }
5214
5142
  if (!SLUG_RE.test(newSlug)) {
@@ -5233,14 +5161,14 @@ async function slug(oldSlug, newSlug) {
5233
5161
  return EXIT.ALREADY_EXISTS;
5234
5162
  }
5235
5163
  try {
5236
- const updated = await reslugMesh2(oldSlug, newSlug);
5164
+ const updated = await renameMesh2(oldSlug, newSlug);
5237
5165
  const local = cfg.meshes.find((m) => m.slug === oldSlug);
5238
5166
  if (local) {
5239
5167
  removeMeshConfig(oldSlug);
5240
- setMeshConfig(updated.slug, { ...local, slug: updated.slug, name: updated.name });
5168
+ setMeshConfig(updated.slug, { ...local, slug: updated.slug, name: updated.slug });
5241
5169
  }
5242
- console.log(` ${green(icons.check)} Slug changed: "${oldSlug}" → "${updated.slug}"`);
5243
- console.log(` ${dim("Other peers will pick up the new slug after they run")} ${bold("claudemesh sync")}`);
5170
+ console.log(` ${green(icons.check)} Renamed: "${oldSlug}" → "${updated.slug}"`);
5171
+ console.log(` ${dim("Other peers will pick up the new identifier after they run")} ${bold("claudemesh sync")}`);
5244
5172
  return EXIT.SUCCESS;
5245
5173
  } catch (err) {
5246
5174
  if (err instanceof ApiError) {
@@ -5252,6 +5180,8 @@ async function slug(oldSlug, newSlug) {
5252
5180
  return EXIT.PERMISSION_DENIED;
5253
5181
  if (err.status === 404)
5254
5182
  return EXIT.NOT_FOUND;
5183
+ if (err.status === 409)
5184
+ return EXIT.ALREADY_EXISTS;
5255
5185
  if (err.status === 400)
5256
5186
  return EXIT.INVALID_ARGS;
5257
5187
  return EXIT.INTERNAL_ERROR;
@@ -5261,7 +5191,7 @@ async function slug(oldSlug, newSlug) {
5261
5191
  }
5262
5192
  }
5263
5193
  var SLUG_RE;
5264
- var init_slug = __esm(() => {
5194
+ var init_rename2 = __esm(() => {
5265
5195
  init_facade10();
5266
5196
  init_facade6();
5267
5197
  init_facade3();
@@ -6384,7 +6314,7 @@ async function invite(email, opts = {}) {
6384
6314
  Select mesh to share:
6385
6315
  `);
6386
6316
  config.meshes.forEach((m, i) => {
6387
- console.log(` ${bold(String(i + 1) + ")")} ${m.slug} ${dim("(" + m.name + ")")}`);
6317
+ console.log(` ${bold(String(i + 1) + ")")} ${m.slug}`);
6388
6318
  });
6389
6319
  console.log("");
6390
6320
  const choice = await prompt4(" Choice [1]: ") || "1";
@@ -6818,17 +6748,17 @@ function projectFields(record, fields) {
6818
6748
  }
6819
6749
  return out;
6820
6750
  }
6821
- async function listPeersForMesh(slug2) {
6751
+ async function listPeersForMesh(slug) {
6822
6752
  const config = readConfig();
6823
- const joined = config.meshes.find((m) => m.slug === slug2);
6753
+ const joined = config.meshes.find((m) => m.slug === slug);
6824
6754
  const selfMemberPubkey = joined?.pubkey ?? null;
6825
- const bridged = await tryBridge(slug2, "peers");
6755
+ const bridged = await tryBridge(slug, "peers");
6826
6756
  if (bridged && bridged.ok) {
6827
6757
  const peers = bridged.result;
6828
6758
  return peers.map((p) => annotateSelf(p, selfMemberPubkey, null));
6829
6759
  }
6830
6760
  let result = [];
6831
- await withMesh({ meshSlug: slug2 }, async (client) => {
6761
+ await withMesh({ meshSlug: slug }, async (client) => {
6832
6762
  const all = await client.listPeers();
6833
6763
  const selfSessionPubkey = client.getSessionPubkey();
6834
6764
  result = all.map((p) => annotateSelf(p, selfMemberPubkey, selfSessionPubkey));
@@ -6851,15 +6781,15 @@ async function runPeers(flags) {
6851
6781
  const fieldList = typeof flags.json === "string" && flags.json.length > 0 ? flags.json.split(",").map((s) => s.trim()).filter(Boolean) : null;
6852
6782
  const wantsJson = flags.json !== undefined && flags.json !== false;
6853
6783
  const allJson = [];
6854
- for (const slug2 of slugs) {
6784
+ for (const slug of slugs) {
6855
6785
  try {
6856
- const peers = await listPeersForMesh(slug2);
6786
+ const peers = await listPeersForMesh(slug);
6857
6787
  if (wantsJson) {
6858
6788
  const projected = fieldList ? peers.map((p) => projectFields(p, fieldList)) : peers;
6859
- allJson.push({ mesh: slug2, peers: projected });
6789
+ allJson.push({ mesh: slug, peers: projected });
6860
6790
  continue;
6861
6791
  }
6862
- render.section(`peers on ${slug2} (${peers.length})`);
6792
+ render.section(`peers on ${slug} (${peers.length})`);
6863
6793
  if (peers.length === 0) {
6864
6794
  render.info(dim(" (no peers connected)"));
6865
6795
  continue;
@@ -6884,7 +6814,7 @@ async function runPeers(flags) {
6884
6814
  render.info(dim(` cwd: ${p.cwd}`));
6885
6815
  }
6886
6816
  } catch (e) {
6887
- render.err(`${slug2}: ${e instanceof Error ? e.message : String(e)}`);
6817
+ render.err(`${slug}: ${e instanceof Error ? e.message : String(e)}`);
6888
6818
  }
6889
6819
  }
6890
6820
  if (wantsJson) {
@@ -7173,11 +7103,11 @@ async function runMe(flags) {
7173
7103
  }
7174
7104
  const slugWidth = Math.max(...ws.meshes.map((m) => m.slug.length), 8);
7175
7105
  for (const m of ws.meshes) {
7176
- const slug2 = cyan(m.slug.padEnd(slugWidth));
7106
+ const slug = cyan(m.slug.padEnd(slugWidth));
7177
7107
  const peers = `${m.online}/${m.peers}`;
7178
7108
  const role = dim(m.myRole);
7179
7109
  const unread = m.unreadMentions > 0 ? " " + yellow(`${m.unreadMentions} @you`) : "";
7180
- process.stdout.write(` ${slug2} ${peers.padStart(5)} online ${dim(String(m.topics).padStart(2) + " topics")} ${role}${unread}
7110
+ process.stdout.write(` ${slug} ${peers.padStart(5)} online ${dim(String(m.topics).padStart(2) + " topics")} ${role}${unread}
7181
7111
  `);
7182
7112
  }
7183
7113
  return EXIT.SUCCESS;
@@ -7207,11 +7137,11 @@ async function runMeTopics(flags) {
7207
7137
  const slugWidth = Math.max(...visible.map((t) => t.meshSlug.length), 6);
7208
7138
  const nameWidth = Math.max(...visible.map((t) => t.name.length), 8);
7209
7139
  for (const t of visible) {
7210
- const slug2 = dim(t.meshSlug.padEnd(slugWidth));
7140
+ const slug = dim(t.meshSlug.padEnd(slugWidth));
7211
7141
  const name = cyan(t.name.padEnd(nameWidth));
7212
7142
  const unread = t.unread > 0 ? yellow(`${t.unread} unread`.padStart(10)) : dim("·".padStart(10));
7213
7143
  const last = t.lastMessageAt ? dim(formatRelativeTime(t.lastMessageAt)) : dim("never");
7214
- process.stdout.write(` ${slug2} ${name} ${unread} ${last}
7144
+ process.stdout.write(` ${slug} ${name} ${unread} ${last}
7215
7145
  `);
7216
7146
  }
7217
7147
  return EXIT.SUCCESS;
@@ -7247,13 +7177,13 @@ async function runMeNotifications(flags) {
7247
7177
  }
7248
7178
  const slugWidth = Math.max(...ws.notifications.map((n) => n.meshSlug.length), 6);
7249
7179
  for (const n of ws.notifications) {
7250
- const slug2 = dim(n.meshSlug.padEnd(slugWidth));
7180
+ const slug = dim(n.meshSlug.padEnd(slugWidth));
7251
7181
  const topic = cyan(`#${n.topicName}`);
7252
7182
  const sender = n.senderName ? `from ${n.senderName}` : "from ?";
7253
7183
  const ago = formatRelativeTime(n.createdAt);
7254
7184
  const dot = n.read ? dim("·") : yellow("●");
7255
7185
  const snippet = n.snippet ?? (n.ciphertext ? dim("[encrypted]") : dim("[empty]"));
7256
- process.stdout.write(` ${dot} ${slug2} ${topic} ${dim(sender)} ${dim(ago)}
7186
+ process.stdout.write(` ${dot} ${slug} ${topic} ${dim(sender)} ${dim(ago)}
7257
7187
  ` + ` ${snippet.length > 200 ? snippet.slice(0, 200) + "…" : snippet}
7258
7188
  `);
7259
7189
  }
@@ -7286,12 +7216,12 @@ async function runMeActivity(flags) {
7286
7216
  }
7287
7217
  const slugWidth = Math.max(...ws.activity.map((a) => a.meshSlug.length), 6);
7288
7218
  for (const a of ws.activity) {
7289
- const slug2 = dim(a.meshSlug.padEnd(slugWidth));
7219
+ const slug = dim(a.meshSlug.padEnd(slugWidth));
7290
7220
  const topic = cyan(`#${a.topicName}`);
7291
7221
  const sender = a.senderName ?? "?";
7292
7222
  const ago = formatRelativeTime(a.createdAt);
7293
7223
  const snippet = a.snippet ?? (a.ciphertext ? dim("[encrypted]") : dim("[empty]"));
7294
- process.stdout.write(` ${slug2} ${topic} ${dim(sender + " ·")} ${dim(ago)}
7224
+ process.stdout.write(` ${slug} ${topic} ${dim(sender + " ·")} ${dim(ago)}
7295
7225
  ` + ` ${snippet.length > 200 ? snippet.slice(0, 200) + "…" : snippet}
7296
7226
  `);
7297
7227
  }
@@ -7330,10 +7260,10 @@ async function runMeSearch(flags) {
7330
7260
  `));
7331
7261
  const slugWidth = Math.max(...ws.topics.map((t) => t.meshSlug.length), 6);
7332
7262
  for (const t of ws.topics) {
7333
- const slug2 = dim(t.meshSlug.padEnd(slugWidth));
7263
+ const slug = dim(t.meshSlug.padEnd(slugWidth));
7334
7264
  const name = cyan(`#${t.name}`);
7335
7265
  const desc = t.description ? dim(` — ${t.description}`) : "";
7336
- process.stdout.write(` ${slug2} ${name}${desc}
7266
+ process.stdout.write(` ${slug} ${name}${desc}
7337
7267
  `);
7338
7268
  }
7339
7269
  }
@@ -7343,13 +7273,13 @@ async function runMeSearch(flags) {
7343
7273
  `));
7344
7274
  const slugWidth = Math.max(...ws.messages.map((m) => m.meshSlug.length), 6);
7345
7275
  for (const m of ws.messages) {
7346
- const slug2 = dim(m.meshSlug.padEnd(slugWidth));
7276
+ const slug = dim(m.meshSlug.padEnd(slugWidth));
7347
7277
  const topic = cyan(`#${m.topicName}`);
7348
7278
  const sender = m.senderName;
7349
7279
  const ago = formatRelativeTime(m.createdAt);
7350
7280
  const snippet = m.snippet ?? (m.bodyVersion === 2 ? dim("[encrypted — open the topic to decrypt]") : dim("[empty]"));
7351
7281
  const highlighted = m.snippet ? highlightMatch(snippet, flags.query) : snippet;
7352
- process.stdout.write(` ${slug2} ${topic} ${dim(sender + " ·")} ${dim(ago)}
7282
+ process.stdout.write(` ${slug} ${topic} ${dim(sender + " ·")} ${dim(ago)}
7353
7283
  ` + ` ${highlighted}
7354
7284
  `);
7355
7285
  }
@@ -7394,11 +7324,11 @@ async function runMeTasks(flags) {
7394
7324
  }
7395
7325
  const slugWidth = Math.max(...ws.tasks.map((t) => t.meshSlug.length), 6);
7396
7326
  for (const t of ws.tasks) {
7397
- const slug2 = dim(t.meshSlug.padEnd(slugWidth));
7327
+ const slug = dim(t.meshSlug.padEnd(slugWidth));
7398
7328
  const status = t.status === "open" ? yellow("open ") : t.status === "claimed" ? cyan("working ") : green("done ");
7399
7329
  const prio = t.priority === "urgent" ? yellow("!") : t.priority === "low" ? dim("·") : " ";
7400
7330
  const claimer = t.claimedByName ? dim(` ← ${t.claimedByName}`) : "";
7401
- process.stdout.write(` ${slug2} ${prio} ${status} ${t.title}${claimer}
7331
+ process.stdout.write(` ${slug} ${prio} ${status} ${t.title}${claimer}
7402
7332
  `);
7403
7333
  }
7404
7334
  return EXIT.SUCCESS;
@@ -7431,12 +7361,12 @@ async function runMeState(flags) {
7431
7361
  const slugWidth = Math.max(...ws.entries.map((e) => e.meshSlug.length), 6);
7432
7362
  const keyWidth = Math.max(...ws.entries.map((e) => e.key.length), 8);
7433
7363
  for (const e of ws.entries) {
7434
- const slug2 = dim(e.meshSlug.padEnd(slugWidth));
7364
+ const slug = dim(e.meshSlug.padEnd(slugWidth));
7435
7365
  const key = cyan(e.key.padEnd(keyWidth));
7436
7366
  const valueStr = typeof e.value === "string" ? e.value : JSON.stringify(e.value);
7437
7367
  const trimmed = valueStr.length > 80 ? valueStr.slice(0, 80) + "…" : valueStr;
7438
7368
  const ago = dim(formatRelativeTime(e.updatedAt));
7439
- process.stdout.write(` ${slug2} ${key} ${trimmed} ${ago}
7369
+ process.stdout.write(` ${slug} ${key} ${trimmed} ${ago}
7440
7370
  `);
7441
7371
  }
7442
7372
  return EXIT.SUCCESS;
@@ -7469,11 +7399,11 @@ async function runMeMemory(flags) {
7469
7399
  }
7470
7400
  const slugWidth = Math.max(...ws.memories.map((m) => m.meshSlug.length), 6);
7471
7401
  for (const m of ws.memories) {
7472
- const slug2 = dim(m.meshSlug.padEnd(slugWidth));
7402
+ const slug = dim(m.meshSlug.padEnd(slugWidth));
7473
7403
  const ago = dim(formatRelativeTime(m.rememberedAt));
7474
7404
  const tags = m.tags.length > 0 ? " " + dim("[" + m.tags.join(", ") + "]") : "";
7475
7405
  const content = m.content.length > 240 ? m.content.slice(0, 240) + "…" : m.content;
7476
- process.stdout.write(` ${slug2} ${ago}${tags}
7406
+ process.stdout.write(` ${slug} ${ago}${tags}
7477
7407
  ${content}
7478
7408
  `);
7479
7409
  }
@@ -10257,10 +10187,10 @@ async function resolvePeer(meshSlug, name) {
10257
10187
  return { displayName: match.displayName, pubkey: key };
10258
10188
  });
10259
10189
  }
10260
- function pickMesh2(slug2) {
10190
+ function pickMesh2(slug) {
10261
10191
  const cfg = readConfig();
10262
- if (slug2)
10263
- return cfg.meshes.find((m) => m.slug === slug2) ? slug2 : null;
10192
+ if (slug)
10193
+ return cfg.meshes.find((m) => m.slug === slug) ? slug : null;
10264
10194
  return cfg.meshes[0]?.slug ?? null;
10265
10195
  }
10266
10196
  async function runGrant(peer, caps, opts = {}) {
@@ -14532,26 +14462,26 @@ __export(exports_seed_test_mesh, {
14532
14462
  runSeedTestMesh: () => runSeedTestMesh
14533
14463
  });
14534
14464
  function runSeedTestMesh(args) {
14535
- const [brokerUrl, meshId, memberId, pubkey, slug2] = args;
14536
- if (!brokerUrl || !meshId || !memberId || !pubkey || !slug2) {
14465
+ const [brokerUrl, meshId, memberId, pubkey, slug] = args;
14466
+ if (!brokerUrl || !meshId || !memberId || !pubkey || !slug) {
14537
14467
  render.err("Usage: claudemesh seed-test-mesh <broker-ws-url> <mesh-id> <member-id> <pubkey> <slug>");
14538
14468
  render.info(dim('Example: claudemesh seed-test-mesh "ws://localhost:7900/ws" mesh-123 member-abc aaa..aaa smoke-test'));
14539
14469
  process.exit(1);
14540
14470
  }
14541
14471
  const config = readConfig();
14542
- config.meshes = config.meshes.filter((m) => m.slug !== slug2);
14472
+ config.meshes = config.meshes.filter((m) => m.slug !== slug);
14543
14473
  config.meshes.push({
14544
14474
  meshId,
14545
14475
  memberId,
14546
- slug: slug2,
14547
- name: `Test: ${slug2}`,
14476
+ slug,
14477
+ name: `Test: ${slug}`,
14548
14478
  pubkey,
14549
14479
  secretKey: "dev-only-stub",
14550
14480
  brokerUrl,
14551
14481
  joinedAt: new Date().toISOString()
14552
14482
  });
14553
14483
  writeConfig(config);
14554
- render.ok(`seeded ${bold(slug2)}`, dim(meshId));
14484
+ render.ok(`seeded ${bold(slug)}`, dim(meshId));
14555
14485
  render.hint(`run ${bold("claudemesh mcp")} to connect, or register with Claude Code via ${bold("claudemesh install")}`);
14556
14486
  }
14557
14487
  var init_seed_test_mesh = __esm(() => {
@@ -15137,8 +15067,7 @@ Mesh
15137
15067
  claudemesh launch [slug] launch Claude Code on a mesh (alias: connect)
15138
15068
  claudemesh list show your meshes (alias: ls)
15139
15069
  claudemesh delete [slug] delete a mesh (alias: rm)
15140
- claudemesh rename <slug> <name> rename a mesh's display name (slug stays)
15141
- claudemesh slug <old> <new> change a mesh's slug (URL-safe identifier)
15070
+ claudemesh rename <old> <new> change a mesh's slug (the identifier you see and type)
15142
15071
  claudemesh share [email] share mesh (invite link / send email)
15143
15072
 
15144
15073
  Peer (resource form, recommended)
@@ -15389,11 +15318,6 @@ async function main() {
15389
15318
  process.exit(await rename2(positionals[0] ?? "", positionals[1] ?? ""));
15390
15319
  break;
15391
15320
  }
15392
- case "slug": {
15393
- const { slug: slug2 } = await Promise.resolve().then(() => (init_slug(), exports_slug));
15394
- process.exit(await slug2(positionals[0] ?? "", positionals[1] ?? ""));
15395
- break;
15396
- }
15397
15321
  case "share":
15398
15322
  case "invite": {
15399
15323
  const { invite: invite2 } = await Promise.resolve().then(() => (init_invite(), exports_invite));
@@ -16207,4 +16131,4 @@ main().catch((err) => {
16207
16131
  process.exit(EXIT.INTERNAL_ERROR);
16208
16132
  });
16209
16133
 
16210
- //# debugId=F81EA97B92E1F36F64756E2164756E21
16134
+ //# debugId=5139AEA096A0916B64756E2164756E21