claudemesh-cli 0.6.4 → 0.6.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 +47 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48012,12 +48012,12 @@ class BrokerClient {
48012
48012
  async claimTask(id) {
48013
48013
  if (!this.ws || this.ws.readyState !== this.ws.OPEN)
48014
48014
  return;
48015
- this.ws.send(JSON.stringify({ type: "claim_task", id }));
48015
+ this.ws.send(JSON.stringify({ type: "claim_task", taskId: id }));
48016
48016
  }
48017
48017
  async completeTask(id, result) {
48018
48018
  if (!this.ws || this.ws.readyState !== this.ws.OPEN)
48019
48019
  return;
48020
- this.ws.send(JSON.stringify({ type: "complete_task", id, result }));
48020
+ this.ws.send(JSON.stringify({ type: "complete_task", taskId: id, result }));
48021
48021
  }
48022
48022
  async listTasks(status, assignee) {
48023
48023
  if (!this.ws || this.ws.readyState !== this.ws.OPEN)
@@ -48332,7 +48332,7 @@ class BrokerClient {
48332
48332
  return;
48333
48333
  }
48334
48334
  if (msg.type === "graph_result") {
48335
- const rows = msg.rows ?? [];
48335
+ const rows = msg.records ?? [];
48336
48336
  const resolver = this.graphResultResolvers.shift();
48337
48337
  if (resolver)
48338
48338
  resolver(rows);
@@ -48422,6 +48422,7 @@ class BrokerClient {
48422
48422
  if (msg.type === "error") {
48423
48423
  this.debug(`broker error: ${msg.code} ${msg.message}`);
48424
48424
  const id = msg.id ? String(msg.id) : null;
48425
+ let handledByPendingSend = false;
48425
48426
  if (id) {
48426
48427
  const pending = this.pendingSends.get(id);
48427
48428
  if (pending) {
@@ -48430,6 +48431,40 @@ class BrokerClient {
48430
48431
  error: `${msg.code}: ${msg.message}`
48431
48432
  });
48432
48433
  this.pendingSends.delete(id);
48434
+ handledByPendingSend = true;
48435
+ }
48436
+ }
48437
+ if (!handledByPendingSend) {
48438
+ if (this.stateResolvers.length > 0) {
48439
+ this.stateResolvers.shift()(null);
48440
+ } else if (this.stateListResolvers.length > 0) {
48441
+ this.stateListResolvers.shift()([]);
48442
+ } else if (this.memoryStoreResolvers.length > 0) {
48443
+ this.memoryStoreResolvers.shift()(null);
48444
+ } else if (this.memoryRecallResolvers.length > 0) {
48445
+ this.memoryRecallResolvers.shift()([]);
48446
+ } else if (this.fileUrlResolvers.length > 0) {
48447
+ this.fileUrlResolvers.shift()(null);
48448
+ } else if (this.fileListResolvers.length > 0) {
48449
+ this.fileListResolvers.shift()([]);
48450
+ } else if (this.fileStatusResolvers.length > 0) {
48451
+ this.fileStatusResolvers.shift()([]);
48452
+ } else if (this.graphResultResolvers.length > 0) {
48453
+ this.graphResultResolvers.shift()([]);
48454
+ } else if (this.vectorStoredResolvers.length > 0) {
48455
+ this.vectorStoredResolvers.shift()(null);
48456
+ } else if (this.vectorResultsResolvers.length > 0) {
48457
+ this.vectorResultsResolvers.shift()([]);
48458
+ } else if (this.taskListResolvers.length > 0) {
48459
+ this.taskListResolvers.shift()([]);
48460
+ } else if (this.meshQueryResolvers.length > 0) {
48461
+ this.meshQueryResolvers.shift()(null);
48462
+ } else if (this.contextResultsResolvers.length > 0) {
48463
+ this.contextResultsResolvers.shift()([]);
48464
+ } else if (this.contextListResolvers.length > 0) {
48465
+ this.contextListResolvers.shift()([]);
48466
+ } else if (this.streamListResolvers.length > 0) {
48467
+ this.streamListResolvers.shift()([]);
48433
48468
  }
48434
48469
  }
48435
48470
  }
@@ -48777,10 +48812,15 @@ ${peerLines.join(`
48777
48812
  const { id } = args ?? {};
48778
48813
  if (!id)
48779
48814
  return text("message_status: `id` required", true);
48780
- const client = allClients()[0];
48781
- if (!client)
48815
+ const clients2 = allClients();
48816
+ if (!clients2.length)
48782
48817
  return text("message_status: not connected", true);
48783
- const result = await client.messageStatus(id);
48818
+ let result = null;
48819
+ for (const c of clients2) {
48820
+ result = await c.messageStatus(id);
48821
+ if (result)
48822
+ break;
48823
+ }
48784
48824
  if (!result)
48785
48825
  return text(`Message ${id} not found or timed out.`);
48786
48826
  const recipientLines = result.recipients.map((r) => ` - ${r.name} (${r.pubkey.slice(0, 12)}…): ${r.status}`);
@@ -50458,7 +50498,7 @@ init_config();
50458
50498
  // package.json
50459
50499
  var package_default = {
50460
50500
  name: "claudemesh-cli",
50461
- version: "0.6.4",
50501
+ version: "0.6.5",
50462
50502
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
50463
50503
  keywords: [
50464
50504
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
5
5
  "keywords": [
6
6
  "claude-code",