@swmansion/argent 0.35.1-next.31 → 0.35.1-next.33

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/cli-cmds.mjs CHANGED
@@ -7320,14 +7320,14 @@ var require_parser = __commonJS({
7320
7320
  case "scalar":
7321
7321
  case "single-quoted-scalar":
7322
7322
  case "double-quoted-scalar": {
7323
- const fs34 = this.flowScalar(this.type);
7323
+ const fs35 = this.flowScalar(this.type);
7324
7324
  if (atNextItem || it.value) {
7325
- map2.items.push({ start, key: fs34, sep: [] });
7325
+ map2.items.push({ start, key: fs35, sep: [] });
7326
7326
  this.onKeyLine = true;
7327
7327
  } else if (it.sep) {
7328
- this.stack.push(fs34);
7328
+ this.stack.push(fs35);
7329
7329
  } else {
7330
- Object.assign(it, { key: fs34, sep: [] });
7330
+ Object.assign(it, { key: fs35, sep: [] });
7331
7331
  this.onKeyLine = true;
7332
7332
  }
7333
7333
  return;
@@ -7455,13 +7455,13 @@ var require_parser = __commonJS({
7455
7455
  case "scalar":
7456
7456
  case "single-quoted-scalar":
7457
7457
  case "double-quoted-scalar": {
7458
- const fs34 = this.flowScalar(this.type);
7458
+ const fs35 = this.flowScalar(this.type);
7459
7459
  if (!it || it.value)
7460
- fc.items.push({ start: [], key: fs34, sep: [] });
7460
+ fc.items.push({ start: [], key: fs35, sep: [] });
7461
7461
  else if (it.sep)
7462
- this.stack.push(fs34);
7462
+ this.stack.push(fs35);
7463
7463
  else
7464
- Object.assign(it, { key: fs34, sep: [] });
7464
+ Object.assign(it, { key: fs35, sep: [] });
7465
7465
  return;
7466
7466
  }
7467
7467
  case "flow-map-end":
@@ -11193,12 +11193,12 @@ var require_dist3 = __commonJS({
11193
11193
  });
11194
11194
 
11195
11195
  // ../argent-cli/src/run.ts
11196
- import * as fs13 from "node:fs";
11196
+ import * as fs14 from "node:fs";
11197
11197
  import * as path21 from "node:path";
11198
11198
 
11199
11199
  // ../argent-tools-client/src/launcher.ts
11200
11200
  import * as net from "node:net";
11201
- import * as fs5 from "node:fs";
11201
+ import * as fs6 from "node:fs";
11202
11202
  import * as path7 from "node:path";
11203
11203
  import * as readline from "node:readline";
11204
11204
  import { spawn, execFileSync } from "node:child_process";
@@ -11858,6 +11858,7 @@ function getConfigDefinition(key, registry2 = CONFIG_SCHEMA) {
11858
11858
  }
11859
11859
 
11860
11860
  // ../configuration-core/src/config-access.ts
11861
+ import * as fs5 from "node:fs";
11861
11862
  import * as path6 from "node:path";
11862
11863
  function readScopeValue(def, scope, options) {
11863
11864
  if (!def.scopes.includes(scope)) return void 0;
@@ -12073,7 +12074,7 @@ function isVersionNewer(a2, b) {
12073
12074
  function readBundlePackageVersion(bundlePath) {
12074
12075
  try {
12075
12076
  const pkg = JSON.parse(
12076
- fs5.readFileSync(path7.join(path7.dirname(bundlePath), "..", "package.json"), "utf8")
12077
+ fs6.readFileSync(path7.join(path7.dirname(bundlePath), "..", "package.json"), "utf8")
12077
12078
  );
12078
12079
  return typeof pkg.version === "string" ? pkg.version : void 0;
12079
12080
  } catch {
@@ -12133,7 +12134,7 @@ function killSpawnedChild(child, pid) {
12133
12134
  }
12134
12135
  function resolveToolsServerNode() {
12135
12136
  const { bun, deno, electron } = process.versions;
12136
- return !(bun || deno || electron) && fs5.existsSync(process.execPath) ? process.execPath : "node";
12137
+ return !(bun || deno || electron) && fs6.existsSync(process.execPath) ? process.execPath : "node";
12137
12138
  }
12138
12139
  function parseListeningPort(line) {
12139
12140
  const match = line.match(/Tools server listening on http:\/\/.+:(\d+)/);
@@ -12143,10 +12144,10 @@ function spawnToolsServer(paths, port, options = {}) {
12143
12144
  return new Promise((resolve26, reject) => {
12144
12145
  let logFd;
12145
12146
  try {
12146
- fs5.mkdirSync(STATE_DIR, { recursive: true });
12147
- logFd = fs5.openSync(LOG_FILE, "a");
12147
+ fs6.mkdirSync(STATE_DIR, { recursive: true });
12148
+ logFd = fs6.openSync(LOG_FILE, "a");
12148
12149
  } catch {
12149
- logFd = fs5.openSync("/dev/null", "w");
12150
+ logFd = fs6.openSync("/dev/null", "w");
12150
12151
  }
12151
12152
  const nodeBin = resolveToolsServerNode();
12152
12153
  const child = spawn(nodeBin, [paths.bundlePath, "start"], {
@@ -12154,7 +12155,7 @@ function spawnToolsServer(paths, port, options = {}) {
12154
12155
  stdio: ["ignore", "pipe", logFd],
12155
12156
  env: buildToolsServerEnv(paths, port, process.env, options)
12156
12157
  });
12157
- fs5.closeSync(logFd);
12158
+ fs6.closeSync(logFd);
12158
12159
  const pid = child.pid;
12159
12160
  if (!pid) {
12160
12161
  child.once(
@@ -12241,12 +12242,12 @@ async function writeToolsServerState(state2) {
12241
12242
  }
12242
12243
  function writeToolsServerStateSync(state2) {
12243
12244
  const target = stateFileForBundle(state2.bundlePath);
12244
- fs5.mkdirSync(STATE_DIR, { recursive: true });
12245
- fs5.writeFileSync(target, JSON.stringify(state2, null, 2) + "\n", {
12245
+ fs6.mkdirSync(STATE_DIR, { recursive: true });
12246
+ fs6.writeFileSync(target, JSON.stringify(state2, null, 2) + "\n", {
12246
12247
  encoding: "utf8",
12247
12248
  mode: 384
12248
12249
  });
12249
- fs5.chmodSync(target, 384);
12250
+ fs6.chmodSync(target, 384);
12250
12251
  }
12251
12252
  async function clearToolsServerState(bundlePath) {
12252
12253
  const files = [STATE_FILE];
@@ -12289,7 +12290,7 @@ async function sweepDeadStateFiles() {
12289
12290
  });
12290
12291
  continue;
12291
12292
  }
12292
- if (fs5.existsSync(fresh.bundlePath)) continue;
12293
+ if (fs6.existsSync(fresh.bundlePath)) continue;
12293
12294
  if (!couldBeOurToolServer(fresh.pid, fresh.bundlePath)) continue;
12294
12295
  await unlink(file2).catch(() => {
12295
12296
  });
@@ -12336,7 +12337,7 @@ async function killToolServer(bundlePath) {
12336
12337
  await clearToolsServerState(bundlePath ?? state2.bundlePath);
12337
12338
  return alive;
12338
12339
  }
12339
- var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs5.existsSync(p)) ?? "ps";
12340
+ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs6.existsSync(p)) ?? "ps";
12340
12341
  var PS_WIDTH_FLAGS = ["-ww"];
12341
12342
  var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
12342
12343
  function readProcessCommandLine(pid, flags2 = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
@@ -12383,13 +12384,13 @@ var LOCK_STALE_MS2 = 45e3;
12383
12384
  var LOCK_POLL_MS = 100;
12384
12385
  function spawnLockIsStale() {
12385
12386
  try {
12386
- const { pid, ts } = JSON.parse(fs5.readFileSync(LOCK_FILE, "utf8"));
12387
+ const { pid, ts } = JSON.parse(fs6.readFileSync(LOCK_FILE, "utf8"));
12387
12388
  if (typeof pid === "number" && pid > 0 && !isProcessAlive(pid)) return true;
12388
12389
  if (typeof ts === "number" && Date.now() - ts > LOCK_STALE_MS2) return true;
12389
12390
  return false;
12390
12391
  } catch {
12391
12392
  try {
12392
- return Date.now() - fs5.statSync(LOCK_FILE).mtimeMs > LOCK_STALE_MS2;
12393
+ return Date.now() - fs6.statSync(LOCK_FILE).mtimeMs > LOCK_STALE_MS2;
12393
12394
  } catch {
12394
12395
  return true;
12395
12396
  }
@@ -12397,7 +12398,7 @@ function spawnLockIsStale() {
12397
12398
  }
12398
12399
  async function acquireSpawnLock() {
12399
12400
  try {
12400
- fs5.mkdirSync(STATE_DIR, { recursive: true });
12401
+ fs6.mkdirSync(STATE_DIR, { recursive: true });
12401
12402
  } catch {
12402
12403
  return null;
12403
12404
  }
@@ -12405,11 +12406,11 @@ async function acquireSpawnLock() {
12405
12406
  const deadline = Date.now() + LOCK_WAIT_TIMEOUT_MS;
12406
12407
  for (; ; ) {
12407
12408
  try {
12408
- const fd = fs5.openSync(LOCK_FILE, "wx");
12409
+ const fd = fs6.openSync(LOCK_FILE, "wx");
12409
12410
  try {
12410
- fs5.writeSync(fd, JSON.stringify({ pid: process.pid, nonce, ts: Date.now() }));
12411
+ fs6.writeSync(fd, JSON.stringify({ pid: process.pid, nonce, ts: Date.now() }));
12411
12412
  } finally {
12412
- fs5.closeSync(fd);
12413
+ fs6.closeSync(fd);
12413
12414
  }
12414
12415
  let released = false;
12415
12416
  return {
@@ -12417,8 +12418,8 @@ async function acquireSpawnLock() {
12417
12418
  if (released) return;
12418
12419
  released = true;
12419
12420
  try {
12420
- const cur = JSON.parse(fs5.readFileSync(LOCK_FILE, "utf8"));
12421
- if (cur.pid === process.pid && cur.nonce === nonce) fs5.unlinkSync(LOCK_FILE);
12421
+ const cur = JSON.parse(fs6.readFileSync(LOCK_FILE, "utf8"));
12422
+ if (cur.pid === process.pid && cur.nonce === nonce) fs6.unlinkSync(LOCK_FILE);
12422
12423
  } catch {
12423
12424
  }
12424
12425
  }
@@ -12427,10 +12428,10 @@ async function acquireSpawnLock() {
12427
12428
  if (err.code !== "EEXIST") return null;
12428
12429
  if (spawnLockIsStale()) {
12429
12430
  try {
12430
- fs5.unlinkSync(LOCK_FILE);
12431
+ fs6.unlinkSync(LOCK_FILE);
12431
12432
  } catch {
12432
12433
  }
12433
- if (!fs5.existsSync(LOCK_FILE)) continue;
12434
+ if (!fs6.existsSync(LOCK_FILE)) continue;
12434
12435
  }
12435
12436
  if (Date.now() >= deadline) return null;
12436
12437
  await new Promise((r2) => setTimeout(r2, LOCK_POLL_MS));
@@ -12470,7 +12471,7 @@ async function ensureToolsServer(paths) {
12470
12471
  }
12471
12472
  await clearToolsServerState(paths.bundlePath);
12472
12473
  await sweepDeadStateFiles();
12473
- if (!fs5.existsSync(paths.bundlePath)) {
12474
+ if (!fs6.existsSync(paths.bundlePath)) {
12474
12475
  throw new Error(
12475
12476
  `The argent install serving this session is gone from disk (${paths.bundlePath}) \u2014 it was likely updated or removed. Restart the editor's MCP connection to reconnect.`
12476
12477
  );
@@ -12574,11 +12575,11 @@ var LAUNCH_PLATFORMS = ["ios", "android", "chromium", "vega", "macos"];
12574
12575
  var SELECTABLE_PLATFORMS = [...LAUNCH_PLATFORMS, "ios-remote"];
12575
12576
 
12576
12577
  // ../registry/src/flow-file-refs.ts
12577
- import * as fs7 from "node:fs/promises";
12578
+ import * as fs8 from "node:fs/promises";
12578
12579
  import * as path9 from "node:path";
12579
12580
 
12580
12581
  // ../registry/src/e2e-dirs.ts
12581
- import * as fs6 from "node:fs/promises";
12582
+ import * as fs7 from "node:fs/promises";
12582
12583
  import * as path8 from "node:path";
12583
12584
  var E2E_DIR = path8.join(".argent", "e2e");
12584
12585
  var LEGACY_E2E_DIRS = Object.freeze([path8.join(".argent", "flows")]);
@@ -12593,7 +12594,7 @@ function e2eFileCandidates(projectRoot, name) {
12593
12594
  return e2eDirsFor(projectRoot).map((dir) => path8.join(dir, `${name}.yaml`));
12594
12595
  }
12595
12596
  async function exists(file2) {
12596
- return fs6.stat(file2).then(
12597
+ return fs7.stat(file2).then(
12597
12598
  () => true,
12598
12599
  () => false
12599
12600
  );
@@ -12687,10 +12688,10 @@ function canonicalToolArgs(tool, args) {
12687
12688
  // ../registry/src/flow-file-refs.ts
12688
12689
  async function canonicalFlowPath(p) {
12689
12690
  try {
12690
- return await fs7.realpath(p);
12691
+ return await fs8.realpath(p);
12691
12692
  } catch {
12692
12693
  try {
12693
- return path9.join(await fs7.realpath(path9.dirname(p)), path9.basename(p));
12694
+ return path9.join(await fs8.realpath(path9.dirname(p)), path9.basename(p));
12694
12695
  } catch {
12695
12696
  return p;
12696
12697
  }
@@ -12750,7 +12751,7 @@ function flowMemberKey(anchorDir, target) {
12750
12751
  return `${anchorDir}\0${target}`;
12751
12752
  }
12752
12753
  async function classifyOnDiskSpelling(dir, base, addressable = FLOW_FILE_NAME_PATTERN) {
12753
- const entries = await fs7.readdir(dir).catch(() => null);
12754
+ const entries = await fs8.readdir(dir).catch(() => null);
12754
12755
  if (entries === null || entries.includes(base)) return { state: "listed" };
12755
12756
  const actual = entries.find((entry) => entry.toLowerCase() === base.toLowerCase());
12756
12757
  if (actual === void 0) return { state: "absent" };
@@ -37474,7 +37475,7 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
37474
37475
  init_esm();
37475
37476
 
37476
37477
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-node-http-env-configuration.js
37477
- import * as fs8 from "fs";
37478
+ import * as fs9 from "fs";
37478
37479
  import * as path14 from "path";
37479
37480
  init_esm();
37480
37481
  function getStaticHeadersFromEnv(signalIdentifier) {
@@ -37535,7 +37536,7 @@ function readFileFromEnv(signalSpecificEnvVar, nonSignalSpecificEnvVar, warningM
37535
37536
  const filePath = signalSpecificPath ?? nonSignalSpecificPath;
37536
37537
  if (filePath != null) {
37537
37538
  try {
37538
- return fs8.readFileSync(path14.resolve(process.cwd(), filePath));
37539
+ return fs9.readFileSync(path14.resolve(process.cwd(), filePath));
37539
37540
  } catch {
37540
37541
  diag2.warn(warningMessage);
37541
37542
  return void 0;
@@ -37621,7 +37622,7 @@ var OTLPLogExporter = class extends OTLPExporterBase {
37621
37622
  init_esm();
37622
37623
 
37623
37624
  // ../telemetry/src/debug.ts
37624
- import * as fs9 from "node:fs";
37625
+ import * as fs10 from "node:fs";
37625
37626
 
37626
37627
  // ../telemetry/src/paths.ts
37627
37628
  import * as path15 from "node:path";
@@ -37659,8 +37660,8 @@ function emitDebugPayload(payload) {
37659
37660
  } catch {
37660
37661
  }
37661
37662
  try {
37662
- fs9.mkdirSync(argentHomeDir(), { recursive: true });
37663
- fs9.appendFileSync(debugLogPath(), line + "\n");
37663
+ fs10.mkdirSync(argentHomeDir(), { recursive: true });
37664
+ fs10.appendFileSync(debugLogPath(), line + "\n");
37664
37665
  } catch {
37665
37666
  }
37666
37667
  }
@@ -38142,7 +38143,7 @@ function sanitize(event, raw) {
38142
38143
  import { randomUUID as randomUUID5 } from "node:crypto";
38143
38144
 
38144
38145
  // ../telemetry/src/cloud-agent-detect.ts
38145
- import { existsSync as existsSync3 } from "node:fs";
38146
+ import { existsSync as existsSync4 } from "node:fs";
38146
38147
  var CLAUDE_CLOUD_ENV_KINDS = /* @__PURE__ */ new Set(["byoc", "anthropic_cloud"]);
38147
38148
  var CLAUDE_REMOTE_ENTRYPOINTS = /* @__PURE__ */ new Set([
38148
38149
  "remote",
@@ -38185,7 +38186,7 @@ function detectCloudAgent(env = process.env, opts = {}) {
38185
38186
  if (isCursorCloud(env)) return "cursor";
38186
38187
  if (isCopilotAgent(env)) return "copilot";
38187
38188
  if (isReplitAgent(env)) return "replit";
38188
- const fileExists = opts.fileExists ?? existsSync3;
38189
+ const fileExists = opts.fileExists ?? existsSync4;
38189
38190
  if (safeExists(fileExists, DEVIN_MARKER_PATH)) return "devin";
38190
38191
  if (safeExists(fileExists, JULES_MARKER_PATH)) return "jules";
38191
38192
  return null;
@@ -38595,7 +38596,7 @@ function isCi(env = process.env) {
38595
38596
  var SESSION_ID2 = randomUUID5();
38596
38597
  function readCliVersion() {
38597
38598
  if (true) {
38598
- return "0.35.1-next.30";
38599
+ return "0.35.1-next.33";
38599
38600
  }
38600
38601
  return "0.0.0";
38601
38602
  }
@@ -38628,7 +38629,7 @@ function getBaseProps(runtime) {
38628
38629
 
38629
38630
  // ../telemetry/src/identity.ts
38630
38631
  import * as crypto2 from "node:crypto";
38631
- import * as fs10 from "node:fs";
38632
+ import * as fs11 from "node:fs";
38632
38633
  import * as path16 from "node:path";
38633
38634
  var FINGERPRINT_PATTERN = /^[0-9a-f]{64}$/;
38634
38635
  var cached2 = null;
@@ -38725,17 +38726,17 @@ function resolveFingerprintOnce(resolveFingerprint) {
38725
38726
  function isCorruptIdFile(filePath) {
38726
38727
  let isRegularFile;
38727
38728
  try {
38728
- isRegularFile = fs10.lstatSync(filePath).isFile();
38729
+ isRegularFile = fs11.lstatSync(filePath).isFile();
38729
38730
  } catch {
38730
38731
  return false;
38731
38732
  }
38732
38733
  return isRegularFile && tryReadId(filePath) === null;
38733
38734
  }
38734
38735
  function writeIdFileAtomic(finalPath, id) {
38735
- fs10.mkdirSync(argentHomeDir(), { recursive: true });
38736
+ fs11.mkdirSync(argentHomeDir(), { recursive: true });
38736
38737
  let occupant;
38737
38738
  try {
38738
- occupant = fs10.lstatSync(finalPath);
38739
+ occupant = fs11.lstatSync(finalPath);
38739
38740
  } catch (err) {
38740
38741
  if (err.code !== "ENOENT") throw err;
38741
38742
  }
@@ -38746,24 +38747,24 @@ function writeIdFileAtomic(finalPath, id) {
38746
38747
  argentHomeDir(),
38747
38748
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
38748
38749
  );
38749
- const fd = fs10.openSync(tmpPath, "wx", 384);
38750
+ const fd = fs11.openSync(tmpPath, "wx", 384);
38750
38751
  try {
38751
38752
  try {
38752
- fs10.writeSync(fd, id);
38753
- fs10.fsyncSync(fd);
38753
+ fs11.writeSync(fd, id);
38754
+ fs11.fsyncSync(fd);
38754
38755
  } finally {
38755
- fs10.closeSync(fd);
38756
+ fs11.closeSync(fd);
38756
38757
  }
38757
- fs10.renameSync(tmpPath, finalPath);
38758
+ fs11.renameSync(tmpPath, finalPath);
38758
38759
  } finally {
38759
38760
  try {
38760
- fs10.unlinkSync(tmpPath);
38761
+ fs11.unlinkSync(tmpPath);
38761
38762
  } catch {
38762
38763
  }
38763
38764
  }
38764
38765
  }
38765
38766
  function mintRandomId(finalPath) {
38766
- fs10.mkdirSync(argentHomeDir(), { recursive: true });
38767
+ fs11.mkdirSync(argentHomeDir(), { recursive: true });
38767
38768
  let value = crypto2.randomUUID();
38768
38769
  for (let attempt = 0; attempt < 3; attempt++) {
38769
38770
  const tmpPath = path16.join(
@@ -38772,19 +38773,19 @@ function mintRandomId(finalPath) {
38772
38773
  );
38773
38774
  let fd;
38774
38775
  try {
38775
- fd = fs10.openSync(tmpPath, "wx", 384);
38776
+ fd = fs11.openSync(tmpPath, "wx", 384);
38776
38777
  } catch (err) {
38777
38778
  if (err.code === "EEXIST") continue;
38778
38779
  throw err;
38779
38780
  }
38780
38781
  try {
38781
38782
  try {
38782
- fs10.writeSync(fd, value);
38783
- fs10.fsyncSync(fd);
38783
+ fs11.writeSync(fd, value);
38784
+ fs11.fsyncSync(fd);
38784
38785
  } finally {
38785
- fs10.closeSync(fd);
38786
+ fs11.closeSync(fd);
38786
38787
  }
38787
- fs10.linkSync(tmpPath, finalPath);
38788
+ fs11.linkSync(tmpPath, finalPath);
38788
38789
  cached2 = { path: finalPath, id: value };
38789
38790
  return value;
38790
38791
  } catch (err) {
@@ -38803,7 +38804,7 @@ function mintRandomId(finalPath) {
38803
38804
  throw err;
38804
38805
  } finally {
38805
38806
  try {
38806
- fs10.unlinkSync(tmpPath);
38807
+ fs11.unlinkSync(tmpPath);
38807
38808
  } catch {
38808
38809
  }
38809
38810
  }
@@ -38816,7 +38817,7 @@ function claimCorruptOccupant(finalPath) {
38816
38817
  `.telemetry-id.corrupt.${process.pid}.${crypto2.randomUUID()}`
38817
38818
  );
38818
38819
  try {
38819
- fs10.renameSync(finalPath, claimed);
38820
+ fs11.renameSync(finalPath, claimed);
38820
38821
  } catch {
38821
38822
  return null;
38822
38823
  }
@@ -38825,7 +38826,7 @@ function claimCorruptOccupant(finalPath) {
38825
38826
  grabbed = tryReadId(claimed);
38826
38827
  } finally {
38827
38828
  try {
38828
- fs10.unlinkSync(claimed);
38829
+ fs11.unlinkSync(claimed);
38829
38830
  } catch {
38830
38831
  }
38831
38832
  }
@@ -38837,9 +38838,9 @@ function peekAnonId() {
38837
38838
  function tryReadId(filePath) {
38838
38839
  let raw;
38839
38840
  try {
38840
- const stats = fs10.lstatSync(filePath);
38841
+ const stats = fs11.lstatSync(filePath);
38841
38842
  if (!stats.isFile()) return null;
38842
- raw = fs10.readFileSync(filePath, "utf8");
38843
+ raw = fs11.readFileSync(filePath, "utf8");
38843
38844
  } catch (err) {
38844
38845
  if (err.code === "ENOENT") return null;
38845
38846
  return null;
@@ -38854,7 +38855,7 @@ import { execFileSync as execFileSync2, spawn as spawn3 } from "node:child_proce
38854
38855
 
38855
38856
  // ../native-devtools-ios/src/index.ts
38856
38857
  import * as path17 from "node:path";
38857
- import * as fs11 from "node:fs";
38858
+ import * as fs12 from "node:fs";
38858
38859
  var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path17.join(__dirname, "..", "dylibs");
38859
38860
  var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path17.join(__dirname, "..", "bin");
38860
38861
  var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path17.join(DYLIB_DIR, "tcp");
@@ -38874,9 +38875,9 @@ function platformBinDir() {
38874
38875
  function simulatorServerBinaryPath() {
38875
38876
  const binaryName = simulatorServerBinaryName();
38876
38877
  const p = path17.join(platformBinDir(), binaryName);
38877
- if (!fs11.existsSync(p)) {
38878
+ if (!fs12.existsSync(p)) {
38878
38879
  const flat = path17.join(BIN_DIR, binaryName);
38879
- const migrationHint = fs11.existsSync(flat) ? ` Found a binary at the old flat path ${flat}; move it to ${p} or update ARGENT_SIMULATOR_SERVER_DIR to point at the parent of the platform subdirectory.` : "";
38880
+ const migrationHint = fs12.existsSync(flat) ? ` Found a binary at the old flat path ${flat}; move it to ${p} or update ARGENT_SIMULATOR_SERVER_DIR to point at the parent of the platform subdirectory.` : "";
38880
38881
  throw new Error(
38881
38882
  `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
38882
38883
  );
@@ -38956,7 +38957,7 @@ function resolveHostFingerprintAsync() {
38956
38957
  }
38957
38958
 
38958
38959
  // ../telemetry/src/consent.ts
38959
- import * as fs12 from "node:fs";
38960
+ import * as fs13 from "node:fs";
38960
38961
  import * as path18 from "node:path";
38961
38962
  var cache = /* @__PURE__ */ new Map();
38962
38963
  var sessionOverride = null;
@@ -38964,7 +38965,7 @@ function readConfigOverrideAt(filePath) {
38964
38965
  const miss = { mtimeMs: null, fingerprint: null, enabledOverride: null };
38965
38966
  let stats;
38966
38967
  try {
38967
- stats = fs12.lstatSync(filePath);
38968
+ stats = fs13.lstatSync(filePath);
38968
38969
  } catch {
38969
38970
  cache.set(filePath, miss);
38970
38971
  return null;
@@ -38981,7 +38982,7 @@ function readConfigOverrideAt(filePath) {
38981
38982
  }
38982
38983
  let parsedEnabled = null;
38983
38984
  try {
38984
- const raw = fs12.readFileSync(filePath, "utf8");
38985
+ const raw = fs13.readFileSync(filePath, "utf8");
38985
38986
  const json2 = JSON.parse(raw);
38986
38987
  if (json2 && typeof json2 === "object") {
38987
38988
  const t2 = json2.telemetry;
@@ -41199,8 +41200,8 @@ async function fetchImageToFile(result, outPath) {
41199
41200
  const res = await fetch(url2);
41200
41201
  if (!res.ok) throw new Error(`Failed to download image: ${res.status} ${res.statusText}`);
41201
41202
  const buf = Buffer.from(await res.arrayBuffer());
41202
- fs13.mkdirSync(path21.dirname(path21.resolve(outPath)), { recursive: true });
41203
- fs13.writeFileSync(outPath, buf);
41203
+ fs14.mkdirSync(path21.dirname(path21.resolve(outPath)), { recursive: true });
41204
+ fs14.writeFileSync(outPath, buf);
41204
41205
  }
41205
41206
  function renderResult(result, outputHint, images, json2) {
41206
41207
  if (json2) return JSON.stringify(result, null, 2);
@@ -41412,8 +41413,8 @@ settled=false or debugger-status's not_connected.
41412
41413
  if (outPath && meta3.outputHint === "image") {
41413
41414
  try {
41414
41415
  if (images.length > 0) {
41415
- fs13.mkdirSync(path21.dirname(path21.resolve(outPath)), { recursive: true });
41416
- fs13.writeFileSync(outPath, images[0].data);
41416
+ fs14.mkdirSync(path21.dirname(path21.resolve(outPath)), { recursive: true });
41417
+ fs14.writeFileSync(outPath, images[0].data);
41417
41418
  } else if (result && typeof result === "object") {
41418
41419
  await fetchImageToFile(result, outPath);
41419
41420
  }
@@ -41545,7 +41546,7 @@ Listing tools contacts the argent tool-server, starting one if none is running.
41545
41546
  }
41546
41547
 
41547
41548
  // ../argent-cli/src/server.ts
41548
- import * as fs14 from "node:fs";
41549
+ import * as fs15 from "node:fs";
41549
41550
  import * as readline2 from "node:readline";
41550
41551
  import { constants as constants2, networkInterfaces } from "node:os";
41551
41552
  import { spawn as spawn4 } from "node:child_process";
@@ -41613,12 +41614,12 @@ Stop one with: kill <pid>`);
41613
41614
  }
41614
41615
  }
41615
41616
  function logsCmd(follow) {
41616
- if (!fs14.existsSync(LOG_FILE2)) {
41617
+ if (!fs15.existsSync(LOG_FILE2)) {
41617
41618
  console.log(`No log file at ${LOG_FILE2}`);
41618
41619
  return;
41619
41620
  }
41620
41621
  if (!follow) {
41621
- process.stdout.write(fs14.readFileSync(LOG_FILE2, "utf8"));
41622
+ process.stdout.write(fs15.readFileSync(LOG_FILE2, "utf8"));
41622
41623
  return;
41623
41624
  }
41624
41625
  const cannotFollow = (err) => {
@@ -41946,8 +41947,8 @@ async function runForeground(paths, { port, host, idleTimeoutMinutes, token }, j
41946
41947
  if (stateWritten) {
41947
41948
  const file2 = stateFileForBundle(paths.bundlePath);
41948
41949
  try {
41949
- const cur = JSON.parse(fs14.readFileSync(file2, "utf8"));
41950
- if (cur.pid === childPid) fs14.unlinkSync(file2);
41950
+ const cur = JSON.parse(fs15.readFileSync(file2, "utf8"));
41951
+ if (cur.pid === childPid) fs15.unlinkSync(file2);
41951
41952
  } catch {
41952
41953
  }
41953
41954
  }
@@ -42057,22 +42058,22 @@ async function server(argv, options) {
42057
42058
  }
42058
42059
 
42059
42060
  // ../argent-cli/src/lens.ts
42060
- import * as fs15 from "node:fs";
42061
+ import * as fs16 from "node:fs";
42061
42062
  import * as os2 from "node:os";
42062
42063
  import * as path22 from "node:path";
42063
42064
 
42064
42065
  // ../argent-cli/src/lens-terminal.ts
42065
42066
  import { execFileSync as execFileSync3 } from "node:child_process";
42066
- import { existsSync as existsSync6 } from "node:fs";
42067
+ import { existsSync as existsSync7 } from "node:fs";
42067
42068
  var ITERM_PATHS = ["/Applications/iTerm.app", `${process.env.HOME ?? ""}/Applications/iTerm.app`];
42068
- function isITermInstalled(existsSync22 = defaultExists) {
42069
- return ITERM_PATHS.some((p) => p && existsSync22(p));
42069
+ function isITermInstalled(existsSync23 = defaultExists) {
42070
+ return ITERM_PATHS.some((p) => p && existsSync23(p));
42070
42071
  }
42071
42072
  function defaultExists(p) {
42072
- return existsSync6(p);
42073
+ return existsSync7(p);
42073
42074
  }
42074
- function resolveTerminal(preferred = "iterm", existsSync22 = defaultExists) {
42075
- if (preferred === "iterm" && isITermInstalled(existsSync22)) return "iterm";
42075
+ function resolveTerminal(preferred = "iterm", existsSync23 = defaultExists) {
42076
+ if (preferred === "iterm" && isITermInstalled(existsSync23)) return "iterm";
42076
42077
  return "terminal";
42077
42078
  }
42078
42079
  function escapeAppleScript(s) {
@@ -42814,11 +42815,11 @@ async function lens(argv, options) {
42814
42815
  process.exit(1);
42815
42816
  }
42816
42817
  const seedFile = path22.join(os2.tmpdir(), `argent-lens-seed-${process.pid}-${Date.now()}.txt`);
42817
- fs15.writeFileSync(seedFile, buildSeedPrompt(), "utf8");
42818
+ fs16.writeFileSync(seedFile, buildSeedPrompt(), "utf8");
42818
42819
  const launchCmd = agent.launch(shellQuote(process.cwd()), shellQuote(seedFile));
42819
42820
  const removeSeedFile = () => {
42820
42821
  try {
42821
- fs15.rmSync(seedFile, { force: true });
42822
+ fs16.rmSync(seedFile, { force: true });
42822
42823
  } catch {
42823
42824
  }
42824
42825
  };
@@ -44355,7 +44356,7 @@ var n2 = class extends y {
44355
44356
  import { styleText as styleText2, stripVTControlCharacters } from "node:util";
44356
44357
  import process$1 from "node:process";
44357
44358
  var import_sisteransi2 = __toESM(require_src(), 1);
44358
- import { existsSync as existsSync7, lstatSync as lstatSync3, readdirSync as readdirSync3 } from "node:fs";
44359
+ import { existsSync as existsSync8, lstatSync as lstatSync3, readdirSync as readdirSync3 } from "node:fs";
44359
44360
  import { dirname as dirname17, join as join24 } from "node:path";
44360
44361
  function isUnicodeSupported() {
44361
44362
  if (process$1.platform !== "win32") {
@@ -45373,7 +45374,7 @@ async function cmdDisable(scope) {
45373
45374
 
45374
45375
  // ../argent-cli/src/providers.ts
45375
45376
  var import_picocolors7 = __toESM(require_picocolors(), 1);
45376
- import * as fs19 from "node:fs";
45377
+ import * as fs20 from "node:fs";
45377
45378
  import * as path30 from "node:path";
45378
45379
 
45379
45380
  // ../device-providers/src/contract.ts
@@ -45519,7 +45520,7 @@ var providerEnvelopeSchema = providerRecordSchema.extend({
45519
45520
  });
45520
45521
 
45521
45522
  // ../device-providers/src/read.ts
45522
- import * as fs16 from "node:fs";
45523
+ import * as fs17 from "node:fs";
45523
45524
  import * as os3 from "node:os";
45524
45525
  import * as path28 from "node:path";
45525
45526
  var DISABLE_ENV = "ARGENT_DISABLE_DEVICE_PROVIDERS";
@@ -45548,7 +45549,7 @@ function warnOnce(key, message) {
45548
45549
  function readProviderFile(file2) {
45549
45550
  let raw;
45550
45551
  try {
45551
- raw = fs16.readFileSync(file2, "utf8");
45552
+ raw = fs17.readFileSync(file2, "utf8");
45552
45553
  } catch {
45553
45554
  return void 0;
45554
45555
  }
@@ -45598,14 +45599,14 @@ function discoverProviders() {
45598
45599
  function descriptorFiles() {
45599
45600
  const directory = providersDirectory();
45600
45601
  try {
45601
- return fs16.readdirSync(directory).filter((name) => name.endsWith(".json")).sort().map((name) => path28.join(directory, name));
45602
+ return fs17.readdirSync(directory).filter((name) => name.endsWith(".json")).sort().map((name) => path28.join(directory, name));
45602
45603
  } catch {
45603
45604
  return [];
45604
45605
  }
45605
45606
  }
45606
45607
 
45607
45608
  // ../device-providers/src/write.ts
45608
- import * as fs17 from "node:fs";
45609
+ import * as fs18 from "node:fs";
45609
45610
  import * as path29 from "node:path";
45610
45611
  var ProviderValidationError = class extends Error {
45611
45612
  /** One line per problem, `path: message`, in the order zod reported them. */
@@ -45661,17 +45662,17 @@ function publishProvider(record2, options = {}) {
45661
45662
  const file2 = path29.join(directory, `${validated.id}.json`);
45662
45663
  const body = JSON.stringify(canonicalize(candidate), null, 2) + "\n";
45663
45664
  try {
45664
- if (fs17.readFileSync(file2, "utf8") === body) return { changed: false, path: file2 };
45665
+ if (fs18.readFileSync(file2, "utf8") === body) return { changed: false, path: file2 };
45665
45666
  } catch {
45666
45667
  }
45667
- fs17.mkdirSync(directory, { recursive: true });
45668
+ fs18.mkdirSync(directory, { recursive: true });
45668
45669
  const temporary = `${file2}.${process.pid}.tmp`;
45669
45670
  try {
45670
- fs17.writeFileSync(temporary, body);
45671
- fs17.renameSync(temporary, file2);
45671
+ fs18.writeFileSync(temporary, body);
45672
+ fs18.renameSync(temporary, file2);
45672
45673
  } catch (error63) {
45673
45674
  try {
45674
- fs17.rmSync(temporary, { force: true });
45675
+ fs18.rmSync(temporary, { force: true });
45675
45676
  } catch {
45676
45677
  }
45677
45678
  throw error63;
@@ -45684,7 +45685,7 @@ function withdrawProvider(id) {
45684
45685
  }
45685
45686
  const file2 = path29.join(providersDirectory(), `${id}.json`);
45686
45687
  try {
45687
- fs17.unlinkSync(file2);
45688
+ fs18.unlinkSync(file2);
45688
45689
  return true;
45689
45690
  } catch (e) {
45690
45691
  if (e.code === "ENOENT") return false;
@@ -45714,7 +45715,7 @@ function pruneOrphanedProviders(options = {}) {
45714
45715
  continue;
45715
45716
  }
45716
45717
  try {
45717
- fs17.unlinkSync(file2);
45718
+ fs18.unlinkSync(file2);
45718
45719
  removed.push(entry);
45719
45720
  } catch {
45720
45721
  }
@@ -45724,7 +45725,7 @@ function pruneOrphanedProviders(options = {}) {
45724
45725
 
45725
45726
  // ../argent-cli/src/providers-check.ts
45726
45727
  var import_picocolors6 = __toESM(require_picocolors(), 1);
45727
- import * as fs18 from "node:fs";
45728
+ import * as fs19 from "node:fs";
45728
45729
  var KNOWN_CAPABILITIES = new Set(EXTERNAL_CAPABILITIES);
45729
45730
  var PROBE_TIMEOUT_MS = 5e3;
45730
45731
  function error62(message) {
@@ -45790,7 +45791,7 @@ async function checkDevices(devices, findings) {
45790
45791
  );
45791
45792
  } else {
45792
45793
  try {
45793
- fs18.accessSync(device.deviceSet, fs18.constants.R_OK);
45794
+ fs19.accessSync(device.deviceSet, fs19.constants.R_OK);
45794
45795
  } catch {
45795
45796
  findings.push(
45796
45797
  error62(`${label}: deviceSet '${device.deviceSet}' is not readable by this user`)
@@ -45847,7 +45848,7 @@ async function checkDevices(devices, findings) {
45847
45848
  );
45848
45849
  } else {
45849
45850
  try {
45850
- fs18.accessSync(device.nativeDevtools.socketPath, fs18.constants.R_OK | fs18.constants.W_OK);
45851
+ fs19.accessSync(device.nativeDevtools.socketPath, fs19.constants.R_OK | fs19.constants.W_OK);
45851
45852
  } catch {
45852
45853
  findings.push(
45853
45854
  error62(
@@ -45918,7 +45919,7 @@ async function checkDescriptorFile(file2, expectedVersion) {
45918
45919
  const report = { deviceCount: 0, findings, source: file2 };
45919
45920
  let raw;
45920
45921
  try {
45921
- raw = fs18.readFileSync(file2, "utf8");
45922
+ raw = fs19.readFileSync(file2, "utf8");
45922
45923
  } catch (e) {
45923
45924
  findings.push(error62(`unreadable: ${e instanceof Error ? e.message : String(e)}`));
45924
45925
  return report;
@@ -46063,7 +46064,7 @@ async function readDocument(args) {
46063
46064
  }
46064
46065
  if (args.file) {
46065
46066
  try {
46066
- return { raw: fs19.readFileSync(args.file, "utf8"), source: args.file };
46067
+ return { raw: fs20.readFileSync(args.file, "utf8"), source: args.file };
46067
46068
  } catch (e) {
46068
46069
  throw new UsageError2(
46069
46070
  `cannot read ${args.file}: ${e instanceof Error ? e.message : String(e)}`
@@ -46411,14 +46412,14 @@ async function providers(argv) {
46411
46412
 
46412
46413
  // ../argent-cli/src/doctor.ts
46413
46414
  var import_picocolors8 = __toESM(require_picocolors(), 1);
46414
- import * as fs33 from "node:fs";
46415
+ import * as fs34 from "node:fs";
46415
46416
  import * as path46 from "node:path";
46416
46417
  import { execFile } from "node:child_process";
46417
46418
  import { promisify } from "node:util";
46418
46419
  import { homedir as homedir8 } from "node:os";
46419
46420
 
46420
46421
  // ../argent-installer/src/mcp-configs.ts
46421
- import * as fs26 from "node:fs";
46422
+ import * as fs27 from "node:fs";
46422
46423
  import * as path37 from "node:path";
46423
46424
  import { execFileSync as execFileSync8 } from "node:child_process";
46424
46425
  import { homedir as homedir5 } from "node:os";
@@ -46433,7 +46434,7 @@ var CURSOR_ALLOWLIST_PATTERN = "argent:*";
46433
46434
 
46434
46435
  // ../argent-installer/src/utils.ts
46435
46436
  var import_semver3 = __toESM(require_semver2(), 1);
46436
- import * as fs25 from "node:fs";
46437
+ import * as fs26 from "node:fs";
46437
46438
  import * as path36 from "node:path";
46438
46439
  import * as dns from "node:dns";
46439
46440
  import { createHash as createHash6 } from "node:crypto";
@@ -48757,12 +48758,12 @@ function applyEdits(text2, edits) {
48757
48758
  }
48758
48759
 
48759
48760
  // ../argent-installer/src/package-root.ts
48760
- import * as fs20 from "node:fs";
48761
+ import * as fs21 from "node:fs";
48761
48762
  import * as path31 from "node:path";
48762
48763
  function resolvePackageRoot(dirname27) {
48763
48764
  let current = path31.resolve(dirname27);
48764
48765
  while (true) {
48765
- if (fs20.existsSync(path31.join(current, "package.json"))) return current;
48766
+ if (fs21.existsSync(path31.join(current, "package.json"))) return current;
48766
48767
  const parent = path31.dirname(current);
48767
48768
  if (parent === current) return path31.resolve(dirname27);
48768
48769
  current = parent;
@@ -48771,22 +48772,22 @@ function resolvePackageRoot(dirname27) {
48771
48772
 
48772
48773
  // ../argent-installer/src/package-manager.ts
48773
48774
  import { execFileSync as execFileSync6 } from "node:child_process";
48774
- import * as fs23 from "node:fs";
48775
+ import * as fs24 from "node:fs";
48775
48776
  import * as os4 from "node:os";
48776
48777
  import * as path34 from "node:path";
48777
48778
 
48778
48779
  // ../argent-installer/src/topology.ts
48779
48780
  var import_semver2 = __toESM(require_semver2(), 1);
48780
- import * as fs22 from "node:fs";
48781
+ import * as fs23 from "node:fs";
48781
48782
  import * as path33 from "node:path";
48782
48783
  import { createRequire as createRequire2 } from "node:module";
48783
48784
  import { execFileSync as execFileSync5 } from "node:child_process";
48784
48785
 
48785
48786
  // ../argent-installer/src/preflight.ts
48786
- import * as fs21 from "node:fs";
48787
+ import * as fs22 from "node:fs";
48787
48788
  import * as path32 from "node:path";
48788
48789
  function isYarnPnp(projectRoot) {
48789
- return fs21.existsSync(path32.join(projectRoot, ".pnp.cjs")) || fs21.existsSync(path32.join(projectRoot, ".pnp.loader.mjs"));
48790
+ return fs22.existsSync(path32.join(projectRoot, ".pnp.cjs")) || fs22.existsSync(path32.join(projectRoot, ".pnp.loader.mjs"));
48790
48791
  }
48791
48792
 
48792
48793
  // ../argent-installer/src/topology.ts
@@ -48855,8 +48856,8 @@ function getGloballyInstalledPackageRoot() {
48855
48856
  }
48856
48857
  function readShimScript(binaryPath) {
48857
48858
  try {
48858
- if (fs22.statSync(binaryPath).size > 64 * 1024) return null;
48859
- return fs22.readFileSync(binaryPath, "utf8");
48859
+ if (fs23.statSync(binaryPath).size > 64 * 1024) return null;
48860
+ return fs23.readFileSync(binaryPath, "utf8");
48860
48861
  } catch {
48861
48862
  return null;
48862
48863
  }
@@ -48877,9 +48878,9 @@ function globalPackageRootOf(binaryPath) {
48877
48878
  }
48878
48879
  function packageRootOf(binaryPath) {
48879
48880
  try {
48880
- const realPath = fs22.realpathSync(binaryPath);
48881
+ const realPath = fs23.realpathSync(binaryPath);
48881
48882
  const root = resolvePackageRoot(path33.dirname(realPath));
48882
- const pkg = JSON.parse(fs22.readFileSync(path33.join(root, "package.json"), "utf8"));
48883
+ const pkg = JSON.parse(fs23.readFileSync(path33.join(root, "package.json"), "utf8"));
48883
48884
  return pkg.name === PACKAGE_NAME ? root : null;
48884
48885
  } catch {
48885
48886
  return null;
@@ -48889,7 +48890,7 @@ function getGloballyInstalledVersion() {
48889
48890
  const pkgRoot = getGloballyInstalledPackageRoot();
48890
48891
  if (!pkgRoot) return null;
48891
48892
  try {
48892
- const pkg = JSON.parse(fs22.readFileSync(path33.join(pkgRoot, "package.json"), "utf8"));
48893
+ const pkg = JSON.parse(fs23.readFileSync(path33.join(pkgRoot, "package.json"), "utf8"));
48893
48894
  return pkg.version ?? null;
48894
48895
  } catch {
48895
48896
  return null;
@@ -48898,7 +48899,7 @@ function getGloballyInstalledVersion() {
48898
48899
  function readManifestDeclaration(projectRoot) {
48899
48900
  try {
48900
48901
  const pkg = JSON.parse(
48901
- fs22.readFileSync(path33.join(projectRoot, "package.json"), "utf8")
48902
+ fs23.readFileSync(path33.join(projectRoot, "package.json"), "utf8")
48902
48903
  );
48903
48904
  const spec = pkg.devDependencies?.[PACKAGE_NAME] ?? pkg.dependencies?.[PACKAGE_NAME] ?? pkg.optionalDependencies?.[PACKAGE_NAME];
48904
48905
  return typeof spec === "string" ? spec : null;
@@ -48915,7 +48916,7 @@ function resolveLocalArgentDir(projectRoot) {
48915
48916
  return path33.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
48916
48917
  } catch {
48917
48918
  const plain = path33.join(projectRoot, "node_modules", PACKAGE_NAME);
48918
- return fs22.existsSync(path33.join(plain, "package.json")) ? plain : null;
48919
+ return fs23.existsSync(path33.join(plain, "package.json")) ? plain : null;
48919
48920
  }
48920
48921
  }
48921
48922
  function probeLocalInstall(projectRoot) {
@@ -48923,7 +48924,7 @@ function probeLocalInstall(projectRoot) {
48923
48924
  if (packageDir) {
48924
48925
  let version2;
48925
48926
  try {
48926
- const pkg = JSON.parse(fs22.readFileSync(path33.join(packageDir, "package.json"), "utf8"));
48927
+ const pkg = JSON.parse(fs23.readFileSync(path33.join(packageDir, "package.json"), "utf8"));
48927
48928
  version2 = pkg.version ?? null;
48928
48929
  } catch {
48929
48930
  version2 = null;
@@ -48966,10 +48967,10 @@ function detectGlobalPackageManager() {
48966
48967
  return BUN_GLOBAL_ROOT.test(root) ? "bun" : lockfileOwnerOf(root) ?? "yarn";
48967
48968
  }
48968
48969
  if (process.platform === "win32") {
48969
- if (fs23.existsSync(path34.join(npmCopyBeside(path34.dirname(binaryPath)), "package.json"))) {
48970
+ if (fs24.existsSync(path34.join(npmCopyBeside(path34.dirname(binaryPath)), "package.json"))) {
48970
48971
  return "npm";
48971
48972
  }
48972
- if (fs23.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
48973
+ if (fs24.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
48973
48974
  }
48974
48975
  const shim = readShimScript(binaryPath);
48975
48976
  if (shim === null || !/node_modules[\\/]/.test(shim)) return "npm";
@@ -48994,7 +48995,7 @@ function isInNpmLayout(binaryPath, root) {
48994
48995
  const binDir = canonicalPath(path34.dirname(link2));
48995
48996
  if (canonicalPath(npmCopyBeside(binDir)) === realRoot) return true;
48996
48997
  try {
48997
- link2 = path34.resolve(binDir, fs23.readlinkSync(link2));
48998
+ link2 = path34.resolve(binDir, fs24.readlinkSync(link2));
48998
48999
  } catch {
48999
49000
  return false;
49000
49001
  }
@@ -49010,7 +49011,7 @@ function asKnownPm(name) {
49010
49011
  }
49011
49012
  function pmFromPackageManagerField(dir) {
49012
49013
  try {
49013
- const pkg = JSON.parse(fs23.readFileSync(path34.join(dir, "package.json"), "utf8"));
49014
+ const pkg = JSON.parse(fs24.readFileSync(path34.join(dir, "package.json"), "utf8"));
49014
49015
  if (typeof pkg.packageManager === "string") {
49015
49016
  return asKnownPm(pkg.packageManager.split("@")[0]);
49016
49017
  }
@@ -49021,7 +49022,7 @@ function pmFromPackageManagerField(dir) {
49021
49022
  }
49022
49023
  function pmFromDevEngines(dir) {
49023
49024
  try {
49024
- const pkg = JSON.parse(fs23.readFileSync(path34.join(dir, "package.json"), "utf8"));
49025
+ const pkg = JSON.parse(fs24.readFileSync(path34.join(dir, "package.json"), "utf8"));
49025
49026
  const devEnginesPm = pkg.devEngines?.packageManager;
49026
49027
  const names = /* @__PURE__ */ new Set();
49027
49028
  for (const entry of Array.isArray(devEnginesPm) ? devEnginesPm : [devEnginesPm]) {
@@ -49034,7 +49035,7 @@ function pmFromDevEngines(dir) {
49034
49035
  }
49035
49036
  }
49036
49037
  function pmFromLockfile(dir) {
49037
- const has = (file2) => fs23.existsSync(path34.join(dir, file2));
49038
+ const has = (file2) => fs24.existsSync(path34.join(dir, file2));
49038
49039
  if (has("pnpm-lock.yaml")) return "pnpm";
49039
49040
  if (has("yarn.lock")) return "yarn";
49040
49041
  if (has("bun.lock") || has("bun.lockb")) return "bun";
@@ -49042,14 +49043,14 @@ function pmFromLockfile(dir) {
49042
49043
  return null;
49043
49044
  }
49044
49045
  function pmFromWorkspaceMarker(dir) {
49045
- return fs23.existsSync(path34.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
49046
+ return fs24.existsSync(path34.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
49046
49047
  }
49047
49048
  function detectProjectPackageManager(projectRoot) {
49048
49049
  let dir = path34.resolve(projectRoot);
49049
49050
  for (; ; ) {
49050
49051
  const pm = pmFromPackageManagerField(dir) ?? pmFromLockfile(dir) ?? pmFromDevEngines(dir) ?? pmFromWorkspaceMarker(dir);
49051
49052
  if (pm) return pm;
49052
- if (fs23.existsSync(path34.join(dir, ".git"))) break;
49053
+ if (fs24.existsSync(path34.join(dir, ".git"))) break;
49053
49054
  const parent = path34.dirname(dir);
49054
49055
  if (parent === dir) break;
49055
49056
  dir = parent;
@@ -49082,7 +49083,7 @@ function projectInstallCommand(pm) {
49082
49083
  }
49083
49084
 
49084
49085
  // ../argent-installer/src/install-record.ts
49085
- import * as fs24 from "node:fs";
49086
+ import * as fs25 from "node:fs";
49086
49087
  import * as path35 from "node:path";
49087
49088
  function getInstallRecordPath(projectRoot) {
49088
49089
  return path35.join(projectRoot, ".argent", "install.json");
@@ -49090,7 +49091,7 @@ function getInstallRecordPath(projectRoot) {
49090
49091
  function readInstallRecord(projectRoot) {
49091
49092
  try {
49092
49093
  const parsed = JSON.parse(
49093
- fs24.readFileSync(getInstallRecordPath(projectRoot), "utf8")
49094
+ fs25.readFileSync(getInstallRecordPath(projectRoot), "utf8")
49094
49095
  );
49095
49096
  if (parsed && (parsed.mode === "local" || parsed.mode === "global")) return parsed;
49096
49097
  return null;
@@ -49108,7 +49109,7 @@ function resolveInstallMode(projectRoot) {
49108
49109
  var PACKAGE_ROOT = resolvePackageRoot(import.meta.dirname);
49109
49110
  function resolveBundledDir(dirName) {
49110
49111
  const packagedDir = path36.join(PACKAGE_ROOT, dirName);
49111
- if (fs25.existsSync(packagedDir)) return packagedDir;
49112
+ if (fs26.existsSync(packagedDir)) return packagedDir;
49112
49113
  return path36.resolve(PACKAGE_ROOT, "..", "skills", dirName);
49113
49114
  }
49114
49115
  var SKILLS_DIR = resolveBundledDir("skills");
@@ -49116,7 +49117,7 @@ var RULES_DIR = resolveBundledDir("rules");
49116
49117
  var AGENTS_DIR = resolveBundledDir("agents");
49117
49118
  function listBundledSkills(skillsDir = SKILLS_DIR) {
49118
49119
  try {
49119
- return fs25.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs25.existsSync(path36.join(skillsDir, name, "SKILL.md"))).sort();
49120
+ return fs26.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs26.existsSync(path36.join(skillsDir, name, "SKILL.md"))).sort();
49120
49121
  } catch {
49121
49122
  return [];
49122
49123
  }
@@ -49178,10 +49179,10 @@ function resolveProjectRoot2(startDir, homeDir = os5.homedir()) {
49178
49179
  if (currentDir !== initialDir && canonicalPath(currentDir) === home2) {
49179
49180
  return initialDir;
49180
49181
  }
49181
- if (PROJECT_ROOT_MARKERS.some((marker) => fs25.existsSync(path36.join(currentDir, marker)))) {
49182
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs26.existsSync(path36.join(currentDir, marker)))) {
49182
49183
  return currentDir;
49183
49184
  }
49184
- if (fs25.existsSync(path36.join(currentDir, ".git"))) {
49185
+ if (fs26.existsSync(path36.join(currentDir, ".git"))) {
49185
49186
  return currentDir;
49186
49187
  }
49187
49188
  const parentDir = path36.dirname(currentDir);
@@ -49192,20 +49193,20 @@ function resolveProjectRoot2(startDir, homeDir = os5.homedir()) {
49192
49193
  }
49193
49194
  }
49194
49195
  function readToml(filePath) {
49195
- if (!fs25.existsSync(filePath)) return {};
49196
+ if (!fs26.existsSync(filePath)) return {};
49196
49197
  try {
49197
- return parse4(fs25.readFileSync(filePath, "utf8"));
49198
+ return parse4(fs26.readFileSync(filePath, "utf8"));
49198
49199
  } catch {
49199
49200
  return {};
49200
49201
  }
49201
49202
  }
49202
49203
  function writeToml(filePath, data) {
49203
- fs25.mkdirSync(path36.dirname(filePath), { recursive: true });
49204
- fs25.writeFileSync(filePath, stringify(data) + "\n");
49204
+ fs26.mkdirSync(path36.dirname(filePath), { recursive: true });
49205
+ fs26.writeFileSync(filePath, stringify(data) + "\n");
49205
49206
  }
49206
49207
  function readYaml(filePath) {
49207
- if (!fs25.existsSync(filePath)) return new import_yaml5.Document({});
49208
- const text2 = fs25.readFileSync(filePath, "utf8");
49208
+ if (!fs26.existsSync(filePath)) return new import_yaml5.Document({});
49209
+ const text2 = fs26.readFileSync(filePath, "utf8");
49209
49210
  const doc = (0, import_yaml5.parseDocument)(text2);
49210
49211
  if (doc.errors.length > 0) {
49211
49212
  const messages = doc.errors.map((e) => e.message).join("; ");
@@ -49214,20 +49215,20 @@ function readYaml(filePath) {
49214
49215
  return doc;
49215
49216
  }
49216
49217
  function writeYaml(filePath, doc) {
49217
- fs25.mkdirSync(path36.dirname(filePath), { recursive: true });
49218
- fs25.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
49218
+ fs26.mkdirSync(path36.dirname(filePath), { recursive: true });
49219
+ fs26.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
49219
49220
  }
49220
49221
  function readJson(filePath) {
49221
- if (!fs25.existsSync(filePath)) return {};
49222
+ if (!fs26.existsSync(filePath)) return {};
49222
49223
  try {
49223
- return JSON.parse(fs25.readFileSync(filePath, "utf8"));
49224
+ return JSON.parse(fs26.readFileSync(filePath, "utf8"));
49224
49225
  } catch {
49225
49226
  return {};
49226
49227
  }
49227
49228
  }
49228
49229
  function writeJson(filePath, data) {
49229
- fs25.mkdirSync(path36.dirname(filePath), { recursive: true });
49230
- fs25.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
49230
+ fs26.mkdirSync(path36.dirname(filePath), { recursive: true });
49231
+ fs26.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
49231
49232
  }
49232
49233
  var JSONC_FORMATTING = { tabSize: 2, insertSpaces: true };
49233
49234
  function setJsoncIn(text2, jsonPath, value) {
@@ -49235,8 +49236,8 @@ function setJsoncIn(text2, jsonPath, value) {
49235
49236
  return applyEdits(text2, edits);
49236
49237
  }
49237
49238
  function readJsoncFileRaw(filePath) {
49238
- if (!fs25.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
49239
- let text2 = fs25.readFileSync(filePath, "utf8");
49239
+ if (!fs26.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
49240
+ let text2 = fs26.readFileSync(filePath, "utf8");
49240
49241
  const hadBom = text2.charCodeAt(0) === 65279;
49241
49242
  if (hadBom) text2 = text2.slice(1);
49242
49243
  const wasEmpty = text2.trim() === "";
@@ -49256,18 +49257,18 @@ function isEmptyPlainObject(value) {
49256
49257
  }
49257
49258
  function rmEmptyDir(dirPath) {
49258
49259
  try {
49259
- if (!fs25.existsSync(dirPath)) return false;
49260
- if (!fs25.statSync(dirPath).isDirectory()) return false;
49261
- if (fs25.readdirSync(dirPath).length > 0) return false;
49262
- fs25.rmdirSync(dirPath);
49260
+ if (!fs26.existsSync(dirPath)) return false;
49261
+ if (!fs26.statSync(dirPath).isDirectory()) return false;
49262
+ if (fs26.readdirSync(dirPath).length > 0) return false;
49263
+ fs26.rmdirSync(dirPath);
49263
49264
  return true;
49264
49265
  } catch {
49265
49266
  return false;
49266
49267
  }
49267
49268
  }
49268
49269
  function readJsonc(filePath) {
49269
- if (!fs25.existsSync(filePath)) return {};
49270
- let raw = fs25.readFileSync(filePath, "utf8");
49270
+ if (!fs26.existsSync(filePath)) return {};
49271
+ let raw = fs26.readFileSync(filePath, "utf8");
49271
49272
  if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
49272
49273
  if (raw.trim() === "") return {};
49273
49274
  const parsed = parse6(raw, [], { allowTrailingComma: true });
@@ -49288,7 +49289,7 @@ function yamlSyntaxErrorLine(raw) {
49288
49289
  function findConfigSyntaxErrorLine(filePath, jsonOptions) {
49289
49290
  let raw;
49290
49291
  try {
49291
- raw = fs25.readFileSync(filePath, "utf8");
49292
+ raw = fs26.readFileSync(filePath, "utf8");
49292
49293
  } catch {
49293
49294
  return null;
49294
49295
  }
@@ -49314,17 +49315,17 @@ function editJsoncFile(filePath, jsonPath, value) {
49314
49315
  }
49315
49316
  const parsed = parse6(text2, [], { allowTrailingComma: true });
49316
49317
  if (isEmptyPlainObject(parsed)) {
49317
- fs25.rmSync(filePath, { force: true });
49318
+ fs26.rmSync(filePath, { force: true });
49318
49319
  rmEmptyDir(path36.dirname(filePath));
49319
49320
  return;
49320
49321
  }
49321
- fs25.mkdirSync(path36.dirname(filePath), { recursive: true });
49322
+ fs26.mkdirSync(path36.dirname(filePath), { recursive: true });
49322
49323
  const out = wasEmpty && !text2.endsWith("\n") ? text2 + "\n" : text2;
49323
- fs25.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
49324
+ fs26.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
49324
49325
  }
49325
49326
  function dirExists(p) {
49326
49327
  try {
49327
- return fs25.statSync(p).isDirectory();
49328
+ return fs26.statSync(p).isDirectory();
49328
49329
  } catch {
49329
49330
  return false;
49330
49331
  }
@@ -49332,7 +49333,7 @@ function dirExists(p) {
49332
49333
  function getInstalledVersion() {
49333
49334
  try {
49334
49335
  const pkgPath = path36.join(PACKAGE_ROOT, "package.json");
49335
- const pkg = JSON.parse(fs25.readFileSync(pkgPath, "utf8"));
49336
+ const pkg = JSON.parse(fs26.readFileSync(pkgPath, "utf8"));
49336
49337
  return pkg.version ?? null;
49337
49338
  } catch {
49338
49339
  return null;
@@ -49377,10 +49378,10 @@ function hasEnv(entry) {
49377
49378
  }
49378
49379
  function removeDirIfEmpty(dirPath) {
49379
49380
  try {
49380
- if (!fs26.existsSync(dirPath)) return;
49381
- if (!fs26.statSync(dirPath).isDirectory()) return;
49382
- if (fs26.readdirSync(dirPath).length > 0) return;
49383
- fs26.rmdirSync(dirPath);
49381
+ if (!fs27.existsSync(dirPath)) return;
49382
+ if (!fs27.statSync(dirPath).isDirectory()) return;
49383
+ if (fs27.readdirSync(dirPath).length > 0) return;
49384
+ fs27.rmdirSync(dirPath);
49384
49385
  } catch {
49385
49386
  }
49386
49387
  }
@@ -49415,7 +49416,7 @@ function isPinnedGlobalEntry(entry) {
49415
49416
  }
49416
49417
  function writeTomlOrRemove(filePath, data) {
49417
49418
  if (Object.keys(data).length === 0) {
49418
- fs26.rmSync(filePath, { force: true });
49419
+ fs27.rmSync(filePath, { force: true });
49419
49420
  removeDirIfEmpty(path37.dirname(filePath));
49420
49421
  return;
49421
49422
  }
@@ -49425,12 +49426,12 @@ function dirHasEditorEvidence(dir, looksArgentOnly) {
49425
49426
  return dirExists(dir) && !looksArgentOnly(dir);
49426
49427
  }
49427
49428
  function fileHasEditorEvidence(filePath, looksArgentOnly) {
49428
- return fs26.existsSync(filePath) && !looksArgentOnly(filePath);
49429
+ return fs27.existsSync(filePath) && !looksArgentOnly(filePath);
49429
49430
  }
49430
49431
  function parseJsoncStrict(filePath) {
49431
49432
  let raw;
49432
49433
  try {
49433
- raw = fs26.readFileSync(filePath, "utf8");
49434
+ raw = fs27.readFileSync(filePath, "utf8");
49434
49435
  } catch {
49435
49436
  return null;
49436
49437
  }
@@ -49443,14 +49444,14 @@ function parseJsoncStrict(filePath) {
49443
49444
  }
49444
49445
  function parseTomlStrict(filePath) {
49445
49446
  try {
49446
- return parse4(fs26.readFileSync(filePath, "utf8"));
49447
+ return parse4(fs27.readFileSync(filePath, "utf8"));
49447
49448
  } catch {
49448
49449
  return null;
49449
49450
  }
49450
49451
  }
49451
49452
  function parseYamlStrict(filePath) {
49452
49453
  try {
49453
- const parsed = (0, import_yaml6.parse)(fs26.readFileSync(filePath, "utf8"));
49454
+ const parsed = (0, import_yaml6.parse)(fs27.readFileSync(filePath, "utf8"));
49454
49455
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return null;
49455
49456
  return parsed;
49456
49457
  } catch {
@@ -49473,7 +49474,7 @@ function bundledManagedNames(kind) {
49473
49474
  if (cached3) return cached3;
49474
49475
  let names;
49475
49476
  try {
49476
- names = new Set(fs26.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
49477
+ names = new Set(fs27.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
49477
49478
  } catch {
49478
49479
  names = /* @__PURE__ */ new Set();
49479
49480
  }
@@ -49484,7 +49485,7 @@ function bundledManagedNames(kind) {
49484
49485
  function managedDirLooksArgentOnly(dir, kind) {
49485
49486
  let entries;
49486
49487
  try {
49487
- entries = fs26.readdirSync(dir);
49488
+ entries = fs27.readdirSync(dir);
49488
49489
  } catch {
49489
49490
  return false;
49490
49491
  }
@@ -49496,7 +49497,7 @@ function managedDirLooksArgentOnly(dir, kind) {
49496
49497
  function cursorDirLooksArgentOnly(dir) {
49497
49498
  let entries;
49498
49499
  try {
49499
- entries = fs26.readdirSync(dir);
49500
+ entries = fs27.readdirSync(dir);
49500
49501
  } catch {
49501
49502
  return false;
49502
49503
  }
@@ -49535,7 +49536,7 @@ function claudeSettingsLooksArgentOnly(filePath) {
49535
49536
  function claudeDirLooksArgentOnly(dir) {
49536
49537
  let entries;
49537
49538
  try {
49538
- entries = fs26.readdirSync(dir);
49539
+ entries = fs27.readdirSync(dir);
49539
49540
  } catch {
49540
49541
  return false;
49541
49542
  }
@@ -49552,7 +49553,7 @@ function claudeDirLooksArgentOnly(dir) {
49552
49553
  function vscodeDirLooksArgentOnly(dir) {
49553
49554
  let entries;
49554
49555
  try {
49555
- entries = fs26.readdirSync(dir);
49556
+ entries = fs27.readdirSync(dir);
49556
49557
  } catch {
49557
49558
  return false;
49558
49559
  }
@@ -49564,7 +49565,7 @@ function vscodeDirLooksArgentOnly(dir) {
49564
49565
  function windsurfDirLooksArgentOnly(dir) {
49565
49566
  let entries;
49566
49567
  try {
49567
- entries = fs26.readdirSync(dir);
49568
+ entries = fs27.readdirSync(dir);
49568
49569
  } catch {
49569
49570
  return false;
49570
49571
  }
@@ -49601,7 +49602,7 @@ function zedSettingsLooksArgentOnly(filePath) {
49601
49602
  function zedDirLooksArgentOnly(dir) {
49602
49603
  let entries;
49603
49604
  try {
49604
- entries = fs26.readdirSync(dir);
49605
+ entries = fs27.readdirSync(dir);
49605
49606
  } catch {
49606
49607
  return false;
49607
49608
  }
@@ -49613,7 +49614,7 @@ function zedDirLooksArgentOnly(dir) {
49613
49614
  function geminiDirLooksArgentOnly(dir) {
49614
49615
  let entries;
49615
49616
  try {
49616
- entries = fs26.readdirSync(dir);
49617
+ entries = fs27.readdirSync(dir);
49617
49618
  } catch {
49618
49619
  return false;
49619
49620
  }
@@ -49638,7 +49639,7 @@ function hermesConfigLooksArgentOnly(filePath) {
49638
49639
  function hermesDirLooksArgentOnly(dir) {
49639
49640
  let entries;
49640
49641
  try {
49641
- entries = fs26.readdirSync(dir);
49642
+ entries = fs27.readdirSync(dir);
49642
49643
  } catch {
49643
49644
  return false;
49644
49645
  }
@@ -49650,7 +49651,7 @@ function hermesDirLooksArgentOnly(dir) {
49650
49651
  function kiroDirLooksArgentOnly(dir) {
49651
49652
  let entries;
49652
49653
  try {
49653
- entries = fs26.readdirSync(dir);
49654
+ entries = fs27.readdirSync(dir);
49654
49655
  } catch {
49655
49656
  return false;
49656
49657
  }
@@ -49660,7 +49661,7 @@ function kiroDirLooksArgentOnly(dir) {
49660
49661
  const settingsDir = path37.join(dir, entry);
49661
49662
  let settingsEntries;
49662
49663
  try {
49663
- settingsEntries = fs26.readdirSync(settingsDir);
49664
+ settingsEntries = fs27.readdirSync(settingsDir);
49664
49665
  } catch {
49665
49666
  return false;
49666
49667
  }
@@ -49673,7 +49674,7 @@ function kiroDirLooksArgentOnly(dir) {
49673
49674
  function codexDirLooksArgentOnly(dir) {
49674
49675
  let entries;
49675
49676
  try {
49676
- entries = fs26.readdirSync(dir);
49677
+ entries = fs27.readdirSync(dir);
49677
49678
  } catch {
49678
49679
  return false;
49679
49680
  }
@@ -49731,7 +49732,7 @@ var cursorAdapter = {
49731
49732
  });
49732
49733
  },
49733
49734
  remove(configPath) {
49734
- if (!fs26.existsSync(configPath)) return false;
49735
+ if (!fs27.existsSync(configPath)) return false;
49735
49736
  const config3 = readJsonc(configPath);
49736
49737
  const servers = config3.mcpServers;
49737
49738
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -49739,7 +49740,7 @@ var cursorAdapter = {
49739
49740
  return true;
49740
49741
  },
49741
49742
  getArgentEntry(configPath) {
49742
- if (!fs26.existsSync(configPath)) return null;
49743
+ if (!fs27.existsSync(configPath)) return null;
49743
49744
  const config3 = readJsonc(configPath);
49744
49745
  const servers = config3.mcpServers;
49745
49746
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -49764,7 +49765,7 @@ var cursorAdapter = {
49764
49765
  removeAllowlist(_root, scope) {
49765
49766
  if (scope !== "global") return;
49766
49767
  const permPath = cursorPermissionsPath();
49767
- if (!fs26.existsSync(permPath)) return;
49768
+ if (!fs27.existsSync(permPath)) return;
49768
49769
  const config3 = readJsonc(permPath);
49769
49770
  const list = Array.isArray(config3.mcpAllowlist) ? config3.mcpAllowlist : void 0;
49770
49771
  if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
@@ -49777,7 +49778,7 @@ function claudeProjectKeysForRoot(projects, root) {
49777
49778
  return Object.keys(projects).filter((key) => key === root || canonicalPath(key) === target);
49778
49779
  }
49779
49780
  function claudeDisabledListFinding(settingsPath, label, projectConfined) {
49780
- if (!fs26.existsSync(settingsPath)) return null;
49781
+ if (!fs27.existsSync(settingsPath)) return null;
49781
49782
  const disabled = readJson(settingsPath).disabledMcpjsonServers;
49782
49783
  if (!Array.isArray(disabled) || !disabled.includes(MCP_SERVER_KEY)) return null;
49783
49784
  return {
@@ -49824,7 +49825,7 @@ var claudeAdapter = {
49824
49825
  });
49825
49826
  },
49826
49827
  remove(configPath) {
49827
- if (!fs26.existsSync(configPath)) return false;
49828
+ if (!fs27.existsSync(configPath)) return false;
49828
49829
  const config3 = readJsonc(configPath);
49829
49830
  const servers = config3.mcpServers;
49830
49831
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -49838,7 +49839,7 @@ var claudeAdapter = {
49838
49839
  return true;
49839
49840
  },
49840
49841
  getArgentEntry(configPath) {
49841
- if (!fs26.existsSync(configPath)) return null;
49842
+ if (!fs27.existsSync(configPath)) return null;
49842
49843
  const config3 = readJsonc(configPath);
49843
49844
  const servers = config3.mcpServers;
49844
49845
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -49928,7 +49929,7 @@ var vscodeAdapter = {
49928
49929
  });
49929
49930
  },
49930
49931
  remove(configPath) {
49931
- if (!fs26.existsSync(configPath)) return false;
49932
+ if (!fs27.existsSync(configPath)) return false;
49932
49933
  const config3 = readJsonc(configPath);
49933
49934
  const servers = config3.servers;
49934
49935
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -49936,7 +49937,7 @@ var vscodeAdapter = {
49936
49937
  return true;
49937
49938
  },
49938
49939
  getArgentEntry(configPath) {
49939
- if (!fs26.existsSync(configPath)) return null;
49940
+ if (!fs27.existsSync(configPath)) return null;
49940
49941
  const config3 = readJsonc(configPath);
49941
49942
  const servers = config3.servers;
49942
49943
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50014,7 +50015,7 @@ var windsurfAdapter = {
50014
50015
  });
50015
50016
  },
50016
50017
  remove(configPath) {
50017
- if (!fs26.existsSync(configPath)) return false;
50018
+ if (!fs27.existsSync(configPath)) return false;
50018
50019
  const config3 = readJsonc(configPath);
50019
50020
  const servers = config3.mcpServers;
50020
50021
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50022,7 +50023,7 @@ var windsurfAdapter = {
50022
50023
  return true;
50023
50024
  },
50024
50025
  getArgentEntry(configPath) {
50025
- if (!fs26.existsSync(configPath)) return null;
50026
+ if (!fs27.existsSync(configPath)) return null;
50026
50027
  const config3 = readJsonc(configPath);
50027
50028
  const servers = config3.mcpServers;
50028
50029
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50045,7 +50046,7 @@ var windsurfAdapter = {
50045
50046
  if (scope !== "global") return;
50046
50047
  removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
50047
50048
  const configPath = path37.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
50048
- if (!fs26.existsSync(configPath)) return;
50049
+ if (!fs27.existsSync(configPath)) return;
50049
50050
  const config3 = readJsonc(configPath);
50050
50051
  const servers = config3.mcpServers;
50051
50052
  const entry = servers?.[MCP_SERVER_KEY];
@@ -50075,7 +50076,7 @@ var zedAdapter = {
50075
50076
  });
50076
50077
  },
50077
50078
  remove(configPath) {
50078
- if (!fs26.existsSync(configPath)) return false;
50079
+ if (!fs27.existsSync(configPath)) return false;
50079
50080
  const config3 = readJsonc(configPath);
50080
50081
  const servers = config3.context_servers;
50081
50082
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50083,7 +50084,7 @@ var zedAdapter = {
50083
50084
  return true;
50084
50085
  },
50085
50086
  getArgentEntry(configPath) {
50086
- if (!fs26.existsSync(configPath)) return null;
50087
+ if (!fs27.existsSync(configPath)) return null;
50087
50088
  const config3 = readJsonc(configPath);
50088
50089
  const servers = config3.context_servers;
50089
50090
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50099,7 +50100,7 @@ var zedAdapter = {
50099
50100
  },
50100
50101
  removeAllowlist(root, scope) {
50101
50102
  const settingsPath = scope === "global" ? path37.join(homedir5(), ".config", "zed", "settings.json") : path37.join(root, ".zed", "settings.json");
50102
- if (!fs26.existsSync(settingsPath)) return;
50103
+ if (!fs27.existsSync(settingsPath)) return;
50103
50104
  const config3 = readJsonc(settingsPath);
50104
50105
  const perms = config3.agent?.tool_permissions;
50105
50106
  if (!perms || perms.default !== "allow") return;
@@ -50127,7 +50128,7 @@ var geminiAdapter = {
50127
50128
  });
50128
50129
  },
50129
50130
  remove(configPath) {
50130
- if (!fs26.existsSync(configPath)) return false;
50131
+ if (!fs27.existsSync(configPath)) return false;
50131
50132
  const config3 = readJsonc(configPath);
50132
50133
  const servers = config3.mcpServers;
50133
50134
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50135,7 +50136,7 @@ var geminiAdapter = {
50135
50136
  return true;
50136
50137
  },
50137
50138
  getArgentEntry(configPath) {
50138
- if (!fs26.existsSync(configPath)) return null;
50139
+ if (!fs27.existsSync(configPath)) return null;
50139
50140
  const config3 = readJsonc(configPath);
50140
50141
  const servers = config3.mcpServers;
50141
50142
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50157,7 +50158,7 @@ var geminiAdapter = {
50157
50158
  },
50158
50159
  removeAllowlist(root, scope) {
50159
50160
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
50160
- if (!configPath || !fs26.existsSync(configPath)) {
50161
+ if (!configPath || !fs27.existsSync(configPath)) {
50161
50162
  return;
50162
50163
  }
50163
50164
  const config3 = readJsonc(configPath);
@@ -50193,7 +50194,7 @@ var codexAdapter = {
50193
50194
  writeToml(configPath, config3);
50194
50195
  },
50195
50196
  remove(configPath) {
50196
- if (!fs26.existsSync(configPath)) return false;
50197
+ if (!fs27.existsSync(configPath)) return false;
50197
50198
  const config3 = readToml(configPath);
50198
50199
  const servers = config3.mcp_servers;
50199
50200
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50203,7 +50204,7 @@ var codexAdapter = {
50203
50204
  return true;
50204
50205
  },
50205
50206
  getArgentEntry(configPath) {
50206
- if (!fs26.existsSync(configPath)) return null;
50207
+ if (!fs27.existsSync(configPath)) return null;
50207
50208
  const config3 = readToml(configPath);
50208
50209
  const servers = config3.mcp_servers;
50209
50210
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50235,7 +50236,7 @@ var codexAdapter = {
50235
50236
  // them, and an emptied or removed table stays as it is.
50236
50237
  refreshAllowlist(root, scope) {
50237
50238
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
50238
- if (!configPath || !fs26.existsSync(configPath)) return;
50239
+ if (!configPath || !fs27.existsSync(configPath)) return;
50239
50240
  const config3 = readToml(configPath);
50240
50241
  const toolsConfig = config3.mcp_servers?.argent?.tools;
50241
50242
  if (!toolsConfig) return;
@@ -50297,7 +50298,7 @@ var hermesAdapter = {
50297
50298
  writeYaml(configPath, doc);
50298
50299
  },
50299
50300
  remove(configPath) {
50300
- if (!fs26.existsSync(configPath)) return false;
50301
+ if (!fs27.existsSync(configPath)) return false;
50301
50302
  const doc = readYaml(configPath);
50302
50303
  const servers = doc.get("mcp_servers");
50303
50304
  if (!(0, import_yaml6.isMap)(servers)) return false;
@@ -50310,7 +50311,7 @@ var hermesAdapter = {
50310
50311
  return true;
50311
50312
  },
50312
50313
  getArgentEntry(configPath) {
50313
- if (!fs26.existsSync(configPath)) return null;
50314
+ if (!fs27.existsSync(configPath)) return null;
50314
50315
  const doc = readYaml(configPath);
50315
50316
  const servers = doc.get("mcp_servers");
50316
50317
  if (!(0, import_yaml6.isMap)(servers)) return null;
@@ -50338,7 +50339,7 @@ function hasOpenCodeBinary() {
50338
50339
  function pickOpencodeConfig(dir, candidates) {
50339
50340
  for (const name of candidates) {
50340
50341
  const candidate = path37.join(dir, name);
50341
- if (fs26.existsSync(candidate)) return candidate;
50342
+ if (fs27.existsSync(candidate)) return candidate;
50342
50343
  }
50343
50344
  return path37.join(dir, "opencode.json");
50344
50345
  }
@@ -50362,7 +50363,7 @@ var openCodeAdapter = {
50362
50363
  });
50363
50364
  },
50364
50365
  remove(configPath) {
50365
- if (!fs26.existsSync(configPath)) return false;
50366
+ if (!fs27.existsSync(configPath)) return false;
50366
50367
  const config3 = readJsonc(configPath);
50367
50368
  const servers = config3.mcp;
50368
50369
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50370,7 +50371,7 @@ var openCodeAdapter = {
50370
50371
  return true;
50371
50372
  },
50372
50373
  getArgentEntry(configPath) {
50373
- if (!fs26.existsSync(configPath)) return null;
50374
+ if (!fs27.existsSync(configPath)) return null;
50374
50375
  const config3 = readJsonc(configPath);
50375
50376
  const servers = config3.mcp;
50376
50377
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50385,7 +50386,7 @@ var openCodeAdapter = {
50385
50386
  },
50386
50387
  removeAllowlist(root, scope) {
50387
50388
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
50388
- if (!configPath || !fs26.existsSync(configPath)) return;
50389
+ if (!configPath || !fs27.existsSync(configPath)) return;
50389
50390
  const config3 = readJsonc(configPath);
50390
50391
  const tools2 = config3.tools;
50391
50392
  if (!tools2 || !(OPENCODE_ALLOWLIST_PATTERN in tools2)) return;
@@ -50415,7 +50416,7 @@ var kiroAdapter = {
50415
50416
  });
50416
50417
  },
50417
50418
  remove(configPath) {
50418
- if (!fs26.existsSync(configPath)) return false;
50419
+ if (!fs27.existsSync(configPath)) return false;
50419
50420
  const config3 = readJsonc(configPath);
50420
50421
  const servers = config3.mcpServers;
50421
50422
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -50423,7 +50424,7 @@ var kiroAdapter = {
50423
50424
  return true;
50424
50425
  },
50425
50426
  getArgentEntry(configPath) {
50426
- if (!fs26.existsSync(configPath)) return null;
50427
+ if (!fs27.existsSync(configPath)) return null;
50427
50428
  const config3 = readJsonc(configPath);
50428
50429
  const servers = config3.mcpServers;
50429
50430
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -50447,7 +50448,7 @@ var kiroAdapter = {
50447
50448
  },
50448
50449
  removeAllowlist(root, scope) {
50449
50450
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
50450
- if (!configPath || !fs26.existsSync(configPath)) return;
50451
+ if (!configPath || !fs27.existsSync(configPath)) return;
50451
50452
  const config3 = readJsonc(configPath);
50452
50453
  const servers = config3.mcpServers;
50453
50454
  const entry = servers?.[MCP_SERVER_KEY];
@@ -50499,7 +50500,7 @@ function addAllowRule(settingsPath, rule) {
50499
50500
  editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
50500
50501
  }
50501
50502
  function removeAllowRule(settingsPath, rule) {
50502
- if (!fs26.existsSync(settingsPath)) return;
50503
+ if (!fs27.existsSync(settingsPath)) return;
50503
50504
  const config3 = readJsonc(settingsPath);
50504
50505
  const permissions = config3?.permissions;
50505
50506
  const allow = permissions?.allow;
@@ -50623,7 +50624,7 @@ import * as path38 from "node:path";
50623
50624
 
50624
50625
  // ../argent-installer/src/cli-record.ts
50625
50626
  var import_semver4 = __toESM(require_semver2(), 1);
50626
- import * as fs27 from "node:fs";
50627
+ import * as fs28 from "node:fs";
50627
50628
  import * as path39 from "node:path";
50628
50629
 
50629
50630
  // ../argent-installer/src/init-telemetry.ts
@@ -50677,7 +50678,7 @@ var INSTALL_UNCLASSIFIED_FAILED = {
50677
50678
  };
50678
50679
 
50679
50680
  // ../argent-installer/src/install-runner.ts
50680
- import * as fs30 from "node:fs";
50681
+ import * as fs31 from "node:fs";
50681
50682
  import * as path42 from "node:path";
50682
50683
 
50683
50684
  // ../argent-installer/src/shell.ts
@@ -50685,16 +50686,16 @@ import { execFileSync as execFileSync9, spawn as spawn5 } from "node:child_proce
50685
50686
 
50686
50687
  // ../argent-installer/src/skills.ts
50687
50688
  import { execFileSync as execFileSync11 } from "node:child_process";
50688
- import * as fs29 from "node:fs";
50689
+ import * as fs30 from "node:fs";
50689
50690
  import * as path41 from "node:path";
50690
50691
 
50691
50692
  // ../argent-installer/src/skills-runner.ts
50692
50693
  import { execFileSync as execFileSync10 } from "node:child_process";
50693
- import * as fs28 from "node:fs";
50694
+ import * as fs29 from "node:fs";
50694
50695
  import * as path40 from "node:path";
50695
50696
 
50696
50697
  // ../argent-installer/src/init-scope.ts
50697
- import { existsSync as existsSync18 } from "node:fs";
50698
+ import { existsSync as existsSync19 } from "node:fs";
50698
50699
  import { resolve as resolve23 } from "node:path";
50699
50700
 
50700
50701
  // ../argent-installer/src/init-skills.ts
@@ -50704,7 +50705,7 @@ import * as path43 from "node:path";
50704
50705
 
50705
50706
  // ../argent-installer/src/update.ts
50706
50707
  var import_semver5 = __toESM(require_semver2(), 1);
50707
- import * as fs31 from "node:fs";
50708
+ import * as fs32 from "node:fs";
50708
50709
  import * as os7 from "node:os";
50709
50710
  import * as path44 from "node:path";
50710
50711
 
@@ -50751,7 +50752,7 @@ var UPDATE_UNCLASSIFIED_FAILED = {
50751
50752
 
50752
50753
  // ../argent-installer/src/uninstall.ts
50753
50754
  var import_yaml7 = __toESM(require_dist2(), 1);
50754
- import * as fs32 from "node:fs";
50755
+ import * as fs33 from "node:fs";
50755
50756
  import * as path45 from "node:path";
50756
50757
  var UNINSTALL_TOOLSERVER_STOP_FAILED = {
50757
50758
  error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
@@ -50841,14 +50842,14 @@ function classifyNodeScript(entry, ctx) {
50841
50842
  const script = entry.args.find((arg) => !arg.startsWith("-"));
50842
50843
  if (!script) return entryCheck("info", entry, "custom command, not checked");
50843
50844
  if (path46.isAbsolute(script)) {
50844
- return fs33.existsSync(script) ? entryCheck("ok", entry) : entryCheck("error", entry, `${script} does not exist`, {
50845
+ return fs34.existsSync(script) ? entryCheck("ok", entry) : entryCheck("error", entry, `${script} does not exist`, {
50845
50846
  fix: `${ctx.argentCommand} init`
50846
50847
  });
50847
50848
  }
50848
- if (!fs33.existsSync(path46.resolve(ctx.projectRoot, script))) {
50849
+ if (!fs34.existsSync(path46.resolve(ctx.projectRoot, script))) {
50849
50850
  return entryCheck("error", entry, `${script} does not exist`, { fix: ctx.projectInstallFix });
50850
50851
  }
50851
- if (!fs33.existsSync(path46.resolve(ctx.cwd, script))) {
50852
+ if (!fs34.existsSync(path46.resolve(ctx.cwd, script))) {
50852
50853
  return entryCheck("error", entry, `${script} is relative to ${home(ctx.projectRoot)}`, {
50853
50854
  detail: "an editor started in this folder cannot find it",
50854
50855
  fix: `Start the editor in ${home(ctx.projectRoot)}`
@@ -50857,13 +50858,13 @@ function classifyNodeScript(entry, ctx) {
50857
50858
  return entryCheck("ok", entry);
50858
50859
  }
50859
50860
  function classifyPinnedEntry(entry, initFix) {
50860
- const missing = [entry.command, entry.args[0]].find((p) => !fs33.existsSync(p));
50861
+ const missing = [entry.command, entry.args[0]].find((p) => !fs34.existsSync(p));
50861
50862
  return missing ? entryCheck("error", entry, `${missing} does not exist`, { fix: initFix }) : entryCheck("ok", entry);
50862
50863
  }
50863
50864
  function isRunnableFile(file2) {
50864
50865
  try {
50865
- if (!fs33.statSync(file2).isFile()) return false;
50866
- if (process.platform !== "win32") fs33.accessSync(file2, fs33.constants.X_OK);
50866
+ if (!fs34.statSync(file2).isFile()) return false;
50867
+ if (process.platform !== "win32") fs34.accessSync(file2, fs34.constants.X_OK);
50867
50868
  return true;
50868
50869
  } catch {
50869
50870
  return false;
@@ -50906,7 +50907,7 @@ function classifyMcpEntry(entry, ctx) {
50906
50907
  if (entry.command === MCP_BINARY_NAME) return classifyArgentOnPath(entry, ctx);
50907
50908
  if (Object.hasOwn(RUNNER_PACKAGES, entry.command)) return classifyPackageRunner(entry, ctx);
50908
50909
  if (isPinnedGlobalEntry(entry)) return classifyPinnedEntry(entry, initFix);
50909
- if (path46.isAbsolute(entry.command) && !fs33.existsSync(entry.command)) {
50910
+ if (path46.isAbsolute(entry.command) && !fs34.existsSync(entry.command)) {
50910
50911
  return entryCheck("error", entry, `${entry.command} does not exist`, { fix: initFix });
50911
50912
  }
50912
50913
  return entryCheck("info", entry, "custom command, not checked");
@@ -50957,7 +50958,7 @@ function brokenUnconfiguredConfigs({ projectRoot, cwd }, configured) {
50957
50958
  function mayHoldArgentEntry({ scope, configPath }) {
50958
50959
  if (scope === "project") return true;
50959
50960
  try {
50960
- return fs33.readFileSync(configPath, "utf8").includes(MCP_SERVER_KEY);
50961
+ return fs34.readFileSync(configPath, "utf8").includes(MCP_SERVER_KEY);
50961
50962
  } catch {
50962
50963
  return false;
50963
50964
  }
@@ -50997,7 +50998,7 @@ function editorsSection(ctx) {
50997
50998
  }
50998
50999
  function listRuleFiles(rulesDir = RULES_DIR) {
50999
51000
  try {
51000
- return fs33.readdirSync(rulesDir).filter((f) => f.endsWith(".md"));
51001
+ return fs34.readdirSync(rulesDir).filter((f) => f.endsWith(".md"));
51001
51002
  } catch {
51002
51003
  return [];
51003
51004
  }
@@ -51018,7 +51019,7 @@ function summarizeList(items, shown = 5) {
51018
51019
  function localContentDir(ctx, name) {
51019
51020
  if (!ctx.localPackageDir) return void 0;
51020
51021
  const dir = path46.join(ctx.localPackageDir, name);
51021
- return fs33.existsSync(dir) ? dir : void 0;
51022
+ return fs34.existsSync(dir) ? dir : void 0;
51022
51023
  }
51023
51024
  function skillsSection(ctx) {
51024
51025
  const checks = [];
@@ -51026,7 +51027,7 @@ function skillsSection(ctx) {
51026
51027
  const initFix = `${ctx.argentCommand} init`;
51027
51028
  const bundled = listBundledSkills(localContentDir(ctx, "skills"));
51028
51029
  const missing = bundled.filter(
51029
- (skill) => !skillDirs.some((dir) => fs33.existsSync(path46.join(dir, skill)))
51030
+ (skill) => !skillDirs.some((dir) => fs34.existsSync(path46.join(dir, skill)))
51030
51031
  );
51031
51032
  if (bundled.length > 0 && missing.length === bundled.length) {
51032
51033
  checks.push(check2("warn", "No argent skills installed", { fix: initFix }));
@@ -51046,7 +51047,7 @@ function skillsSection(ctx) {
51046
51047
  }
51047
51048
  const ruleFiles = listRuleFiles(localContentDir(ctx, "rules"));
51048
51049
  for (const dir of ruleDirs) {
51049
- const absent = ruleFiles.filter((f) => !fs33.existsSync(path46.join(dir, f)));
51050
+ const absent = ruleFiles.filter((f) => !fs34.existsSync(path46.join(dir, f)));
51050
51051
  checks.push(
51051
51052
  absent.length === 0 ? check2("ok", `Rules present in ${home(dir)}`) : check2("warn", `Rules missing in ${home(dir)}`, {
51052
51053
  detail: absent.join(", "),
@@ -51073,7 +51074,7 @@ async function probeHostDeps(paths) {
51073
51074
  }
51074
51075
  function xcodesIn(dir) {
51075
51076
  try {
51076
- return fs33.readdirSync(dir).filter((name) => /^Xcode(?:[-_ ].*)?\.app$/.test(name)).map((name) => path46.join(dir, name));
51077
+ return fs34.readdirSync(dir).filter((name) => /^Xcode(?:[-_ ].*)?\.app$/.test(name)).map((name) => path46.join(dir, name));
51077
51078
  } catch {
51078
51079
  return [];
51079
51080
  }
@@ -51146,7 +51147,7 @@ function hasClaudeProjectConfig(dir) {
51146
51147
  }
51147
51148
  function ancestorsInRepo(dir, homeDir) {
51148
51149
  const ancestors = ancestorsBelowHome(dir, homeDir);
51149
- const repoIndex = [dir, ...ancestors].findIndex((d) => fs33.existsSync(path46.join(d, ".git")));
51150
+ const repoIndex = [dir, ...ancestors].findIndex((d) => fs34.existsSync(path46.join(d, ".git")));
51150
51151
  return repoIndex === -1 ? ancestors : ancestors.slice(0, repoIndex);
51151
51152
  }
51152
51153
  function ancestorsBelowHome(dir, homeDir) {
@@ -51167,7 +51168,7 @@ function resolveDoctorRoot(cwd, homeDir = homedir8()) {
51167
51168
  function crossesGitRoot(cwd, projectRoot) {
51168
51169
  const dirs = [cwd, ...ancestorsBelowHome(cwd, path46.resolve(homedir8()))];
51169
51170
  const rootIndex = dirs.indexOf(projectRoot);
51170
- return rootIndex > 0 && dirs.slice(0, rootIndex).some((d) => fs33.existsSync(path46.join(d, ".git")));
51171
+ return rootIndex > 0 && dirs.slice(0, rootIndex).some((d) => fs34.existsSync(path46.join(d, ".git")));
51171
51172
  }
51172
51173
  function readsConfigAt(editor, aboveRepo) {
51173
51174
  return !aboveRepo || editor === "Claude Code";