claudemesh-cli 0.5.4 → 0.5.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.
Files changed (2) hide show
  1. package/dist/index.js +55 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46745,6 +46745,20 @@ var TOOLS = [
46745
46745
  name: "mesh_info",
46746
46746
  description: "Get a complete overview of the mesh: peers, groups, state, memory, files, tasks, streams, tables. Call on session start for full situational awareness.",
46747
46747
  inputSchema: { type: "object", properties: {} }
46748
+ },
46749
+ {
46750
+ name: "ping_mesh",
46751
+ description: "Send test messages through the full pipeline and measure round-trip timing per priority. Diagnoses push delivery issues.",
46752
+ inputSchema: {
46753
+ type: "object",
46754
+ properties: {
46755
+ priorities: {
46756
+ type: "array",
46757
+ items: { type: "string", enum: ["now", "next", "low"] },
46758
+ description: 'Priorities to test (default: ["now", "next"])'
46759
+ }
46760
+ }
46761
+ }
46748
46762
  }
46749
46763
  ];
46750
46764
 
@@ -48561,6 +48575,46 @@ ${rows.join(`
48561
48575
  ];
48562
48576
  return text(lines.join(`
48563
48577
  `));
48578
+ }
48579
+ case "ping_mesh": {
48580
+ const { priorities: pingPriorities } = args ?? {};
48581
+ const toTest = pingPriorities ?? ["now", "next"];
48582
+ const client = allClients()[0];
48583
+ if (!client)
48584
+ return text("ping_mesh: not connected", true);
48585
+ const results = [];
48586
+ for (const prio of toTest) {
48587
+ const sendTime = Date.now();
48588
+ const pingId = `ping-${sendTime}-${prio}`;
48589
+ const sendResult = await client.send("*", `__ping__${pingId}`, prio);
48590
+ const ackTime = Date.now();
48591
+ if (!sendResult.ok) {
48592
+ results.push(`[${prio}] SEND FAILED: ${sendResult.error}`);
48593
+ continue;
48594
+ }
48595
+ let received = false;
48596
+ let receiveTime = 0;
48597
+ for (let i = 0;i < 100; i++) {
48598
+ await new Promise((r) => setTimeout(r, 100));
48599
+ const buffer = client.pushHistory;
48600
+ const match = buffer.find((m) => m.plaintext?.includes(pingId) || false);
48601
+ if (match) {
48602
+ received = true;
48603
+ receiveTime = Date.now();
48604
+ break;
48605
+ }
48606
+ }
48607
+ if (received) {
48608
+ results.push(`[${prio}] OK — send→ack: ${ackTime - sendTime}ms, send→receive: ${receiveTime - sendTime}ms`);
48609
+ } else {
48610
+ const peers = await client.listPeers();
48611
+ const selfStatus = peers.find((p) => p.displayName === myName)?.status ?? "unknown";
48612
+ results.push(`[${prio}] NOT RECEIVED in 10s (your status: ${selfStatus}${selfStatus === "working" ? " — broker holds next/low" : ""})`);
48613
+ }
48614
+ }
48615
+ return text(`Ping results:
48616
+ ${results.join(`
48617
+ `)}`);
48564
48618
  }
48565
48619
  default:
48566
48620
  return text(`Unknown tool: ${name}`, true);
@@ -49556,7 +49610,7 @@ init_config();
49556
49610
  // package.json
49557
49611
  var package_default = {
49558
49612
  name: "claudemesh-cli",
49559
- version: "0.5.4",
49613
+ version: "0.5.5",
49560
49614
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
49561
49615
  keywords: [
49562
49616
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
5
5
  "keywords": [
6
6
  "claude-code",