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