claudemesh-cli 0.5.2 → 0.5.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.
Files changed (2) hide show
  1. package/dist/index.js +42 -41
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48570,47 +48570,48 @@ ${rows.join(`
48570
48570
  const transport = new StdioServerTransport;
48571
48571
  await server.connect(transport);
48572
48572
  for (const client of allClients()) {
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;
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
+ }
48590
48606
  }
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
- }
48607
+ });
48608
+ process.stderr.write(`[claudemesh] pushed: from=${fromName} content=${content.slice(0, 60)}
48609
+ `);
48610
+ } catch (pushErr) {
48611
+ process.stderr.write(`[claudemesh] push FAILED: ${pushErr}
48612
+ `);
48613
+ }
48614
+ });
48614
48615
  client.onStreamData(async (evt) => {
48615
48616
  try {
48616
48617
  await server.notification({
@@ -49555,7 +49556,7 @@ init_config();
49555
49556
  // package.json
49556
49557
  var package_default = {
49557
49558
  name: "claudemesh-cli",
49558
- version: "0.5.2",
49559
+ version: "0.5.4",
49559
49560
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
49560
49561
  keywords: [
49561
49562
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
5
5
  "keywords": [
6
6
  "claude-code",