claudemesh-cli 1.34.3 → 1.34.4
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/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.4", env;
|
|
85
85
|
var init_urls = __esm(() => {
|
|
86
86
|
URLS = {
|
|
87
87
|
BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
|
|
@@ -3003,12 +3003,19 @@ ${mf.allowed_tools.map((t) => ` - ${t}`).join(`
|
|
|
3003
3003
|
} catch {}
|
|
3004
3004
|
}
|
|
3005
3005
|
});
|
|
3006
|
+
let welcomeSent = false;
|
|
3007
|
+
const WELCOME_GRACE_MS = 2000;
|
|
3008
|
+
server.oninitialized = () => {
|
|
3009
|
+
mcpLog("server_initialized");
|
|
3010
|
+
if (welcomeSent)
|
|
3011
|
+
return;
|
|
3012
|
+
welcomeSent = true;
|
|
3013
|
+
setTimeout(() => {
|
|
3014
|
+
emitMeshWelcome(server, mcpLog);
|
|
3015
|
+
}, WELCOME_GRACE_MS);
|
|
3016
|
+
};
|
|
3006
3017
|
const transport = new StdioServerTransport;
|
|
3007
3018
|
await server.connect(transport);
|
|
3008
|
-
const WELCOME_DELAY_MS = 5000;
|
|
3009
|
-
setTimeout(() => {
|
|
3010
|
-
emitMeshWelcome(server, mcpLog);
|
|
3011
|
-
}, WELCOME_DELAY_MS);
|
|
3012
3019
|
const keepalive = setInterval(() => {}, 1000);
|
|
3013
3020
|
const shutdown = () => {
|
|
3014
3021
|
clearInterval(keepalive);
|
|
@@ -3045,9 +3052,21 @@ async function emitMeshWelcome(server, mcpLog) {
|
|
|
3045
3052
|
const { status, body } = await daemonGet(path, { sessionToken });
|
|
3046
3053
|
if (status === 200 && Array.isArray(body?.peers)) {
|
|
3047
3054
|
const peers = body.peers;
|
|
3048
|
-
const real = peers.filter((p) =>
|
|
3055
|
+
const real = peers.filter((p) => {
|
|
3056
|
+
const channel = String(p.channel ?? "");
|
|
3057
|
+
const peerRole = String(p.peerRole ?? "");
|
|
3058
|
+
const isInfra = channel === "claudemesh-daemon" || peerRole === "control-plane";
|
|
3059
|
+
if (isInfra)
|
|
3060
|
+
return false;
|
|
3061
|
+
if (selfSessionPubkey && p.pubkey === selfSessionPubkey)
|
|
3062
|
+
return false;
|
|
3063
|
+
return true;
|
|
3064
|
+
});
|
|
3049
3065
|
peerCount = real.length;
|
|
3050
3066
|
peerNames = real.map((p) => String(p.displayName ?? "unknown")).filter((n, i, arr) => arr.indexOf(n) === i).slice(0, 5);
|
|
3067
|
+
mcpLog("welcome_peers_resolved", { total: peers.length, real: real.length });
|
|
3068
|
+
} else {
|
|
3069
|
+
mcpLog("welcome_peers_status", { status });
|
|
3051
3070
|
}
|
|
3052
3071
|
} catch (e) {
|
|
3053
3072
|
mcpLog("welcome_peers_lookup_failed", { err: String(e) });
|
|
@@ -3234,4 +3253,4 @@ startMcpServer().catch((err) => {
|
|
|
3234
3253
|
process.exit(1);
|
|
3235
3254
|
});
|
|
3236
3255
|
|
|
3237
|
-
//# debugId=
|
|
3256
|
+
//# debugId=37722A693A6DEC1564756E2164756E21
|