claudemesh-cli 1.31.0 → 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.
@@ -104,7 +104,7 @@ __export(exports_urls, {
104
104
  VERSION: () => VERSION,
105
105
  URLS: () => URLS
106
106
  });
107
- var URLS, VERSION = "1.31.0", env;
107
+ var URLS, VERSION = "1.31.1", env;
108
108
  var init_urls = __esm(() => {
109
109
  URLS = {
110
110
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -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 });
@@ -9335,21 +9336,45 @@ function bindSseStream(res, bus) {
9335
9336
  }
9336
9337
 
9337
9338
  // src/daemon/process-info.ts
9338
- import { execFileSync } from "node:child_process";
9339
- function getProcessStartTime(pid) {
9339
+ import { execFile as execFile2 } from "node:child_process";
9340
+ import { promisify } from "node:util";
9341
+ async function getProcessStartTime(pid) {
9340
9342
  if (!Number.isFinite(pid) || pid <= 0)
9341
9343
  return null;
9342
9344
  try {
9343
- const out = execFileSync("ps", ["-o", "lstart=", "-p", String(pid)], {
9345
+ const { stdout } = await execFileAsync("ps", ["-o", "lstart=", "-p", String(pid)], {
9344
9346
  encoding: "utf8",
9345
- timeout: 1000,
9346
- stdio: ["ignore", "pipe", "ignore"]
9347
- }).trim();
9347
+ timeout: 1000
9348
+ });
9349
+ const out = stdout.trim();
9348
9350
  return out.length > 0 ? out : null;
9349
9351
  } catch {
9350
9352
  return null;
9351
9353
  }
9352
9354
  }
9355
+ async function getProcessStartTimes(pids) {
9356
+ const result = new Map;
9357
+ const valid = pids.filter((p) => Number.isFinite(p) && p > 0);
9358
+ if (valid.length === 0)
9359
+ return result;
9360
+ try {
9361
+ const { stdout } = await execFileAsync("ps", ["-o", "pid=,lstart=", "-p", valid.join(",")], { encoding: "utf8", timeout: 2000 });
9362
+ for (const raw of stdout.split(`
9363
+ `)) {
9364
+ const line = raw.trim();
9365
+ if (!line)
9366
+ continue;
9367
+ const m = /^(\d+)\s+(.+)$/.exec(line);
9368
+ if (!m)
9369
+ continue;
9370
+ const pid = Number.parseInt(m[1], 10);
9371
+ const lstart = m[2].trim();
9372
+ if (Number.isFinite(pid) && lstart.length > 0)
9373
+ result.set(pid, lstart);
9374
+ }
9375
+ } catch {}
9376
+ return result;
9377
+ }
9353
9378
  function isPidAlive(pid) {
9354
9379
  if (!Number.isFinite(pid) || pid <= 0)
9355
9380
  return false;
@@ -9360,13 +9385,18 @@ function isPidAlive(pid) {
9360
9385
  return false;
9361
9386
  }
9362
9387
  }
9363
- var init_process_info = () => {};
9388
+ var execFileAsync;
9389
+ var init_process_info = __esm(() => {
9390
+ execFileAsync = promisify(execFile2);
9391
+ });
9364
9392
 
9365
9393
  // src/daemon/session-registry.ts
9366
9394
  function startReaper() {
9367
9395
  if (reaperHandle)
9368
9396
  return;
9369
- reaperHandle = setInterval(reapDead, REAPER_INTERVAL_MS).unref?.() ?? reaperHandle;
9397
+ reaperHandle = setInterval(() => {
9398
+ reapDead();
9399
+ }, REAPER_INTERVAL_MS).unref?.() ?? reaperHandle;
9370
9400
  }
9371
9401
  function setRegistryHooks(next) {
9372
9402
  hooks.onRegister = next.onRegister;
@@ -9383,15 +9413,26 @@ function registerSession(info) {
9383
9413
  } catch {}
9384
9414
  }
9385
9415
  }
9386
- const startTime = info.startTime ?? getProcessStartTime(info.pid) ?? undefined;
9387
- const stored = { ...info, startTime, registeredAt: Date.now() };
9416
+ const stored = { ...info, registeredAt: Date.now() };
9388
9417
  byToken.set(info.token, stored);
9389
9418
  bySessionId.set(info.sessionId, info.token);
9390
9419
  try {
9391
9420
  hooks.onRegister?.(stored);
9392
9421
  } catch {}
9422
+ if (stored.startTime === undefined) {
9423
+ captureStartTimeAsync(info.token, info.pid);
9424
+ }
9393
9425
  return stored;
9394
9426
  }
9427
+ async function captureStartTimeAsync(token, pid) {
9428
+ const lstart = await getProcessStartTime(pid);
9429
+ if (lstart === null)
9430
+ return;
9431
+ const entry = byToken.get(token);
9432
+ if (!entry || entry.pid !== pid)
9433
+ return;
9434
+ entry.startTime = lstart;
9435
+ }
9395
9436
  function deregisterByToken(token) {
9396
9437
  const entry = byToken.get(token);
9397
9438
  if (!entry)
@@ -9417,9 +9458,11 @@ function resolveToken(token) {
9417
9458
  function listSessions() {
9418
9459
  return [...byToken.values()];
9419
9460
  }
9420
- function reapDead() {
9461
+ async function reapDead() {
9462
+ const entries = [...byToken.entries()];
9421
9463
  const dead = [];
9422
- for (const [token, info] of byToken.entries()) {
9464
+ const survivors = [];
9465
+ for (const [token, info] of entries) {
9423
9466
  if (Date.now() - info.registeredAt > TTL_MS) {
9424
9467
  dead.push(token);
9425
9468
  continue;
@@ -9428,13 +9471,22 @@ function reapDead() {
9428
9471
  dead.push(token);
9429
9472
  continue;
9430
9473
  }
9431
- if (info.startTime !== undefined) {
9432
- const live = getProcessStartTime(info.pid);
9433
- if (live !== null && live !== info.startTime) {
9434
- dead.push(token);
9435
- continue;
9474
+ survivors.push([token, info]);
9475
+ }
9476
+ const guardedPids = survivors.filter(([, info]) => info.startTime !== undefined).map(([, info]) => info.pid);
9477
+ if (guardedPids.length > 0) {
9478
+ try {
9479
+ const live = await getProcessStartTimes(guardedPids);
9480
+ for (const [token, info] of survivors) {
9481
+ if (info.startTime === undefined)
9482
+ continue;
9483
+ const lstart = live.get(info.pid);
9484
+ if (lstart === undefined)
9485
+ continue;
9486
+ if (lstart !== info.startTime)
9487
+ dead.push(token);
9436
9488
  }
9437
- }
9489
+ } catch {}
9438
9490
  }
9439
9491
  for (const t of dead)
9440
9492
  deregisterByToken(t);
@@ -11531,7 +11583,7 @@ __export(exports_service_install, {
11531
11583
  });
11532
11584
  import { existsSync as existsSync12, mkdirSync as mkdirSync7, writeFileSync as writeFileSync11, unlinkSync as unlinkSync5, readFileSync as readFileSync11 } from "node:fs";
11533
11585
  import { execSync as execSync2 } from "node:child_process";
11534
- import { homedir as homedir6 } from "node:os";
11586
+ import { homedir as homedir7 } from "node:os";
11535
11587
  import { join as join8, dirname as dirname5 } from "node:path";
11536
11588
  function detectPlatform() {
11537
11589
  if (process.platform === "darwin")
@@ -11583,7 +11635,7 @@ function uninstallService() {
11583
11635
  return { platform: platform5, removed };
11584
11636
  }
11585
11637
  function darwinPlistPath() {
11586
- return join8(homedir6(), "Library", "LaunchAgents", `${SERVICE_LABEL2}.plist`);
11638
+ return join8(homedir7(), "Library", "LaunchAgents", `${SERVICE_LABEL2}.plist`);
11587
11639
  }
11588
11640
  function installDarwin(args) {
11589
11641
  const plist = darwinPlistPath();
@@ -11618,11 +11670,11 @@ function installDarwin(args) {
11618
11670
  <key>StandardErrorPath</key>
11619
11671
  <string>${escapeXml(log2)}</string>
11620
11672
  <key>WorkingDirectory</key>
11621
- <string>${escapeXml(homedir6())}</string>
11673
+ <string>${escapeXml(homedir7())}</string>
11622
11674
  <key>EnvironmentVariables</key>
11623
11675
  <dict>
11624
11676
  <key>HOME</key>
11625
- <string>${escapeXml(homedir6())}</string>
11677
+ <string>${escapeXml(homedir7())}</string>
11626
11678
  <key>PATH</key>
11627
11679
  <string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
11628
11680
  </dict>
@@ -11651,7 +11703,7 @@ function installDarwin(args) {
11651
11703
  };
11652
11704
  }
11653
11705
  function linuxUnitPath() {
11654
- return join8(homedir6(), ".config", "systemd", "user", SYSTEMD_UNIT2);
11706
+ return join8(homedir7(), ".config", "systemd", "user", SYSTEMD_UNIT2);
11655
11707
  }
11656
11708
  function installLinux(args) {
11657
11709
  const unit = linuxUnitPath();
@@ -12059,7 +12111,7 @@ import {
12059
12111
  readFileSync as readFileSync12,
12060
12112
  writeFileSync as writeFileSync12
12061
12113
  } from "node:fs";
12062
- import { homedir as homedir7, platform as platform5 } from "node:os";
12114
+ import { homedir as homedir8, platform as platform5 } from "node:os";
12063
12115
  import { dirname as dirname6, join as join9, resolve } from "node:path";
12064
12116
  import { fileURLToPath } from "node:url";
12065
12117
  import { spawnSync as spawnSync3 } from "node:child_process";
@@ -12528,9 +12580,9 @@ var init_install = __esm(() => {
12528
12580
  init_facade();
12529
12581
  init_render();
12530
12582
  init_styles();
12531
- CLAUDE_CONFIG = join9(homedir7(), ".claude.json");
12532
- CLAUDE_SETTINGS = join9(homedir7(), ".claude", "settings.json");
12533
- 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");
12534
12586
  CLAUDEMESH_TOOLS = [
12535
12587
  "mcp__claudemesh__cancel_scheduled",
12536
12588
  "mcp__claudemesh__check_messages",
@@ -12587,7 +12639,7 @@ __export(exports_uninstall, {
12587
12639
  });
12588
12640
  import { readFileSync as readFileSync13, writeFileSync as writeFileSync13, existsSync as existsSync14, rmSync as rmSync2, readdirSync as readdirSync2 } from "node:fs";
12589
12641
  import { join as join10, dirname as dirname7 } from "node:path";
12590
- import { homedir as homedir8 } from "node:os";
12642
+ import { homedir as homedir9 } from "node:os";
12591
12643
  import { fileURLToPath as fileURLToPath2 } from "node:url";
12592
12644
  function bundledSkillsDir() {
12593
12645
  const here = fileURLToPath2(import.meta.url);
@@ -12674,7 +12726,7 @@ var init_uninstall = __esm(() => {
12674
12726
  init_render();
12675
12727
  init_styles();
12676
12728
  init_exit_codes();
12677
- CLAUDE_SKILLS_ROOT2 = join10(homedir8(), ".claude", "skills");
12729
+ CLAUDE_SKILLS_ROOT2 = join10(homedir9(), ".claude", "skills");
12678
12730
  });
12679
12731
 
12680
12732
  // src/commands/doctor.ts
@@ -12683,7 +12735,7 @@ __export(exports_doctor, {
12683
12735
  runDoctor: () => runDoctor
12684
12736
  });
12685
12737
  import { existsSync as existsSync15, readFileSync as readFileSync14, statSync as statSync3 } from "node:fs";
12686
- import { homedir as homedir9, platform as platform6 } from "node:os";
12738
+ import { homedir as homedir10, platform as platform6 } from "node:os";
12687
12739
  import { join as join11 } from "node:path";
12688
12740
  import { spawnSync as spawnSync4 } from "node:child_process";
12689
12741
  function checkNode() {
@@ -12708,7 +12760,7 @@ function checkClaudeOnPath() {
12708
12760
  };
12709
12761
  }
12710
12762
  function checkMcpRegistered() {
12711
- const claudeConfig = join11(homedir9(), ".claude.json");
12763
+ const claudeConfig = join11(homedir10(), ".claude.json");
12712
12764
  if (!existsSync15(claudeConfig)) {
12713
12765
  return {
12714
12766
  name: "claudemesh MCP registered in ~/.claude.json",
@@ -12734,7 +12786,7 @@ function checkMcpRegistered() {
12734
12786
  }
12735
12787
  }
12736
12788
  function checkHooksRegistered() {
12737
- const settings = join11(homedir9(), ".claude", "settings.json");
12789
+ const settings = join11(homedir10(), ".claude", "settings.json");
12738
12790
  if (!existsSync15(settings)) {
12739
12791
  return {
12740
12792
  name: "Status hooks registered in ~/.claude/settings.json",
@@ -13668,7 +13720,7 @@ var exports_url_handler = {};
13668
13720
  __export(exports_url_handler, {
13669
13721
  runUrlHandler: () => runUrlHandler
13670
13722
  });
13671
- import { platform as platform7, homedir as homedir10 } from "node:os";
13723
+ import { platform as platform7, homedir as homedir11 } from "node:os";
13672
13724
  import { existsSync as existsSync21, mkdirSync as mkdirSync9, writeFileSync as writeFileSync14, rmSync as rmSync3, chmodSync as chmodSync5 } from "node:fs";
13673
13725
  import { join as join12 } from "node:path";
13674
13726
  import { spawnSync as spawnSync5 } from "node:child_process";
@@ -13677,7 +13729,7 @@ function resolveClaudemeshBin() {
13677
13729
  }
13678
13730
  function installDarwin2() {
13679
13731
  const binPath = resolveClaudemeshBin();
13680
- const appDir = join12(homedir10(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13732
+ const appDir = join12(homedir11(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13681
13733
  const contents = join12(appDir, "Contents");
13682
13734
  const macOS = join12(contents, "MacOS");
13683
13735
  mkdirSync9(macOS, { recursive: true });
@@ -13729,7 +13781,7 @@ EOF
13729
13781
  }
13730
13782
  function installLinux2() {
13731
13783
  const binPath = resolveClaudemeshBin();
13732
- const appsDir = join12(homedir10(), ".local", "share", "applications");
13784
+ const appsDir = join12(homedir11(), ".local", "share", "applications");
13733
13785
  mkdirSync9(appsDir, { recursive: true });
13734
13786
  const desktop = `[Desktop Entry]
13735
13787
  Type=Application
@@ -13764,7 +13816,7 @@ function installWindows() {
13764
13816
  `[HKEY_CURRENT_USER\\Software\\Classes\\claudemesh\\shell\\open\\command]`,
13765
13817
  `@="\\"${binPath.replace(/\\/g, "\\\\")}\\" \\"%1\\""`
13766
13818
  ];
13767
- const regPath = join12(homedir10(), "claudemesh-handler.reg");
13819
+ const regPath = join12(homedir11(), "claudemesh-handler.reg");
13768
13820
  writeFileSync14(regPath, lines.join(`\r
13769
13821
  `));
13770
13822
  const res = spawnSync5("reg.exe", ["import", regPath], { encoding: "utf-8" });
@@ -13776,14 +13828,14 @@ function installWindows() {
13776
13828
  return EXIT.SUCCESS;
13777
13829
  }
13778
13830
  function uninstallDarwin() {
13779
- const appDir = join12(homedir10(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13831
+ const appDir = join12(homedir11(), "Library", "Application Support", "claudemesh", "ClaudemeshHandler.app");
13780
13832
  if (existsSync21(appDir))
13781
13833
  rmSync3(appDir, { recursive: true, force: true });
13782
13834
  render.ok("removed claudemesh:// handler on macOS");
13783
13835
  return EXIT.SUCCESS;
13784
13836
  }
13785
13837
  function uninstallLinux() {
13786
- const desktopPath = join12(homedir10(), ".local", "share", "applications", "claudemesh.desktop");
13838
+ const desktopPath = join12(homedir11(), ".local", "share", "applications", "claudemesh.desktop");
13787
13839
  if (existsSync21(desktopPath))
13788
13840
  rmSync3(desktopPath, { force: true });
13789
13841
  render.ok("removed claudemesh:// handler on Linux");
@@ -13831,7 +13883,7 @@ __export(exports_status_line, {
13831
13883
  });
13832
13884
  import { existsSync as existsSync22, readFileSync as readFileSync18 } from "node:fs";
13833
13885
  import { join as join13 } from "node:path";
13834
- import { homedir as homedir11 } from "node:os";
13886
+ import { homedir as homedir12 } from "node:os";
13835
13887
  async function runStatusLine() {
13836
13888
  try {
13837
13889
  const config = readConfig();
@@ -13839,7 +13891,7 @@ async function runStatusLine() {
13839
13891
  process.stdout.write("◇ claudemesh (not joined)");
13840
13892
  return EXIT.SUCCESS;
13841
13893
  }
13842
- const cachePath = join13(homedir11(), ".claudemesh", "peer-cache.json");
13894
+ const cachePath = join13(homedir12(), ".claudemesh", "peer-cache.json");
13843
13895
  let cache = {};
13844
13896
  if (existsSync22(cachePath)) {
13845
13897
  try {
@@ -14083,7 +14135,7 @@ __export(exports_grants, {
14083
14135
  isAllowed: () => isAllowed
14084
14136
  });
14085
14137
  import { existsSync as existsSync25, mkdirSync as mkdirSync10, readFileSync as readFileSync20, writeFileSync as writeFileSync16 } from "node:fs";
14086
- import { homedir as homedir12 } from "node:os";
14138
+ import { homedir as homedir13 } from "node:os";
14087
14139
  import { join as join15 } from "node:path";
14088
14140
  async function syncToBroker(meshSlug, grants) {
14089
14141
  const auth = getStoredToken();
@@ -14111,7 +14163,7 @@ function readGrants() {
14111
14163
  }
14112
14164
  }
14113
14165
  function writeGrants(g) {
14114
- const dir = join15(homedir12(), ".claudemesh");
14166
+ const dir = join15(homedir13(), ".claudemesh");
14115
14167
  if (!existsSync25(dir))
14116
14168
  mkdirSync10(dir, { recursive: true });
14117
14169
  writeFileSync16(GRANT_FILE, JSON.stringify(g, null, 2), { mode: 384 });
@@ -14270,7 +14322,7 @@ var init_grants = __esm(() => {
14270
14322
  BROKER_HTTP7 = URLS.BROKER.replace("wss://", "https://").replace("ws://", "http://").replace("/ws", "");
14271
14323
  ALL_CAPS = ["read", "dm", "broadcast", "state-read", "state-write", "file-read"];
14272
14324
  DEFAULT_CAPS = ["read", "dm", "broadcast", "state-read"];
14273
- GRANT_FILE = join15(homedir12(), ".claudemesh", "grants.json");
14325
+ GRANT_FILE = join15(homedir13(), ".claudemesh", "grants.json");
14274
14326
  });
14275
14327
 
14276
14328
  // src/commands/profile.ts
@@ -19989,4 +20041,4 @@ main().catch((err) => {
19989
20041
  process.exit(EXIT.INTERNAL_ERROR);
19990
20042
  });
19991
20043
 
19992
- //# debugId=CD2B8A691C15D42A64756E2164756E21
20044
+ //# debugId=9913FF6B13F5DF2D64756E2164756E21