claudemesh-cli 1.34.8 → 1.34.10
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 +132 -48
- package/dist/entrypoints/cli.js.map +11 -11
- package/dist/entrypoints/mcp.js +22 -5
- package/dist/entrypoints/mcp.js.map +3 -3
- package/package.json +1 -1
package/dist/entrypoints/mcp.js
CHANGED
|
@@ -81,7 +81,7 @@ __export(exports_urls, {
|
|
|
81
81
|
VERSION: () => VERSION,
|
|
82
82
|
URLS: () => URLS
|
|
83
83
|
});
|
|
84
|
-
var URLS, VERSION = "1.34.
|
|
84
|
+
var URLS, VERSION = "1.34.10", env;
|
|
85
85
|
var init_urls = __esm(() => {
|
|
86
86
|
URLS = {
|
|
87
87
|
BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
|
|
@@ -3012,11 +3012,23 @@ ${mf.allowed_tools.map((t) => ` - ${t}`).join(`
|
|
|
3012
3012
|
} else if (ev.kind === "peer_join" || ev.kind === "peer_leave" || ev.kind === "system") {
|
|
3013
3013
|
const d = ev.data;
|
|
3014
3014
|
const eventName = String(d.event ?? ev.kind);
|
|
3015
|
+
const renderPeerLine = (verb) => {
|
|
3016
|
+
const name = String(d.name ?? "unknown");
|
|
3017
|
+
const pubkey = String(d.pubkey ?? "");
|
|
3018
|
+
const pubkeyTag = pubkey ? ` (${pubkey.slice(0, 8)})` : "";
|
|
3019
|
+
const groups = Array.isArray(d.groups) ? d.groups : [];
|
|
3020
|
+
const groupNames = groups.map((g) => typeof g === "object" && g !== null && ("name" in g) ? String(g.name) : typeof g === "string" ? g : "").filter(Boolean);
|
|
3021
|
+
const groupsTag = groupNames.length > 0 ? ` [${groupNames.join(", ")}]` : "";
|
|
3022
|
+
const lastSeen = typeof d.lastSeenAt === "string" ? d.lastSeenAt : null;
|
|
3023
|
+
const summary = typeof d.summary === "string" && d.summary.trim() ? d.summary.trim() : null;
|
|
3024
|
+
const returningTail = lastSeen ? ` — last seen ${new Date(lastSeen).toLocaleTimeString()}${summary ? ` · "${summary.slice(0, 80)}"` : ""}` : "";
|
|
3025
|
+
return `[system] Peer "${name}"${pubkeyTag}${groupsTag} ${verb} the mesh${returningTail}`;
|
|
3026
|
+
};
|
|
3015
3027
|
let content;
|
|
3016
3028
|
if (ev.kind === "peer_join") {
|
|
3017
|
-
content =
|
|
3029
|
+
content = renderPeerLine(eventName === "peer_returned" ? "returned to" : "joined");
|
|
3018
3030
|
} else if (ev.kind === "peer_leave") {
|
|
3019
|
-
content =
|
|
3031
|
+
content = renderPeerLine("left");
|
|
3020
3032
|
} else {
|
|
3021
3033
|
content = `[system] ${eventName}: ${JSON.stringify(d).slice(0, 240)}`;
|
|
3022
3034
|
}
|
|
@@ -3028,7 +3040,12 @@ ${mf.allowed_tools.map((t) => ` - ${t}`).join(`
|
|
|
3028
3040
|
meta: {
|
|
3029
3041
|
kind: "system",
|
|
3030
3042
|
event: eventName,
|
|
3031
|
-
mesh_slug: String(d.mesh ?? "")
|
|
3043
|
+
mesh_slug: String(d.mesh ?? ""),
|
|
3044
|
+
...typeof d.name === "string" ? { peer_name: d.name } : {},
|
|
3045
|
+
...typeof d.pubkey === "string" ? { peer_pubkey: d.pubkey } : {},
|
|
3046
|
+
...Array.isArray(d.groups) ? { peer_groups: JSON.stringify(d.groups) } : {},
|
|
3047
|
+
...typeof d.lastSeenAt === "string" ? { peer_last_seen_at: d.lastSeenAt } : {},
|
|
3048
|
+
...typeof d.summary === "string" ? { peer_summary: d.summary } : {}
|
|
3032
3049
|
}
|
|
3033
3050
|
}
|
|
3034
3051
|
});
|
|
@@ -3290,4 +3307,4 @@ startMcpServer().catch((err) => {
|
|
|
3290
3307
|
process.exit(1);
|
|
3291
3308
|
});
|
|
3292
3309
|
|
|
3293
|
-
//# debugId=
|
|
3310
|
+
//# debugId=9B7A0F3981D237EC64756E2164756E21
|