claudemesh-cli 1.0.0-alpha.26 → 1.0.0-alpha.28
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/entrypoints/cli.js +3128 -1341
- package/dist/entrypoints/cli.js.map +45 -28
- package/dist/entrypoints/mcp.js +20 -3
- package/dist/entrypoints/mcp.js.map +3 -3
- package/package.json +3 -1
package/dist/entrypoints/mcp.js
CHANGED
|
@@ -15,6 +15,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
15
15
|
});
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
19
|
var __export = (target, all) => {
|
|
19
20
|
for (var name in all)
|
|
20
21
|
__defProp(target, name, {
|
|
@@ -3709,9 +3710,16 @@ ${manifest.allowed_tools.map((t) => ` - ${t}`).join(`
|
|
|
3709
3710
|
if (clients2.length === 0)
|
|
3710
3711
|
return text(mesh_slug ? `list_peers: no joined mesh "${mesh_slug}"` : "list_peers: no joined meshes", true);
|
|
3711
3712
|
const sections = [];
|
|
3713
|
+
const statusCache = {};
|
|
3712
3714
|
for (const c of clients2) {
|
|
3713
3715
|
const peers = await c.listPeers();
|
|
3714
3716
|
const header = `## ${c.meshSlug} (${c.status}, mesh ${c.meshId.slice(0, 8)}…)`;
|
|
3717
|
+
statusCache[c.meshSlug] = {
|
|
3718
|
+
total: peers.length,
|
|
3719
|
+
online: peers.filter((p) => p.status !== "offline").length,
|
|
3720
|
+
updatedAt: new Date().toISOString(),
|
|
3721
|
+
you: process.env.CLAUDEMESH_DISPLAY_NAME ?? undefined
|
|
3722
|
+
};
|
|
3715
3723
|
if (peers.length === 0) {
|
|
3716
3724
|
sections.push(`${header}
|
|
3717
3725
|
No peers connected.`);
|
|
@@ -3740,6 +3748,15 @@ ${peerLines.join(`
|
|
|
3740
3748
|
`)}`);
|
|
3741
3749
|
}
|
|
3742
3750
|
}
|
|
3751
|
+
try {
|
|
3752
|
+
const { writeFileSync: writeFileSync2, mkdirSync: mkdirSync2, existsSync: existsSync2 } = await import("node:fs");
|
|
3753
|
+
const { join: joinPath } = await import("node:path");
|
|
3754
|
+
const { homedir: homedir2 } = await import("node:os");
|
|
3755
|
+
const dir = joinPath(homedir2(), ".claudemesh");
|
|
3756
|
+
if (!existsSync2(dir))
|
|
3757
|
+
mkdirSync2(dir, { recursive: true });
|
|
3758
|
+
writeFileSync2(joinPath(dir, "peer-cache.json"), JSON.stringify(statusCache));
|
|
3759
|
+
} catch {}
|
|
3743
3760
|
return text(sections.join(`
|
|
3744
3761
|
|
|
3745
3762
|
`));
|
|
@@ -3761,8 +3778,8 @@ ${peerLines.join(`
|
|
|
3761
3778
|
return text(`Message ${id} not found or timed out.`);
|
|
3762
3779
|
const recipientLines = result.recipients.map((r) => ` - ${r.name} (${r.pubkey.slice(0, 12)}…): ${r.status}`);
|
|
3763
3780
|
return text(`Message ${id.slice(0, 12)}… → ${result.targetSpec}
|
|
3764
|
-
|
|
3765
|
-
|
|
3781
|
+
Delivered: ${result.delivered}${result.deliveredAt ? ` at ${result.deliveredAt}` : ""}
|
|
3782
|
+
Recipients:
|
|
3766
3783
|
${recipientLines.join(`
|
|
3767
3784
|
`)}`);
|
|
3768
3785
|
}
|
|
@@ -5420,4 +5437,4 @@ startMcpServer().catch((err) => {
|
|
|
5420
5437
|
process.exit(1);
|
|
5421
5438
|
});
|
|
5422
5439
|
|
|
5423
|
-
//# debugId=
|
|
5440
|
+
//# debugId=A4140639E8A1CA6E64756E2164756E21
|