claudemesh-cli 0.1.11 → 0.1.13
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 +55 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46822,7 +46822,7 @@ async function startMcpServer() {
|
|
|
46822
46822
|
|
|
46823
46823
|
IMPORTANT: When you receive a <channel source="claudemesh" ...> message, RESPOND IMMEDIATELY. Do not wait until your current task is finished. Pause what you are doing, reply to the message using send_message, then resume your work. Treat incoming peer messages like a coworker tapping you on the shoulder — answer right away, even if you're in the middle of something.
|
|
46824
46824
|
|
|
46825
|
-
Read the from_id, from_name, mesh_slug, and priority attributes to understand context. Reply by calling send_message with
|
|
46825
|
+
Read the from_id, from_name, mesh_slug, and priority attributes to understand context. Reply by calling send_message with to set to the from_name (display name) of the sender.
|
|
46826
46826
|
|
|
46827
46827
|
Available tools:
|
|
46828
46828
|
- list_peers: see joined meshes + their connection status
|
|
@@ -46929,7 +46929,13 @@ ${drained.join(`
|
|
|
46929
46929
|
for (const client of allClients()) {
|
|
46930
46930
|
client.onPush(async (msg) => {
|
|
46931
46931
|
const fromPubkey = msg.senderPubkey || "";
|
|
46932
|
-
|
|
46932
|
+
let fromName = fromPubkey ? `peer-${fromPubkey.slice(0, 8)}` : "unknown";
|
|
46933
|
+
try {
|
|
46934
|
+
const peers = await client.listPeers();
|
|
46935
|
+
const match = peers.find((p) => p.pubkey === fromPubkey);
|
|
46936
|
+
if (match)
|
|
46937
|
+
fromName = match.displayName;
|
|
46938
|
+
} catch {}
|
|
46933
46939
|
const content = msg.plaintext ?? decryptFailedWarning(fromPubkey);
|
|
46934
46940
|
try {
|
|
46935
46941
|
await server.notification({
|
|
@@ -47555,6 +47561,7 @@ function parseArgs(argv) {
|
|
|
47555
47561
|
joinLink: null,
|
|
47556
47562
|
meshSlug: null,
|
|
47557
47563
|
quiet: false,
|
|
47564
|
+
skipPermConfirm: false,
|
|
47558
47565
|
claudeArgs: []
|
|
47559
47566
|
};
|
|
47560
47567
|
let i = 0;
|
|
@@ -47574,6 +47581,8 @@ function parseArgs(argv) {
|
|
|
47574
47581
|
result.meshSlug = arg.slice("--mesh=".length);
|
|
47575
47582
|
} else if (arg === "--quiet") {
|
|
47576
47583
|
result.quiet = true;
|
|
47584
|
+
} else if (arg === "-y" || arg === "--yes") {
|
|
47585
|
+
result.skipPermConfirm = true;
|
|
47577
47586
|
} else if (arg === "--") {
|
|
47578
47587
|
result.claudeArgs.push(...argv.slice(i + 1));
|
|
47579
47588
|
break;
|
|
@@ -47607,6 +47616,40 @@ async function pickMesh(meshes) {
|
|
|
47607
47616
|
});
|
|
47608
47617
|
});
|
|
47609
47618
|
}
|
|
47619
|
+
async function confirmPermissions() {
|
|
47620
|
+
const useColor = !process.env.NO_COLOR && process.env.TERM !== "dumb" && process.stdout.isTTY;
|
|
47621
|
+
const bold = (s) => useColor ? `\x1B[1m${s}\x1B[22m` : s;
|
|
47622
|
+
const dim = (s) => useColor ? `\x1B[2m${s}\x1B[22m` : s;
|
|
47623
|
+
const yellow = (s) => useColor ? `\x1B[33m${s}\x1B[39m` : s;
|
|
47624
|
+
console.log(yellow(bold(" Autonomous mode")));
|
|
47625
|
+
console.log("");
|
|
47626
|
+
console.log(" For peers to chat seamlessly, Claude needs to send and");
|
|
47627
|
+
console.log(" receive messages without asking for approval each time.");
|
|
47628
|
+
console.log(" This means tool calls (like sending a peer message) will");
|
|
47629
|
+
console.log(" run automatically — the same as running claude with");
|
|
47630
|
+
console.log(" --dangerously-skip-permissions.");
|
|
47631
|
+
console.log("");
|
|
47632
|
+
console.log(dim(" Claude still can't access anything outside your mesh —"));
|
|
47633
|
+
console.log(dim(" peers only exchange text messages, not tool calls."));
|
|
47634
|
+
console.log(dim(" Skip this prompt next time with: claudemesh launch -y"));
|
|
47635
|
+
console.log("");
|
|
47636
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
47637
|
+
return new Promise((resolve2, reject) => {
|
|
47638
|
+
rl.question(` ${bold("Continue?")} [Y/n] `, (answer) => {
|
|
47639
|
+
rl.close();
|
|
47640
|
+
const a = answer.trim().toLowerCase();
|
|
47641
|
+
if (a === "" || a === "y" || a === "yes") {
|
|
47642
|
+
resolve2();
|
|
47643
|
+
} else {
|
|
47644
|
+
console.log(`
|
|
47645
|
+
Aborted. Run without autonomous mode:`);
|
|
47646
|
+
console.log(` claude --dangerously-load-development-channels server:claudemesh
|
|
47647
|
+
`);
|
|
47648
|
+
process.exit(0);
|
|
47649
|
+
}
|
|
47650
|
+
});
|
|
47651
|
+
});
|
|
47652
|
+
}
|
|
47610
47653
|
function printBanner(name, meshSlug) {
|
|
47611
47654
|
const useColor = !process.env.NO_COLOR && process.env.TERM !== "dumb" && process.stdout.isTTY;
|
|
47612
47655
|
const dim = (s) => useColor ? `\x1B[2m${s}\x1B[22m` : s;
|
|
@@ -47674,12 +47717,17 @@ async function runLaunch(extraArgs) {
|
|
|
47674
47717
|
};
|
|
47675
47718
|
writeFileSync4(join4(tmpDir, "config.json"), JSON.stringify(sessionConfig, null, 2) + `
|
|
47676
47719
|
`, "utf-8");
|
|
47677
|
-
if (!args.quiet)
|
|
47720
|
+
if (!args.quiet) {
|
|
47678
47721
|
printBanner(displayName, mesh.slug);
|
|
47722
|
+
if (!args.skipPermConfirm) {
|
|
47723
|
+
await confirmPermissions();
|
|
47724
|
+
}
|
|
47725
|
+
}
|
|
47679
47726
|
const filtered = [];
|
|
47680
47727
|
for (let i = 0;i < args.claudeArgs.length; i++) {
|
|
47681
|
-
if (args.claudeArgs[i] === "--dangerously-load-development-channels") {
|
|
47682
|
-
i
|
|
47728
|
+
if (args.claudeArgs[i] === "--dangerously-load-development-channels" || args.claudeArgs[i] === "--dangerously-skip-permissions") {
|
|
47729
|
+
if (args.claudeArgs[i] === "--dangerously-load-development-channels")
|
|
47730
|
+
i++;
|
|
47683
47731
|
continue;
|
|
47684
47732
|
}
|
|
47685
47733
|
filtered.push(args.claudeArgs[i]);
|
|
@@ -47687,6 +47735,7 @@ async function runLaunch(extraArgs) {
|
|
|
47687
47735
|
const claudeArgs = [
|
|
47688
47736
|
"--dangerously-load-development-channels",
|
|
47689
47737
|
"server:claudemesh",
|
|
47738
|
+
"--dangerously-skip-permissions",
|
|
47690
47739
|
...filtered
|
|
47691
47740
|
];
|
|
47692
47741
|
const isWindows = process.platform === "win32";
|
|
@@ -47737,7 +47786,7 @@ init_config();
|
|
|
47737
47786
|
// package.json
|
|
47738
47787
|
var package_default = {
|
|
47739
47788
|
name: "claudemesh-cli",
|
|
47740
|
-
version: "0.1.
|
|
47789
|
+
version: "0.1.13",
|
|
47741
47790
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
47742
47791
|
keywords: [
|
|
47743
47792
|
"claude-code",
|