claudemesh-cli 0.10.5 → 0.10.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/index.js +43 -40
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -40189,7 +40189,7 @@ var package_default;
|
|
|
40189
40189
|
var init_package = __esm(() => {
|
|
40190
40190
|
package_default = {
|
|
40191
40191
|
name: "claudemesh-cli",
|
|
40192
|
-
version: "0.10.
|
|
40192
|
+
version: "0.10.6",
|
|
40193
40193
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
40194
40194
|
keywords: [
|
|
40195
40195
|
"claude-code",
|
|
@@ -54088,7 +54088,7 @@ async function runHook(args) {
|
|
|
54088
54088
|
// src/commands/launch.ts
|
|
54089
54089
|
init_config();
|
|
54090
54090
|
init_auth();
|
|
54091
|
-
import {
|
|
54091
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
54092
54092
|
import { randomUUID } from "node:crypto";
|
|
54093
54093
|
import { mkdtempSync, writeFileSync as writeFileSync4, rmSync, readdirSync, statSync, existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
54094
54094
|
import { tmpdir, hostname as hostname2, homedir as homedir4 } from "node:os";
|
|
@@ -54532,9 +54532,9 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54532
54532
|
const keypair = await generateKeypair3();
|
|
54533
54533
|
const displayNameForSync = args.name ?? `${hostname2()}-${process.pid}`;
|
|
54534
54534
|
const { syncWithBroker: syncWithBroker2 } = await Promise.resolve().then(() => exports_sync_with_broker);
|
|
54535
|
-
const
|
|
54535
|
+
const result2 = await syncWithBroker2(syncToken, keypair.publicKey, displayNameForSync);
|
|
54536
54536
|
const { saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), exports_config));
|
|
54537
|
-
for (const m of
|
|
54537
|
+
for (const m of result2.meshes) {
|
|
54538
54538
|
config2.meshes.push({
|
|
54539
54539
|
meshId: m.mesh_id,
|
|
54540
54540
|
memberId: m.member_id,
|
|
@@ -54546,11 +54546,11 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54546
54546
|
joinedAt: new Date().toISOString()
|
|
54547
54547
|
});
|
|
54548
54548
|
}
|
|
54549
|
-
config2.accountId =
|
|
54549
|
+
config2.accountId = result2.account_id;
|
|
54550
54550
|
saveConfig2(config2);
|
|
54551
54551
|
justSynced = true;
|
|
54552
54552
|
console.log(`
|
|
54553
|
-
${green2("✓")} Synced ${
|
|
54553
|
+
${green2("✓")} Synced ${result2.meshes.length} mesh(es): ${result2.meshes.map((m) => m.slug).join(", ")}
|
|
54554
54554
|
`);
|
|
54555
54555
|
}
|
|
54556
54556
|
if (config2.meshes.length === 0) {
|
|
@@ -54735,19 +54735,6 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54735
54735
|
}
|
|
54736
54736
|
}
|
|
54737
54737
|
}
|
|
54738
|
-
const child = spawn(claudeBin, claudeArgs, {
|
|
54739
|
-
stdio: "inherit",
|
|
54740
|
-
shell: isWindows,
|
|
54741
|
-
env: {
|
|
54742
|
-
...process.env,
|
|
54743
|
-
CLAUDEMESH_CONFIG_DIR: tmpDir,
|
|
54744
|
-
CLAUDEMESH_DISPLAY_NAME: displayName,
|
|
54745
|
-
...claudeSessionId ? { CLAUDEMESH_SESSION_ID: claudeSessionId } : {},
|
|
54746
|
-
MCP_TIMEOUT: process.env.MCP_TIMEOUT ?? "30000",
|
|
54747
|
-
MAX_MCP_OUTPUT_TOKENS: process.env.MAX_MCP_OUTPUT_TOKENS ?? "50000",
|
|
54748
|
-
...role ? { CLAUDEMESH_ROLE: role } : {}
|
|
54749
|
-
}
|
|
54750
|
-
});
|
|
54751
54738
|
const cleanup = () => {
|
|
54752
54739
|
if (meshMcpEntries.length > 0) {
|
|
54753
54740
|
try {
|
|
@@ -54766,31 +54753,47 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54766
54753
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
54767
54754
|
} catch {}
|
|
54768
54755
|
};
|
|
54769
|
-
|
|
54770
|
-
|
|
54756
|
+
process.on("exit", cleanup);
|
|
54757
|
+
if (process.stdin.isTTY) {
|
|
54758
|
+
try {
|
|
54759
|
+
process.stdin.setRawMode(false);
|
|
54760
|
+
} catch {}
|
|
54761
|
+
}
|
|
54762
|
+
process.stdin.removeAllListeners("data");
|
|
54763
|
+
process.stdin.removeAllListeners("keypress");
|
|
54764
|
+
process.stdin.removeAllListeners("readable");
|
|
54765
|
+
process.stdin.pause();
|
|
54766
|
+
if (process.stdout.isTTY) {
|
|
54767
|
+
process.stdout.write("\x1B[?25h");
|
|
54768
|
+
process.stdout.write("\x1B[?1049l");
|
|
54769
|
+
}
|
|
54770
|
+
const result = spawnSync2(claudeBin, claudeArgs, {
|
|
54771
|
+
stdio: "inherit",
|
|
54772
|
+
shell: isWindows,
|
|
54773
|
+
env: {
|
|
54774
|
+
...process.env,
|
|
54775
|
+
CLAUDEMESH_CONFIG_DIR: tmpDir,
|
|
54776
|
+
CLAUDEMESH_DISPLAY_NAME: displayName,
|
|
54777
|
+
...claudeSessionId ? { CLAUDEMESH_SESSION_ID: claudeSessionId } : {},
|
|
54778
|
+
MCP_TIMEOUT: process.env.MCP_TIMEOUT ?? "30000",
|
|
54779
|
+
MAX_MCP_OUTPUT_TOKENS: process.env.MAX_MCP_OUTPUT_TOKENS ?? "50000",
|
|
54780
|
+
...role ? { CLAUDEMESH_ROLE: role } : {}
|
|
54781
|
+
}
|
|
54782
|
+
});
|
|
54783
|
+
if (result.error) {
|
|
54784
|
+
const err = result.error;
|
|
54771
54785
|
if (err.code === "ENOENT") {
|
|
54772
54786
|
console.error("✗ `claude` not found on PATH. Install Claude Code first.");
|
|
54773
54787
|
} else {
|
|
54774
54788
|
console.error(`✗ failed to launch claude: ${err.message}`);
|
|
54775
54789
|
}
|
|
54776
54790
|
process.exit(1);
|
|
54777
|
-
}
|
|
54778
|
-
|
|
54779
|
-
|
|
54780
|
-
|
|
54781
|
-
|
|
54782
|
-
|
|
54783
|
-
}
|
|
54784
|
-
process.exit(code ?? 0);
|
|
54785
|
-
});
|
|
54786
|
-
process.on("SIGTERM", () => {
|
|
54787
|
-
cleanup();
|
|
54788
|
-
process.exit(0);
|
|
54789
|
-
});
|
|
54790
|
-
process.on("SIGINT", () => {
|
|
54791
|
-
cleanup();
|
|
54792
|
-
process.exit(0);
|
|
54793
|
-
});
|
|
54791
|
+
}
|
|
54792
|
+
if (result.signal) {
|
|
54793
|
+
process.kill(process.pid, result.signal);
|
|
54794
|
+
return;
|
|
54795
|
+
}
|
|
54796
|
+
process.exit(result.status ?? 0);
|
|
54794
54797
|
}
|
|
54795
54798
|
|
|
54796
54799
|
// src/commands/status.ts
|
|
@@ -54881,7 +54884,7 @@ init_version();
|
|
|
54881
54884
|
import { existsSync as existsSync5, readFileSync as readFileSync4, statSync as statSync3 } from "node:fs";
|
|
54882
54885
|
import { homedir as homedir5, platform as platform2 } from "node:os";
|
|
54883
54886
|
import { join as join5 } from "node:path";
|
|
54884
|
-
import { spawnSync as
|
|
54887
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
54885
54888
|
function checkNode() {
|
|
54886
54889
|
const major = Number(process.versions.node.split(".")[0]);
|
|
54887
54890
|
return {
|
|
@@ -54892,7 +54895,7 @@ function checkNode() {
|
|
|
54892
54895
|
};
|
|
54893
54896
|
}
|
|
54894
54897
|
function checkClaudeOnPath() {
|
|
54895
|
-
const res = platform2() === "win32" ?
|
|
54898
|
+
const res = platform2() === "win32" ? spawnSync3("where", ["claude"]) : spawnSync3("sh", ["-c", "command -v claude"]);
|
|
54896
54899
|
const onPath = res.status === 0;
|
|
54897
54900
|
const location = onPath ? res.stdout.toString().trim().split(`
|
|
54898
54901
|
`)[0] : undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemesh-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"vitest": "4.0.14",
|
|
51
51
|
"@turbostarter/eslint-config": "0.1.0",
|
|
52
52
|
"@turbostarter/prettier-config": "0.1.0",
|
|
53
|
-
"@turbostarter/
|
|
54
|
-
"@turbostarter/
|
|
53
|
+
"@turbostarter/vitest-config": "0.1.0",
|
|
54
|
+
"@turbostarter/tsconfig": "0.1.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
|