claudemesh-cli 0.5.1 → 0.5.3
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 +50 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48570,43 +48570,56 @@ ${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
|
-
|
|
48590
|
-
|
|
48591
|
-
|
|
48592
|
-
|
|
48593
|
-
|
|
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
|
+
if (buffered.length > 0) {
|
|
48577
|
+
process.stderr.write(`[claudemesh] poll: ${buffered.length} message(s) to push
|
|
48578
|
+
`);
|
|
48579
|
+
}
|
|
48580
|
+
for (const msg of buffered) {
|
|
48581
|
+
const fromPubkey = msg.senderPubkey || "";
|
|
48582
|
+
const fromName = fromPubkey ? await resolvePeerName(client, fromPubkey) : "unknown";
|
|
48583
|
+
if (messageMode === "inbox") {
|
|
48584
|
+
try {
|
|
48585
|
+
await server.notification({
|
|
48586
|
+
method: "notifications/claude/channel",
|
|
48587
|
+
params: {
|
|
48588
|
+
content: `[inbox] New message from ${fromName}. Use check_messages to read.`,
|
|
48589
|
+
meta: { kind: "inbox_notification", from_name: fromName }
|
|
48590
|
+
}
|
|
48591
|
+
});
|
|
48592
|
+
} catch {}
|
|
48593
|
+
continue;
|
|
48606
48594
|
}
|
|
48607
|
-
|
|
48608
|
-
|
|
48609
|
-
|
|
48595
|
+
const content = msg.plaintext ?? decryptFailedWarning(fromPubkey);
|
|
48596
|
+
try {
|
|
48597
|
+
await server.notification({
|
|
48598
|
+
method: "notifications/claude/channel",
|
|
48599
|
+
params: {
|
|
48600
|
+
content,
|
|
48601
|
+
meta: {
|
|
48602
|
+
from_id: fromPubkey,
|
|
48603
|
+
from_name: fromName,
|
|
48604
|
+
mesh_slug: client.meshSlug,
|
|
48605
|
+
mesh_id: client.meshId,
|
|
48606
|
+
priority: msg.priority,
|
|
48607
|
+
sent_at: msg.createdAt,
|
|
48608
|
+
delivered_at: msg.receivedAt,
|
|
48609
|
+
kind: msg.kind
|
|
48610
|
+
}
|
|
48611
|
+
}
|
|
48612
|
+
});
|
|
48613
|
+
process.stderr.write(`[claudemesh] pushed: from=${fromName} content=${content.slice(0, 60)}
|
|
48614
|
+
`);
|
|
48615
|
+
} catch (pushErr) {
|
|
48616
|
+
process.stderr.write(`[claudemesh] push FAILED: ${pushErr}
|
|
48617
|
+
`);
|
|
48618
|
+
}
|
|
48619
|
+
}
|
|
48620
|
+
}, 1000);
|
|
48621
|
+
pushPollTimer.unref();
|
|
48622
|
+
}
|
|
48610
48623
|
client.onStreamData(async (evt) => {
|
|
48611
48624
|
try {
|
|
48612
48625
|
await server.notification({
|
|
@@ -49551,7 +49564,7 @@ init_config();
|
|
|
49551
49564
|
// package.json
|
|
49552
49565
|
var package_default = {
|
|
49553
49566
|
name: "claudemesh-cli",
|
|
49554
|
-
version: "0.5.
|
|
49567
|
+
version: "0.5.3",
|
|
49555
49568
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
49556
49569
|
keywords: [
|
|
49557
49570
|
"claude-code",
|