claudemesh-cli 1.31.4 → 1.31.6
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
CHANGED
|
@@ -104,7 +104,7 @@ __export(exports_urls, {
|
|
|
104
104
|
VERSION: () => VERSION,
|
|
105
105
|
URLS: () => URLS
|
|
106
106
|
});
|
|
107
|
-
var URLS, VERSION = "1.31.
|
|
107
|
+
var URLS, VERSION = "1.31.6", env;
|
|
108
108
|
var init_urls = __esm(() => {
|
|
109
109
|
URLS = {
|
|
110
110
|
BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
|
|
@@ -7896,7 +7896,8 @@ async function listPeersForMesh(slug) {
|
|
|
7896
7896
|
function annotateSelf(peer, selfMemberPubkey, selfSessionPubkey) {
|
|
7897
7897
|
const isSelf = !!(selfMemberPubkey && peer.memberPubkey && peer.memberPubkey === selfMemberPubkey);
|
|
7898
7898
|
const isThisSession = !!(isSelf && selfSessionPubkey && peer.pubkey === selfSessionPubkey);
|
|
7899
|
-
|
|
7899
|
+
const role = peer.profile?.role?.trim() || undefined;
|
|
7900
|
+
return { ...peer, ...role ? { role } : {}, isSelf, isThisSession };
|
|
7900
7901
|
}
|
|
7901
7902
|
async function runPeers(flags) {
|
|
7902
7903
|
const config = readConfig();
|
|
@@ -7991,6 +7992,37 @@ async function runSend(flags, to, message) {
|
|
|
7991
7992
|
const priority = flags.priority === "now" ? "now" : flags.priority === "low" ? "low" : "next";
|
|
7992
7993
|
const config = readConfig();
|
|
7993
7994
|
const meshSlug = flags.mesh ?? (config.meshes.length === 1 ? config.meshes[0].slug : null);
|
|
7995
|
+
if (!to.startsWith("@") && !to.startsWith("#") && to !== "*" && /^[0-9a-f]{4,63}$/i.test(to)) {
|
|
7996
|
+
try {
|
|
7997
|
+
const { tryListPeersViaDaemon: tryListPeersViaDaemon2 } = await Promise.resolve().then(() => (init_daemon_route(), exports_daemon_route));
|
|
7998
|
+
const peers = await tryListPeersViaDaemon2() ?? [];
|
|
7999
|
+
const lower = to.toLowerCase();
|
|
8000
|
+
const matches2 = peers.filter((p) => {
|
|
8001
|
+
const pk = p.pubkey ?? "";
|
|
8002
|
+
const mpk = p.memberPubkey ?? "";
|
|
8003
|
+
return pk.toLowerCase().startsWith(lower) || mpk.toLowerCase().startsWith(lower);
|
|
8004
|
+
});
|
|
8005
|
+
if (matches2.length === 0) {
|
|
8006
|
+
render.err(`No peer matches hex prefix "${to}".`);
|
|
8007
|
+
const names = peers.map((p) => p.displayName).filter(Boolean).join(", ");
|
|
8008
|
+
if (names)
|
|
8009
|
+
render.hint(`online: ${names}`);
|
|
8010
|
+
process.exit(1);
|
|
8011
|
+
}
|
|
8012
|
+
if (matches2.length > 1) {
|
|
8013
|
+
const candidates = matches2.map((p) => {
|
|
8014
|
+
const pk = p.pubkey ?? "";
|
|
8015
|
+
const dn = p.displayName ?? "?";
|
|
8016
|
+
return `${dn} ${pk.slice(0, 16)}…`;
|
|
8017
|
+
}).join(", ");
|
|
8018
|
+
render.err(`Ambiguous hex prefix "${to}" — matches ${matches2.length} peers.`);
|
|
8019
|
+
render.hint(`candidates: ${candidates}`);
|
|
8020
|
+
render.hint("Use a longer prefix or paste the full 64-char pubkey.");
|
|
8021
|
+
process.exit(1);
|
|
8022
|
+
}
|
|
8023
|
+
to = matches2[0].pubkey ?? to;
|
|
8024
|
+
} catch {}
|
|
8025
|
+
}
|
|
7994
8026
|
if (!flags.self && meshSlug) {
|
|
7995
8027
|
const joined = config.meshes.find((m) => m.slug === meshSlug);
|
|
7996
8028
|
if (joined && /^[0-9a-f]{64}$/i.test(to) && to.toLowerCase() === joined.pubkey.toLowerCase()) {
|
|
@@ -15652,22 +15684,36 @@ claudemesh peer bans # list banned members
|
|
|
15652
15684
|
claudemesh peer verify [peer] # 6×5-digit safety numbers
|
|
15653
15685
|
\`\`\`
|
|
15654
15686
|
|
|
15655
|
-
JSON shape (per peer)
|
|
15687
|
+
JSON shape (per peer) — **render \`role\` and \`groups\` whenever you build a table for the user**, they're the highest-signal fields after \`displayName\`:
|
|
15656
15688
|
\`\`\`json
|
|
15657
15689
|
{
|
|
15658
15690
|
"displayName": "Mou",
|
|
15659
|
-
"pubkey": "abc123...",
|
|
15691
|
+
"pubkey": "abc123...", // session pubkey (rotates per claudemesh launch)
|
|
15692
|
+
"memberPubkey": "def456...", // stable identity (same across all sibling sessions)
|
|
15693
|
+
"sessionId": "uuid",
|
|
15660
15694
|
"status": "idle | working | dnd",
|
|
15661
15695
|
"summary": "string or null",
|
|
15696
|
+
"role": "lead | reviewer | bot | ...", // 1.31.5+: top-level alias of profile.role
|
|
15662
15697
|
"groups": [{ "name": "reviewers", "role": "lead" }],
|
|
15663
|
-
"
|
|
15698
|
+
"profile": {
|
|
15699
|
+
"role": "lead",
|
|
15700
|
+
"title": "string or null",
|
|
15701
|
+
"bio": "string or null",
|
|
15702
|
+
"avatar": "emoji or null",
|
|
15703
|
+
"capabilities": ["..."]
|
|
15704
|
+
},
|
|
15705
|
+
"peerType": "claude | telegram | ai | human | connector | ...",
|
|
15664
15706
|
"channel": "claude-code | api | ...",
|
|
15665
15707
|
"model": "claude-opus-4-7 | ...",
|
|
15666
15708
|
"cwd": "/path/to/working/dir or null",
|
|
15709
|
+
"isSelf": true, // peer is one of the caller's own sessions
|
|
15710
|
+
"isThisSession": false, // peer is the exact session running the cli
|
|
15667
15711
|
"stats": { "messagesIn": 0, "messagesOut": 0, "toolCalls": 0, "errors": 0, "uptime": 1200 }
|
|
15668
15712
|
}
|
|
15669
15713
|
\`\`\`
|
|
15670
15714
|
|
|
15715
|
+
**When asked to "list peers" inside a launched session, prefer the human renderer (\`claudemesh peer list\`, no \`--json\`) — it already prints role + groups inline next to the name with an explicit \`(none)\` footer when both are absent. If you do need JSON for parsing, always include \`role\` and \`groups\` columns in any rendered table; the user's primary question is usually "who's in what role" and dropping those fields hides the answer.**
|
|
15716
|
+
|
|
15671
15717
|
### \`message\` — send and inspect messages
|
|
15672
15718
|
|
|
15673
15719
|
\`\`\`bash
|
|
@@ -20051,4 +20097,4 @@ main().catch((err) => {
|
|
|
20051
20097
|
process.exit(EXIT.INTERNAL_ERROR);
|
|
20052
20098
|
});
|
|
20053
20099
|
|
|
20054
|
-
//# debugId=
|
|
20100
|
+
//# debugId=F22F2E19502D800C64756E2164756E21
|