claudemesh-cli 0.5.1 → 0.5.2

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 +41 -37
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48570,43 +48570,47 @@ ${rows.join(`
48570
48570
  const transport = new StdioServerTransport;
48571
48571
  await server.connect(transport);
48572
48572
  for (const client of allClients()) {
48573
- client.onPush(async (msg) => {
48574
- if (messageMode === "off")
48575
- return;
48576
- const fromPubkey = msg.senderPubkey || "";
48577
- const fromName = fromPubkey ? await resolvePeerName(client, fromPubkey) : "unknown";
48578
- if (messageMode === "inbox") {
48579
- try {
48580
- await server.notification({
48581
- method: "notifications/claude/channel",
48582
- params: {
48583
- content: `[inbox] New message from ${fromName}. Use check_messages to read.`,
48584
- meta: { kind: "inbox_notification", from_name: fromName }
48585
- }
48586
- });
48587
- } catch {}
48588
- return;
48589
- }
48590
- const content = msg.plaintext ?? decryptFailedWarning(fromPubkey);
48591
- try {
48592
- await server.notification({
48593
- method: "notifications/claude/channel",
48594
- params: {
48595
- content,
48596
- meta: {
48597
- from_id: fromPubkey,
48598
- from_name: fromName,
48599
- mesh_slug: client.meshSlug,
48600
- mesh_id: client.meshId,
48601
- priority: msg.priority,
48602
- sent_at: msg.createdAt,
48603
- delivered_at: msg.receivedAt,
48604
- kind: msg.kind
48605
- }
48573
+ if (messageMode !== "off") {
48574
+ const pushPollTimer = setInterval(async () => {
48575
+ const buffered = client.drainPushBuffer();
48576
+ for (const msg of buffered) {
48577
+ const fromPubkey = msg.senderPubkey || "";
48578
+ const fromName = fromPubkey ? await resolvePeerName(client, fromPubkey) : "unknown";
48579
+ if (messageMode === "inbox") {
48580
+ try {
48581
+ await server.notification({
48582
+ method: "notifications/claude/channel",
48583
+ params: {
48584
+ content: `[inbox] New message from ${fromName}. Use check_messages to read.`,
48585
+ meta: { kind: "inbox_notification", from_name: fromName }
48586
+ }
48587
+ });
48588
+ } catch {}
48589
+ continue;
48606
48590
  }
48607
- });
48608
- } catch {}
48609
- });
48591
+ const content = msg.plaintext ?? decryptFailedWarning(fromPubkey);
48592
+ try {
48593
+ await server.notification({
48594
+ method: "notifications/claude/channel",
48595
+ params: {
48596
+ content,
48597
+ meta: {
48598
+ from_id: fromPubkey,
48599
+ from_name: fromName,
48600
+ mesh_slug: client.meshSlug,
48601
+ mesh_id: client.meshId,
48602
+ priority: msg.priority,
48603
+ sent_at: msg.createdAt,
48604
+ delivered_at: msg.receivedAt,
48605
+ kind: msg.kind
48606
+ }
48607
+ }
48608
+ });
48609
+ } catch {}
48610
+ }
48611
+ }, 1000);
48612
+ pushPollTimer.unref();
48613
+ }
48610
48614
  client.onStreamData(async (evt) => {
48611
48615
  try {
48612
48616
  await server.notification({
@@ -49551,7 +49555,7 @@ init_config();
49551
49555
  // package.json
49552
49556
  var package_default = {
49553
49557
  name: "claudemesh-cli",
49554
- version: "0.5.1",
49558
+ version: "0.5.2",
49555
49559
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
49556
49560
  keywords: [
49557
49561
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
5
5
  "keywords": [
6
6
  "claude-code",