claudemesh-cli 1.31.1 → 1.31.2

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.
@@ -3615,13 +3615,14 @@ var init_spinner = __esm(() => {
3615
3615
  });
3616
3616
 
3617
3617
  // src/daemon/paths.ts
3618
+ import { homedir as homedir3 } from "node:os";
3618
3619
  import { join as join3 } from "node:path";
3619
- var DAEMON_PATHS, DAEMON_TCP_HOST = "127.0.0.1", DAEMON_TCP_DEFAULT_PORT = 47823;
3620
+ var DAEMON_DIR_ROOT, DAEMON_PATHS, DAEMON_TCP_HOST = "127.0.0.1", DAEMON_TCP_DEFAULT_PORT = 47823;
3620
3621
  var init_paths2 = __esm(() => {
3621
- init_paths();
3622
+ DAEMON_DIR_ROOT = process.env.CLAUDEMESH_DAEMON_DIR || join3(homedir3(), ".claudemesh", "daemon");
3622
3623
  DAEMON_PATHS = {
3623
3624
  get DAEMON_DIR() {
3624
- return join3(PATHS.CONFIG_DIR, "daemon");
3625
+ return DAEMON_DIR_ROOT;
3625
3626
  },
3626
3627
  get PID_FILE() {
3627
3628
  return join3(this.DAEMON_DIR, "daemon.pid");
@@ -3780,7 +3781,7 @@ __export(exports_lifecycle, {
3780
3781
  _resetDaemonReadyCache: () => _resetDaemonReadyCache
3781
3782
  });
3782
3783
  import { existsSync as existsSync6, readFileSync as readFileSync6, statSync, unlinkSync as unlinkSync2, writeFileSync as writeFileSync6 } from "node:fs";
3783
- import { homedir as homedir3 } from "node:os";
3784
+ import { homedir as homedir4 } from "node:os";
3784
3785
  import { join as join4 } from "node:path";
3785
3786
  async function ensureDaemonReady(opts = {}) {
3786
3787
  if (lastResultThisProcess && (lastResultThisProcess.state === "up" || lastResultThisProcess.state === "started")) {
@@ -3835,10 +3836,10 @@ async function runEnsureDaemon(opts) {
3835
3836
  }
3836
3837
  function isServiceManaged() {
3837
3838
  if (process.platform === "darwin") {
3838
- return existsSync6(join4(homedir3(), "Library", "LaunchAgents", `${SERVICE_LABEL}.plist`));
3839
+ return existsSync6(join4(homedir4(), "Library", "LaunchAgents", `${SERVICE_LABEL}.plist`));
3839
3840
  }
3840
3841
  if (process.platform === "linux") {
3841
- return existsSync6(join4(homedir3(), ".config", "systemd", "user", SYSTEMD_UNIT));
3842
+ return existsSync6(join4(homedir4(), ".config", "systemd", "user", SYSTEMD_UNIT));
3842
3843
  }
3843
3844
  return false;
3844
3845
  }
@@ -4005,7 +4006,7 @@ __export(exports_launch, {
4005
4006
  import { spawnSync as spawnSync2 } from "node:child_process";
4006
4007
  import { randomUUID } from "node:crypto";
4007
4008
  import { mkdtempSync, writeFileSync as writeFileSync7, rmSync, readdirSync, statSync as statSync2, existsSync as existsSync7, readFileSync as readFileSync7 } from "node:fs";
4008
- import { tmpdir, hostname as hostname2, homedir as homedir4 } from "node:os";
4009
+ import { tmpdir, hostname as hostname2, homedir as homedir5 } from "node:os";
4009
4010
  import { join as join5 } from "node:path";
4010
4011
  import { createInterface as createInterface4 } from "node:readline";
4011
4012
  async function ensureDaemonRunning(meshSlug, quiet) {
@@ -4352,7 +4353,7 @@ async function runLaunch(flags, rawArgs) {
4352
4353
  } catch {}
4353
4354
  await ensureDaemonRunning(mesh.slug, args.quiet);
4354
4355
  try {
4355
- const claudeConfigPath = join5(homedir4(), ".claude.json");
4356
+ const claudeConfigPath = join5(homedir5(), ".claude.json");
4356
4357
  if (existsSync7(claudeConfigPath)) {
4357
4358
  const claudeConfig = JSON.parse(readFileSync7(claudeConfigPath, "utf-8"));
4358
4359
  const mcpServers = claudeConfig.mcpServers ?? {};
@@ -4458,7 +4459,7 @@ async function runLaunch(flags, rawArgs) {
4458
4459
  }
4459
4460
  const meshMcpEntries = [];
4460
4461
  if (serviceCatalog.length > 0) {
4461
- const claudeConfigPath = join5(homedir4(), ".claude.json");
4462
+ const claudeConfigPath = join5(homedir5(), ".claude.json");
4462
4463
  let claudeConfig = {};
4463
4464
  try {
4464
4465
  claudeConfig = JSON.parse(readFileSync7(claudeConfigPath, "utf-8"));
@@ -4523,9 +4524,9 @@ async function runLaunch(flags, rawArgs) {
4523
4524
  let claudeBin = "claude";
4524
4525
  if (!isWindows2) {
4525
4526
  const candidates = [
4526
- join5(homedir4(), ".local", "bin", "claude"),
4527
+ join5(homedir5(), ".local", "bin", "claude"),
4527
4528
  "/usr/local/bin/claude",
4528
- join5(homedir4(), ".claude", "bin", "claude")
4529
+ join5(homedir5(), ".claude", "bin", "claude")
4529
4530
  ];
4530
4531
  for (const c of candidates) {
4531
4532
  if (existsSync7(c)) {
@@ -4537,7 +4538,7 @@ async function runLaunch(flags, rawArgs) {
4537
4538
  const cleanup = () => {
4538
4539
  if (meshMcpEntries.length > 0) {
4539
4540
  try {
4540
- const claudeConfigPath = join5(homedir4(), ".claude.json");
4541
+ const claudeConfigPath = join5(homedir5(), ".claude.json");
4541
4542
  const claudeConfig = JSON.parse(readFileSync7(claudeConfigPath, "utf-8"));
4542
4543
  const mcpServers = claudeConfig.mcpServers ?? {};
4543
4544
  for (const { key } of meshMcpEntries) {
@@ -5244,7 +5245,7 @@ __export(exports_join, {
5244
5245
  import sodium3 from "libsodium-wrappers";
5245
5246
  import { writeFileSync as writeFileSync8, mkdirSync as mkdirSync4 } from "node:fs";
5246
5247
  import { join as join6, dirname as dirname3 } from "node:path";
5247
- import { homedir as homedir5, hostname as hostname3 } from "node:os";
5248
+ import { homedir as homedir6, hostname as hostname3 } from "node:os";
5248
5249
  function deriveAppBaseUrl() {
5249
5250
  const override = process.env.CLAUDEMESH_APP_URL;
5250
5251
  if (override)
@@ -5363,7 +5364,7 @@ async function runJoin(args) {
5363
5364
  joinedAt: new Date().toISOString()
5364
5365
  });
5365
5366
  writeConfig(config);
5366
- const configDir = env.CLAUDEMESH_CONFIG_DIR ?? join6(homedir5(), ".claudemesh");
5367
+ const configDir = env.CLAUDEMESH_CONFIG_DIR ?? join6(homedir6(), ".claudemesh");
5367
5368
  const inviteFile = join6(configDir, `invite-${payload.mesh_slug}.txt`);
5368
5369
  try {
5369
5370
  mkdirSync4(dirname3(inviteFile), { recursive: true });
@@ -11582,7 +11583,7 @@ __export(exports_service_install, {
11582
11583
  });
11583
11584
  import { existsSync as existsSync12, mkdirSync as mkdirSync7, writeFileSync as writeFileSync11, unlinkSync as unlinkSync5, readFileSync as readFileSync11 } from "node:fs";
11584
11585
  import { execSync as execSync2 } from "node:child_process";
11585
- import { homedir as homedir6 } from "node:os";
11586
+ import { homedir as homedir7 } from "node:os";
11586
11587
  import { join as join8, dirname as dirname5 } from "node:path";
11587
11588
  function detectPlatform() {
11588
11589
  if (process.platform === "darwin")
@@ -11634,7 +11635,7 @@ function uninstallService() {
11634
11635
  return { platform: platform5, removed };
11635
11636
  }
11636
11637
  function darwinPlistPath() {
11637
- return join8(homedir6(), "Library", "LaunchAgents", `${SERVICE_LABEL2}.plist`);
11638
+ return join8(homedir7(), "Library", "LaunchAgents", `${SERVICE_LABEL2}.plist`);
11638
11639
  }
11639
11640
  function installDarwin(args) {
11640
11641
  const plist = darwinPlistPath();
@@ -11669,11 +11670,11 @@ function installDarwin(args) {
11669
11670
  <key>StandardErrorPath</key>
11670
11671
  <string>${escapeXml(log2)}</string>
11671
11672
  <key>WorkingDirectory</key>
11672
- <string>${escapeXml(homedir6())}</string>
11673
+ <string>${escapeXml(homedir7())}</string>
11673
11674
  <key>EnvironmentVariables</key>
11674
11675
  <dict>
11675
11676
  <key>HOME</key>
11676
- <string>${escapeXml(homedir6())}</string>
11677
+ <string>${escapeXml(homedir7())}</string>
11677
11678
  <key>PATH</key>
11678
11679
  <string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
11679
11680
  </dict>
@@ -11702,7 +11703,7 @@ function installDarwin(args) {
11702
11703
  };
11703
11704
  }
11704
11705
  function linuxUnitPath() {
11705
- return join8(homedir6(), ".config", "systemd", "user", SYSTEMD_UNIT2);
11706
+ return join8(homedir7(), ".config", "systemd", "user", SYSTEMD_UNIT2);
11706
11707
  }
11707
11708
  function installLinux(args) {
11708
11709
  const unit = linuxUnitPath();
@@ -12110,7 +12111,7 @@ import {
12110
12111
  readFileSync as readFileSync12,
12111
12112
  writeFileSync as writeFileSync12
12112
12113
  } from "node:fs";
12113
- import { homedir as homedir7, platform as platform5 } from "node:os";
12114
+ import { homedir as homedir8, platform as platform5 } from "node:os";
12114
12115
  import { dirname as dirname6, join as join9, resolve } from "node:path";
12115
12116
  import { fileURLToPath } from "node:url";
12116
12117
  import { spawnSync as spawnSync3 } from "node:child_process";
@@ -12579,9 +12580,9 @@ var init_install = __esm(() => {
12579
12580
  init_facade();
12580
12581
  init_render();
12581
12582
  init_styles();
12582
- CLAUDE_CONFIG = join9(homedir7(), ".claude.json");
12583
- CLAUDE_SETTINGS = join9(homedir7(), ".claude", "settings.json");
12584
- CLAUDE_SKILLS_ROOT = join9(homedir7(), ".claude", "skills");
12583
+ CLAUDE_CONFIG = join9(homedir8(), ".claude.json");
12584
+ CLAUDE_SETTINGS = join9(homedir8(), ".claude", "settings.json");
12585
+ CLAUDE_SKILLS_ROOT = join9(homedir8(), ".claude", "skills");
12585
12586
  CLAUDEMESH_TOOLS = [
12586
12587
  "mcp__claudemesh__cancel_scheduled",
12587
12588
  "mcp__claudemesh__check_messages",
@@ -12638,7 +12639,7 @@ __export(exports_uninstall, {
12638
12639
  });
12639
12640
  import { readFileSync as readFileSync13, writeFileSync as writeFileSync13, existsSync as existsSync14, rmSync as rmSync2, readdirSync as readdirSync2 } from "node:fs";
12640
12641
  import { join as join10, dirname as dirname7 } from "node:path";
12641
- import { homedir as homedir8 } from "node:os";
12642
+ import { homedir as homedir9 } from "node:os";
12642
12643
  import { fileURLToPath as fileURLToPath2 } from "node:url";
12643
12644
  function bundledSkillsDir() {
12644
12645
  const here = fileURLToPath2(import.meta.url);
@@ -12725,7 +12726,7 @@ var init_uninstall = __esm(() => {
12725
12726
  init_render();
12726
12727
  init_styles();
12727
12728
  init_exit_codes();
12728
- CLAUDE_SKILLS_ROOT2 = join10(homedir8(), ".claude", "skills");
12729
+ CLAUDE_SKILLS_ROOT2 = join10(homedir9(), ".claude", "skills");
12729
12730
  });
12730
12731
 
12731
12732
  // src/commands/doctor.ts
@@ -12734,7 +12735,7 @@ __export(exports_doctor, {
12734
12735
  runDoctor: () => runDoctor
12735
12736
  });
12736
12737
  import { existsSync as existsSync15, readFileSync as readFileSync14, statSync as statSync3 } from "node:fs";
12737
- import { homedir as homedir9, platform as platform6 } from "node:os";
12738
+ import { homedir as homedir10, platform as platform6 } from "node:os";
12738
12739
  import { join as join11 } from "node:path";
12739
12740
  import { spawnSync as spawnSync4 } from "node:child_process";
12740
12741
  function checkNode() {
@@ -12759,7 +12760,7 @@ function checkClaudeOnPath() {
12759
12760
  };
12760
12761
  }
12761
12762
  function checkMcpRegistered() {
12762
- const claudeConfig = join11(homedir9(), ".claude.json");
12763
+ const claudeConfig = join11(homedir10(), ".claude.json");
12763
12764
  if (!existsSync15(claudeConfig)) {
12764
12765
  return {
12765
12766
  name: "claudemesh MCP registered in ~/.claude.json",
@@ -12785,7 +12786,7 @@ function checkMcpRegistered() {
12785
12786
  }
12786
12787
  }
12787
12788
  function checkHooksRegistered() {
12788
- const settings = join11(homedir9(), ".claude", "settings.json");
12789
+ const settings = join11(homedir10(), ".claude", "settings.json");
12789
12790
  if (!existsSync15(settings)) {
12790
12791
  return {
12791
12792
  name: "Status hooks registered in ~/.claude/settings.json",
@@ -13719,7 +13720,7 @@ var exports_url_handler = {};
13719
13720
  __export(exports_url_handler, {
13720
13721
  runUrlHandler: () => runUrlHandler
13721
13722
  });
13722
- import { platform as platform7, homedir as homedir10 } from "node:os";
13723
+ import { platform as platform7, homedir as homedir11 } from "node:os";
13723
13724
  import { existsSync as existsSync21, mkdirSync as mkdirSync9, writeFileSync as writeFileSync14, rmSync as rmSync3, chmodSync as chmodSync5 } from "node:fs";
13724
13725
  import { join as join12 } from "node:path";
13725
13726
  import { spawnSync as spawnSync5 } from "node:child_process";
@@ -13728,7 +13729,7 @@ function resolveClaudemeshBin() {
13728
13729
  }
13729
13730
  function installDarwin2() {
13730
13731
  const binPath = resolveClaudemeshBin();
13731
- const appDir = join12(homedir10(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13732
+ const appDir = join12(homedir11(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13732
13733
  const contents = join12(appDir, "Contents");
13733
13734
  const macOS = join12(contents, "MacOS");
13734
13735
  mkdirSync9(macOS, { recursive: true });
@@ -13780,7 +13781,7 @@ EOF
13780
13781
  }
13781
13782
  function installLinux2() {
13782
13783
  const binPath = resolveClaudemeshBin();
13783
- const appsDir = join12(homedir10(), ".local", "share", "applications");
13784
+ const appsDir = join12(homedir11(), ".local", "share", "applications");
13784
13785
  mkdirSync9(appsDir, { recursive: true });
13785
13786
  const desktop = `[Desktop Entry]
13786
13787
  Type=Application
@@ -13815,7 +13816,7 @@ function installWindows() {
13815
13816
  `[HKEY_CURRENT_USER\\Software\\Classes\\claudemesh\\shell\\open\\command]`,
13816
13817
  `@="\\"${binPath.replace(/\\/g, "\\\\")}\\" \\"%1\\""`
13817
13818
  ];
13818
- const regPath = join12(homedir10(), "claudemesh-handler.reg");
13819
+ const regPath = join12(homedir11(), "claudemesh-handler.reg");
13819
13820
  writeFileSync14(regPath, lines.join(`\r
13820
13821
  `));
13821
13822
  const res = spawnSync5("reg.exe", ["import", regPath], { encoding: "utf-8" });
@@ -13827,14 +13828,14 @@ function installWindows() {
13827
13828
  return EXIT.SUCCESS;
13828
13829
  }
13829
13830
  function uninstallDarwin() {
13830
- const appDir = join12(homedir10(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13831
+ const appDir = join12(homedir11(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13831
13832
  if (existsSync21(appDir))
13832
13833
  rmSync3(appDir, { recursive: true, force: true });
13833
13834
  render.ok("removed claudemesh:// handler on macOS");
13834
13835
  return EXIT.SUCCESS;
13835
13836
  }
13836
13837
  function uninstallLinux() {
13837
- const desktopPath = join12(homedir10(), ".local", "share", "applications", "claudemesh.desktop");
13838
+ const desktopPath = join12(homedir11(), ".local", "share", "applications", "claudemesh.desktop");
13838
13839
  if (existsSync21(desktopPath))
13839
13840
  rmSync3(desktopPath, { force: true });
13840
13841
  render.ok("removed claudemesh:// handler on Linux");
@@ -13882,7 +13883,7 @@ __export(exports_status_line, {
13882
13883
  });
13883
13884
  import { existsSync as existsSync22, readFileSync as readFileSync18 } from "node:fs";
13884
13885
  import { join as join13 } from "node:path";
13885
- import { homedir as homedir11 } from "node:os";
13886
+ import { homedir as homedir12 } from "node:os";
13886
13887
  async function runStatusLine() {
13887
13888
  try {
13888
13889
  const config = readConfig();
@@ -13890,7 +13891,7 @@ async function runStatusLine() {
13890
13891
  process.stdout.write("◇ claudemesh (not joined)");
13891
13892
  return EXIT.SUCCESS;
13892
13893
  }
13893
- const cachePath = join13(homedir11(), ".claudemesh", "peer-cache.json");
13894
+ const cachePath = join13(homedir12(), ".claudemesh", "peer-cache.json");
13894
13895
  let cache = {};
13895
13896
  if (existsSync22(cachePath)) {
13896
13897
  try {
@@ -14134,7 +14135,7 @@ __export(exports_grants, {
14134
14135
  isAllowed: () => isAllowed
14135
14136
  });
14136
14137
  import { existsSync as existsSync25, mkdirSync as mkdirSync10, readFileSync as readFileSync20, writeFileSync as writeFileSync16 } from "node:fs";
14137
- import { homedir as homedir12 } from "node:os";
14138
+ import { homedir as homedir13 } from "node:os";
14138
14139
  import { join as join15 } from "node:path";
14139
14140
  async function syncToBroker(meshSlug, grants) {
14140
14141
  const auth = getStoredToken();
@@ -14162,7 +14163,7 @@ function readGrants() {
14162
14163
  }
14163
14164
  }
14164
14165
  function writeGrants(g) {
14165
- const dir = join15(homedir12(), ".claudemesh");
14166
+ const dir = join15(homedir13(), ".claudemesh");
14166
14167
  if (!existsSync25(dir))
14167
14168
  mkdirSync10(dir, { recursive: true });
14168
14169
  writeFileSync16(GRANT_FILE, JSON.stringify(g, null, 2), { mode: 384 });
@@ -14321,7 +14322,7 @@ var init_grants = __esm(() => {
14321
14322
  BROKER_HTTP7 = URLS.BROKER.replace("wss://", "https://").replace("ws://", "http://").replace("/ws", "");
14322
14323
  ALL_CAPS = ["read", "dm", "broadcast", "state-read", "state-write", "file-read"];
14323
14324
  DEFAULT_CAPS = ["read", "dm", "broadcast", "state-read"];
14324
- GRANT_FILE = join15(homedir12(), ".claudemesh", "grants.json");
14325
+ GRANT_FILE = join15(homedir13(), ".claudemesh", "grants.json");
14325
14326
  });
14326
14327
 
14327
14328
  // src/commands/profile.ts
@@ -20040,4 +20041,4 @@ main().catch((err) => {
20040
20041
  process.exit(EXIT.INTERNAL_ERROR);
20041
20042
  });
20042
20043
 
20043
- //# debugId=59AFA8DBDD2CE8AD64756E2164756E21
20044
+ //# debugId=9913FF6B13F5DF2D64756E2164756E21