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.
- package/dist/index.js +42 -41
- 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
|
-
|
|
48574
|
-
|
|
48575
|
-
|
|
48576
|
-
|
|
48577
|
-
|
|
48578
|
-
|
|
48579
|
-
|
|
48580
|
-
|
|
48581
|
-
|
|
48582
|
-
|
|
48583
|
-
|
|
48584
|
-
|
|
48585
|
-
|
|
48586
|
-
|
|
48587
|
-
|
|
48588
|
-
|
|
48589
|
-
|
|
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
|
-
|
|
48592
|
-
|
|
48593
|
-
|
|
48594
|
-
|
|
48595
|
-
|
|
48596
|
-
|
|
48597
|
-
|
|
48598
|
-
|
|
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.
|
|
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",
|