claudemesh-cli 1.34.3 → 1.34.5
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.5", 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,21 @@ ${mf.allowed_tools.map((t) => ` - ${t}`).join(`
|
|
|
3003
3003
|
} catch {}
|
|
3004
3004
|
}
|
|
3005
3005
|
});
|
|
3006
|
+
const WELCOME_GRACE_FAST_MS = 5000;
|
|
3007
|
+
const WELCOME_GRACE_SLOW_MS = 15000;
|
|
3008
|
+
server.oninitialized = () => {
|
|
3009
|
+
mcpLog("server_initialized");
|
|
3010
|
+
setTimeout(() => {
|
|
3011
|
+
mcpLog("welcome_attempt", { lane: "fast", grace_ms: WELCOME_GRACE_FAST_MS });
|
|
3012
|
+
emitMeshWelcome(server, mcpLog);
|
|
3013
|
+
}, WELCOME_GRACE_FAST_MS);
|
|
3014
|
+
setTimeout(() => {
|
|
3015
|
+
mcpLog("welcome_attempt", { lane: "slow", grace_ms: WELCOME_GRACE_SLOW_MS });
|
|
3016
|
+
emitMeshWelcome(server, mcpLog);
|
|
3017
|
+
}, WELCOME_GRACE_SLOW_MS);
|
|
3018
|
+
};
|
|
3006
3019
|
const transport = new StdioServerTransport;
|
|
3007
3020
|
await server.connect(transport);
|
|
3008
|
-
const WELCOME_DELAY_MS = 5000;
|
|
3009
|
-
setTimeout(() => {
|
|
3010
|
-
emitMeshWelcome(server, mcpLog);
|
|
3011
|
-
}, WELCOME_DELAY_MS);
|
|
3012
3021
|
const keepalive = setInterval(() => {}, 1000);
|
|
3013
3022
|
const shutdown = () => {
|
|
3014
3023
|
clearInterval(keepalive);
|
|
@@ -3045,9 +3054,21 @@ async function emitMeshWelcome(server, mcpLog) {
|
|
|
3045
3054
|
const { status, body } = await daemonGet(path, { sessionToken });
|
|
3046
3055
|
if (status === 200 && Array.isArray(body?.peers)) {
|
|
3047
3056
|
const peers = body.peers;
|
|
3048
|
-
const real = peers.filter((p) =>
|
|
3057
|
+
const real = peers.filter((p) => {
|
|
3058
|
+
const channel = String(p.channel ?? "");
|
|
3059
|
+
const peerRole = String(p.peerRole ?? "");
|
|
3060
|
+
const isInfra = channel === "claudemesh-daemon" || peerRole === "control-plane";
|
|
3061
|
+
if (isInfra)
|
|
3062
|
+
return false;
|
|
3063
|
+
if (selfSessionPubkey && p.pubkey === selfSessionPubkey)
|
|
3064
|
+
return false;
|
|
3065
|
+
return true;
|
|
3066
|
+
});
|
|
3049
3067
|
peerCount = real.length;
|
|
3050
3068
|
peerNames = real.map((p) => String(p.displayName ?? "unknown")).filter((n, i, arr) => arr.indexOf(n) === i).slice(0, 5);
|
|
3069
|
+
mcpLog("welcome_peers_resolved", { total: peers.length, real: real.length });
|
|
3070
|
+
} else {
|
|
3071
|
+
mcpLog("welcome_peers_status", { status });
|
|
3051
3072
|
}
|
|
3052
3073
|
} catch (e) {
|
|
3053
3074
|
mcpLog("welcome_peers_lookup_failed", { err: String(e) });
|
|
@@ -3234,4 +3255,4 @@ startMcpServer().catch((err) => {
|
|
|
3234
3255
|
process.exit(1);
|
|
3235
3256
|
});
|
|
3236
3257
|
|
|
3237
|
-
//# debugId=
|
|
3258
|
+
//# debugId=5B72C4535C08E7F264756E2164756E21
|