claudemesh-cli 0.5.6 → 0.5.8
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/index.js +33 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47231,7 +47231,10 @@ class BrokerClient {
|
|
|
47231
47231
|
signal: AbortSignal.timeout(30000)
|
|
47232
47232
|
});
|
|
47233
47233
|
const body = await res.json();
|
|
47234
|
-
|
|
47234
|
+
if (!res.ok || !body.fileId) {
|
|
47235
|
+
throw new Error(body.error ?? `HTTP ${res.status}`);
|
|
47236
|
+
}
|
|
47237
|
+
return body.fileId;
|
|
47235
47238
|
}
|
|
47236
47239
|
async vectorStore(collection, text, metadata) {
|
|
47237
47240
|
if (!this.ws || this.ws.readyState !== this.ws.OPEN)
|
|
@@ -48251,14 +48254,16 @@ ${lines.join(`
|
|
|
48251
48254
|
const client = allClients()[0];
|
|
48252
48255
|
if (!client)
|
|
48253
48256
|
return text("share_file: not connected", true);
|
|
48254
|
-
|
|
48255
|
-
|
|
48256
|
-
|
|
48257
|
-
|
|
48258
|
-
|
|
48259
|
-
|
|
48260
|
-
return text(
|
|
48261
|
-
|
|
48257
|
+
try {
|
|
48258
|
+
const fileId = await client.uploadFile(filePath, client.meshId, client.meshSlug, {
|
|
48259
|
+
name: fileName,
|
|
48260
|
+
tags,
|
|
48261
|
+
persistent: true
|
|
48262
|
+
});
|
|
48263
|
+
return text(`Shared: ${fileName ?? filePath} (${fileId})`);
|
|
48264
|
+
} catch (e) {
|
|
48265
|
+
return text(`share_file: upload failed — ${e instanceof Error ? e.message : String(e)}`, true);
|
|
48266
|
+
}
|
|
48262
48267
|
}
|
|
48263
48268
|
case "get_file": {
|
|
48264
48269
|
const { id, save_to } = args ?? {};
|
|
@@ -48693,7 +48698,25 @@ ${rows.join(`
|
|
|
48693
48698
|
} catch {}
|
|
48694
48699
|
});
|
|
48695
48700
|
}
|
|
48701
|
+
setTimeout(async () => {
|
|
48702
|
+
const client = allClients()[0];
|
|
48703
|
+
if (!client || client.status !== "open")
|
|
48704
|
+
return;
|
|
48705
|
+
try {
|
|
48706
|
+
const peers = await client.listPeers();
|
|
48707
|
+
const peerNames = peers.filter((p) => p.displayName !== myName).map((p) => p.displayName).join(", ") || "none";
|
|
48708
|
+
await server.notification({
|
|
48709
|
+
method: "notifications/claude/channel",
|
|
48710
|
+
params: {
|
|
48711
|
+
content: `[system] Connected as ${myName} to mesh ${client.meshSlug}. ${peers.length} peer(s) online: ${peerNames}. Call mesh_info for full details or set_summary to announce yourself.`,
|
|
48712
|
+
meta: { kind: "welcome", mesh_slug: client.meshSlug }
|
|
48713
|
+
}
|
|
48714
|
+
});
|
|
48715
|
+
} catch {}
|
|
48716
|
+
}, 3000);
|
|
48717
|
+
const keepalive = setInterval(() => {}, 1000);
|
|
48696
48718
|
const shutdown = () => {
|
|
48719
|
+
clearInterval(keepalive);
|
|
48697
48720
|
stopAll();
|
|
48698
48721
|
process.exit(0);
|
|
48699
48722
|
};
|
|
@@ -49606,7 +49629,7 @@ init_config();
|
|
|
49606
49629
|
// package.json
|
|
49607
49630
|
var package_default = {
|
|
49608
49631
|
name: "claudemesh-cli",
|
|
49609
|
-
version: "0.5.
|
|
49632
|
+
version: "0.5.8",
|
|
49610
49633
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
49611
49634
|
keywords: [
|
|
49612
49635
|
"claude-code",
|