@swmansion/argent 0.35.1-next.5 → 0.35.1-next.50

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.
Files changed (55) hide show
  1. package/README.md +16 -15
  2. package/bin/argent-android-devtools-0.4.0.apk +0 -0
  3. package/bin/darwin/argent-macos-helper +0 -0
  4. package/bin/darwin/ax-service +0 -0
  5. package/bin/darwin/tvos-ax-service +0 -0
  6. package/bin/darwin/tvos-hid-daemon +0 -0
  7. package/bin/network-inspector/network-inspector.jar +0 -0
  8. package/bin/tcp/ax-service +0 -0
  9. package/dist/cli-cmds.mjs +2416 -2067
  10. package/dist/client.js +453 -378
  11. package/dist/fatal-handlers.js +7 -1
  12. package/dist/fatal-handlers.js.map +1 -1
  13. package/dist/installer-help.js +2 -1
  14. package/dist/installer-help.js.map +1 -1
  15. package/dist/installer.mjs +702 -673
  16. package/dist/mcp-server.mjs +1708 -1540
  17. package/dist/tool-args.generated.d.ts +411 -318
  18. package/dist/tool-server.cjs +12378 -9218
  19. package/dylibs/libArgentAudio.dylib +0 -0
  20. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  21. package/dylibs/libKeyboardPatch.dylib +0 -0
  22. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  23. package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
  24. package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
  25. package/dylibs/tcp/argent-audio-feeder +0 -0
  26. package/dylibs/tcp/libArgentAudio.dylib +0 -0
  27. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  28. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  29. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  30. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  31. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  32. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  33. package/package.json +2 -2
  34. package/skills/argent-android-emulator-setup/SKILL.md +2 -2
  35. package/skills/argent-create-e2e/SKILL.md +2 -1
  36. package/skills/argent-create-e2e/references/e2e-yaml.md +42 -2
  37. package/skills/argent-create-e2e/references/live-authoring.md +13 -2
  38. package/skills/argent-device-interact/SKILL.md +21 -94
  39. package/skills/argent-device-interact/references/advanced.md +64 -0
  40. package/skills/argent-ios-device-interact/SKILL.md +1 -1
  41. package/skills/argent-ios-device-setup/SKILL.md +1 -1
  42. package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
  43. package/skills/argent-lens/SKILL.md +1 -1
  44. package/skills/argent-macos-app-interact/SKILL.md +1 -1
  45. package/skills/argent-metro-debugger/SKILL.md +4 -4
  46. package/skills/argent-native-profiler/SKILL.md +1 -1
  47. package/skills/argent-qa-e2e/SKILL.md +1 -1
  48. package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
  49. package/skills/argent-react-native-optimization/SKILL.md +1 -1
  50. package/skills/argent-react-native-profiler/SKILL.md +1 -1
  51. package/skills/argent-screen-recording/SKILL.md +1 -1
  52. package/skills/argent-screenshot-diff/SKILL.md +1 -1
  53. package/skills/argent-settings-permissions/SKILL.md +1 -1
  54. package/skills/argent-test-ui-flow/SKILL.md +1 -1
  55. package/skills/argent-tv-interact/SKILL.md +1 -1
@@ -2052,7 +2052,7 @@ var require_parse = __commonJS({
2052
2052
  "../../node_modules/semver/functions/parse.js"(exports, module) {
2053
2053
  "use strict";
2054
2054
  var SemVer = require_semver();
2055
- var parse5 = (version, options, throwErrors = false) => {
2055
+ var parse6 = (version, options, throwErrors = false) => {
2056
2056
  if (version instanceof SemVer) {
2057
2057
  return version;
2058
2058
  }
@@ -2065,7 +2065,7 @@ var require_parse = __commonJS({
2065
2065
  throw er;
2066
2066
  }
2067
2067
  };
2068
- module.exports = parse5;
2068
+ module.exports = parse6;
2069
2069
  }
2070
2070
  });
2071
2071
 
@@ -2073,9 +2073,9 @@ var require_parse = __commonJS({
2073
2073
  var require_valid = __commonJS({
2074
2074
  "../../node_modules/semver/functions/valid.js"(exports, module) {
2075
2075
  "use strict";
2076
- var parse5 = require_parse();
2076
+ var parse6 = require_parse();
2077
2077
  var valid = (version, options) => {
2078
- const v = parse5(version, options);
2078
+ const v = parse6(version, options);
2079
2079
  return v ? v.version : null;
2080
2080
  };
2081
2081
  module.exports = valid;
@@ -2086,9 +2086,9 @@ var require_valid = __commonJS({
2086
2086
  var require_clean = __commonJS({
2087
2087
  "../../node_modules/semver/functions/clean.js"(exports, module) {
2088
2088
  "use strict";
2089
- var parse5 = require_parse();
2089
+ var parse6 = require_parse();
2090
2090
  var clean = (version, options) => {
2091
- const s = parse5(version.trim().replace(/^[=v]+/, ""), options);
2091
+ const s = parse6(version.trim().replace(/^[=v]+/, ""), options);
2092
2092
  return s ? s.version : null;
2093
2093
  };
2094
2094
  module.exports = clean;
@@ -2123,10 +2123,10 @@ var require_inc = __commonJS({
2123
2123
  var require_diff = __commonJS({
2124
2124
  "../../node_modules/semver/functions/diff.js"(exports, module) {
2125
2125
  "use strict";
2126
- var parse5 = require_parse();
2126
+ var parse6 = require_parse();
2127
2127
  var diff = (version1, version2) => {
2128
- const v1 = parse5(version1, null, true);
2129
- const v2 = parse5(version2, null, true);
2128
+ const v1 = parse6(version1, null, true);
2129
+ const v2 = parse6(version2, null, true);
2130
2130
  const comparison = v1.compare(v2);
2131
2131
  if (comparison === 0) {
2132
2132
  return null;
@@ -2197,9 +2197,9 @@ var require_patch = __commonJS({
2197
2197
  var require_prerelease = __commonJS({
2198
2198
  "../../node_modules/semver/functions/prerelease.js"(exports, module) {
2199
2199
  "use strict";
2200
- var parse5 = require_parse();
2200
+ var parse6 = require_parse();
2201
2201
  var prerelease = (version, options) => {
2202
- const parsed = parse5(version, options);
2202
+ const parsed = parse6(version, options);
2203
2203
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
2204
2204
  };
2205
2205
  module.exports = prerelease;
@@ -2385,7 +2385,7 @@ var require_coerce = __commonJS({
2385
2385
  "../../node_modules/semver/functions/coerce.js"(exports, module) {
2386
2386
  "use strict";
2387
2387
  var SemVer = require_semver();
2388
- var parse5 = require_parse();
2388
+ var parse6 = require_parse();
2389
2389
  var { safeRe: re2, t: t2 } = require_re();
2390
2390
  var coerce = (version, options) => {
2391
2391
  if (version instanceof SemVer) {
@@ -2420,7 +2420,7 @@ var require_coerce = __commonJS({
2420
2420
  const patch = match[4] || "0";
2421
2421
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
2422
2422
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
2423
- return parse5(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
2423
+ return parse6(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
2424
2424
  };
2425
2425
  module.exports = coerce;
2426
2426
  }
@@ -2430,7 +2430,7 @@ var require_coerce = __commonJS({
2430
2430
  var require_truncate = __commonJS({
2431
2431
  "../../node_modules/semver/functions/truncate.js"(exports, module) {
2432
2432
  "use strict";
2433
- var parse5 = require_parse();
2433
+ var parse6 = require_parse();
2434
2434
  var constants3 = require_constants();
2435
2435
  var SemVer = require_semver();
2436
2436
  var truncate = (version, truncation, options) => {
@@ -2442,7 +2442,7 @@ var require_truncate = __commonJS({
2442
2442
  };
2443
2443
  var cloneInputVersion = (version, options) => {
2444
2444
  const versionStringToParse = version instanceof SemVer ? version.version : version;
2445
- return parse5(versionStringToParse, options);
2445
+ return parse6(versionStringToParse, options);
2446
2446
  };
2447
2447
  var doTruncation = (version, truncation) => {
2448
2448
  if (isPrerelease(truncation)) {
@@ -3486,7 +3486,7 @@ var require_semver2 = __commonJS({
3486
3486
  var constants3 = require_constants();
3487
3487
  var SemVer = require_semver();
3488
3488
  var identifiers = require_identifiers();
3489
- var parse5 = require_parse();
3489
+ var parse6 = require_parse();
3490
3490
  var valid = require_valid();
3491
3491
  var clean = require_clean();
3492
3492
  var inc = require_inc();
@@ -3525,7 +3525,7 @@ var require_semver2 = __commonJS({
3525
3525
  var simplifyRange = require_simplify();
3526
3526
  var subset = require_subset();
3527
3527
  module.exports = {
3528
- parse: parse5,
3528
+ parse: parse6,
3529
3529
  valid,
3530
3530
  clean,
3531
3531
  inc,
@@ -3652,17 +3652,17 @@ var require_visit = __commonJS({
3652
3652
  visit2.BREAK = BREAK;
3653
3653
  visit2.SKIP = SKIP;
3654
3654
  visit2.REMOVE = REMOVE;
3655
- function visit_(key, node, visitor, path33) {
3656
- const ctrl = callVisitor(key, node, visitor, path33);
3655
+ function visit_(key, node, visitor, path34) {
3656
+ const ctrl = callVisitor(key, node, visitor, path34);
3657
3657
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3658
- replaceNode(key, path33, ctrl);
3659
- return visit_(key, ctrl, visitor, path33);
3658
+ replaceNode(key, path34, ctrl);
3659
+ return visit_(key, ctrl, visitor, path34);
3660
3660
  }
3661
3661
  if (typeof ctrl !== "symbol") {
3662
3662
  if (identity2.isCollection(node)) {
3663
- path33 = Object.freeze(path33.concat(node));
3663
+ path34 = Object.freeze(path34.concat(node));
3664
3664
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3665
- const ci = visit_(i2, node.items[i2], visitor, path33);
3665
+ const ci = visit_(i2, node.items[i2], visitor, path34);
3666
3666
  if (typeof ci === "number")
3667
3667
  i2 = ci - 1;
3668
3668
  else if (ci === BREAK)
@@ -3673,13 +3673,13 @@ var require_visit = __commonJS({
3673
3673
  }
3674
3674
  }
3675
3675
  } else if (identity2.isPair(node)) {
3676
- path33 = Object.freeze(path33.concat(node));
3677
- const ck = visit_("key", node.key, visitor, path33);
3676
+ path34 = Object.freeze(path34.concat(node));
3677
+ const ck = visit_("key", node.key, visitor, path34);
3678
3678
  if (ck === BREAK)
3679
3679
  return BREAK;
3680
3680
  else if (ck === REMOVE)
3681
3681
  node.key = null;
3682
- const cv = visit_("value", node.value, visitor, path33);
3682
+ const cv = visit_("value", node.value, visitor, path34);
3683
3683
  if (cv === BREAK)
3684
3684
  return BREAK;
3685
3685
  else if (cv === REMOVE)
@@ -3700,17 +3700,17 @@ var require_visit = __commonJS({
3700
3700
  visitAsync.BREAK = BREAK;
3701
3701
  visitAsync.SKIP = SKIP;
3702
3702
  visitAsync.REMOVE = REMOVE;
3703
- async function visitAsync_(key, node, visitor, path33) {
3704
- const ctrl = await callVisitor(key, node, visitor, path33);
3703
+ async function visitAsync_(key, node, visitor, path34) {
3704
+ const ctrl = await callVisitor(key, node, visitor, path34);
3705
3705
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3706
- replaceNode(key, path33, ctrl);
3707
- return visitAsync_(key, ctrl, visitor, path33);
3706
+ replaceNode(key, path34, ctrl);
3707
+ return visitAsync_(key, ctrl, visitor, path34);
3708
3708
  }
3709
3709
  if (typeof ctrl !== "symbol") {
3710
3710
  if (identity2.isCollection(node)) {
3711
- path33 = Object.freeze(path33.concat(node));
3711
+ path34 = Object.freeze(path34.concat(node));
3712
3712
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3713
- const ci = await visitAsync_(i2, node.items[i2], visitor, path33);
3713
+ const ci = await visitAsync_(i2, node.items[i2], visitor, path34);
3714
3714
  if (typeof ci === "number")
3715
3715
  i2 = ci - 1;
3716
3716
  else if (ci === BREAK)
@@ -3721,13 +3721,13 @@ var require_visit = __commonJS({
3721
3721
  }
3722
3722
  }
3723
3723
  } else if (identity2.isPair(node)) {
3724
- path33 = Object.freeze(path33.concat(node));
3725
- const ck = await visitAsync_("key", node.key, visitor, path33);
3724
+ path34 = Object.freeze(path34.concat(node));
3725
+ const ck = await visitAsync_("key", node.key, visitor, path34);
3726
3726
  if (ck === BREAK)
3727
3727
  return BREAK;
3728
3728
  else if (ck === REMOVE)
3729
3729
  node.key = null;
3730
- const cv = await visitAsync_("value", node.value, visitor, path33);
3730
+ const cv = await visitAsync_("value", node.value, visitor, path34);
3731
3731
  if (cv === BREAK)
3732
3732
  return BREAK;
3733
3733
  else if (cv === REMOVE)
@@ -3754,23 +3754,23 @@ var require_visit = __commonJS({
3754
3754
  }
3755
3755
  return visitor;
3756
3756
  }
3757
- function callVisitor(key, node, visitor, path33) {
3757
+ function callVisitor(key, node, visitor, path34) {
3758
3758
  if (typeof visitor === "function")
3759
- return visitor(key, node, path33);
3759
+ return visitor(key, node, path34);
3760
3760
  if (identity2.isMap(node))
3761
- return visitor.Map?.(key, node, path33);
3761
+ return visitor.Map?.(key, node, path34);
3762
3762
  if (identity2.isSeq(node))
3763
- return visitor.Seq?.(key, node, path33);
3763
+ return visitor.Seq?.(key, node, path34);
3764
3764
  if (identity2.isPair(node))
3765
- return visitor.Pair?.(key, node, path33);
3765
+ return visitor.Pair?.(key, node, path34);
3766
3766
  if (identity2.isScalar(node))
3767
- return visitor.Scalar?.(key, node, path33);
3767
+ return visitor.Scalar?.(key, node, path34);
3768
3768
  if (identity2.isAlias(node))
3769
- return visitor.Alias?.(key, node, path33);
3769
+ return visitor.Alias?.(key, node, path34);
3770
3770
  return void 0;
3771
3771
  }
3772
- function replaceNode(key, path33, node) {
3773
- const parent = path33[path33.length - 1];
3772
+ function replaceNode(key, path34, node) {
3773
+ const parent = path34[path34.length - 1];
3774
3774
  if (identity2.isCollection(parent)) {
3775
3775
  parent.items[key] = node;
3776
3776
  } else if (identity2.isPair(parent)) {
@@ -4382,10 +4382,10 @@ var require_Collection = __commonJS({
4382
4382
  var createNode = require_createNode();
4383
4383
  var identity2 = require_identity();
4384
4384
  var Node = require_Node();
4385
- function collectionFromPath(schema, path33, value) {
4385
+ function collectionFromPath(schema, path34, value) {
4386
4386
  let v = value;
4387
- for (let i2 = path33.length - 1; i2 >= 0; --i2) {
4388
- const k = path33[i2];
4387
+ for (let i2 = path34.length - 1; i2 >= 0; --i2) {
4388
+ const k = path34[i2];
4389
4389
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4390
4390
  const a2 = [];
4391
4391
  a2[k] = v;
@@ -4404,7 +4404,7 @@ var require_Collection = __commonJS({
4404
4404
  sourceObjects: /* @__PURE__ */ new Map()
4405
4405
  });
4406
4406
  }
4407
- var isEmptyPath = (path33) => path33 == null || typeof path33 === "object" && !!path33[Symbol.iterator]().next().done;
4407
+ var isEmptyPath = (path34) => path34 == null || typeof path34 === "object" && !!path34[Symbol.iterator]().next().done;
4408
4408
  var Collection = class extends Node.NodeBase {
4409
4409
  constructor(type, schema) {
4410
4410
  super(type);
@@ -4434,11 +4434,11 @@ var require_Collection = __commonJS({
4434
4434
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4435
4435
  * that already exists in the map.
4436
4436
  */
4437
- addIn(path33, value) {
4438
- if (isEmptyPath(path33))
4437
+ addIn(path34, value) {
4438
+ if (isEmptyPath(path34))
4439
4439
  this.add(value);
4440
4440
  else {
4441
- const [key, ...rest] = path33;
4441
+ const [key, ...rest] = path34;
4442
4442
  const node = this.get(key, true);
4443
4443
  if (identity2.isCollection(node))
4444
4444
  node.addIn(rest, value);
@@ -4452,8 +4452,8 @@ var require_Collection = __commonJS({
4452
4452
  * Removes a value from the collection.
4453
4453
  * @returns `true` if the item was found and removed.
4454
4454
  */
4455
- deleteIn(path33) {
4456
- const [key, ...rest] = path33;
4455
+ deleteIn(path34) {
4456
+ const [key, ...rest] = path34;
4457
4457
  if (rest.length === 0)
4458
4458
  return this.delete(key);
4459
4459
  const node = this.get(key, true);
@@ -4467,8 +4467,8 @@ var require_Collection = __commonJS({
4467
4467
  * scalar values from their surrounding node; to disable set `keepScalar` to
4468
4468
  * `true` (collections are always returned intact).
4469
4469
  */
4470
- getIn(path33, keepScalar) {
4471
- const [key, ...rest] = path33;
4470
+ getIn(path34, keepScalar) {
4471
+ const [key, ...rest] = path34;
4472
4472
  const node = this.get(key, true);
4473
4473
  if (rest.length === 0)
4474
4474
  return !keepScalar && identity2.isScalar(node) ? node.value : node;
@@ -4486,8 +4486,8 @@ var require_Collection = __commonJS({
4486
4486
  /**
4487
4487
  * Checks if the collection includes a value with the key `key`.
4488
4488
  */
4489
- hasIn(path33) {
4490
- const [key, ...rest] = path33;
4489
+ hasIn(path34) {
4490
+ const [key, ...rest] = path34;
4491
4491
  if (rest.length === 0)
4492
4492
  return this.has(key);
4493
4493
  const node = this.get(key, true);
@@ -4497,8 +4497,8 @@ var require_Collection = __commonJS({
4497
4497
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4498
4498
  * boolean to add/remove the item from the set.
4499
4499
  */
4500
- setIn(path33, value) {
4501
- const [key, ...rest] = path33;
4500
+ setIn(path34, value) {
4501
+ const [key, ...rest] = path34;
4502
4502
  if (rest.length === 0) {
4503
4503
  this.set(key, value);
4504
4504
  } else {
@@ -7013,9 +7013,9 @@ var require_Document = __commonJS({
7013
7013
  this.contents.add(value);
7014
7014
  }
7015
7015
  /** Adds a value to the document. */
7016
- addIn(path33, value) {
7016
+ addIn(path34, value) {
7017
7017
  if (assertCollection(this.contents))
7018
- this.contents.addIn(path33, value);
7018
+ this.contents.addIn(path34, value);
7019
7019
  }
7020
7020
  /**
7021
7021
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -7090,14 +7090,14 @@ var require_Document = __commonJS({
7090
7090
  * Removes a value from the document.
7091
7091
  * @returns `true` if the item was found and removed.
7092
7092
  */
7093
- deleteIn(path33) {
7094
- if (Collection.isEmptyPath(path33)) {
7093
+ deleteIn(path34) {
7094
+ if (Collection.isEmptyPath(path34)) {
7095
7095
  if (this.contents == null)
7096
7096
  return false;
7097
7097
  this.contents = null;
7098
7098
  return true;
7099
7099
  }
7100
- return assertCollection(this.contents) ? this.contents.deleteIn(path33) : false;
7100
+ return assertCollection(this.contents) ? this.contents.deleteIn(path34) : false;
7101
7101
  }
7102
7102
  /**
7103
7103
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -7112,10 +7112,10 @@ var require_Document = __commonJS({
7112
7112
  * scalar values from their surrounding node; to disable set `keepScalar` to
7113
7113
  * `true` (collections are always returned intact).
7114
7114
  */
7115
- getIn(path33, keepScalar) {
7116
- if (Collection.isEmptyPath(path33))
7115
+ getIn(path34, keepScalar) {
7116
+ if (Collection.isEmptyPath(path34))
7117
7117
  return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
7118
- return identity2.isCollection(this.contents) ? this.contents.getIn(path33, keepScalar) : void 0;
7118
+ return identity2.isCollection(this.contents) ? this.contents.getIn(path34, keepScalar) : void 0;
7119
7119
  }
7120
7120
  /**
7121
7121
  * Checks if the document includes a value with the key `key`.
@@ -7126,10 +7126,10 @@ var require_Document = __commonJS({
7126
7126
  /**
7127
7127
  * Checks if the document includes a value at `path`.
7128
7128
  */
7129
- hasIn(path33) {
7130
- if (Collection.isEmptyPath(path33))
7129
+ hasIn(path34) {
7130
+ if (Collection.isEmptyPath(path34))
7131
7131
  return this.contents !== void 0;
7132
- return identity2.isCollection(this.contents) ? this.contents.hasIn(path33) : false;
7132
+ return identity2.isCollection(this.contents) ? this.contents.hasIn(path34) : false;
7133
7133
  }
7134
7134
  /**
7135
7135
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -7146,13 +7146,13 @@ var require_Document = __commonJS({
7146
7146
  * Sets a value in this document. For `!!set`, `value` needs to be a
7147
7147
  * boolean to add/remove the item from the set.
7148
7148
  */
7149
- setIn(path33, value) {
7150
- if (Collection.isEmptyPath(path33)) {
7149
+ setIn(path34, value) {
7150
+ if (Collection.isEmptyPath(path34)) {
7151
7151
  this.contents = value;
7152
7152
  } else if (this.contents == null) {
7153
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path33), value);
7153
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path34), value);
7154
7154
  } else if (assertCollection(this.contents)) {
7155
- this.contents.setIn(path33, value);
7155
+ this.contents.setIn(path34, value);
7156
7156
  }
7157
7157
  }
7158
7158
  /**
@@ -7538,10 +7538,10 @@ var require_resolve_block_map = __commonJS({
7538
7538
  let offset = bm.offset;
7539
7539
  let commentEnd = null;
7540
7540
  for (const collItem of bm.items) {
7541
- const { start, key, sep: sep9, value } = collItem;
7541
+ const { start, key, sep: sep10, value } = collItem;
7542
7542
  const keyProps = resolveProps.resolveProps(start, {
7543
7543
  indicator: "explicit-key-ind",
7544
- next: key ?? sep9?.[0],
7544
+ next: key ?? sep10?.[0],
7545
7545
  offset,
7546
7546
  onError,
7547
7547
  parentIndent: bm.indent,
@@ -7555,7 +7555,7 @@ var require_resolve_block_map = __commonJS({
7555
7555
  else if ("indent" in key && key.indent !== bm.indent)
7556
7556
  onError(offset, "BAD_INDENT", startColMsg);
7557
7557
  }
7558
- if (!keyProps.anchor && !keyProps.tag && !sep9) {
7558
+ if (!keyProps.anchor && !keyProps.tag && !sep10) {
7559
7559
  commentEnd = keyProps.end;
7560
7560
  if (keyProps.comment) {
7561
7561
  if (map.comment)
@@ -7579,7 +7579,7 @@ var require_resolve_block_map = __commonJS({
7579
7579
  ctx.atKey = false;
7580
7580
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
7581
7581
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
7582
- const valueProps = resolveProps.resolveProps(sep9 ?? [], {
7582
+ const valueProps = resolveProps.resolveProps(sep10 ?? [], {
7583
7583
  indicator: "map-value-ind",
7584
7584
  next: value,
7585
7585
  offset: keyNode.range[2],
@@ -7595,7 +7595,7 @@ var require_resolve_block_map = __commonJS({
7595
7595
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
7596
7596
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
7597
7597
  }
7598
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep9, null, valueProps, onError);
7598
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep10, null, valueProps, onError);
7599
7599
  if (ctx.schema.compat)
7600
7600
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
7601
7601
  offset = valueNode.range[2];
@@ -7686,7 +7686,7 @@ var require_resolve_end = __commonJS({
7686
7686
  let comment = "";
7687
7687
  if (end) {
7688
7688
  let hasSpace = false;
7689
- let sep9 = "";
7689
+ let sep10 = "";
7690
7690
  for (const token of end) {
7691
7691
  const { source, type } = token;
7692
7692
  switch (type) {
@@ -7700,13 +7700,13 @@ var require_resolve_end = __commonJS({
7700
7700
  if (!comment)
7701
7701
  comment = cb;
7702
7702
  else
7703
- comment += sep9 + cb;
7704
- sep9 = "";
7703
+ comment += sep10 + cb;
7704
+ sep10 = "";
7705
7705
  break;
7706
7706
  }
7707
7707
  case "newline":
7708
7708
  if (comment)
7709
- sep9 += source;
7709
+ sep10 += source;
7710
7710
  hasSpace = true;
7711
7711
  break;
7712
7712
  default:
@@ -7749,18 +7749,18 @@ var require_resolve_flow_collection = __commonJS({
7749
7749
  let offset = fc.offset + fc.start.source.length;
7750
7750
  for (let i2 = 0; i2 < fc.items.length; ++i2) {
7751
7751
  const collItem = fc.items[i2];
7752
- const { start, key, sep: sep9, value } = collItem;
7752
+ const { start, key, sep: sep10, value } = collItem;
7753
7753
  const props = resolveProps.resolveProps(start, {
7754
7754
  flow: fcName,
7755
7755
  indicator: "explicit-key-ind",
7756
- next: key ?? sep9?.[0],
7756
+ next: key ?? sep10?.[0],
7757
7757
  offset,
7758
7758
  onError,
7759
7759
  parentIndent: fc.indent,
7760
7760
  startOnNewline: false
7761
7761
  });
7762
7762
  if (!props.found) {
7763
- if (!props.anchor && !props.tag && !sep9 && !value) {
7763
+ if (!props.anchor && !props.tag && !sep10 && !value) {
7764
7764
  if (i2 === 0 && props.comma)
7765
7765
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
7766
7766
  else if (i2 < fc.items.length - 1)
@@ -7814,8 +7814,8 @@ var require_resolve_flow_collection = __commonJS({
7814
7814
  }
7815
7815
  }
7816
7816
  }
7817
- if (!isMap2 && !sep9 && !props.found) {
7818
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep9, null, props, onError);
7817
+ if (!isMap2 && !sep10 && !props.found) {
7818
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep10, null, props, onError);
7819
7819
  coll.items.push(valueNode);
7820
7820
  offset = valueNode.range[2];
7821
7821
  if (isBlock(value))
@@ -7827,7 +7827,7 @@ var require_resolve_flow_collection = __commonJS({
7827
7827
  if (isBlock(key))
7828
7828
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
7829
7829
  ctx.atKey = false;
7830
- const valueProps = resolveProps.resolveProps(sep9 ?? [], {
7830
+ const valueProps = resolveProps.resolveProps(sep10 ?? [], {
7831
7831
  flow: fcName,
7832
7832
  indicator: "map-value-ind",
7833
7833
  next: value,
@@ -7838,8 +7838,8 @@ var require_resolve_flow_collection = __commonJS({
7838
7838
  });
7839
7839
  if (valueProps.found) {
7840
7840
  if (!isMap2 && !props.found && ctx.options.strict) {
7841
- if (sep9)
7842
- for (const st of sep9) {
7841
+ if (sep10)
7842
+ for (const st of sep10) {
7843
7843
  if (st === valueProps.found)
7844
7844
  break;
7845
7845
  if (st.type === "newline") {
@@ -7856,7 +7856,7 @@ var require_resolve_flow_collection = __commonJS({
7856
7856
  else
7857
7857
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
7858
7858
  }
7859
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep9, null, valueProps, onError) : null;
7859
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep10, null, valueProps, onError) : null;
7860
7860
  if (valueNode) {
7861
7861
  if (isBlock(value))
7862
7862
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -8036,7 +8036,7 @@ var require_resolve_block_scalar = __commonJS({
8036
8036
  chompStart = i2 + 1;
8037
8037
  }
8038
8038
  let value = "";
8039
- let sep9 = "";
8039
+ let sep10 = "";
8040
8040
  let prevMoreIndented = false;
8041
8041
  for (let i2 = 0; i2 < contentStart; ++i2)
8042
8042
  value += lines[i2][0].slice(trimIndent) + "\n";
@@ -8053,24 +8053,24 @@ var require_resolve_block_scalar = __commonJS({
8053
8053
  indent = "";
8054
8054
  }
8055
8055
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
8056
- value += sep9 + indent.slice(trimIndent) + content;
8057
- sep9 = "\n";
8056
+ value += sep10 + indent.slice(trimIndent) + content;
8057
+ sep10 = "\n";
8058
8058
  } else if (indent.length > trimIndent || content[0] === " ") {
8059
- if (sep9 === " ")
8060
- sep9 = "\n";
8061
- else if (!prevMoreIndented && sep9 === "\n")
8062
- sep9 = "\n\n";
8063
- value += sep9 + indent.slice(trimIndent) + content;
8064
- sep9 = "\n";
8059
+ if (sep10 === " ")
8060
+ sep10 = "\n";
8061
+ else if (!prevMoreIndented && sep10 === "\n")
8062
+ sep10 = "\n\n";
8063
+ value += sep10 + indent.slice(trimIndent) + content;
8064
+ sep10 = "\n";
8065
8065
  prevMoreIndented = true;
8066
8066
  } else if (content === "") {
8067
- if (sep9 === "\n")
8067
+ if (sep10 === "\n")
8068
8068
  value += "\n";
8069
8069
  else
8070
- sep9 = "\n";
8070
+ sep10 = "\n";
8071
8071
  } else {
8072
- value += sep9 + content;
8073
- sep9 = " ";
8072
+ value += sep10 + content;
8073
+ sep10 = " ";
8074
8074
  prevMoreIndented = false;
8075
8075
  }
8076
8076
  }
@@ -8253,25 +8253,25 @@ var require_resolve_flow_scalar = __commonJS({
8253
8253
  trimBoth = /^[ \t]+|[ \t]+$/g;
8254
8254
  }
8255
8255
  let res = match[1].replace(trimEnd, "");
8256
- let sep9 = " ";
8256
+ let sep10 = " ";
8257
8257
  let pos = line.lastIndex;
8258
8258
  while (match = line.exec(source)) {
8259
8259
  const lm = match[1].replace(trimBoth, "");
8260
8260
  if (lm === "") {
8261
- if (sep9 === "\n")
8262
- res += sep9;
8261
+ if (sep10 === "\n")
8262
+ res += sep10;
8263
8263
  else
8264
- sep9 = "\n";
8264
+ sep10 = "\n";
8265
8265
  } else {
8266
- res += sep9 + lm;
8267
- sep9 = " ";
8266
+ res += sep10 + lm;
8267
+ sep10 = " ";
8268
8268
  }
8269
8269
  pos = line.lastIndex;
8270
8270
  }
8271
8271
  const last = /[ \t]*(.*)/sy;
8272
8272
  last.lastIndex = pos;
8273
8273
  match = last.exec(source);
8274
- return res + sep9 + (match?.[1] ?? "");
8274
+ return res + sep10 + (match?.[1] ?? "");
8275
8275
  }
8276
8276
  function doubleQuotedValue(source, onError) {
8277
8277
  let res = "";
@@ -9081,14 +9081,14 @@ var require_cst_stringify = __commonJS({
9081
9081
  }
9082
9082
  }
9083
9083
  }
9084
- function stringifyItem({ start, key, sep: sep9, value }) {
9084
+ function stringifyItem({ start, key, sep: sep10, value }) {
9085
9085
  let res = "";
9086
9086
  for (const st of start)
9087
9087
  res += st.source;
9088
9088
  if (key)
9089
9089
  res += stringifyToken(key);
9090
- if (sep9)
9091
- for (const st of sep9)
9090
+ if (sep10)
9091
+ for (const st of sep10)
9092
9092
  res += st.source;
9093
9093
  if (value)
9094
9094
  res += stringifyToken(value);
@@ -9113,9 +9113,9 @@ var require_cst_visit = __commonJS({
9113
9113
  visit2.BREAK = BREAK;
9114
9114
  visit2.SKIP = SKIP;
9115
9115
  visit2.REMOVE = REMOVE;
9116
- visit2.itemAtPath = (cst, path33) => {
9116
+ visit2.itemAtPath = (cst, path34) => {
9117
9117
  let item = cst;
9118
- for (const [field, index] of path33) {
9118
+ for (const [field, index] of path34) {
9119
9119
  const tok = item?.[field];
9120
9120
  if (tok && "items" in tok) {
9121
9121
  item = tok.items[index];
@@ -9124,23 +9124,23 @@ var require_cst_visit = __commonJS({
9124
9124
  }
9125
9125
  return item;
9126
9126
  };
9127
- visit2.parentCollection = (cst, path33) => {
9128
- const parent = visit2.itemAtPath(cst, path33.slice(0, -1));
9129
- const field = path33[path33.length - 1][0];
9127
+ visit2.parentCollection = (cst, path34) => {
9128
+ const parent = visit2.itemAtPath(cst, path34.slice(0, -1));
9129
+ const field = path34[path34.length - 1][0];
9130
9130
  const coll = parent?.[field];
9131
9131
  if (coll && "items" in coll)
9132
9132
  return coll;
9133
9133
  throw new Error("Parent collection not found");
9134
9134
  };
9135
- function _visit(path33, item, visitor) {
9136
- let ctrl = visitor(item, path33);
9135
+ function _visit(path34, item, visitor) {
9136
+ let ctrl = visitor(item, path34);
9137
9137
  if (typeof ctrl === "symbol")
9138
9138
  return ctrl;
9139
9139
  for (const field of ["key", "value"]) {
9140
9140
  const token = item[field];
9141
9141
  if (token && "items" in token) {
9142
9142
  for (let i2 = 0; i2 < token.items.length; ++i2) {
9143
- const ci = _visit(Object.freeze(path33.concat([[field, i2]])), token.items[i2], visitor);
9143
+ const ci = _visit(Object.freeze(path34.concat([[field, i2]])), token.items[i2], visitor);
9144
9144
  if (typeof ci === "number")
9145
9145
  i2 = ci - 1;
9146
9146
  else if (ci === BREAK)
@@ -9151,10 +9151,10 @@ var require_cst_visit = __commonJS({
9151
9151
  }
9152
9152
  }
9153
9153
  if (typeof ctrl === "function" && field === "key")
9154
- ctrl = ctrl(item, path33);
9154
+ ctrl = ctrl(item, path34);
9155
9155
  }
9156
9156
  }
9157
- return typeof ctrl === "function" ? ctrl(item, path33) : ctrl;
9157
+ return typeof ctrl === "function" ? ctrl(item, path34) : ctrl;
9158
9158
  }
9159
9159
  exports.visit = visit2;
9160
9160
  }
@@ -10255,18 +10255,18 @@ var require_parser = __commonJS({
10255
10255
  if (this.type === "map-value-ind") {
10256
10256
  const prev = getPrevProps(this.peek(2));
10257
10257
  const start = getFirstKeyStartProps(prev);
10258
- let sep9;
10258
+ let sep10;
10259
10259
  if (scalar.end) {
10260
- sep9 = scalar.end;
10261
- sep9.push(this.sourceToken);
10260
+ sep10 = scalar.end;
10261
+ sep10.push(this.sourceToken);
10262
10262
  delete scalar.end;
10263
10263
  } else
10264
- sep9 = [this.sourceToken];
10264
+ sep10 = [this.sourceToken];
10265
10265
  const map = {
10266
10266
  type: "block-map",
10267
10267
  offset: scalar.offset,
10268
10268
  indent: scalar.indent,
10269
- items: [{ start, key: scalar, sep: sep9 }]
10269
+ items: [{ start, key: scalar, sep: sep10 }]
10270
10270
  };
10271
10271
  this.onKeyLine = true;
10272
10272
  this.stack[this.stack.length - 1] = map;
@@ -10419,15 +10419,15 @@ var require_parser = __commonJS({
10419
10419
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
10420
10420
  const start2 = getFirstKeyStartProps(it.start);
10421
10421
  const key = it.key;
10422
- const sep9 = it.sep;
10423
- sep9.push(this.sourceToken);
10422
+ const sep10 = it.sep;
10423
+ sep10.push(this.sourceToken);
10424
10424
  delete it.key;
10425
10425
  delete it.sep;
10426
10426
  this.stack.push({
10427
10427
  type: "block-map",
10428
10428
  offset: this.offset,
10429
10429
  indent: this.indent,
10430
- items: [{ start: start2, key, sep: sep9 }]
10430
+ items: [{ start: start2, key, sep: sep10 }]
10431
10431
  });
10432
10432
  } else if (start.length > 0) {
10433
10433
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -10456,14 +10456,14 @@ var require_parser = __commonJS({
10456
10456
  case "scalar":
10457
10457
  case "single-quoted-scalar":
10458
10458
  case "double-quoted-scalar": {
10459
- const fs26 = this.flowScalar(this.type);
10459
+ const fs27 = this.flowScalar(this.type);
10460
10460
  if (atNextItem || it.value) {
10461
- map.items.push({ start, key: fs26, sep: [] });
10461
+ map.items.push({ start, key: fs27, sep: [] });
10462
10462
  this.onKeyLine = true;
10463
10463
  } else if (it.sep) {
10464
- this.stack.push(fs26);
10464
+ this.stack.push(fs27);
10465
10465
  } else {
10466
- Object.assign(it, { key: fs26, sep: [] });
10466
+ Object.assign(it, { key: fs27, sep: [] });
10467
10467
  this.onKeyLine = true;
10468
10468
  }
10469
10469
  return;
@@ -10591,13 +10591,13 @@ var require_parser = __commonJS({
10591
10591
  case "scalar":
10592
10592
  case "single-quoted-scalar":
10593
10593
  case "double-quoted-scalar": {
10594
- const fs26 = this.flowScalar(this.type);
10594
+ const fs27 = this.flowScalar(this.type);
10595
10595
  if (!it || it.value)
10596
- fc.items.push({ start: [], key: fs26, sep: [] });
10596
+ fc.items.push({ start: [], key: fs27, sep: [] });
10597
10597
  else if (it.sep)
10598
- this.stack.push(fs26);
10598
+ this.stack.push(fs27);
10599
10599
  else
10600
- Object.assign(it, { key: fs26, sep: [] });
10600
+ Object.assign(it, { key: fs27, sep: [] });
10601
10601
  return;
10602
10602
  }
10603
10603
  case "flow-map-end":
@@ -10621,13 +10621,13 @@ var require_parser = __commonJS({
10621
10621
  const prev = getPrevProps(parent);
10622
10622
  const start = getFirstKeyStartProps(prev);
10623
10623
  fixFlowSeqItems(fc);
10624
- const sep9 = fc.end.splice(1, fc.end.length);
10625
- sep9.push(this.sourceToken);
10624
+ const sep10 = fc.end.splice(1, fc.end.length);
10625
+ sep10.push(this.sourceToken);
10626
10626
  const map = {
10627
10627
  type: "block-map",
10628
10628
  offset: fc.offset,
10629
10629
  indent: fc.indent,
10630
- items: [{ start, key: fc, sep: sep9 }]
10630
+ items: [{ start, key: fc, sep: sep10 }]
10631
10631
  };
10632
10632
  this.onKeyLine = true;
10633
10633
  this.stack[this.stack.length - 1] = map;
@@ -10805,7 +10805,7 @@ var require_public_api = __commonJS({
10805
10805
  }
10806
10806
  return doc;
10807
10807
  }
10808
- function parse5(src, reviver, options) {
10808
+ function parse6(src, reviver, options) {
10809
10809
  let _reviver = void 0;
10810
10810
  if (typeof reviver === "function") {
10811
10811
  _reviver = reviver;
@@ -10846,7 +10846,7 @@ var require_public_api = __commonJS({
10846
10846
  return value.toString(options);
10847
10847
  return new Document2.Document(value, _replacer, options).toString(options);
10848
10848
  }
10849
- exports.parse = parse5;
10849
+ exports.parse = parse6;
10850
10850
  exports.parseAllDocuments = parseAllDocuments;
10851
10851
  exports.parseDocument = parseDocument2;
10852
10852
  exports.stringify = stringify2;
@@ -11008,13 +11008,13 @@ var require_min_release_age = __commonJS({
11008
11008
  return Number.isFinite(days) && days > 0 ? days * config_parse_1.DAY_MS : 0;
11009
11009
  }
11010
11010
  function probe(p, cwd) {
11011
- return new Promise((resolve21) => {
11011
+ return new Promise((resolve22) => {
11012
11012
  (0, node_child_process_1.exec)(p.command, { cwd, timeout: PROBE_TIMEOUT_MS2, windowsHide: true }, (err, stdout2) => {
11013
11013
  if (err) {
11014
- resolve21(0);
11014
+ resolve22(0);
11015
11015
  return;
11016
11016
  }
11017
- resolve21(p.parse(stdout2));
11017
+ resolve22(p.parse(stdout2));
11018
11018
  });
11019
11019
  });
11020
11020
  }
@@ -11047,12 +11047,12 @@ var require_registry = __commonJS({
11047
11047
  var node_https_1 = __importDefault(__require("node:https"));
11048
11048
  var REQUEST_TIMEOUT_MS = 1e4;
11049
11049
  function fetchRegistryInfo2(url) {
11050
- return new Promise((resolve21) => {
11050
+ return new Promise((resolve22) => {
11051
11051
  let resolved = false;
11052
11052
  const safeResolve = (value) => {
11053
11053
  if (!resolved) {
11054
11054
  resolved = true;
11055
- resolve21(value);
11055
+ resolve22(value);
11056
11056
  }
11057
11057
  };
11058
11058
  const req = node_https_1.default.get(url, { timeout: REQUEST_TIMEOUT_MS }, (res) => {
@@ -12992,8 +12992,8 @@ var Deferred = class {
12992
12992
  _resolve;
12993
12993
  _reject;
12994
12994
  constructor() {
12995
- this._promise = new Promise((resolve21, reject) => {
12996
- this._resolve = resolve21;
12995
+ this._promise = new Promise((resolve22, reject) => {
12996
+ this._resolve = resolve22;
12997
12997
  this._reject = reject;
12998
12998
  });
12999
12999
  }
@@ -13886,8 +13886,8 @@ var ExportOperation = class {
13886
13886
  _metrics;
13887
13887
  _exportScheduledResolve;
13888
13888
  constructor(exporter, logRecords, exportTimeoutMillis, metrics) {
13889
- this._exportScheduledPromise = new Promise((resolve21) => {
13890
- this._exportScheduledResolve = resolve21;
13889
+ this._exportScheduledPromise = new Promise((resolve22) => {
13890
+ this._exportScheduledResolve = resolve22;
13891
13891
  });
13892
13892
  this._exportCompleted = this._executeExport(exporter, logRecords, exportTimeoutMillis);
13893
13893
  this._metrics = metrics;
@@ -13912,7 +13912,7 @@ var ExportOperation = class {
13912
13912
  }
13913
13913
  }
13914
13914
  async _exportWithTimeout(exporter, logRecords, exportTimeoutMillis) {
13915
- return new Promise((resolve21, reject) => {
13915
+ return new Promise((resolve22, reject) => {
13916
13916
  const timer = setTimeout(() => {
13917
13917
  reject(new Error("Timeout"));
13918
13918
  }, exportTimeoutMillis);
@@ -13920,7 +13920,7 @@ var ExportOperation = class {
13920
13920
  this._metrics.finishLogs(logRecords.length, result.error);
13921
13921
  clearTimeout(timer);
13922
13922
  if (result.code === ExportResultCode.SUCCESS) {
13923
- resolve21();
13923
+ resolve22();
13924
13924
  } else {
13925
13925
  reject(result.error ?? new Error("BatchLogRecordProcessor: log record export failed"));
13926
13926
  }
@@ -14701,7 +14701,7 @@ function parseRetryAfterToMills(retryAfter) {
14701
14701
  var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION4}`;
14702
14702
  var MAX_RESPONSE_BODY_SIZE = 4 * 1024 * 1024;
14703
14703
  function sendWithHttp(request, url, headers, compression, userAgent, agent, data, timeoutMillis) {
14704
- return new Promise((resolve21) => {
14704
+ return new Promise((resolve22) => {
14705
14705
  const parsedUrl = new URL(url);
14706
14706
  if (userAgent) {
14707
14707
  headers["User-Agent"] = `${userAgent} ${DEFAULT_USER_AGENT}`;
@@ -14720,7 +14720,7 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14720
14720
  responseSize += chunk.length;
14721
14721
  if (responseSize > MAX_RESPONSE_BODY_SIZE) {
14722
14722
  const sizeError = new Error(`OTLP export response body exceeded size limit of ${MAX_RESPONSE_BODY_SIZE} bytes`);
14723
- resolve21({ status: "failure", error: sizeError });
14723
+ resolve22({ status: "failure", error: sizeError });
14724
14724
  res.destroy();
14725
14725
  return;
14726
14726
  }
@@ -14728,18 +14728,18 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14728
14728
  });
14729
14729
  res.on("end", () => {
14730
14730
  if (res.statusCode && res.statusCode <= 299) {
14731
- resolve21({
14731
+ resolve22({
14732
14732
  status: "success",
14733
14733
  data: Buffer.concat(responseData)
14734
14734
  });
14735
14735
  } else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
14736
- resolve21({
14736
+ resolve22({
14737
14737
  status: "retryable",
14738
14738
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
14739
14739
  });
14740
14740
  } else {
14741
14741
  const error = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
14742
- resolve21({
14742
+ resolve22({
14743
14743
  status: "failure",
14744
14744
  error
14745
14745
  });
@@ -14747,17 +14747,17 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14747
14747
  });
14748
14748
  res.on("error", (error) => {
14749
14749
  if (res.statusCode && res.statusCode <= 299) {
14750
- resolve21({
14750
+ resolve22({
14751
14751
  status: "success"
14752
14752
  });
14753
14753
  } else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
14754
- resolve21({
14754
+ resolve22({
14755
14755
  status: "retryable",
14756
14756
  error,
14757
14757
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
14758
14758
  });
14759
14759
  } else {
14760
- resolve21({
14760
+ resolve22({
14761
14761
  status: "failure",
14762
14762
  error
14763
14763
  });
@@ -14766,26 +14766,26 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14766
14766
  });
14767
14767
  req.setTimeout(timeoutMillis, () => {
14768
14768
  req.destroy();
14769
- resolve21({
14769
+ resolve22({
14770
14770
  status: "retryable",
14771
14771
  error: new Error("Request timed out")
14772
14772
  });
14773
14773
  });
14774
14774
  req.on("error", (error) => {
14775
14775
  if (isHttpTransportNetworkErrorRetryable(error)) {
14776
- resolve21({
14776
+ resolve22({
14777
14777
  status: "retryable",
14778
14778
  error
14779
14779
  });
14780
14780
  } else {
14781
- resolve21({
14781
+ resolve22({
14782
14782
  status: "failure",
14783
14783
  error
14784
14784
  });
14785
14785
  }
14786
14786
  });
14787
14787
  compressAndSend(req, compression, data, (error) => {
14788
- resolve21({
14788
+ resolve22({
14789
14789
  status: "failure",
14790
14790
  error
14791
14791
  });
@@ -14875,9 +14875,9 @@ var RetryingTransport = class {
14875
14875
  this._transport = transport;
14876
14876
  }
14877
14877
  retry(data, timeoutMillis, inMillis) {
14878
- return new Promise((resolve21, reject) => {
14878
+ return new Promise((resolve22, reject) => {
14879
14879
  setTimeout(() => {
14880
- this._transport.send(data, timeoutMillis).then(resolve21, reject);
14880
+ this._transport.send(data, timeoutMillis).then(resolve22, reject);
14881
14881
  }, inMillis);
14882
14882
  });
14883
14883
  }
@@ -15012,7 +15012,7 @@ function appendRootPathToUrlIfNeeded(url) {
15012
15012
  return void 0;
15013
15013
  }
15014
15014
  }
15015
- function appendResourcePathToUrl(url, path33) {
15015
+ function appendResourcePathToUrl(url, path34) {
15016
15016
  try {
15017
15017
  new URL(url);
15018
15018
  } catch {
@@ -15022,11 +15022,11 @@ function appendResourcePathToUrl(url, path33) {
15022
15022
  if (!url.endsWith("/")) {
15023
15023
  url = url + "/";
15024
15024
  }
15025
- url += path33;
15025
+ url += path34;
15026
15026
  try {
15027
15027
  new URL(url);
15028
15028
  } catch {
15029
- diag2.warn(`Configuration: Provided URL appended with '${path33}' is not a valid URL, using 'undefined' instead of '${url}'`);
15029
+ diag2.warn(`Configuration: Provided URL appended with '${path34}' is not a valid URL, using 'undefined' instead of '${url}'`);
15030
15030
  return void 0;
15031
15031
  }
15032
15032
  return url;
@@ -15137,44 +15137,53 @@ var OTLPLogExporter = class extends OTLPExporterBase {
15137
15137
  init_esm();
15138
15138
 
15139
15139
  // ../telemetry/src/debug.ts
15140
- import * as fs6 from "node:fs";
15140
+ import * as fs7 from "node:fs";
15141
15141
 
15142
15142
  // ../telemetry/src/paths.ts
15143
- import * as path7 from "node:path";
15143
+ import * as path8 from "node:path";
15144
15144
 
15145
15145
  // ../configuration-core/src/flags.ts
15146
15146
  import * as fs2 from "node:fs";
15147
+ import * as path3 from "node:path";
15148
+
15149
+ // ../configuration-core/src/home.ts
15150
+ import * as os from "node:os";
15147
15151
  import * as path2 from "node:path";
15148
- import { homedir } from "node:os";
15152
+ var ARGENT_HOME_DIR_ENV = "ARGENT_HOME_DIR";
15153
+ function nonEmpty(value) {
15154
+ if (value == void 0) return null;
15155
+ const trimmed = value.trim();
15156
+ return trimmed === "" ? null : value;
15157
+ }
15158
+ function resolveHomeDir(options = {}) {
15159
+ if (options.homeDir) return options.homeDir;
15160
+ return process.platform === "win32" ? nonEmpty(process.env.USERPROFILE) ?? os.homedir() : nonEmpty(process.env.HOME) ?? os.homedir();
15161
+ }
15162
+ function argentHomeDir(options = {}) {
15163
+ const override = options.homeDir ? null : nonEmpty(process.env[ARGENT_HOME_DIR_ENV]);
15164
+ return override ? path2.resolve(override.trim()) : path2.join(resolveHomeDir(options), ".argent");
15165
+ }
15166
+
15167
+ // ../configuration-core/src/flags.ts
15149
15168
  var PROJECT_MARKERS = [".argent", ".git", "package.json"];
15150
15169
  function findProjectRoot(startDir) {
15151
- let current = path2.resolve(startDir);
15170
+ let current = path3.resolve(startDir);
15152
15171
  while (true) {
15153
15172
  for (const marker of PROJECT_MARKERS) {
15154
- if (fs2.existsSync(path2.join(current, marker))) return current;
15173
+ if (fs2.existsSync(path3.join(current, marker))) return current;
15155
15174
  }
15156
- const parent = path2.dirname(current);
15175
+ const parent = path3.dirname(current);
15157
15176
  if (parent === current) return null;
15158
15177
  current = parent;
15159
15178
  }
15160
15179
  }
15161
15180
  function resolveProjectRoot(startDir) {
15162
- return findProjectRoot(startDir) ?? path2.resolve(startDir);
15181
+ return findProjectRoot(startDir) ?? path3.resolve(startDir);
15163
15182
  }
15164
15183
 
15165
15184
  // ../configuration-core/src/paths.ts
15166
15185
  import * as fs3 from "node:fs";
15167
- import * as os from "node:os";
15168
- import * as path3 from "node:path";
15169
- function nonEmpty(value) {
15170
- if (value == void 0) return null;
15171
- const trimmed = value.trim();
15172
- return trimmed === "" ? null : value;
15173
- }
15174
- function resolveHomeDir(options = {}) {
15175
- if (options.homeDir) return options.homeDir;
15176
- return process.platform === "win32" ? nonEmpty(process.env.USERPROFILE) ?? os.homedir() : nonEmpty(process.env.HOME) ?? os.homedir();
15177
- }
15186
+ import * as path4 from "node:path";
15178
15187
  function isHomeDir(dir, options = {}) {
15179
15188
  return canonicalPath(dir) === canonicalPath(resolveHomeDir(options));
15180
15189
  }
@@ -15182,27 +15191,22 @@ function canonicalPath(p) {
15182
15191
  try {
15183
15192
  return fs3.realpathSync.native(p);
15184
15193
  } catch {
15185
- return path3.resolve(p);
15194
+ return path4.resolve(p);
15186
15195
  }
15187
15196
  }
15188
- function argentHomeDir() {
15189
- return path3.join(resolveHomeDir(), ".argent");
15190
- }
15191
15197
  function configDir(scope = "global", options = {}) {
15192
- if (scope === "global") {
15193
- return path3.join(resolveHomeDir(options), ".argent");
15194
- }
15198
+ if (scope === "global") return argentHomeDir(options);
15195
15199
  const cwd = options.cwd ?? process.cwd();
15196
- return path3.join(resolveProjectRoot(cwd), ".argent");
15200
+ return path4.join(resolveProjectRoot(cwd), ".argent");
15197
15201
  }
15198
15202
  function configFilePath(scope = "global", options = {}) {
15199
- return path3.join(configDir(scope, options), "config.json");
15203
+ return path4.join(configDir(scope, options), "config.json");
15200
15204
  }
15201
15205
 
15202
15206
  // ../configuration-core/src/config.ts
15203
15207
  import * as crypto from "node:crypto";
15204
15208
  import * as fs4 from "node:fs";
15205
- import * as path4 from "node:path";
15209
+ import * as path5 from "node:path";
15206
15210
  function readConfigObject(scope = "global", options = {}) {
15207
15211
  try {
15208
15212
  const raw = fs4.readFileSync(configFilePath(scope, options), "utf8");
@@ -15302,7 +15306,7 @@ function updateConfig(mutate, scope = "global", options = {}) {
15302
15306
  try {
15303
15307
  const next = readConfigObject(scope, options);
15304
15308
  mutate(next);
15305
- const tmpPath = path4.join(dir, `.config.tmp.${process.pid}.${crypto.randomUUID()}`);
15309
+ const tmpPath = path5.join(dir, `.config.tmp.${process.pid}.${crypto.randomUUID()}`);
15306
15310
  const fd = fs4.openSync(tmpPath, "wx", 384);
15307
15311
  try {
15308
15312
  fs4.writeSync(fd, JSON.stringify(next, null, 2) + "\n");
@@ -15349,7 +15353,7 @@ function setWhatsNewSeenVersion(version, options = {}) {
15349
15353
  // ../configuration-core/src/secrets.ts
15350
15354
  var import_dotenv = __toESM(require_dist(), 1);
15351
15355
  import * as fs5 from "node:fs";
15352
- import * as path5 from "node:path";
15356
+ import * as path6 from "node:path";
15353
15357
 
15354
15358
  // ../configuration-core/src/merge.ts
15355
15359
  function mergeRestrictive(local, global2) {
@@ -15536,7 +15540,8 @@ function getConfigDefinition(key, registry = CONFIG_SCHEMA) {
15536
15540
  }
15537
15541
 
15538
15542
  // ../configuration-core/src/config-access.ts
15539
- import * as path6 from "node:path";
15543
+ import * as fs6 from "node:fs";
15544
+ import * as path7 from "node:path";
15540
15545
  function readScopeValue(def, scope, options) {
15541
15546
  if (!def.scopes.includes(scope)) return void 0;
15542
15547
  const raw = getAtPath(readConfigObject(scope, options), def.key);
@@ -15548,6 +15553,10 @@ function getConfigValue(def, options = {}) {
15548
15553
  const merged = applyMergePolicy(def.merge, local, global2);
15549
15554
  return merged ?? def.default;
15550
15555
  }
15556
+ function getConfigValueAtScope(key, scope, options = {}, registry = CONFIG_SCHEMA) {
15557
+ const def = requireDefinition(key, registry);
15558
+ return readScopeValue(def, scope, options);
15559
+ }
15551
15560
  function getConfigValueByKey(key, options = {}, registry = CONFIG_SCHEMA) {
15552
15561
  const def = requireDefinition(key, registry);
15553
15562
  return getConfigValue(def, options);
@@ -15567,13 +15576,19 @@ var UnknownConfigKeyError = class extends Error {
15567
15576
  }
15568
15577
  key;
15569
15578
  };
15579
+ var AUTO_UPDATE_ENABLED_KEY = "autoUpdate.enabled";
15580
+ function isAutoUpdateEnabled() {
15581
+ if (getConfigValueByKey(AUTO_UPDATE_ENABLED_KEY) !== true) return false;
15582
+ const userHome = { homeDir: resolveHomeDir() };
15583
+ return getConfigValueAtScope(AUTO_UPDATE_ENABLED_KEY, "global", userHome) !== false;
15584
+ }
15570
15585
 
15571
15586
  // ../telemetry/src/paths.ts
15572
15587
  function identityFilePath() {
15573
- return path7.join(argentHomeDir(), "telemetry-id");
15588
+ return path8.join(argentHomeDir(), "telemetry-id");
15574
15589
  }
15575
15590
  function debugLogPath() {
15576
- return path7.join(argentHomeDir(), "telemetry-debug.log");
15591
+ return path8.join(argentHomeDir(), "telemetry-debug.log");
15577
15592
  }
15578
15593
 
15579
15594
  // ../telemetry/src/debug.ts
@@ -15603,8 +15618,8 @@ function emitDebugPayload(payload) {
15603
15618
  } catch {
15604
15619
  }
15605
15620
  try {
15606
- fs6.mkdirSync(argentHomeDir(), { recursive: true });
15607
- fs6.appendFileSync(debugLogPath(), line + "\n");
15621
+ fs7.mkdirSync(argentHomeDir(), { recursive: true });
15622
+ fs7.appendFileSync(debugLogPath(), line + "\n");
15608
15623
  } catch {
15609
15624
  }
15610
15625
  }
@@ -15792,16 +15807,16 @@ var LAUNCH_PLATFORMS = ["ios", "android", "chromium", "vega", "macos"];
15792
15807
  var SELECTABLE_PLATFORMS = [...LAUNCH_PLATFORMS, "ios-remote"];
15793
15808
 
15794
15809
  // ../registry/src/flow-file-refs.ts
15795
- import * as fs8 from "node:fs/promises";
15796
- import * as path9 from "node:path";
15810
+ import * as fs9 from "node:fs/promises";
15811
+ import * as path10 from "node:path";
15797
15812
 
15798
15813
  // ../registry/src/e2e-dirs.ts
15799
- import * as fs7 from "node:fs/promises";
15800
- import * as path8 from "node:path";
15801
- var E2E_DIR = path8.join(".argent", "e2e");
15802
- var LEGACY_E2E_DIRS = Object.freeze([path8.join(".argent", "flows")]);
15814
+ import * as fs8 from "node:fs/promises";
15815
+ import * as path9 from "node:path";
15816
+ var E2E_DIR = path9.join(".argent", "e2e");
15817
+ var LEGACY_E2E_DIRS = Object.freeze([path9.join(".argent", "flows")]);
15803
15818
  var E2E_DIRS = Object.freeze([E2E_DIR, ...LEGACY_E2E_DIRS]);
15804
- var E2E_DIR_NAMES = E2E_DIRS.map((dir) => path8.basename(dir));
15819
+ var E2E_DIR_NAMES = E2E_DIRS.map((dir) => path9.basename(dir));
15805
15820
 
15806
15821
  // ../registry/src/tool-ids.ts
15807
15822
  var TOOL_ID_ALIASES = Object.freeze({
@@ -16650,7 +16665,7 @@ function sanitize(event, raw) {
16650
16665
  import { randomUUID as randomUUID4 } from "node:crypto";
16651
16666
 
16652
16667
  // ../telemetry/src/cloud-agent-detect.ts
16653
- import { existsSync as existsSync3 } from "node:fs";
16668
+ import { existsSync as existsSync4 } from "node:fs";
16654
16669
  var CLAUDE_CLOUD_ENV_KINDS = /* @__PURE__ */ new Set(["byoc", "anthropic_cloud"]);
16655
16670
  var CLAUDE_REMOTE_ENTRYPOINTS = /* @__PURE__ */ new Set([
16656
16671
  "remote",
@@ -16681,9 +16696,9 @@ function isReplitAgent(env) {
16681
16696
  }
16682
16697
  var DEVIN_MARKER_PATH = "/opt/.devin";
16683
16698
  var JULES_MARKER_PATH = "/opt/environment_summary.sh";
16684
- function safeExists(fileExists, path33) {
16699
+ function safeExists(fileExists, path34) {
16685
16700
  try {
16686
- return fileExists(path33);
16701
+ return fileExists(path34);
16687
16702
  } catch {
16688
16703
  return false;
16689
16704
  }
@@ -16693,7 +16708,7 @@ function detectCloudAgent(env = process.env, opts = {}) {
16693
16708
  if (isCursorCloud(env)) return "cursor";
16694
16709
  if (isCopilotAgent(env)) return "copilot";
16695
16710
  if (isReplitAgent(env)) return "replit";
16696
- const fileExists = opts.fileExists ?? existsSync3;
16711
+ const fileExists = opts.fileExists ?? existsSync4;
16697
16712
  if (safeExists(fileExists, DEVIN_MARKER_PATH)) return "devin";
16698
16713
  if (safeExists(fileExists, JULES_MARKER_PATH)) return "jules";
16699
16714
  return null;
@@ -17103,7 +17118,7 @@ function isCi(env = process.env) {
17103
17118
  var SESSION_ID = randomUUID4();
17104
17119
  function readCliVersion() {
17105
17120
  if (true) {
17106
- return "0.35.1-next.5";
17121
+ return "0.35.1-next.50";
17107
17122
  }
17108
17123
  return "0.0.0";
17109
17124
  }
@@ -17136,8 +17151,8 @@ function getBaseProps(runtime) {
17136
17151
 
17137
17152
  // ../telemetry/src/identity.ts
17138
17153
  import * as crypto2 from "node:crypto";
17139
- import * as fs9 from "node:fs";
17140
- import * as path10 from "node:path";
17154
+ import * as fs10 from "node:fs";
17155
+ import * as path11 from "node:path";
17141
17156
  var FINGERPRINT_PATTERN = /^[0-9a-f]{64}$/;
17142
17157
  var cached = null;
17143
17158
  var fingerprintResolved = null;
@@ -17244,66 +17259,66 @@ function resolveFingerprintOnce(resolveFingerprint) {
17244
17259
  function isCorruptIdFile(filePath) {
17245
17260
  let isRegularFile;
17246
17261
  try {
17247
- isRegularFile = fs9.lstatSync(filePath).isFile();
17262
+ isRegularFile = fs10.lstatSync(filePath).isFile();
17248
17263
  } catch {
17249
17264
  return false;
17250
17265
  }
17251
17266
  return isRegularFile && tryReadId(filePath) === null;
17252
17267
  }
17253
17268
  function writeIdFileAtomic(finalPath, id) {
17254
- fs9.mkdirSync(argentHomeDir(), { recursive: true });
17269
+ fs10.mkdirSync(argentHomeDir(), { recursive: true });
17255
17270
  let occupant;
17256
17271
  try {
17257
- occupant = fs9.lstatSync(finalPath);
17272
+ occupant = fs10.lstatSync(finalPath);
17258
17273
  } catch (err) {
17259
17274
  if (err.code !== "ENOENT") throw err;
17260
17275
  }
17261
17276
  if (occupant && !occupant.isFile()) {
17262
17277
  throw new Error("telemetry: refusing to replace a non-regular file at the identity path");
17263
17278
  }
17264
- const tmpPath = path10.join(
17279
+ const tmpPath = path11.join(
17265
17280
  argentHomeDir(),
17266
17281
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
17267
17282
  );
17268
- const fd = fs9.openSync(tmpPath, "wx", 384);
17283
+ const fd = fs10.openSync(tmpPath, "wx", 384);
17269
17284
  try {
17270
17285
  try {
17271
- fs9.writeSync(fd, id);
17272
- fs9.fsyncSync(fd);
17286
+ fs10.writeSync(fd, id);
17287
+ fs10.fsyncSync(fd);
17273
17288
  } finally {
17274
- fs9.closeSync(fd);
17289
+ fs10.closeSync(fd);
17275
17290
  }
17276
- fs9.renameSync(tmpPath, finalPath);
17291
+ fs10.renameSync(tmpPath, finalPath);
17277
17292
  } finally {
17278
17293
  try {
17279
- fs9.unlinkSync(tmpPath);
17294
+ fs10.unlinkSync(tmpPath);
17280
17295
  } catch {
17281
17296
  }
17282
17297
  }
17283
17298
  }
17284
17299
  function mintRandomId(finalPath) {
17285
- fs9.mkdirSync(argentHomeDir(), { recursive: true });
17300
+ fs10.mkdirSync(argentHomeDir(), { recursive: true });
17286
17301
  let value = crypto2.randomUUID();
17287
17302
  for (let attempt = 0; attempt < 3; attempt++) {
17288
- const tmpPath = path10.join(
17303
+ const tmpPath = path11.join(
17289
17304
  argentHomeDir(),
17290
17305
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
17291
17306
  );
17292
17307
  let fd;
17293
17308
  try {
17294
- fd = fs9.openSync(tmpPath, "wx", 384);
17309
+ fd = fs10.openSync(tmpPath, "wx", 384);
17295
17310
  } catch (err) {
17296
17311
  if (err.code === "EEXIST") continue;
17297
17312
  throw err;
17298
17313
  }
17299
17314
  try {
17300
17315
  try {
17301
- fs9.writeSync(fd, value);
17302
- fs9.fsyncSync(fd);
17316
+ fs10.writeSync(fd, value);
17317
+ fs10.fsyncSync(fd);
17303
17318
  } finally {
17304
- fs9.closeSync(fd);
17319
+ fs10.closeSync(fd);
17305
17320
  }
17306
- fs9.linkSync(tmpPath, finalPath);
17321
+ fs10.linkSync(tmpPath, finalPath);
17307
17322
  cached = { path: finalPath, id: value };
17308
17323
  return value;
17309
17324
  } catch (err) {
@@ -17322,7 +17337,7 @@ function mintRandomId(finalPath) {
17322
17337
  throw err;
17323
17338
  } finally {
17324
17339
  try {
17325
- fs9.unlinkSync(tmpPath);
17340
+ fs10.unlinkSync(tmpPath);
17326
17341
  } catch {
17327
17342
  }
17328
17343
  }
@@ -17330,12 +17345,12 @@ function mintRandomId(finalPath) {
17330
17345
  throw new Error("telemetry: failed to create identity after retries");
17331
17346
  }
17332
17347
  function claimCorruptOccupant(finalPath) {
17333
- const claimed = path10.join(
17348
+ const claimed = path11.join(
17334
17349
  argentHomeDir(),
17335
17350
  `.telemetry-id.corrupt.${process.pid}.${crypto2.randomUUID()}`
17336
17351
  );
17337
17352
  try {
17338
- fs9.renameSync(finalPath, claimed);
17353
+ fs10.renameSync(finalPath, claimed);
17339
17354
  } catch {
17340
17355
  return null;
17341
17356
  }
@@ -17344,7 +17359,7 @@ function claimCorruptOccupant(finalPath) {
17344
17359
  grabbed = tryReadId(claimed);
17345
17360
  } finally {
17346
17361
  try {
17347
- fs9.unlinkSync(claimed);
17362
+ fs10.unlinkSync(claimed);
17348
17363
  } catch {
17349
17364
  }
17350
17365
  }
@@ -17353,7 +17368,7 @@ function claimCorruptOccupant(finalPath) {
17353
17368
  function deleteAnonId() {
17354
17369
  cached = null;
17355
17370
  try {
17356
- fs9.unlinkSync(identityFilePath());
17371
+ fs10.unlinkSync(identityFilePath());
17357
17372
  } catch (err) {
17358
17373
  if (err.code !== "ENOENT") throw err;
17359
17374
  }
@@ -17361,9 +17376,9 @@ function deleteAnonId() {
17361
17376
  function tryReadId(filePath) {
17362
17377
  let raw;
17363
17378
  try {
17364
- const stats = fs9.lstatSync(filePath);
17379
+ const stats = fs10.lstatSync(filePath);
17365
17380
  if (!stats.isFile()) return null;
17366
- raw = fs9.readFileSync(filePath, "utf8");
17381
+ raw = fs10.readFileSync(filePath, "utf8");
17367
17382
  } catch (err) {
17368
17383
  if (err.code === "ENOENT") return null;
17369
17384
  return null;
@@ -17377,12 +17392,12 @@ function tryReadId(filePath) {
17377
17392
  import { execFileSync, spawn } from "node:child_process";
17378
17393
 
17379
17394
  // ../native-devtools-ios/src/index.ts
17380
- import * as path11 from "node:path";
17381
- import * as fs10 from "node:fs";
17382
- var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path11.join(__dirname, "..", "dylibs");
17383
- var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path11.join(__dirname, "..", "bin");
17384
- var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path11.join(DYLIB_DIR, "tcp");
17385
- var DYLIB_TVOS_DIR = path11.join(DYLIB_DIR, "tvos");
17395
+ import * as path12 from "node:path";
17396
+ import * as fs11 from "node:fs";
17397
+ var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path12.join(__dirname, "..", "dylibs");
17398
+ var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path12.join(__dirname, "..", "bin");
17399
+ var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path12.join(DYLIB_DIR, "tcp");
17400
+ var DYLIB_TVOS_DIR = path12.join(DYLIB_DIR, "tvos");
17386
17401
  function hostPlatformKey() {
17387
17402
  if (process.platform === "linux" && process.arch === "arm64") {
17388
17403
  return "linux-arm64";
@@ -17393,14 +17408,14 @@ function simulatorServerBinaryName() {
17393
17408
  return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
17394
17409
  }
17395
17410
  function platformBinDir() {
17396
- return path11.join(BIN_DIR, hostPlatformKey());
17411
+ return path12.join(BIN_DIR, hostPlatformKey());
17397
17412
  }
17398
17413
  function simulatorServerBinaryPath() {
17399
17414
  const binaryName = simulatorServerBinaryName();
17400
- const p = path11.join(platformBinDir(), binaryName);
17401
- if (!fs10.existsSync(p)) {
17402
- const flat = path11.join(BIN_DIR, binaryName);
17403
- const migrationHint = fs10.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.` : "";
17415
+ const p = path12.join(platformBinDir(), binaryName);
17416
+ if (!fs11.existsSync(p)) {
17417
+ const flat = path12.join(BIN_DIR, binaryName);
17418
+ 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.` : "";
17404
17419
  throw new Error(
17405
17420
  `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
17406
17421
  );
@@ -17429,12 +17444,12 @@ function resolveHostFingerprint() {
17429
17444
  }
17430
17445
  }
17431
17446
  function resolveHostFingerprintAsync() {
17432
- return new Promise((resolve21) => {
17447
+ return new Promise((resolve22) => {
17433
17448
  let binary;
17434
17449
  try {
17435
17450
  binary = simulatorServerBinaryPath();
17436
17451
  } catch {
17437
- resolve21(null);
17452
+ resolve22(null);
17438
17453
  return;
17439
17454
  }
17440
17455
  let settled = false;
@@ -17447,7 +17462,7 @@ function resolveHostFingerprintAsync() {
17447
17462
  child?.kill("SIGKILL");
17448
17463
  } catch {
17449
17464
  }
17450
- resolve21(value);
17465
+ resolve22(value);
17451
17466
  };
17452
17467
  const watchdog = setTimeout(() => finish(null), FINGERPRINT_TIMEOUT_MS);
17453
17468
  watchdog.unref?.();
@@ -17480,15 +17495,15 @@ function resolveHostFingerprintAsync() {
17480
17495
  }
17481
17496
 
17482
17497
  // ../telemetry/src/consent.ts
17483
- import * as fs11 from "node:fs";
17484
- import * as path12 from "node:path";
17498
+ import * as fs12 from "node:fs";
17499
+ import * as path13 from "node:path";
17485
17500
  var cache = /* @__PURE__ */ new Map();
17486
17501
  var sessionOverride = null;
17487
17502
  function readConfigOverrideAt(filePath) {
17488
17503
  const miss = { mtimeMs: null, fingerprint: null, enabledOverride: null };
17489
17504
  let stats;
17490
17505
  try {
17491
- stats = fs11.lstatSync(filePath);
17506
+ stats = fs12.lstatSync(filePath);
17492
17507
  } catch {
17493
17508
  cache.set(filePath, miss);
17494
17509
  return null;
@@ -17505,7 +17520,7 @@ function readConfigOverrideAt(filePath) {
17505
17520
  }
17506
17521
  let parsedEnabled = null;
17507
17522
  try {
17508
- const raw = fs11.readFileSync(filePath, "utf8");
17523
+ const raw = fs12.readFileSync(filePath, "utf8");
17509
17524
  const json = JSON.parse(raw);
17510
17525
  if (json && typeof json === "object") {
17511
17526
  const t2 = json.telemetry;
@@ -17522,8 +17537,12 @@ function readConfigOverrideAt(filePath) {
17522
17537
  function readPersistedConsent(cwd) {
17523
17538
  const globalPath = configFilePath("global");
17524
17539
  const projectPath = configFilePath("project", { cwd });
17540
+ const userConfigPath = path13.join(resolveHomeDir(), ".argent", "config.json");
17541
+ if (userConfigPath !== globalPath && readConfigOverrideAt(userConfigPath) === false) {
17542
+ return { enabled: false, detail: `${userConfigPath} (user)` };
17543
+ }
17525
17544
  const global2 = readConfigOverrideAt(globalPath);
17526
- const projectRoot = path12.dirname(path12.dirname(projectPath));
17545
+ const projectRoot = path13.dirname(path13.dirname(projectPath));
17527
17546
  const project = isHomeDir(projectRoot) ? null : readConfigOverrideAt(projectPath);
17528
17547
  if (project === false && global2 === false) {
17529
17548
  return { enabled: false, detail: "config.json (project and global)" };
@@ -17719,7 +17738,7 @@ var DRAIN_GRACE_MS = 250;
17719
17738
  async function raceDrain(client2, timeoutMs) {
17720
17739
  await Promise.race([
17721
17740
  client2.shutdown(timeoutMs),
17722
- new Promise((resolve21) => setTimeout(resolve21, timeoutMs + DRAIN_GRACE_MS).unref())
17741
+ new Promise((resolve22) => setTimeout(resolve22, timeoutMs + DRAIN_GRACE_MS).unref())
17723
17742
  ]);
17724
17743
  }
17725
17744
  async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
@@ -17739,10 +17758,10 @@ async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
17739
17758
  }
17740
17759
 
17741
17760
  // ../argent-installer/src/mcp-configs.ts
17742
- import * as fs18 from "node:fs";
17743
- import * as path19 from "node:path";
17761
+ import * as fs19 from "node:fs";
17762
+ import * as path20 from "node:path";
17744
17763
  import { execFileSync as execFileSync5 } from "node:child_process";
17745
- import { homedir as homedir5 } from "node:os";
17764
+ import { homedir as homedir4 } from "node:os";
17746
17765
 
17747
17766
  // ../argent-installer/src/constants.ts
17748
17767
  var PACKAGE_NAME = "@swmansion/argent";
@@ -17755,8 +17774,8 @@ var CURSOR_ALLOWLIST_PATTERN = "argent:*";
17755
17774
 
17756
17775
  // ../argent-installer/src/utils.ts
17757
17776
  var import_semver3 = __toESM(require_semver2(), 1);
17758
- import * as fs17 from "node:fs";
17759
- import * as path18 from "node:path";
17777
+ import * as fs18 from "node:fs";
17778
+ import * as path19 from "node:path";
17760
17779
  import * as dns from "node:dns";
17761
17780
  import { createHash as createHash2 } from "node:crypto";
17762
17781
  import * as os3 from "node:os";
@@ -19482,11 +19501,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19482
19501
  onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
19483
19502
  ensurePropertyComplete(offset + length);
19484
19503
  },
19485
- onSeparator: (sep9, offset, length) => {
19504
+ onSeparator: (sep10, offset, length) => {
19486
19505
  if (currentParent.type === "property") {
19487
- if (sep9 === ":") {
19506
+ if (sep10 === ":") {
19488
19507
  currentParent.colonOffset = offset;
19489
- } else if (sep9 === ",") {
19508
+ } else if (sep10 === ",") {
19490
19509
  ensurePropertyComplete(offset);
19491
19510
  }
19492
19511
  }
@@ -19502,12 +19521,12 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19502
19521
  }
19503
19522
  return result;
19504
19523
  }
19505
- function findNodeAtLocation(root, path33) {
19524
+ function findNodeAtLocation(root, path34) {
19506
19525
  if (!root) {
19507
19526
  return void 0;
19508
19527
  }
19509
19528
  let node = root;
19510
- for (let segment of path33) {
19529
+ for (let segment of path34) {
19511
19530
  if (typeof segment === "string") {
19512
19531
  if (node.type !== "object" || !Array.isArray(node.children)) {
19513
19532
  return void 0;
@@ -19861,14 +19880,14 @@ function getNodeType(value) {
19861
19880
 
19862
19881
  // ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
19863
19882
  function setProperty(text2, originalPath, value, options) {
19864
- const path33 = originalPath.slice();
19883
+ const path34 = originalPath.slice();
19865
19884
  const errors = [];
19866
19885
  const root = parseTree(text2, errors);
19867
19886
  let parent = void 0;
19868
19887
  let lastSegment = void 0;
19869
- while (path33.length > 0) {
19870
- lastSegment = path33.pop();
19871
- parent = findNodeAtLocation(root, path33);
19888
+ while (path34.length > 0) {
19889
+ lastSegment = path34.pop();
19890
+ parent = findNodeAtLocation(root, path34);
19872
19891
  if (parent === void 0 && value !== void 0) {
19873
19892
  if (typeof lastSegment === "string") {
19874
19893
  value = { [lastSegment]: value };
@@ -20054,8 +20073,8 @@ var ParseErrorCode;
20054
20073
  ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
20055
20074
  ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
20056
20075
  })(ParseErrorCode || (ParseErrorCode = {}));
20057
- function modify(text2, path33, value, options) {
20058
- return setProperty(text2, path33, value, options);
20076
+ function modify(text2, path34, value, options) {
20077
+ return setProperty(text2, path34, value, options);
20059
20078
  }
20060
20079
  function applyEdits(text2, edits) {
20061
20080
  let sortedEdits = edits.slice(0).sort((a2, b) => {
@@ -20079,39 +20098,39 @@ function applyEdits(text2, edits) {
20079
20098
  }
20080
20099
 
20081
20100
  // ../argent-installer/src/package-root.ts
20082
- import * as fs12 from "node:fs";
20083
- import * as path13 from "node:path";
20084
- function resolvePackageRoot(dirname20) {
20085
- let current = path13.resolve(dirname20);
20101
+ import * as fs13 from "node:fs";
20102
+ import * as path14 from "node:path";
20103
+ function resolvePackageRoot(dirname19) {
20104
+ let current = path14.resolve(dirname19);
20086
20105
  while (true) {
20087
- if (fs12.existsSync(path13.join(current, "package.json"))) return current;
20088
- const parent = path13.dirname(current);
20089
- if (parent === current) return path13.resolve(dirname20);
20106
+ if (fs13.existsSync(path14.join(current, "package.json"))) return current;
20107
+ const parent = path14.dirname(current);
20108
+ if (parent === current) return path14.resolve(dirname19);
20090
20109
  current = parent;
20091
20110
  }
20092
20111
  }
20093
20112
 
20094
20113
  // ../argent-installer/src/package-manager.ts
20095
20114
  import { execFileSync as execFileSync3 } from "node:child_process";
20096
- import * as fs15 from "node:fs";
20115
+ import * as fs16 from "node:fs";
20097
20116
  import * as os2 from "node:os";
20098
- import * as path16 from "node:path";
20117
+ import * as path17 from "node:path";
20099
20118
 
20100
20119
  // ../argent-installer/src/topology.ts
20101
20120
  var import_semver2 = __toESM(require_semver2(), 1);
20102
- import * as fs14 from "node:fs";
20103
- import * as path15 from "node:path";
20121
+ import * as fs15 from "node:fs";
20122
+ import * as path16 from "node:path";
20104
20123
  import { createRequire } from "node:module";
20105
20124
  import { execFileSync as execFileSync2 } from "node:child_process";
20106
20125
 
20107
20126
  // ../argent-installer/src/preflight.ts
20108
- import * as fs13 from "node:fs";
20109
- import * as path14 from "node:path";
20127
+ import * as fs14 from "node:fs";
20128
+ import * as path15 from "node:path";
20110
20129
  function hasProjectPackageJson(projectRoot) {
20111
- return fs13.existsSync(path14.join(projectRoot, "package.json"));
20130
+ return fs14.existsSync(path15.join(projectRoot, "package.json"));
20112
20131
  }
20113
20132
  function isYarnPnp(projectRoot) {
20114
- return fs13.existsSync(path14.join(projectRoot, ".pnp.cjs")) || fs13.existsSync(path14.join(projectRoot, ".pnp.loader.mjs"));
20133
+ return fs14.existsSync(path15.join(projectRoot, ".pnp.cjs")) || fs14.existsSync(path15.join(projectRoot, ".pnp.loader.mjs"));
20115
20134
  }
20116
20135
 
20117
20136
  // ../argent-installer/src/topology.ts
@@ -20137,12 +20156,12 @@ function isTempRunnerPath(binaryPath) {
20137
20156
  }
20138
20157
  function isProjectBinPath(binaryPath) {
20139
20158
  const norm = (p) => process.platform === "win32" ? p.toLowerCase() : canonicalPath(p);
20140
- const binDir = norm(path15.dirname(path15.resolve(binaryPath)));
20159
+ const binDir = norm(path16.dirname(path16.resolve(binaryPath)));
20141
20160
  const prefix = process.env.npm_config_local_prefix;
20142
- if (prefix && norm(path15.join(prefix, "node_modules", ".bin")) === binDir) return true;
20143
- for (let dir = path15.resolve(process.cwd()); ; dir = path15.dirname(dir)) {
20144
- if (norm(path15.join(dir, "node_modules", ".bin")) === binDir) return true;
20145
- if (path15.dirname(dir) === dir) return false;
20161
+ if (prefix && norm(path16.join(prefix, "node_modules", ".bin")) === binDir) return true;
20162
+ for (let dir = path16.resolve(process.cwd()); ; dir = path16.dirname(dir)) {
20163
+ if (norm(path16.join(dir, "node_modules", ".bin")) === binDir) return true;
20164
+ if (path16.dirname(dir) === dir) return false;
20146
20165
  }
20147
20166
  }
20148
20167
  function getPermanentBinaryPaths() {
@@ -20190,8 +20209,8 @@ function getGloballyInstalledPackageRoot() {
20190
20209
  }
20191
20210
  function readShimScript(binaryPath) {
20192
20211
  try {
20193
- if (fs14.statSync(binaryPath).size > 64 * 1024) return null;
20194
- return fs14.readFileSync(binaryPath, "utf8");
20212
+ if (fs15.statSync(binaryPath).size > 64 * 1024) return null;
20213
+ return fs15.readFileSync(binaryPath, "utf8");
20195
20214
  } catch {
20196
20215
  return null;
20197
20216
  }
@@ -20202,7 +20221,7 @@ function shimTargetOf(binaryPath) {
20202
20221
  const trailer = /^# cmd-shim-target=(.+)$/m.exec(shim);
20203
20222
  if (trailer) return trailer[1].trim();
20204
20223
  const relative5 = /"\$basedir(?:_abs)?"?\/'?([^"'\s]*node_modules\/[^"'\s]*)/.exec(shim);
20205
- return relative5 ? path15.resolve(canonicalPath(path15.dirname(binaryPath)), relative5[1]) : null;
20224
+ return relative5 ? path16.resolve(canonicalPath(path16.dirname(binaryPath)), relative5[1]) : null;
20206
20225
  }
20207
20226
  function globalPackageRootOf(binaryPath) {
20208
20227
  const root = packageRootOf(binaryPath);
@@ -20212,9 +20231,9 @@ function globalPackageRootOf(binaryPath) {
20212
20231
  }
20213
20232
  function packageRootOf(binaryPath) {
20214
20233
  try {
20215
- const realPath = fs14.realpathSync(binaryPath);
20216
- const root = resolvePackageRoot(path15.dirname(realPath));
20217
- const pkg = JSON.parse(fs14.readFileSync(path15.join(root, "package.json"), "utf8"));
20234
+ const realPath = fs15.realpathSync(binaryPath);
20235
+ const root = resolvePackageRoot(path16.dirname(realPath));
20236
+ const pkg = JSON.parse(fs15.readFileSync(path16.join(root, "package.json"), "utf8"));
20218
20237
  return pkg.name === PACKAGE_NAME ? root : null;
20219
20238
  } catch {
20220
20239
  return null;
@@ -20223,8 +20242,8 @@ function packageRootOf(binaryPath) {
20223
20242
  function cliPathOf(packageRoot) {
20224
20243
  const binSub = argentBinSubpath(packageRoot);
20225
20244
  if (!binSub) return null;
20226
- const cli = path15.join(packageRoot, binSub);
20227
- return fs14.existsSync(cli) ? cli : null;
20245
+ const cli = path16.join(packageRoot, binSub);
20246
+ return fs15.existsSync(cli) ? cli : null;
20228
20247
  }
20229
20248
  function getGloballyInstalledLaunchPaths() {
20230
20249
  if (process.platform === "win32") return null;
@@ -20234,8 +20253,8 @@ function getGloballyInstalledLaunchPaths() {
20234
20253
  const cli = packageRoot ? cliPathOf(packageRoot) : null;
20235
20254
  if (!cli) return null;
20236
20255
  try {
20237
- const node = path15.join(fs14.realpathSync(path15.dirname(binaryPath)), "node");
20238
- return fs14.existsSync(node) ? { node, cli } : null;
20256
+ const node = path16.join(fs15.realpathSync(path16.dirname(binaryPath)), "node");
20257
+ return fs15.existsSync(node) ? { node, cli } : null;
20239
20258
  } catch {
20240
20259
  return null;
20241
20260
  }
@@ -20244,7 +20263,7 @@ function getGloballyInstalledVersion() {
20244
20263
  const pkgRoot = getGloballyInstalledPackageRoot();
20245
20264
  if (!pkgRoot) return null;
20246
20265
  try {
20247
- const pkg = JSON.parse(fs14.readFileSync(path15.join(pkgRoot, "package.json"), "utf8"));
20266
+ const pkg = JSON.parse(fs15.readFileSync(path16.join(pkgRoot, "package.json"), "utf8"));
20248
20267
  return pkg.version ?? null;
20249
20268
  } catch {
20250
20269
  return null;
@@ -20253,7 +20272,7 @@ function getGloballyInstalledVersion() {
20253
20272
  function readManifestDeclaration(projectRoot) {
20254
20273
  try {
20255
20274
  const pkg = JSON.parse(
20256
- fs14.readFileSync(path15.join(projectRoot, "package.json"), "utf8")
20275
+ fs15.readFileSync(path16.join(projectRoot, "package.json"), "utf8")
20257
20276
  );
20258
20277
  const spec = pkg.devDependencies?.[PACKAGE_NAME] ?? pkg.dependencies?.[PACKAGE_NAME] ?? pkg.optionalDependencies?.[PACKAGE_NAME];
20259
20278
  return typeof spec === "string" ? spec : null;
@@ -20266,11 +20285,11 @@ function isDeclaredLocally(projectRoot) {
20266
20285
  }
20267
20286
  function resolveLocalArgentDir(projectRoot) {
20268
20287
  try {
20269
- const req = createRequire(path15.join(projectRoot, "package.json"));
20270
- return path15.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
20288
+ const req = createRequire(path16.join(projectRoot, "package.json"));
20289
+ return path16.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
20271
20290
  } catch {
20272
- const plain = path15.join(projectRoot, "node_modules", PACKAGE_NAME);
20273
- return fs14.existsSync(path15.join(plain, "package.json")) ? plain : null;
20291
+ const plain = path16.join(projectRoot, "node_modules", PACKAGE_NAME);
20292
+ return fs15.existsSync(path16.join(plain, "package.json")) ? plain : null;
20274
20293
  }
20275
20294
  }
20276
20295
  function probeLocalInstall(projectRoot) {
@@ -20278,7 +20297,7 @@ function probeLocalInstall(projectRoot) {
20278
20297
  if (packageDir) {
20279
20298
  let version;
20280
20299
  try {
20281
- const pkg = JSON.parse(fs14.readFileSync(path15.join(packageDir, "package.json"), "utf8"));
20300
+ const pkg = JSON.parse(fs15.readFileSync(path16.join(packageDir, "package.json"), "utf8"));
20282
20301
  version = pkg.version ?? null;
20283
20302
  } catch {
20284
20303
  version = null;
@@ -20301,8 +20320,8 @@ function getLocallyInstalledVersion(projectRoot) {
20301
20320
  }
20302
20321
  function readLocalPackageVersionUncached(projectRoot) {
20303
20322
  try {
20304
- const pkgPath = path15.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
20305
- const pkg = JSON.parse(fs14.readFileSync(pkgPath, "utf8"));
20323
+ const pkgPath = path16.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
20324
+ const pkg = JSON.parse(fs15.readFileSync(pkgPath, "utf8"));
20306
20325
  return pkg.version ?? null;
20307
20326
  } catch {
20308
20327
  return null;
@@ -20310,7 +20329,7 @@ function readLocalPackageVersionUncached(projectRoot) {
20310
20329
  }
20311
20330
  function argentBinSubpath(pkgDir) {
20312
20331
  try {
20313
- const pkg = JSON.parse(fs14.readFileSync(path15.join(pkgDir, "package.json"), "utf8"));
20332
+ const pkg = JSON.parse(fs15.readFileSync(path16.join(pkgDir, "package.json"), "utf8"));
20314
20333
  if (typeof pkg.bin === "string") return pkg.bin;
20315
20334
  if (pkg.bin && typeof pkg.bin === "object") {
20316
20335
  return pkg.bin[MCP_BINARY_NAME] ?? Object.values(pkg.bin)[0] ?? null;
@@ -20327,16 +20346,16 @@ function getLocalArgentBinRelPath(projectRoot) {
20327
20346
  if (!binSub) return null;
20328
20347
  let root = projectRoot;
20329
20348
  try {
20330
- root = fs14.realpathSync(projectRoot);
20349
+ root = fs15.realpathSync(projectRoot);
20331
20350
  } catch {
20332
20351
  }
20333
- const stableRel = path15.join("node_modules", PACKAGE_NAME, binSub);
20334
- if (fs14.existsSync(path15.join(root, stableRel))) {
20335
- return stableRel.split(path15.sep).join("/");
20352
+ const stableRel = path16.join("node_modules", PACKAGE_NAME, binSub);
20353
+ if (fs15.existsSync(path16.join(root, stableRel))) {
20354
+ return stableRel.split(path16.sep).join("/");
20336
20355
  }
20337
- const abs = path15.join(pkgDir, binSub);
20338
- if (!fs14.existsSync(abs)) return null;
20339
- return path15.relative(root, abs).split(path15.sep).join("/");
20356
+ const abs = path16.join(pkgDir, binSub);
20357
+ if (!fs15.existsSync(abs)) return null;
20358
+ return path16.relative(root, abs).split(path16.sep).join("/");
20340
20359
  }
20341
20360
 
20342
20361
  // ../argent-installer/src/package-manager.ts
@@ -20369,10 +20388,10 @@ function detectGlobalPackageManager() {
20369
20388
  return BUN_GLOBAL_ROOT.test(root) ? "bun" : lockfileOwnerOf(root) ?? "yarn";
20370
20389
  }
20371
20390
  if (process.platform === "win32") {
20372
- if (fs15.existsSync(path16.join(npmCopyBeside(path16.dirname(binaryPath)), "package.json"))) {
20391
+ if (fs16.existsSync(path17.join(npmCopyBeside(path17.dirname(binaryPath)), "package.json"))) {
20373
20392
  return "npm";
20374
20393
  }
20375
- if (fs15.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
20394
+ if (fs16.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
20376
20395
  }
20377
20396
  const shim = readShimScript(binaryPath);
20378
20397
  if (shim === null || !/node_modules[\\/]/.test(shim)) return "npm";
@@ -20381,23 +20400,23 @@ function detectGlobalPackageManager() {
20381
20400
  return (target ? lockfileOwnerOf(target) : null) ?? "yarn";
20382
20401
  }
20383
20402
  function lockfileOwnerOf(root) {
20384
- for (let dir = path16.dirname(root); path16.dirname(dir) !== dir; dir = path16.dirname(dir)) {
20403
+ for (let dir = path17.dirname(root); path17.dirname(dir) !== dir; dir = path17.dirname(dir)) {
20385
20404
  const pm = pmFromLockfile(dir);
20386
20405
  if (pm) return pm;
20387
20406
  }
20388
20407
  return null;
20389
20408
  }
20390
20409
  function npmCopyBeside(binDir) {
20391
- return process.platform === "win32" ? path16.join(binDir, "node_modules", PACKAGE_NAME) : path16.join(path16.dirname(binDir), "lib", "node_modules", PACKAGE_NAME);
20410
+ return process.platform === "win32" ? path17.join(binDir, "node_modules", PACKAGE_NAME) : path17.join(path17.dirname(binDir), "lib", "node_modules", PACKAGE_NAME);
20392
20411
  }
20393
20412
  function isInNpmLayout(binaryPath, root) {
20394
20413
  const realRoot = canonicalPath(root);
20395
20414
  let link = binaryPath;
20396
20415
  for (let hop = 0; hop < 40; hop++) {
20397
- const binDir = canonicalPath(path16.dirname(link));
20416
+ const binDir = canonicalPath(path17.dirname(link));
20398
20417
  if (canonicalPath(npmCopyBeside(binDir)) === realRoot) return true;
20399
20418
  try {
20400
- link = path16.resolve(binDir, fs15.readlinkSync(link));
20419
+ link = path17.resolve(binDir, fs16.readlinkSync(link));
20401
20420
  } catch {
20402
20421
  return false;
20403
20422
  }
@@ -20416,7 +20435,7 @@ function asKnownPm(name) {
20416
20435
  }
20417
20436
  function pmFromPackageManagerField(dir) {
20418
20437
  try {
20419
- const pkg = JSON.parse(fs15.readFileSync(path16.join(dir, "package.json"), "utf8"));
20438
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(dir, "package.json"), "utf8"));
20420
20439
  if (typeof pkg.packageManager === "string") {
20421
20440
  return asKnownPm(pkg.packageManager.split("@")[0]);
20422
20441
  }
@@ -20427,7 +20446,7 @@ function pmFromPackageManagerField(dir) {
20427
20446
  }
20428
20447
  function pmFromDevEngines(dir) {
20429
20448
  try {
20430
- const pkg = JSON.parse(fs15.readFileSync(path16.join(dir, "package.json"), "utf8"));
20449
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(dir, "package.json"), "utf8"));
20431
20450
  const devEnginesPm = pkg.devEngines?.packageManager;
20432
20451
  const names = /* @__PURE__ */ new Set();
20433
20452
  for (const entry of Array.isArray(devEnginesPm) ? devEnginesPm : [devEnginesPm]) {
@@ -20440,7 +20459,7 @@ function pmFromDevEngines(dir) {
20440
20459
  }
20441
20460
  }
20442
20461
  function pmFromLockfile(dir) {
20443
- const has = (file) => fs15.existsSync(path16.join(dir, file));
20462
+ const has = (file) => fs16.existsSync(path17.join(dir, file));
20444
20463
  if (has("pnpm-lock.yaml")) return "pnpm";
20445
20464
  if (has("yarn.lock")) return "yarn";
20446
20465
  if (has("bun.lock") || has("bun.lockb")) return "bun";
@@ -20448,15 +20467,15 @@ function pmFromLockfile(dir) {
20448
20467
  return null;
20449
20468
  }
20450
20469
  function pmFromWorkspaceMarker(dir) {
20451
- return fs15.existsSync(path16.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
20470
+ return fs16.existsSync(path17.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
20452
20471
  }
20453
20472
  function detectProjectPackageManager(projectRoot) {
20454
- let dir = path16.resolve(projectRoot);
20473
+ let dir = path17.resolve(projectRoot);
20455
20474
  for (; ; ) {
20456
20475
  const pm = pmFromPackageManagerField(dir) ?? pmFromLockfile(dir) ?? pmFromDevEngines(dir) ?? pmFromWorkspaceMarker(dir);
20457
20476
  if (pm) return pm;
20458
- if (fs15.existsSync(path16.join(dir, ".git"))) break;
20459
- const parent = path16.dirname(dir);
20477
+ if (fs16.existsSync(path17.join(dir, ".git"))) break;
20478
+ const parent = path17.dirname(dir);
20460
20479
  if (parent === dir) break;
20461
20480
  dir = parent;
20462
20481
  }
@@ -20477,7 +20496,7 @@ function globalInstallCommand(pm, pkg) {
20477
20496
  function globalCommandOptions(pm) {
20478
20497
  if (pm === "npm") return {};
20479
20498
  const home = os2.homedir();
20480
- const cwd = fs15.existsSync(home) ? { cwd: home } : {};
20499
+ const cwd = fs16.existsSync(home) ? { cwd: home } : {};
20481
20500
  if (pm !== "yarn" || !process.env.npm_config_user_agent?.startsWith("npm/")) return cwd;
20482
20501
  const { npm_config_prefix: _npmPrefix, ...env } = process.env;
20483
20502
  return { ...cwd, env };
@@ -20509,11 +20528,11 @@ function ownsGlobalInstall(pm, runningRoot) {
20509
20528
  localBuild = !isRegistrySpec(dependency?.version);
20510
20529
  } else {
20511
20530
  const dir = pm === "bun" ? /^([^\r\n]+) node_modules \(/.exec(output)?.[1] : output;
20512
- if (!dir || !path16.isAbsolute(dir)) return false;
20513
- pkg = pm === "npm" ? path16.join(dir, PACKAGE_NAME) : path16.join(dir, "node_modules", PACKAGE_NAME);
20514
- localBuild = fs15.lstatSync(pkg).isSymbolicLink();
20531
+ if (!dir || !path17.isAbsolute(dir)) return false;
20532
+ pkg = pm === "npm" ? path17.join(dir, PACKAGE_NAME) : path17.join(dir, "node_modules", PACKAGE_NAME);
20533
+ localBuild = fs16.lstatSync(pkg).isSymbolicLink();
20515
20534
  }
20516
- return !localBuild && !!pkg && path16.isAbsolute(pkg) && fs15.realpathSync(pkg) === runningRoot;
20535
+ return !localBuild && !!pkg && path17.isAbsolute(pkg) && fs16.realpathSync(pkg) === runningRoot;
20517
20536
  } catch {
20518
20537
  return false;
20519
20538
  }
@@ -20568,15 +20587,15 @@ function localUninstallCommand(pm, pkg) {
20568
20587
  }
20569
20588
 
20570
20589
  // ../argent-installer/src/install-record.ts
20571
- import * as fs16 from "node:fs";
20572
- import * as path17 from "node:path";
20590
+ import * as fs17 from "node:fs";
20591
+ import * as path18 from "node:path";
20573
20592
  function getInstallRecordPath(projectRoot) {
20574
- return path17.join(projectRoot, ".argent", "install.json");
20593
+ return path18.join(projectRoot, ".argent", "install.json");
20575
20594
  }
20576
20595
  function readInstallRecord(projectRoot) {
20577
20596
  try {
20578
20597
  const parsed = JSON.parse(
20579
- fs16.readFileSync(getInstallRecordPath(projectRoot), "utf8")
20598
+ fs17.readFileSync(getInstallRecordPath(projectRoot), "utf8")
20580
20599
  );
20581
20600
  if (parsed && (parsed.mode === "local" || parsed.mode === "global")) return parsed;
20582
20601
  return null;
@@ -20586,17 +20605,17 @@ function readInstallRecord(projectRoot) {
20586
20605
  }
20587
20606
  function writeInstallRecord(projectRoot, record) {
20588
20607
  const recordPath = getInstallRecordPath(projectRoot);
20589
- fs16.mkdirSync(path17.dirname(recordPath), { recursive: true });
20590
- fs16.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
20608
+ fs17.mkdirSync(path18.dirname(recordPath), { recursive: true });
20609
+ fs17.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
20591
20610
  }
20592
20611
  function removeInstallRecord(projectRoot) {
20593
20612
  const recordPath = getInstallRecordPath(projectRoot);
20594
20613
  try {
20595
- if (!fs16.existsSync(recordPath)) return false;
20596
- fs16.rmSync(recordPath, { force: true });
20597
- const dir = path17.dirname(recordPath);
20614
+ if (!fs17.existsSync(recordPath)) return false;
20615
+ fs17.rmSync(recordPath, { force: true });
20616
+ const dir = path18.dirname(recordPath);
20598
20617
  try {
20599
- if (fs16.existsSync(dir) && fs16.readdirSync(dir).length === 0) fs16.rmdirSync(dir);
20618
+ if (fs17.existsSync(dir) && fs17.readdirSync(dir).length === 0) fs17.rmdirSync(dir);
20600
20619
  } catch {
20601
20620
  }
20602
20621
  return true;
@@ -20624,9 +20643,9 @@ function resolveInstallModeFromFlags(opts) {
20624
20643
  // ../argent-installer/src/utils.ts
20625
20644
  var PACKAGE_ROOT = resolvePackageRoot(import.meta.dirname);
20626
20645
  function resolveBundledDir(dirName) {
20627
- const packagedDir = path18.join(PACKAGE_ROOT, dirName);
20628
- if (fs17.existsSync(packagedDir)) return packagedDir;
20629
- return path18.resolve(PACKAGE_ROOT, "..", "skills", dirName);
20646
+ const packagedDir = path19.join(PACKAGE_ROOT, dirName);
20647
+ if (fs18.existsSync(packagedDir)) return packagedDir;
20648
+ return path19.resolve(PACKAGE_ROOT, "..", "skills", dirName);
20630
20649
  }
20631
20650
  var SKILLS_DIR = resolveBundledDir("skills");
20632
20651
  var RULES_DIR = resolveBundledDir("rules");
@@ -20638,18 +20657,18 @@ function buildArgentSkillsSource(version) {
20638
20657
  }
20639
20658
  function listBundledSkills(skillsDir = SKILLS_DIR) {
20640
20659
  try {
20641
- return fs17.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs17.existsSync(path18.join(skillsDir, name, "SKILL.md"))).sort();
20660
+ return fs18.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs18.existsSync(path19.join(skillsDir, name, "SKILL.md"))).sort();
20642
20661
  } catch {
20643
20662
  return [];
20644
20663
  }
20645
20664
  }
20646
20665
  function getProjectSkillLockPath(cwd = process.cwd()) {
20647
- return path18.join(cwd, "skills-lock.json");
20666
+ return path19.join(cwd, "skills-lock.json");
20648
20667
  }
20649
20668
  function getGlobalSkillLockPath() {
20650
20669
  const xdgStateHome = process.env.XDG_STATE_HOME;
20651
- if (xdgStateHome) return path18.join(xdgStateHome, "skills", ".skill-lock.json");
20652
- return path18.join(os3.homedir(), ".agents", ".skill-lock.json");
20670
+ if (xdgStateHome) return path19.join(xdgStateHome, "skills", ".skill-lock.json");
20671
+ return path19.join(os3.homedir(), ".agents", ".skill-lock.json");
20653
20672
  }
20654
20673
  var ARGENT_SKILL_PREFIX = "argent-";
20655
20674
  var LEGACY_ARGENT_SKILL_NAMES = [
@@ -20755,7 +20774,7 @@ function hashBundledContent(content) {
20755
20774
  }
20756
20775
  function listArgentSkillsInLock(lockPath) {
20757
20776
  try {
20758
- const raw = fs17.readFileSync(lockPath, "utf8");
20777
+ const raw = fs18.readFileSync(lockPath, "utf8");
20759
20778
  const lock = JSON.parse(raw);
20760
20779
  const tracked = lock.skills ?? {};
20761
20780
  return Object.keys(tracked).filter((name) => name.startsWith(ARGENT_SKILL_PREFIX)).sort();
@@ -20779,20 +20798,20 @@ var PROJECT_ROOT_MARKERS = [
20779
20798
  "skills-lock.json"
20780
20799
  ];
20781
20800
  function resolveProjectRoot2(startDir, homeDir = os3.homedir()) {
20782
- const initialDir = path18.resolve(startDir);
20801
+ const initialDir = path19.resolve(startDir);
20783
20802
  const home = canonicalPath(homeDir);
20784
20803
  let currentDir = initialDir;
20785
20804
  while (true) {
20786
20805
  if (currentDir !== initialDir && canonicalPath(currentDir) === home) {
20787
20806
  return initialDir;
20788
20807
  }
20789
- if (PROJECT_ROOT_MARKERS.some((marker) => fs17.existsSync(path18.join(currentDir, marker)))) {
20808
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs18.existsSync(path19.join(currentDir, marker)))) {
20790
20809
  return currentDir;
20791
20810
  }
20792
- if (fs17.existsSync(path18.join(currentDir, ".git"))) {
20811
+ if (fs18.existsSync(path19.join(currentDir, ".git"))) {
20793
20812
  return currentDir;
20794
20813
  }
20795
- const parentDir = path18.dirname(currentDir);
20814
+ const parentDir = path19.dirname(currentDir);
20796
20815
  if (parentDir === currentDir) {
20797
20816
  return initialDir;
20798
20817
  }
@@ -20800,20 +20819,20 @@ function resolveProjectRoot2(startDir, homeDir = os3.homedir()) {
20800
20819
  }
20801
20820
  }
20802
20821
  function readToml(filePath) {
20803
- if (!fs17.existsSync(filePath)) return {};
20822
+ if (!fs18.existsSync(filePath)) return {};
20804
20823
  try {
20805
- return parse(fs17.readFileSync(filePath, "utf8"));
20824
+ return parse(fs18.readFileSync(filePath, "utf8"));
20806
20825
  } catch {
20807
20826
  return {};
20808
20827
  }
20809
20828
  }
20810
20829
  function writeToml(filePath, data) {
20811
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20812
- fs17.writeFileSync(filePath, stringify(data) + "\n");
20830
+ fs18.mkdirSync(path19.dirname(filePath), { recursive: true });
20831
+ fs18.writeFileSync(filePath, stringify(data) + "\n");
20813
20832
  }
20814
20833
  function readYaml(filePath) {
20815
- if (!fs17.existsSync(filePath)) return new import_yaml.Document({});
20816
- const text2 = fs17.readFileSync(filePath, "utf8");
20834
+ if (!fs18.existsSync(filePath)) return new import_yaml.Document({});
20835
+ const text2 = fs18.readFileSync(filePath, "utf8");
20817
20836
  const doc = (0, import_yaml.parseDocument)(text2);
20818
20837
  if (doc.errors.length > 0) {
20819
20838
  const messages = doc.errors.map((e) => e.message).join("; ");
@@ -20822,20 +20841,20 @@ function readYaml(filePath) {
20822
20841
  return doc;
20823
20842
  }
20824
20843
  function writeYaml(filePath, doc) {
20825
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20826
- fs17.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20844
+ fs18.mkdirSync(path19.dirname(filePath), { recursive: true });
20845
+ fs18.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20827
20846
  }
20828
20847
  function readJson(filePath) {
20829
- if (!fs17.existsSync(filePath)) return {};
20848
+ if (!fs18.existsSync(filePath)) return {};
20830
20849
  try {
20831
- return JSON.parse(fs17.readFileSync(filePath, "utf8"));
20850
+ return JSON.parse(fs18.readFileSync(filePath, "utf8"));
20832
20851
  } catch {
20833
20852
  return {};
20834
20853
  }
20835
20854
  }
20836
20855
  function writeJson(filePath, data) {
20837
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20838
- fs17.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20856
+ fs18.mkdirSync(path19.dirname(filePath), { recursive: true });
20857
+ fs18.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20839
20858
  }
20840
20859
  var JSONC_FORMATTING = { tabSize: 2, insertSpaces: true };
20841
20860
  function setJsoncIn(text2, jsonPath, value) {
@@ -20843,8 +20862,8 @@ function setJsoncIn(text2, jsonPath, value) {
20843
20862
  return applyEdits(text2, edits);
20844
20863
  }
20845
20864
  function readJsoncFileRaw(filePath) {
20846
- if (!fs17.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20847
- let text2 = fs17.readFileSync(filePath, "utf8");
20865
+ if (!fs18.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20866
+ let text2 = fs18.readFileSync(filePath, "utf8");
20848
20867
  const hadBom = text2.charCodeAt(0) === 65279;
20849
20868
  if (hadBom) text2 = text2.slice(1);
20850
20869
  const wasEmpty = text2.trim() === "";
@@ -20863,26 +20882,26 @@ function isEmptyPlainObject(value) {
20863
20882
  return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0;
20864
20883
  }
20865
20884
  function removePath(targetPath) {
20866
- const entry = fs17.lstatSync(targetPath, { throwIfNoEntry: false });
20885
+ const entry = fs18.lstatSync(targetPath, { throwIfNoEntry: false });
20867
20886
  if (!entry) return false;
20868
- if (entry.isSymbolicLink()) fs17.unlinkSync(targetPath);
20869
- else fs17.rmSync(targetPath, { recursive: entry.isDirectory(), force: true });
20887
+ if (entry.isSymbolicLink()) fs18.unlinkSync(targetPath);
20888
+ else fs18.rmSync(targetPath, { recursive: entry.isDirectory(), force: true });
20870
20889
  return true;
20871
20890
  }
20872
20891
  function rmEmptyDir(dirPath) {
20873
20892
  try {
20874
- if (!fs17.existsSync(dirPath)) return false;
20875
- if (!fs17.statSync(dirPath).isDirectory()) return false;
20876
- if (fs17.readdirSync(dirPath).length > 0) return false;
20877
- fs17.rmdirSync(dirPath);
20893
+ if (!fs18.existsSync(dirPath)) return false;
20894
+ if (!fs18.statSync(dirPath).isDirectory()) return false;
20895
+ if (fs18.readdirSync(dirPath).length > 0) return false;
20896
+ fs18.rmdirSync(dirPath);
20878
20897
  return true;
20879
20898
  } catch {
20880
20899
  return false;
20881
20900
  }
20882
20901
  }
20883
20902
  function readJsonc(filePath) {
20884
- if (!fs17.existsSync(filePath)) return {};
20885
- let raw = fs17.readFileSync(filePath, "utf8");
20903
+ if (!fs18.existsSync(filePath)) return {};
20904
+ let raw = fs18.readFileSync(filePath, "utf8");
20886
20905
  if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
20887
20906
  if (raw.trim() === "") return {};
20888
20907
  const parsed = parse3(raw, [], { allowTrailingComma: true });
@@ -20903,7 +20922,7 @@ function yamlSyntaxErrorLine(raw) {
20903
20922
  function findConfigSyntaxErrorLine(filePath, jsonOptions) {
20904
20923
  let raw;
20905
20924
  try {
20906
- raw = fs17.readFileSync(filePath, "utf8");
20925
+ raw = fs18.readFileSync(filePath, "utf8");
20907
20926
  } catch {
20908
20927
  return null;
20909
20928
  }
@@ -20929,18 +20948,18 @@ function editJsoncFile(filePath, jsonPath, value) {
20929
20948
  }
20930
20949
  const parsed = parse3(text2, [], { allowTrailingComma: true });
20931
20950
  if (isEmptyPlainObject(parsed)) {
20932
- fs17.rmSync(filePath, { force: true });
20933
- rmEmptyDir(path18.dirname(filePath));
20951
+ fs18.rmSync(filePath, { force: true });
20952
+ rmEmptyDir(path19.dirname(filePath));
20934
20953
  return;
20935
20954
  }
20936
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20955
+ fs18.mkdirSync(path19.dirname(filePath), { recursive: true });
20937
20956
  const out = wasEmpty && !text2.endsWith("\n") ? text2 + "\n" : text2;
20938
- fs17.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20957
+ fs18.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20939
20958
  }
20940
20959
  var MAX_SYMLINK_HOPS = 40;
20941
20960
  function realpathOrSelf(p) {
20942
20961
  try {
20943
- return fs17.realpathSync(p);
20962
+ return fs18.realpathSync(p);
20944
20963
  } catch {
20945
20964
  return p;
20946
20965
  }
@@ -20950,13 +20969,13 @@ function resolveLinkedDestination(dest) {
20950
20969
  for (let hop = 0; hop < MAX_SYMLINK_HOPS; hop++) {
20951
20970
  let entry;
20952
20971
  try {
20953
- entry = fs17.lstatSync(current);
20972
+ entry = fs18.lstatSync(current);
20954
20973
  } catch {
20955
- return current === dest || dirExists(path18.dirname(current)) ? current : dest;
20974
+ return current === dest || dirExists(path19.dirname(current)) ? current : dest;
20956
20975
  }
20957
20976
  if (!entry.isSymbolicLink()) return current;
20958
20977
  try {
20959
- current = path18.resolve(realpathOrSelf(path18.dirname(current)), fs17.readlinkSync(current));
20978
+ current = path19.resolve(realpathOrSelf(path19.dirname(current)), fs18.readlinkSync(current));
20960
20979
  } catch {
20961
20980
  return dest;
20962
20981
  }
@@ -20964,30 +20983,30 @@ function resolveLinkedDestination(dest) {
20964
20983
  return dest;
20965
20984
  }
20966
20985
  function copyDir(src, dest) {
20967
- if (!fs17.existsSync(src) || !treeHasFiles(src)) return null;
20986
+ if (!fs18.existsSync(src) || !treeHasFiles(src)) return null;
20968
20987
  const target = resolveLinkedDestination(dest);
20969
20988
  copyTree(src, target);
20970
20989
  return target;
20971
20990
  }
20972
20991
  function treeHasFiles(dir) {
20973
- return fs17.readdirSync(dir, { withFileTypes: true }).some((entry) => !entry.isDirectory() || treeHasFiles(path18.join(dir, entry.name)));
20992
+ return fs18.readdirSync(dir, { withFileTypes: true }).some((entry) => !entry.isDirectory() || treeHasFiles(path19.join(dir, entry.name)));
20974
20993
  }
20975
20994
  function copyTree(src, dest) {
20976
- const entries = fs17.readdirSync(src, { withFileTypes: true });
20977
- fs17.mkdirSync(dest, { recursive: true });
20995
+ const entries = fs18.readdirSync(src, { withFileTypes: true });
20996
+ fs18.mkdirSync(dest, { recursive: true });
20978
20997
  for (const entry of entries) {
20979
- const from = path18.join(src, entry.name);
20980
- const to = resolveLinkedDestination(path18.join(dest, entry.name));
20998
+ const from = path19.join(src, entry.name);
20999
+ const to = resolveLinkedDestination(path19.join(dest, entry.name));
20981
21000
  if (entry.isDirectory()) copyTree(from, to);
20982
- else fs17.copyFileSync(from, to);
21001
+ else fs18.copyFileSync(from, to);
20983
21002
  }
20984
21003
  }
20985
21004
  function readRetiredFile(targetDir, relativePath) {
20986
- const entryPath = path18.join(resolveLinkedDestination(targetDir), ...relativePath.split("/"));
21005
+ const entryPath = path19.join(resolveLinkedDestination(targetDir), ...relativePath.split("/"));
20987
21006
  const file = resolveLinkedDestination(entryPath);
20988
21007
  try {
20989
- if (!fs17.statSync(file, { throwIfNoEntry: false })?.isFile()) return null;
20990
- return fs17.readFileSync(file, "utf8");
21008
+ if (!fs18.statSync(file, { throwIfNoEntry: false })?.isFile()) return null;
21009
+ return fs18.readFileSync(file, "utf8");
20991
21010
  } catch {
20992
21011
  return null;
20993
21012
  }
@@ -20995,7 +21014,7 @@ function readRetiredFile(targetDir, relativePath) {
20995
21014
  function findRetiredFiles(retired, bundleDir, targetDir) {
20996
21015
  const found = [];
20997
21016
  for (const { path: relativePath, shipped } of retired) {
20998
- if (bundleDir !== null && fs17.existsSync(path18.join(bundleDir, ...relativePath.split("/"))))
21017
+ if (bundleDir !== null && fs18.existsSync(path19.join(bundleDir, ...relativePath.split("/"))))
20999
21018
  continue;
21000
21019
  const content = readRetiredFile(targetDir, relativePath);
21001
21020
  if (content === null) continue;
@@ -21011,17 +21030,17 @@ function removeRetiredFiles(targetDir, files) {
21011
21030
  const content = readRetiredFile(targetDir, relativePath);
21012
21031
  if (content === null || hashBundledContent(content) !== sha256) continue;
21013
21032
  const segments = relativePath.split("/");
21014
- const entryPath = path18.join(dir, ...segments);
21033
+ const entryPath = path19.join(dir, ...segments);
21015
21034
  const file = resolveLinkedDestination(entryPath);
21016
21035
  try {
21017
- fs17.rmSync(file);
21036
+ fs18.rmSync(file);
21018
21037
  if (file !== entryPath) removePath(entryPath);
21019
21038
  removedPaths.push(relativePath);
21020
21039
  } catch {
21021
21040
  continue;
21022
21041
  }
21023
21042
  for (let depth = segments.length - 1; depth > 0; depth--) {
21024
- if (!rmEmptyDir(path18.join(dir, ...segments.slice(0, depth)))) break;
21043
+ if (!rmEmptyDir(path19.join(dir, ...segments.slice(0, depth)))) break;
21025
21044
  }
21026
21045
  }
21027
21046
  const removedRoot = removedPaths.length > 0 && dir === targetDir && rmEmptyDir(dir);
@@ -21029,15 +21048,15 @@ function removeRetiredFiles(targetDir, files) {
21029
21048
  }
21030
21049
  function dirExists(p) {
21031
21050
  try {
21032
- return fs17.statSync(p).isDirectory();
21051
+ return fs18.statSync(p).isDirectory();
21033
21052
  } catch {
21034
21053
  return false;
21035
21054
  }
21036
21055
  }
21037
21056
  function getInstalledVersion() {
21038
21057
  try {
21039
- const pkgPath = path18.join(PACKAGE_ROOT, "package.json");
21040
- const pkg = JSON.parse(fs17.readFileSync(pkgPath, "utf8"));
21058
+ const pkgPath = path19.join(PACKAGE_ROOT, "package.json");
21059
+ const pkg = JSON.parse(fs18.readFileSync(pkgPath, "utf8"));
21041
21060
  return pkg.version ?? null;
21042
21061
  } catch {
21043
21062
  return null;
@@ -21082,12 +21101,12 @@ async function isOnline(timeoutMs = PROBE_TIMEOUT_MS) {
21082
21101
  } catch {
21083
21102
  return false;
21084
21103
  }
21085
- return new Promise((resolve21) => {
21086
- const timer = setTimeout(() => resolve21(false), timeoutMs);
21104
+ return new Promise((resolve22) => {
21105
+ const timer = setTimeout(() => resolve22(false), timeoutMs);
21087
21106
  timer.unref();
21088
21107
  dns.lookup(host, (err) => {
21089
21108
  clearTimeout(timer);
21090
- resolve21(!err);
21109
+ resolve22(!err);
21091
21110
  });
21092
21111
  });
21093
21112
  }
@@ -21104,7 +21123,7 @@ function escapeStringRegexp(string) {
21104
21123
  }
21105
21124
 
21106
21125
  // ../argent-installer/src/mcp-configs.ts
21107
- var TOOL_SERVER_BUNDLE = path19.join(import.meta.dirname, "tool-server.cjs");
21126
+ var TOOL_SERVER_BUNDLE = path20.join(import.meta.dirname, "tool-server.cjs");
21108
21127
  function getAvailableToolIds() {
21109
21128
  const out = execFileSync5("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
21110
21129
  const tools = JSON.parse(out);
@@ -21167,10 +21186,10 @@ function hasCustomizingEnv(entry) {
21167
21186
  }
21168
21187
  function removeDirIfEmpty(dirPath) {
21169
21188
  try {
21170
- if (!fs18.existsSync(dirPath)) return;
21171
- if (!fs18.statSync(dirPath).isDirectory()) return;
21172
- if (fs18.readdirSync(dirPath).length > 0) return;
21173
- fs18.rmdirSync(dirPath);
21189
+ if (!fs19.existsSync(dirPath)) return;
21190
+ if (!fs19.statSync(dirPath).isDirectory()) return;
21191
+ if (fs19.readdirSync(dirPath).length > 0) return;
21192
+ fs19.rmdirSync(dirPath);
21174
21193
  } catch {
21175
21194
  }
21176
21195
  }
@@ -21208,7 +21227,7 @@ function isArgentManagedEntry(entry) {
21208
21227
  return args.length === 1 && args[0] === "mcp";
21209
21228
  case "node": {
21210
21229
  if (args.length !== 2 || args[1] !== "mcp" || !args[0]) return false;
21211
- if (path19.isAbsolute(args[0])) return false;
21230
+ if (path20.isAbsolute(args[0])) return false;
21212
21231
  const normalized = args[0].split("\\").join("/");
21213
21232
  return normalized.includes(`node_modules/${PACKAGE_NAME}/`);
21214
21233
  }
@@ -21222,12 +21241,12 @@ function isArgentManagedEntry(entry) {
21222
21241
  }
21223
21242
  function isPinnedGlobalEntry(entry) {
21224
21243
  const [cli, subcommand] = entry.args;
21225
- return path19.isAbsolute(entry.command) && path19.basename(entry.command) === "node" && entry.args.length === 2 && subcommand === "mcp" && path19.isAbsolute(cli) && cli.includes(`/node_modules/${PACKAGE_NAME}/`);
21244
+ return path20.isAbsolute(entry.command) && path20.basename(entry.command) === "node" && entry.args.length === 2 && subcommand === "mcp" && path20.isAbsolute(cli) && cli.includes(`/node_modules/${PACKAGE_NAME}/`);
21226
21245
  }
21227
21246
  function writeTomlOrRemove(filePath, data) {
21228
21247
  if (Object.keys(data).length === 0) {
21229
- fs18.rmSync(filePath, { force: true });
21230
- removeDirIfEmpty(path19.dirname(filePath));
21248
+ fs19.rmSync(filePath, { force: true });
21249
+ removeDirIfEmpty(path20.dirname(filePath));
21231
21250
  return;
21232
21251
  }
21233
21252
  writeToml(filePath, data);
@@ -21236,12 +21255,12 @@ function dirHasEditorEvidence(dir, looksArgentOnly) {
21236
21255
  return dirExists(dir) && !looksArgentOnly(dir);
21237
21256
  }
21238
21257
  function fileHasEditorEvidence(filePath, looksArgentOnly) {
21239
- return fs18.existsSync(filePath) && !looksArgentOnly(filePath);
21258
+ return fs19.existsSync(filePath) && !looksArgentOnly(filePath);
21240
21259
  }
21241
21260
  function parseJsoncStrict(filePath) {
21242
21261
  let raw;
21243
21262
  try {
21244
- raw = fs18.readFileSync(filePath, "utf8");
21263
+ raw = fs19.readFileSync(filePath, "utf8");
21245
21264
  } catch {
21246
21265
  return null;
21247
21266
  }
@@ -21254,14 +21273,14 @@ function parseJsoncStrict(filePath) {
21254
21273
  }
21255
21274
  function parseTomlStrict(filePath) {
21256
21275
  try {
21257
- return parse(fs18.readFileSync(filePath, "utf8"));
21276
+ return parse(fs19.readFileSync(filePath, "utf8"));
21258
21277
  } catch {
21259
21278
  return null;
21260
21279
  }
21261
21280
  }
21262
21281
  function parseYamlStrict(filePath) {
21263
21282
  try {
21264
- const parsed = (0, import_yaml2.parse)(fs18.readFileSync(filePath, "utf8"));
21283
+ const parsed = (0, import_yaml2.parse)(fs19.readFileSync(filePath, "utf8"));
21265
21284
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return null;
21266
21285
  return parsed;
21267
21286
  } catch {
@@ -21284,7 +21303,7 @@ function bundledManagedNames(kind) {
21284
21303
  if (cached2) return cached2;
21285
21304
  let names;
21286
21305
  try {
21287
- names = new Set(fs18.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
21306
+ names = new Set(fs19.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
21288
21307
  } catch {
21289
21308
  names = /* @__PURE__ */ new Set();
21290
21309
  }
@@ -21295,7 +21314,7 @@ function bundledManagedNames(kind) {
21295
21314
  function managedDirLooksArgentOnly(dir, kind) {
21296
21315
  let entries;
21297
21316
  try {
21298
- entries = fs18.readdirSync(dir);
21317
+ entries = fs19.readdirSync(dir);
21299
21318
  } catch {
21300
21319
  return false;
21301
21320
  }
@@ -21307,13 +21326,13 @@ function managedDirLooksArgentOnly(dir, kind) {
21307
21326
  function cursorDirLooksArgentOnly(dir) {
21308
21327
  let entries;
21309
21328
  try {
21310
- entries = fs18.readdirSync(dir);
21329
+ entries = fs19.readdirSync(dir);
21311
21330
  } catch {
21312
21331
  return false;
21313
21332
  }
21314
21333
  if (entries.length === 0) return false;
21315
21334
  return entries.every((entry) => {
21316
- const full = path19.join(dir, entry);
21335
+ const full = path20.join(dir, entry);
21317
21336
  if (entry === "mcp.json") {
21318
21337
  return jsonLooksArgentServerOnly(full, "mcpServers");
21319
21338
  }
@@ -21346,13 +21365,13 @@ function claudeSettingsLooksArgentOnly(filePath) {
21346
21365
  function claudeDirLooksArgentOnly(dir) {
21347
21366
  let entries;
21348
21367
  try {
21349
- entries = fs18.readdirSync(dir);
21368
+ entries = fs19.readdirSync(dir);
21350
21369
  } catch {
21351
21370
  return false;
21352
21371
  }
21353
21372
  if (entries.length === 0) return false;
21354
21373
  return entries.every((entry) => {
21355
- const full = path19.join(dir, entry);
21374
+ const full = path20.join(dir, entry);
21356
21375
  if (entry === "settings.json") return claudeSettingsLooksArgentOnly(full);
21357
21376
  if (entry === "rules" || entry === "agents" || entry === "skills") {
21358
21377
  return managedDirLooksArgentOnly(full, entry);
@@ -21363,25 +21382,25 @@ function claudeDirLooksArgentOnly(dir) {
21363
21382
  function vscodeDirLooksArgentOnly(dir) {
21364
21383
  let entries;
21365
21384
  try {
21366
- entries = fs18.readdirSync(dir);
21385
+ entries = fs19.readdirSync(dir);
21367
21386
  } catch {
21368
21387
  return false;
21369
21388
  }
21370
21389
  if (entries.length === 0) return false;
21371
21390
  return entries.every(
21372
- (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path19.join(dir, entry), "servers")
21391
+ (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path20.join(dir, entry), "servers")
21373
21392
  );
21374
21393
  }
21375
21394
  function windsurfDirLooksArgentOnly(dir) {
21376
21395
  let entries;
21377
21396
  try {
21378
- entries = fs18.readdirSync(dir);
21397
+ entries = fs19.readdirSync(dir);
21379
21398
  } catch {
21380
21399
  return false;
21381
21400
  }
21382
21401
  if (entries.length === 0) return false;
21383
21402
  return entries.every(
21384
- (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path19.join(dir, entry), "mcpServers")
21403
+ (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path20.join(dir, entry), "mcpServers")
21385
21404
  );
21386
21405
  }
21387
21406
  function zedSettingsLooksArgentOnly(filePath) {
@@ -21412,25 +21431,25 @@ function zedSettingsLooksArgentOnly(filePath) {
21412
21431
  function zedDirLooksArgentOnly(dir) {
21413
21432
  let entries;
21414
21433
  try {
21415
- entries = fs18.readdirSync(dir);
21434
+ entries = fs19.readdirSync(dir);
21416
21435
  } catch {
21417
21436
  return false;
21418
21437
  }
21419
21438
  if (entries.length === 0) return false;
21420
21439
  return entries.every(
21421
- (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path19.join(dir, entry))
21440
+ (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path20.join(dir, entry))
21422
21441
  );
21423
21442
  }
21424
21443
  function geminiDirLooksArgentOnly(dir) {
21425
21444
  let entries;
21426
21445
  try {
21427
- entries = fs18.readdirSync(dir);
21446
+ entries = fs19.readdirSync(dir);
21428
21447
  } catch {
21429
21448
  return false;
21430
21449
  }
21431
21450
  if (entries.length === 0) return false;
21432
21451
  return entries.every((entry) => {
21433
- const full = path19.join(dir, entry);
21452
+ const full = path20.join(dir, entry);
21434
21453
  if (entry === "settings.json") return jsonLooksArgentServerOnly(full, "mcpServers");
21435
21454
  if (entry === "rules" || entry === "agents") return managedDirLooksArgentOnly(full, entry);
21436
21455
  return false;
@@ -21449,48 +21468,48 @@ function hermesConfigLooksArgentOnly(filePath) {
21449
21468
  function hermesDirLooksArgentOnly(dir) {
21450
21469
  let entries;
21451
21470
  try {
21452
- entries = fs18.readdirSync(dir);
21471
+ entries = fs19.readdirSync(dir);
21453
21472
  } catch {
21454
21473
  return false;
21455
21474
  }
21456
21475
  if (entries.length === 0) return false;
21457
21476
  return entries.every(
21458
- (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path19.join(dir, entry))
21477
+ (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path20.join(dir, entry))
21459
21478
  );
21460
21479
  }
21461
21480
  function kiroDirLooksArgentOnly(dir) {
21462
21481
  let entries;
21463
21482
  try {
21464
- entries = fs18.readdirSync(dir);
21483
+ entries = fs19.readdirSync(dir);
21465
21484
  } catch {
21466
21485
  return false;
21467
21486
  }
21468
21487
  if (entries.length === 0) return false;
21469
21488
  return entries.every((entry) => {
21470
21489
  if (entry !== "settings") return false;
21471
- const settingsDir = path19.join(dir, entry);
21490
+ const settingsDir = path20.join(dir, entry);
21472
21491
  let settingsEntries;
21473
21492
  try {
21474
- settingsEntries = fs18.readdirSync(settingsDir);
21493
+ settingsEntries = fs19.readdirSync(settingsDir);
21475
21494
  } catch {
21476
21495
  return false;
21477
21496
  }
21478
21497
  if (settingsEntries.length === 0) return false;
21479
21498
  return settingsEntries.every(
21480
- (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path19.join(settingsDir, name), "mcpServers")
21499
+ (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path20.join(settingsDir, name), "mcpServers")
21481
21500
  );
21482
21501
  });
21483
21502
  }
21484
21503
  function codexDirLooksArgentOnly(dir) {
21485
21504
  let entries;
21486
21505
  try {
21487
- entries = fs18.readdirSync(dir);
21506
+ entries = fs19.readdirSync(dir);
21488
21507
  } catch {
21489
21508
  return false;
21490
21509
  }
21491
21510
  if (entries.length === 0) return false;
21492
21511
  return entries.every((entry) => {
21493
- const full = path19.join(dir, entry);
21512
+ const full = path20.join(dir, entry);
21494
21513
  if (entry === "config.toml") {
21495
21514
  const config = parseTomlStrict(full);
21496
21515
  if (config === null) return false;
@@ -21515,7 +21534,7 @@ function codexDirLooksArgentOnly(dir) {
21515
21534
  });
21516
21535
  }
21517
21536
  function cursorPermissionsPath() {
21518
- return path19.join(homedir5(), ".cursor", "permissions.json");
21537
+ return path20.join(homedir4(), ".cursor", "permissions.json");
21519
21538
  }
21520
21539
  function cursorPermissionsList() {
21521
21540
  const list = readJsonc(cursorPermissionsPath()).mcpAllowlist;
@@ -21524,13 +21543,13 @@ function cursorPermissionsList() {
21524
21543
  var cursorAdapter = {
21525
21544
  name: "Cursor",
21526
21545
  detect() {
21527
- return dirHasEditorEvidence(path19.join(homedir5(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
21546
+ return dirHasEditorEvidence(path20.join(homedir4(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path20.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
21528
21547
  },
21529
21548
  projectPath(root) {
21530
- return path19.join(root, ".cursor", "mcp.json");
21549
+ return path20.join(root, ".cursor", "mcp.json");
21531
21550
  },
21532
21551
  globalPath() {
21533
- return path19.join(homedir5(), ".cursor", "mcp.json");
21552
+ return path20.join(homedir4(), ".cursor", "mcp.json");
21534
21553
  },
21535
21554
  // Read and written as JSONC through readJsonc / editJsoncFile: path-targeted
21536
21555
  // text edits that preserve user comments and foreign servers.
@@ -21542,7 +21561,7 @@ var cursorAdapter = {
21542
21561
  });
21543
21562
  },
21544
21563
  remove(configPath) {
21545
- if (!fs18.existsSync(configPath)) return false;
21564
+ if (!fs19.existsSync(configPath)) return false;
21546
21565
  const config = readJsonc(configPath);
21547
21566
  const servers = config.mcpServers;
21548
21567
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21550,7 +21569,7 @@ var cursorAdapter = {
21550
21569
  return true;
21551
21570
  },
21552
21571
  getArgentEntry(configPath) {
21553
- if (!fs18.existsSync(configPath)) return null;
21572
+ if (!fs19.existsSync(configPath)) return null;
21554
21573
  const config = readJsonc(configPath);
21555
21574
  const servers = config.mcpServers;
21556
21575
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21575,7 +21594,7 @@ var cursorAdapter = {
21575
21594
  removeAllowlist(_root, scope) {
21576
21595
  if (scope !== "global") return;
21577
21596
  const permPath = cursorPermissionsPath();
21578
- if (!fs18.existsSync(permPath)) return;
21597
+ if (!fs19.existsSync(permPath)) return;
21579
21598
  const config = readJsonc(permPath);
21580
21599
  const list = Array.isArray(config.mcpAllowlist) ? config.mcpAllowlist : void 0;
21581
21600
  if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
@@ -21588,7 +21607,7 @@ function claudeProjectKeysForRoot(projects, root) {
21588
21607
  return Object.keys(projects).filter((key) => key === root || canonicalPath(key) === target);
21589
21608
  }
21590
21609
  function claudeDisabledListFinding(settingsPath, label, projectConfined) {
21591
- if (!fs18.existsSync(settingsPath)) return null;
21610
+ if (!fs19.existsSync(settingsPath)) return null;
21592
21611
  const disabled = readJson(settingsPath).disabledMcpjsonServers;
21593
21612
  if (!Array.isArray(disabled) || !disabled.includes(MCP_SERVER_KEY)) return null;
21594
21613
  return {
@@ -21616,13 +21635,13 @@ var claudeAdapter = {
21616
21635
  name: "Claude Code",
21617
21636
  detect() {
21618
21637
  const mcpJsonArgentOnly = (p) => jsonLooksArgentServerOnly(p, "mcpServers");
21619
- return fileHasEditorEvidence(path19.join(process.cwd(), ".mcp.json"), mcpJsonArgentOnly) || fileHasEditorEvidence(path19.join(homedir5(), ".claude.json"), mcpJsonArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".claude"), claudeDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(homedir5(), ".claude"), claudeDirLooksArgentOnly);
21638
+ return fileHasEditorEvidence(path20.join(process.cwd(), ".mcp.json"), mcpJsonArgentOnly) || fileHasEditorEvidence(path20.join(homedir4(), ".claude.json"), mcpJsonArgentOnly) || dirHasEditorEvidence(path20.join(process.cwd(), ".claude"), claudeDirLooksArgentOnly) || dirHasEditorEvidence(path20.join(homedir4(), ".claude"), claudeDirLooksArgentOnly);
21620
21639
  },
21621
21640
  projectPath(root) {
21622
- return path19.join(root, ".mcp.json");
21641
+ return path20.join(root, ".mcp.json");
21623
21642
  },
21624
21643
  globalPath() {
21625
- return path19.join(homedir5(), ".claude.json");
21644
+ return path20.join(homedir4(), ".claude.json");
21626
21645
  },
21627
21646
  // JSONC is a superset of JSON, so this config shares the one comment- and
21628
21647
  // foreign-server-preserving write path (see the Cursor adapter).
@@ -21635,7 +21654,7 @@ var claudeAdapter = {
21635
21654
  });
21636
21655
  },
21637
21656
  remove(configPath) {
21638
- if (!fs18.existsSync(configPath)) return false;
21657
+ if (!fs19.existsSync(configPath)) return false;
21639
21658
  const config = readJsonc(configPath);
21640
21659
  const servers = config.mcpServers;
21641
21660
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21649,7 +21668,7 @@ var claudeAdapter = {
21649
21668
  return true;
21650
21669
  },
21651
21670
  getArgentEntry(configPath) {
21652
- if (!fs18.existsSync(configPath)) return null;
21671
+ if (!fs19.existsSync(configPath)) return null;
21653
21672
  const config = readJsonc(configPath);
21654
21673
  const servers = config.mcpServers;
21655
21674
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21662,7 +21681,7 @@ var claudeAdapter = {
21662
21681
  // .mcp.json rejections (see claudeDisabledListFinding).
21663
21682
  findShadowingConfigs(root, writtenScope) {
21664
21683
  const findings = [];
21665
- const claudeJsonPath = path19.join(homedir5(), ".claude.json");
21684
+ const claudeJsonPath = path20.join(homedir4(), ".claude.json");
21666
21685
  const projects = readJson(claudeJsonPath).projects;
21667
21686
  if (isRecord(projects)) {
21668
21687
  for (const key of claudeProjectKeysForRoot(projects, root)) {
@@ -21699,9 +21718,9 @@ var claudeAdapter = {
21699
21718
  }
21700
21719
  if (writtenScope === "local") {
21701
21720
  const candidates = [
21702
- [path19.join(root, ".claude", "settings.json"), ".claude/settings.json", true],
21703
- [path19.join(root, ".claude", "settings.local.json"), ".claude/settings.local.json", true],
21704
- [path19.join(homedir5(), ".claude", "settings.json"), "~/.claude/settings.json", false]
21721
+ [path20.join(root, ".claude", "settings.json"), ".claude/settings.json", true],
21722
+ [path20.join(root, ".claude", "settings.local.json"), ".claude/settings.local.json", true],
21723
+ [path20.join(homedir4(), ".claude", "settings.json"), "~/.claude/settings.json", false]
21705
21724
  ];
21706
21725
  for (const [settingsPath, label, projectConfined] of candidates) {
21707
21726
  const finding = claudeDisabledListFinding(settingsPath, label, projectConfined);
@@ -21720,10 +21739,10 @@ var claudeAdapter = {
21720
21739
  var vscodeAdapter = {
21721
21740
  name: "VS Code",
21722
21741
  detect() {
21723
- return dirHasEditorEvidence(path19.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path19.join(homedir5(), ".vscode"));
21742
+ return dirHasEditorEvidence(path20.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path20.join(homedir4(), ".vscode"));
21724
21743
  },
21725
21744
  projectPath(root) {
21726
- return path19.join(root, ".vscode", "mcp.json");
21745
+ return path20.join(root, ".vscode", "mcp.json");
21727
21746
  },
21728
21747
  globalPath() {
21729
21748
  return null;
@@ -21739,7 +21758,7 @@ var vscodeAdapter = {
21739
21758
  });
21740
21759
  },
21741
21760
  remove(configPath) {
21742
- if (!fs18.existsSync(configPath)) return false;
21761
+ if (!fs19.existsSync(configPath)) return false;
21743
21762
  const config = readJsonc(configPath);
21744
21763
  const servers = config.servers;
21745
21764
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21747,7 +21766,7 @@ var vscodeAdapter = {
21747
21766
  return true;
21748
21767
  },
21749
21768
  getArgentEntry(configPath) {
21750
- if (!fs18.existsSync(configPath)) return null;
21769
+ if (!fs19.existsSync(configPath)) return null;
21751
21770
  const config = readJsonc(configPath);
21752
21771
  const servers = config.servers;
21753
21772
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21760,7 +21779,7 @@ var vscodeAdapter = {
21760
21779
  findShadowingConfigs(_root, _writtenScope) {
21761
21780
  const findings = [];
21762
21781
  for (const userDir of vscodeUserDirs()) {
21763
- const configPath = path19.join(userDir, "mcp.json");
21782
+ const configPath = path20.join(userDir, "mcp.json");
21764
21783
  const entry = this.getArgentEntry(configPath);
21765
21784
  if (!entry) continue;
21766
21785
  findings.push({
@@ -21777,16 +21796,16 @@ var vscodeAdapter = {
21777
21796
  function vscodeUserDirs() {
21778
21797
  const bases = [];
21779
21798
  if (process.platform === "darwin") {
21780
- bases.push(path19.join(homedir5(), "Library", "Application Support"));
21799
+ bases.push(path20.join(homedir4(), "Library", "Application Support"));
21781
21800
  } else if (process.platform === "win32") {
21782
21801
  if (process.env.APPDATA) bases.push(process.env.APPDATA);
21783
21802
  } else {
21784
- bases.push(path19.join(homedir5(), ".config"));
21803
+ bases.push(path20.join(homedir4(), ".config"));
21785
21804
  }
21786
21805
  const dirs = [];
21787
21806
  for (const base of bases) {
21788
21807
  for (const product of ["Code", "Code - Insiders"]) {
21789
- const dir = path19.join(base, product, "User");
21808
+ const dir = path20.join(base, product, "User");
21790
21809
  if (dirExists(dir)) dirs.push(dir);
21791
21810
  }
21792
21811
  }
@@ -21794,18 +21813,18 @@ function vscodeUserDirs() {
21794
21813
  }
21795
21814
  function devinUserConfigPath() {
21796
21815
  if (process.platform === "win32") {
21797
- const appData = process.env.APPDATA || path19.join(homedir5(), "AppData", "Roaming");
21798
- return path19.join(appData, "devin", "config.json");
21816
+ const appData = process.env.APPDATA || path20.join(homedir4(), "AppData", "Roaming");
21817
+ return path20.join(appData, "devin", "config.json");
21799
21818
  }
21800
21819
  const xdg = process.env.XDG_CONFIG_HOME;
21801
- return path19.join(xdg || path19.join(homedir5(), ".config"), "devin", "config.json");
21820
+ return path20.join(xdg || path20.join(homedir4(), ".config"), "devin", "config.json");
21802
21821
  }
21803
21822
  var windsurfAdapter = {
21804
21823
  name: "Devin Desktop",
21805
21824
  telemetryName: "windsurf",
21806
21825
  detect() {
21807
21826
  return dirHasEditorEvidence(
21808
- path19.join(homedir5(), ".codeium", "windsurf"),
21827
+ path20.join(homedir4(), ".codeium", "windsurf"),
21809
21828
  windsurfDirLooksArgentOnly
21810
21829
  );
21811
21830
  },
@@ -21813,7 +21832,7 @@ var windsurfAdapter = {
21813
21832
  return null;
21814
21833
  },
21815
21834
  globalPath() {
21816
- return path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21835
+ return path20.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21817
21836
  },
21818
21837
  // JSONC-safe writes (see the Cursor adapter).
21819
21838
  write(configPath, entry) {
@@ -21825,7 +21844,7 @@ var windsurfAdapter = {
21825
21844
  });
21826
21845
  },
21827
21846
  remove(configPath) {
21828
- if (!fs18.existsSync(configPath)) return false;
21847
+ if (!fs19.existsSync(configPath)) return false;
21829
21848
  const config = readJsonc(configPath);
21830
21849
  const servers = config.mcpServers;
21831
21850
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21833,7 +21852,7 @@ var windsurfAdapter = {
21833
21852
  return true;
21834
21853
  },
21835
21854
  getArgentEntry(configPath) {
21836
- if (!fs18.existsSync(configPath)) return null;
21855
+ if (!fs19.existsSync(configPath)) return null;
21837
21856
  const config = readJsonc(configPath);
21838
21857
  const servers = config.mcpServers;
21839
21858
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21845,7 +21864,7 @@ var windsurfAdapter = {
21845
21864
  // servers survive. alwaysAllow serves the legacy Cascade agent; the Devin
21846
21865
  // agent needs its own permission rule.
21847
21866
  addAllowlist() {
21848
- const configPath = path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21867
+ const configPath = path20.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21849
21868
  const config = readJsonc(configPath);
21850
21869
  const servers = config.mcpServers;
21851
21870
  if (!servers?.[MCP_SERVER_KEY]) return;
@@ -21855,8 +21874,8 @@ var windsurfAdapter = {
21855
21874
  removeAllowlist(_root, scope) {
21856
21875
  if (scope !== "global") return;
21857
21876
  removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21858
- const configPath = path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21859
- if (!fs18.existsSync(configPath)) return;
21877
+ const configPath = path20.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21878
+ if (!fs19.existsSync(configPath)) return;
21860
21879
  const config = readJsonc(configPath);
21861
21880
  const servers = config.mcpServers;
21862
21881
  const entry = servers?.[MCP_SERVER_KEY];
@@ -21867,13 +21886,13 @@ var windsurfAdapter = {
21867
21886
  var zedAdapter = {
21868
21887
  name: "Zed",
21869
21888
  detect() {
21870
- return dirHasEditorEvidence(path19.join(homedir5(), ".config", "zed"), zedDirLooksArgentOnly);
21889
+ return dirHasEditorEvidence(path20.join(homedir4(), ".config", "zed"), zedDirLooksArgentOnly);
21871
21890
  },
21872
21891
  projectPath(root) {
21873
- return path19.join(root, ".zed", "settings.json");
21892
+ return path20.join(root, ".zed", "settings.json");
21874
21893
  },
21875
21894
  globalPath() {
21876
- return path19.join(homedir5(), ".config", "zed", "settings.json");
21895
+ return path20.join(homedir4(), ".config", "zed", "settings.json");
21877
21896
  },
21878
21897
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
21879
21898
  // formatting outside the touched key survive (see the Cursor adapter).
@@ -21886,7 +21905,7 @@ var zedAdapter = {
21886
21905
  });
21887
21906
  },
21888
21907
  remove(configPath) {
21889
- if (!fs18.existsSync(configPath)) return false;
21908
+ if (!fs19.existsSync(configPath)) return false;
21890
21909
  const config = readJsonc(configPath);
21891
21910
  const servers = config.context_servers;
21892
21911
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21894,7 +21913,7 @@ var zedAdapter = {
21894
21913
  return true;
21895
21914
  },
21896
21915
  getArgentEntry(configPath) {
21897
- if (!fs18.existsSync(configPath)) return null;
21916
+ if (!fs19.existsSync(configPath)) return null;
21898
21917
  const config = readJsonc(configPath);
21899
21918
  const servers = config.context_servers;
21900
21919
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21905,12 +21924,12 @@ var zedAdapter = {
21905
21924
  // Zed has no server-level wildcard for MCP tools — each tool would need its
21906
21925
  // own entry — so the global default is set to "allow" instead.
21907
21926
  addAllowlist(root, scope) {
21908
- const settingsPath = scope === "global" ? path19.join(homedir5(), ".config", "zed", "settings.json") : path19.join(root, ".zed", "settings.json");
21927
+ const settingsPath = scope === "global" ? path20.join(homedir4(), ".config", "zed", "settings.json") : path20.join(root, ".zed", "settings.json");
21909
21928
  editJsoncFile(settingsPath, ["agent", "tool_permissions", "default"], "allow");
21910
21929
  },
21911
21930
  removeAllowlist(root, scope) {
21912
- const settingsPath = scope === "global" ? path19.join(homedir5(), ".config", "zed", "settings.json") : path19.join(root, ".zed", "settings.json");
21913
- if (!fs18.existsSync(settingsPath)) return;
21931
+ const settingsPath = scope === "global" ? path20.join(homedir4(), ".config", "zed", "settings.json") : path20.join(root, ".zed", "settings.json");
21932
+ if (!fs19.existsSync(settingsPath)) return;
21914
21933
  const config = readJsonc(settingsPath);
21915
21934
  const perms = config.agent?.tool_permissions;
21916
21935
  if (!perms || perms.default !== "allow") return;
@@ -21920,13 +21939,13 @@ var zedAdapter = {
21920
21939
  var geminiAdapter = {
21921
21940
  name: "Gemini",
21922
21941
  detect() {
21923
- return dirHasEditorEvidence(path19.join(homedir5(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21942
+ return dirHasEditorEvidence(path20.join(homedir4(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path20.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21924
21943
  },
21925
21944
  projectPath(root) {
21926
- return path19.join(root, ".gemini", "settings.json");
21945
+ return path20.join(root, ".gemini", "settings.json");
21927
21946
  },
21928
21947
  globalPath() {
21929
- return path19.join(homedir5(), ".gemini", "settings.json");
21948
+ return path20.join(homedir4(), ".gemini", "settings.json");
21930
21949
  },
21931
21950
  // JSONC-safe writes (see the Cursor adapter).
21932
21951
  write(configPath, entry) {
@@ -21938,7 +21957,7 @@ var geminiAdapter = {
21938
21957
  });
21939
21958
  },
21940
21959
  remove(configPath) {
21941
- if (!fs18.existsSync(configPath)) return false;
21960
+ if (!fs19.existsSync(configPath)) return false;
21942
21961
  const config = readJsonc(configPath);
21943
21962
  const servers = config.mcpServers;
21944
21963
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21946,7 +21965,7 @@ var geminiAdapter = {
21946
21965
  return true;
21947
21966
  },
21948
21967
  getArgentEntry(configPath) {
21949
- if (!fs18.existsSync(configPath)) return null;
21968
+ if (!fs19.existsSync(configPath)) return null;
21950
21969
  const config = readJsonc(configPath);
21951
21970
  const servers = config.mcpServers;
21952
21971
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21968,7 +21987,7 @@ var geminiAdapter = {
21968
21987
  },
21969
21988
  removeAllowlist(root, scope) {
21970
21989
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
21971
- if (!configPath || !fs18.existsSync(configPath)) {
21990
+ if (!configPath || !fs19.existsSync(configPath)) {
21972
21991
  return;
21973
21992
  }
21974
21993
  const config = readJsonc(configPath);
@@ -21982,13 +22001,13 @@ var CODEX_FILENAME = ".codex";
21982
22001
  var codexAdapter = {
21983
22002
  name: "Codex",
21984
22003
  detect() {
21985
- return dirHasEditorEvidence(path19.join(homedir5(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
22004
+ return dirHasEditorEvidence(path20.join(homedir4(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path20.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
21986
22005
  },
21987
22006
  projectPath(root) {
21988
- return path19.join(root, CODEX_FILENAME, "config.toml");
22007
+ return path20.join(root, CODEX_FILENAME, "config.toml");
21989
22008
  },
21990
22009
  globalPath() {
21991
- return path19.join(homedir5(), CODEX_FILENAME, "config.toml");
22010
+ return path20.join(homedir4(), CODEX_FILENAME, "config.toml");
21992
22011
  },
21993
22012
  write(configPath, entry) {
21994
22013
  const config = readToml(configPath);
@@ -22004,7 +22023,7 @@ var codexAdapter = {
22004
22023
  writeToml(configPath, config);
22005
22024
  },
22006
22025
  remove(configPath) {
22007
- if (!fs18.existsSync(configPath)) return false;
22026
+ if (!fs19.existsSync(configPath)) return false;
22008
22027
  const config = readToml(configPath);
22009
22028
  const servers = config.mcp_servers;
22010
22029
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22014,7 +22033,7 @@ var codexAdapter = {
22014
22033
  return true;
22015
22034
  },
22016
22035
  getArgentEntry(configPath) {
22017
- if (!fs18.existsSync(configPath)) return null;
22036
+ if (!fs19.existsSync(configPath)) return null;
22018
22037
  const config = readToml(configPath);
22019
22038
  const servers = config.mcp_servers;
22020
22039
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22046,7 +22065,7 @@ var codexAdapter = {
22046
22065
  // them, and an emptied or removed table stays as it is.
22047
22066
  refreshAllowlist(root, scope) {
22048
22067
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22049
- if (!configPath || !fs18.existsSync(configPath)) return;
22068
+ if (!configPath || !fs19.existsSync(configPath)) return;
22050
22069
  const config = readToml(configPath);
22051
22070
  const toolsConfig = config.mcp_servers?.argent?.tools;
22052
22071
  if (!toolsConfig) return;
@@ -22083,13 +22102,13 @@ var codexAdapter = {
22083
22102
  var hermesAdapter = {
22084
22103
  name: "Hermes",
22085
22104
  detect() {
22086
- return dirHasEditorEvidence(path19.join(homedir5(), ".hermes"), hermesDirLooksArgentOnly);
22105
+ return dirHasEditorEvidence(path20.join(homedir4(), ".hermes"), hermesDirLooksArgentOnly);
22087
22106
  },
22088
22107
  projectPath() {
22089
22108
  return null;
22090
22109
  },
22091
22110
  globalPath() {
22092
- return path19.join(homedir5(), ".hermes", "config.yaml");
22111
+ return path20.join(homedir4(), ".hermes", "config.yaml");
22093
22112
  },
22094
22113
  write(configPath, entry) {
22095
22114
  const doc = readYaml(configPath);
@@ -22108,7 +22127,7 @@ var hermesAdapter = {
22108
22127
  writeYaml(configPath, doc);
22109
22128
  },
22110
22129
  remove(configPath) {
22111
- if (!fs18.existsSync(configPath)) return false;
22130
+ if (!fs19.existsSync(configPath)) return false;
22112
22131
  const doc = readYaml(configPath);
22113
22132
  const servers = doc.get("mcp_servers");
22114
22133
  if (!(0, import_yaml2.isMap)(servers)) return false;
@@ -22121,7 +22140,7 @@ var hermesAdapter = {
22121
22140
  return true;
22122
22141
  },
22123
22142
  getArgentEntry(configPath) {
22124
- if (!fs18.existsSync(configPath)) return null;
22143
+ if (!fs19.existsSync(configPath)) return null;
22125
22144
  const doc = readYaml(configPath);
22126
22145
  const servers = doc.get("mcp_servers");
22127
22146
  if (!(0, import_yaml2.isMap)(servers)) return null;
@@ -22148,10 +22167,10 @@ function hasOpenCodeBinary() {
22148
22167
  }
22149
22168
  function pickOpencodeConfig(dir, candidates) {
22150
22169
  for (const name of candidates) {
22151
- const candidate = path19.join(dir, name);
22152
- if (fs18.existsSync(candidate)) return candidate;
22170
+ const candidate = path20.join(dir, name);
22171
+ if (fs19.existsSync(candidate)) return candidate;
22153
22172
  }
22154
- return path19.join(dir, "opencode.json");
22173
+ return path20.join(dir, "opencode.json");
22155
22174
  }
22156
22175
  var openCodeAdapter = {
22157
22176
  name: "opencode",
@@ -22162,7 +22181,7 @@ var openCodeAdapter = {
22162
22181
  return pickOpencodeConfig(root, OPENCODE_PROJECT_FILES);
22163
22182
  },
22164
22183
  globalPath() {
22165
- return pickOpencodeConfig(path19.join(homedir5(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
22184
+ return pickOpencodeConfig(path20.join(homedir4(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
22166
22185
  },
22167
22186
  write(configPath, entry) {
22168
22187
  editJsoncFile(configPath, ["mcp", MCP_SERVER_KEY], {
@@ -22173,7 +22192,7 @@ var openCodeAdapter = {
22173
22192
  });
22174
22193
  },
22175
22194
  remove(configPath) {
22176
- if (!fs18.existsSync(configPath)) return false;
22195
+ if (!fs19.existsSync(configPath)) return false;
22177
22196
  const config = readJsonc(configPath);
22178
22197
  const servers = config.mcp;
22179
22198
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22181,7 +22200,7 @@ var openCodeAdapter = {
22181
22200
  return true;
22182
22201
  },
22183
22202
  getArgentEntry(configPath) {
22184
- if (!fs18.existsSync(configPath)) return null;
22203
+ if (!fs19.existsSync(configPath)) return null;
22185
22204
  const config = readJsonc(configPath);
22186
22205
  const servers = config.mcp;
22187
22206
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22196,7 +22215,7 @@ var openCodeAdapter = {
22196
22215
  },
22197
22216
  removeAllowlist(root, scope) {
22198
22217
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22199
- if (!configPath || !fs18.existsSync(configPath)) return;
22218
+ if (!configPath || !fs19.existsSync(configPath)) return;
22200
22219
  const config = readJsonc(configPath);
22201
22220
  const tools = config.tools;
22202
22221
  if (!tools || !(OPENCODE_ALLOWLIST_PATTERN in tools)) return;
@@ -22207,13 +22226,13 @@ var KIRO_AUTO_APPROVE_ALL = ["*"];
22207
22226
  var kiroAdapter = {
22208
22227
  name: "Kiro",
22209
22228
  detect() {
22210
- return dirHasEditorEvidence(path19.join(homedir5(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
22229
+ return dirHasEditorEvidence(path20.join(homedir4(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path20.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
22211
22230
  },
22212
22231
  projectPath(root) {
22213
- return path19.join(root, ".kiro", "settings", "mcp.json");
22232
+ return path20.join(root, ".kiro", "settings", "mcp.json");
22214
22233
  },
22215
22234
  globalPath() {
22216
- return path19.join(homedir5(), ".kiro", "settings", "mcp.json");
22235
+ return path20.join(homedir4(), ".kiro", "settings", "mcp.json");
22217
22236
  },
22218
22237
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
22219
22238
  // foreign servers survive (see the Cursor adapter).
@@ -22226,7 +22245,7 @@ var kiroAdapter = {
22226
22245
  });
22227
22246
  },
22228
22247
  remove(configPath) {
22229
- if (!fs18.existsSync(configPath)) return false;
22248
+ if (!fs19.existsSync(configPath)) return false;
22230
22249
  const config = readJsonc(configPath);
22231
22250
  const servers = config.mcpServers;
22232
22251
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22234,7 +22253,7 @@ var kiroAdapter = {
22234
22253
  return true;
22235
22254
  },
22236
22255
  getArgentEntry(configPath) {
22237
- if (!fs18.existsSync(configPath)) return null;
22256
+ if (!fs19.existsSync(configPath)) return null;
22238
22257
  const config = readJsonc(configPath);
22239
22258
  const servers = config.mcpServers;
22240
22259
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22258,7 +22277,7 @@ var kiroAdapter = {
22258
22277
  },
22259
22278
  removeAllowlist(root, scope) {
22260
22279
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22261
- if (!configPath || !fs18.existsSync(configPath)) return;
22280
+ if (!configPath || !fs19.existsSync(configPath)) return;
22262
22281
  const config = readJsonc(configPath);
22263
22282
  const servers = config.mcpServers;
22264
22283
  const entry = servers?.[MCP_SERVER_KEY];
@@ -22310,7 +22329,7 @@ function addAllowRule(settingsPath, rule) {
22310
22329
  editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
22311
22330
  }
22312
22331
  function removeAllowRule(settingsPath, rule) {
22313
- if (!fs18.existsSync(settingsPath)) return;
22332
+ if (!fs19.existsSync(settingsPath)) return;
22314
22333
  const config = readJsonc(settingsPath);
22315
22334
  const permissions = config?.permissions;
22316
22335
  const allow = permissions?.allow;
@@ -22320,7 +22339,7 @@ function removeAllowRule(settingsPath, rule) {
22320
22339
  editJsoncFile(settingsPath, ["permissions", "allow"], next.length > 0 ? next : void 0);
22321
22340
  }
22322
22341
  function claudeSettingsPath(root, scope) {
22323
- return scope === "global" ? path19.join(homedir5(), ".claude", "settings.json") : path19.join(root, ".claude", "settings.json");
22342
+ return scope === "global" ? path20.join(homedir4(), ".claude", "settings.json") : path20.join(root, ".claude", "settings.json");
22324
22343
  }
22325
22344
  function addClaudePermission(root, scope) {
22326
22345
  addAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
@@ -22333,13 +22352,13 @@ function formatCopyDestination(target, writtenPath, root) {
22333
22352
  return `${target.label} -> ${formatManagedPathLabel(writtenPath, realpathOrSelf(root))}`;
22334
22353
  }
22335
22354
  function formatManagedPathLabel(targetPath, root) {
22336
- for (const home of [path19.resolve(homedir5()), canonicalPath(homedir5())]) {
22337
- if (targetPath === home || targetPath.startsWith(`${home}${path19.sep}`)) {
22355
+ for (const home of [path20.resolve(homedir4()), canonicalPath(homedir4())]) {
22356
+ if (targetPath === home || targetPath.startsWith(`${home}${path20.sep}`)) {
22338
22357
  return `~${targetPath.slice(home.length)}`;
22339
22358
  }
22340
22359
  }
22341
- const relative5 = path19.relative(root, targetPath);
22342
- if (relative5 && !relative5.startsWith("..") && !path19.isAbsolute(relative5)) {
22360
+ const relative5 = path20.relative(root, targetPath);
22361
+ if (relative5 && !relative5.startsWith("..") && !path20.isAbsolute(relative5)) {
22343
22362
  return relative5;
22344
22363
  }
22345
22364
  return targetPath;
@@ -22353,7 +22372,7 @@ function addManagedTarget(targets, editorName, targetPath, root) {
22353
22372
  }
22354
22373
  function getAdapterBasePath(adapter, root, scope) {
22355
22374
  const configPath = scope === "global" ? adapter.globalPath() : adapter.projectPath(root);
22356
- return configPath ? path19.dirname(configPath) : null;
22375
+ return configPath ? path20.dirname(configPath) : null;
22357
22376
  }
22358
22377
  function getManagedContentTargets(adapters, root, scope) {
22359
22378
  const targets = {
@@ -22363,17 +22382,17 @@ function getManagedContentTargets(adapters, root, scope) {
22363
22382
  codexConfigTargets: [],
22364
22383
  skillsLockTargets: []
22365
22384
  };
22366
- const workspaceBase = scope === "global" ? homedir5() : root;
22385
+ const workspaceBase = scope === "global" ? homedir4() : root;
22367
22386
  addManagedTarget(
22368
22387
  targets.skillTargets,
22369
22388
  "skills",
22370
- path19.join(workspaceBase, ".agents", "skills"),
22389
+ path20.join(workspaceBase, ".agents", "skills"),
22371
22390
  root
22372
22391
  );
22373
22392
  addManagedTarget(
22374
22393
  targets.skillsLockTargets,
22375
22394
  "skills",
22376
- path19.join(workspaceBase, "skills-lock.json"),
22395
+ path20.join(workspaceBase, "skills-lock.json"),
22377
22396
  root
22378
22397
  );
22379
22398
  for (const adapter of adapters) {
@@ -22381,21 +22400,21 @@ function getManagedContentTargets(adapters, root, scope) {
22381
22400
  case "Cursor": {
22382
22401
  const base = getAdapterBasePath(adapter, root, scope);
22383
22402
  if (!base) break;
22384
- addManagedTarget(targets.skillTargets, adapter.name, path19.join(base, "skills"), root);
22385
- addManagedTarget(targets.ruleTargets, adapter.name, path19.join(base, "rules"), root);
22403
+ addManagedTarget(targets.skillTargets, adapter.name, path20.join(base, "skills"), root);
22404
+ addManagedTarget(targets.ruleTargets, adapter.name, path20.join(base, "rules"), root);
22386
22405
  break;
22387
22406
  }
22388
22407
  case "Claude Code": {
22389
- const claudeBase = scope === "global" ? path19.join(homedir5(), ".claude") : path19.join(root, ".claude");
22390
- addManagedTarget(targets.skillTargets, adapter.name, path19.join(claudeBase, "skills"), root);
22391
- addManagedTarget(targets.ruleTargets, adapter.name, path19.join(claudeBase, "rules"), root);
22392
- addManagedTarget(targets.agentTargets, adapter.name, path19.join(claudeBase, "agents"), root);
22408
+ const claudeBase = scope === "global" ? path20.join(homedir4(), ".claude") : path20.join(root, ".claude");
22409
+ addManagedTarget(targets.skillTargets, adapter.name, path20.join(claudeBase, "skills"), root);
22410
+ addManagedTarget(targets.ruleTargets, adapter.name, path20.join(claudeBase, "rules"), root);
22411
+ addManagedTarget(targets.agentTargets, adapter.name, path20.join(claudeBase, "agents"), root);
22393
22412
  break;
22394
22413
  }
22395
22414
  case "Gemini": {
22396
- const geminiBase = scope === "global" ? path19.join(homedir5(), ".gemini") : path19.join(root, ".gemini");
22397
- addManagedTarget(targets.ruleTargets, adapter.name, path19.join(geminiBase, "rules"), root);
22398
- addManagedTarget(targets.agentTargets, adapter.name, path19.join(geminiBase, "agents"), root);
22415
+ const geminiBase = scope === "global" ? path20.join(homedir4(), ".gemini") : path20.join(root, ".gemini");
22416
+ addManagedTarget(targets.ruleTargets, adapter.name, path20.join(geminiBase, "rules"), root);
22417
+ addManagedTarget(targets.agentTargets, adapter.name, path20.join(geminiBase, "agents"), root);
22399
22418
  break;
22400
22419
  }
22401
22420
  case "Codex": {
@@ -22405,19 +22424,19 @@ function getManagedContentTargets(adapters, root, scope) {
22405
22424
  break;
22406
22425
  }
22407
22426
  case "opencode": {
22408
- const base = scope === "global" ? path19.join(homedir5(), ".config", "opencode") : path19.join(root, ".opencode");
22409
- addManagedTarget(targets.skillTargets, adapter.name, path19.join(base, "skills"), root);
22410
- addManagedTarget(targets.agentTargets, adapter.name, path19.join(base, "agents"), root);
22427
+ const base = scope === "global" ? path20.join(homedir4(), ".config", "opencode") : path20.join(root, ".opencode");
22428
+ addManagedTarget(targets.skillTargets, adapter.name, path20.join(base, "skills"), root);
22429
+ addManagedTarget(targets.agentTargets, adapter.name, path20.join(base, "agents"), root);
22411
22430
  break;
22412
22431
  }
22413
22432
  case "Kiro": {
22414
- const kiroBase = scope === "global" ? path19.join(homedir5(), ".kiro") : path19.join(root, ".kiro");
22415
- addManagedTarget(targets.skillTargets, adapter.name, path19.join(kiroBase, "skills"), root);
22433
+ const kiroBase = scope === "global" ? path20.join(homedir4(), ".kiro") : path20.join(root, ".kiro");
22434
+ addManagedTarget(targets.skillTargets, adapter.name, path20.join(kiroBase, "skills"), root);
22416
22435
  break;
22417
22436
  }
22418
22437
  case "Devin Desktop": {
22419
- const devinBase = scope === "global" ? path19.join(process.env.XDG_CONFIG_HOME || path19.join(homedir5(), ".config"), "devin") : path19.join(root, ".devin");
22420
- addManagedTarget(targets.skillTargets, adapter.name, path19.join(devinBase, "skills"), root);
22438
+ const devinBase = scope === "global" ? path20.join(process.env.XDG_CONFIG_HOME || path20.join(homedir4(), ".config"), "devin") : path20.join(root, ".devin");
22439
+ addManagedTarget(targets.skillTargets, adapter.name, path20.join(devinBase, "skills"), root);
22421
22440
  break;
22422
22441
  }
22423
22442
  }
@@ -22431,12 +22450,12 @@ function stripFrontmatter(content) {
22431
22450
  return match ? content.slice(match[0].length).trim() : content.trim();
22432
22451
  }
22433
22452
  function readAndConcatRules(rulesDir) {
22434
- if (!fs18.existsSync(rulesDir)) return null;
22435
- const files = fs18.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
22453
+ if (!fs19.existsSync(rulesDir)) return null;
22454
+ const files = fs19.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
22436
22455
  if (files.length === 0) return null;
22437
22456
  const parts = [];
22438
22457
  for (const file of files) {
22439
- const raw = fs18.readFileSync(path19.join(rulesDir, file), "utf8");
22458
+ const raw = fs19.readFileSync(path20.join(rulesDir, file), "utf8");
22440
22459
  const stripped = stripFrontmatter(raw);
22441
22460
  if (stripped) parts.push(stripped);
22442
22461
  }
@@ -22471,7 +22490,7 @@ function injectCodexRules(configPath, rulesDir) {
22471
22490
  return configPath;
22472
22491
  }
22473
22492
  function removeCodexRules(configPath) {
22474
- if (!fs18.existsSync(configPath)) return false;
22493
+ if (!fs19.existsSync(configPath)) return false;
22475
22494
  const config = readToml(configPath);
22476
22495
  const existing = config.developer_instructions;
22477
22496
  if (!existing || !existing.includes(ARGENT_RULES_START)) return false;
@@ -22563,10 +22582,10 @@ function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
22563
22582
  }
22564
22583
 
22565
22584
  // ../argent-installer/src/retired-files.ts
22566
- import * as path20 from "node:path";
22585
+ import * as path21 from "node:path";
22567
22586
  var import_picocolors = __toESM(require_picocolors(), 1);
22568
22587
  function displayPath(entry, file) {
22569
- return path20.join(entry.location, ...file.relativePath.split("/"));
22588
+ return path21.join(entry.location, ...file.relativePath.split("/"));
22570
22589
  }
22571
22590
  async function cleanupRetiredFiles(found, options) {
22572
22591
  const result = { removed: [], declined: [], failed: [], removedRoots: [] };
@@ -22617,14 +22636,14 @@ async function reportRetiredFiles(found, interactive) {
22617
22636
 
22618
22637
  // ../argent-installer/src/cli-record.ts
22619
22638
  var import_semver4 = __toESM(require_semver2(), 1);
22620
- import * as fs19 from "node:fs";
22621
- import * as path21 from "node:path";
22639
+ import * as fs20 from "node:fs";
22640
+ import * as path22 from "node:path";
22622
22641
  function cliRecordPath() {
22623
- return path21.join(argentHomeDir(), "cli.json");
22642
+ return path22.join(argentHomeDir(), "cli.json");
22624
22643
  }
22625
22644
  function readCliRecord() {
22626
22645
  try {
22627
- const parsed = JSON.parse(fs19.readFileSync(cliRecordPath(), "utf8"));
22646
+ const parsed = JSON.parse(fs20.readFileSync(cliRecordPath(), "utf8"));
22628
22647
  if (typeof parsed?.cli === "string" && typeof parsed?.node === "string") return parsed;
22629
22648
  return null;
22630
22649
  } catch {
@@ -22634,7 +22653,7 @@ function readCliRecord() {
22634
22653
  function resolveCliEntry(mode, projectRoot) {
22635
22654
  if (mode === "local") {
22636
22655
  const relative5 = getLocalArgentBinRelPath(projectRoot);
22637
- return relative5 ? path21.resolve(projectRoot, relative5) : null;
22656
+ return relative5 ? path22.resolve(projectRoot, relative5) : null;
22638
22657
  }
22639
22658
  const packageRoot = getGloballyInstalledPackageRoot();
22640
22659
  return packageRoot ? cliPathOf(packageRoot) : null;
@@ -22653,10 +22672,10 @@ function writeCliRecord(input) {
22653
22672
  function persistCliRecord(record) {
22654
22673
  const file = cliRecordPath();
22655
22674
  try {
22656
- fs19.mkdirSync(path21.dirname(file), { recursive: true });
22675
+ fs20.mkdirSync(path22.dirname(file), { recursive: true });
22657
22676
  const temporary = `${file}.${process.pid}.tmp`;
22658
- fs19.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
22659
- fs19.renameSync(temporary, file);
22677
+ fs20.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
22678
+ fs20.renameSync(temporary, file);
22660
22679
  return file;
22661
22680
  } catch {
22662
22681
  return null;
@@ -22664,10 +22683,10 @@ function persistCliRecord(record) {
22664
22683
  }
22665
22684
  function healCliRecord(input) {
22666
22685
  try {
22667
- if (!fs19.existsSync(input.cli)) return null;
22686
+ if (!fs20.existsSync(input.cli)) return null;
22668
22687
  const existing = readCliRecord();
22669
22688
  if (existing) {
22670
- const alive = fs19.existsSync(existing.node) && fs19.existsSync(existing.cli);
22689
+ const alive = fs20.existsSync(existing.node) && fs20.existsSync(existing.cli);
22671
22690
  const ourVersion = import_semver4.default.valid(input.version);
22672
22691
  const theirVersion = import_semver4.default.valid(existing.version);
22673
22692
  const newerThanExisting = ourVersion !== null && (theirVersion === null || import_semver4.default.gt(ourVersion, theirVersion));
@@ -22688,11 +22707,11 @@ function removeCliRecordFor(installDir) {
22688
22707
  if (!installDir) return false;
22689
22708
  const record = readCliRecord();
22690
22709
  if (!record) return false;
22691
- const root = path21.resolve(installDir);
22692
- const relative5 = path21.relative(root, path21.resolve(record.cli));
22693
- if (relative5.startsWith("..") || path21.isAbsolute(relative5)) return false;
22710
+ const root = path22.resolve(installDir);
22711
+ const relative5 = path22.relative(root, path22.resolve(record.cli));
22712
+ if (relative5.startsWith("..") || path22.isAbsolute(relative5)) return false;
22694
22713
  try {
22695
- fs19.rmSync(cliRecordPath(), { force: true });
22714
+ fs20.rmSync(cliRecordPath(), { force: true });
22696
22715
  return true;
22697
22716
  } catch {
22698
22717
  return false;
@@ -22728,9 +22747,11 @@ async function resolveTelemetryConsent(opts) {
22728
22747
  printFirstRunNotice();
22729
22748
  return { kind: "skipped" };
22730
22749
  }
22731
- const source = getConsentState().source.source;
22750
+ const state2 = getConsentState();
22751
+ const source = state2.source.source;
22732
22752
  const envOwnsDecision = source === "env_do_not_track" || source === "env_argent_telemetry";
22733
- if (envOwnsDecision || hasShownFirstRunNotice()) {
22753
+ const configOptedOut = source === "config_file" && !state2.enabled;
22754
+ if (envOwnsDecision || configOptedOut || hasShownFirstRunNotice()) {
22734
22755
  return { kind: "skipped" };
22735
22756
  }
22736
22757
  log.info(
@@ -22916,8 +22937,8 @@ async function promptInstallMode(defaultMode = "global") {
22916
22937
 
22917
22938
  // ../argent-installer/src/install-runner.ts
22918
22939
  var import_picocolors4 = __toESM(require_picocolors(), 1);
22919
- import * as fs22 from "node:fs";
22920
- import * as path24 from "node:path";
22940
+ import * as fs23 from "node:fs";
22941
+ import * as path25 from "node:path";
22921
22942
 
22922
22943
  // ../argent-installer/src/shell.ts
22923
22944
  import { execFileSync as execFileSync6, spawn as spawn2 } from "node:child_process";
@@ -22949,7 +22970,7 @@ var ShellCommandError = class extends Error {
22949
22970
  signal;
22950
22971
  };
22951
22972
  function runShellCommand(cmd, opts = {}) {
22952
- return new Promise((resolve21, reject) => {
22973
+ return new Promise((resolve22, reject) => {
22953
22974
  const child = spawn2(cmd.bin, cmd.args, {
22954
22975
  stdio: ["ignore", "pipe", "pipe"],
22955
22976
  shell: process.platform === "win32",
@@ -22965,7 +22986,7 @@ function runShellCommand(cmd, opts = {}) {
22965
22986
  stderr += chunk.toString();
22966
22987
  });
22967
22988
  child.on("close", (code, signal) => {
22968
- if (code === 0) resolve21();
22989
+ if (code === 0) resolve22();
22969
22990
  else
22970
22991
  reject(
22971
22992
  new ShellCommandError(
@@ -22981,33 +23002,33 @@ function runShellCommand(cmd, opts = {}) {
22981
23002
 
22982
23003
  // ../argent-installer/src/skills.ts
22983
23004
  import { execFileSync as execFileSync8 } from "node:child_process";
22984
- import * as fs21 from "node:fs";
22985
- import * as path23 from "node:path";
23005
+ import * as fs22 from "node:fs";
23006
+ import * as path24 from "node:path";
22986
23007
  var import_picocolors3 = __toESM(require_picocolors(), 1);
22987
23008
 
22988
23009
  // ../argent-installer/src/skills-runner.ts
22989
23010
  import { execFileSync as execFileSync7 } from "node:child_process";
22990
- import * as fs20 from "node:fs";
22991
- import * as path22 from "node:path";
23011
+ import * as fs21 from "node:fs";
23012
+ import * as path23 from "node:path";
22992
23013
  var WIN32_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD";
22993
23014
  function findOnPath(bin, env, platform) {
22994
23015
  const pathValue = env.PATH ?? env.Path ?? "";
22995
- const dirs = pathValue.split(path22.delimiter).filter((dir) => path22.isAbsolute(dir));
23016
+ const dirs = pathValue.split(path23.delimiter).filter((dir) => path23.isAbsolute(dir));
22996
23017
  if (platform === "win32") {
22997
23018
  const exts = (env.PATHEXT ?? WIN32_DEFAULT_PATHEXT).split(";").filter(Boolean);
22998
23019
  for (const dir of dirs) {
22999
23020
  for (const ext of exts) {
23000
- const candidate = path22.join(dir, bin + ext);
23001
- if (fs20.existsSync(candidate)) return candidate;
23021
+ const candidate = path23.join(dir, bin + ext);
23022
+ if (fs21.existsSync(candidate)) return candidate;
23002
23023
  }
23003
23024
  }
23004
23025
  return null;
23005
23026
  }
23006
23027
  for (const dir of dirs) {
23007
- const candidate = path22.join(dir, bin);
23028
+ const candidate = path23.join(dir, bin);
23008
23029
  try {
23009
- if (!fs20.statSync(candidate).isFile()) continue;
23010
- fs20.accessSync(candidate, fs20.constants.X_OK);
23030
+ if (!fs21.statSync(candidate).isFile()) continue;
23031
+ fs21.accessSync(candidate, fs21.constants.X_OK);
23011
23032
  return candidate;
23012
23033
  } catch {
23013
23034
  }
@@ -23184,13 +23205,13 @@ function snapshotArgentSkills(projectRoot, scope, names) {
23184
23205
  let candidates = names;
23185
23206
  if (names.length === 0) {
23186
23207
  try {
23187
- candidates = fs21.readdirSync(targetPath).filter((n3) => n3.startsWith(ARGENT_SKILL_PREFIX));
23208
+ candidates = fs22.readdirSync(targetPath).filter((n3) => n3.startsWith(ARGENT_SKILL_PREFIX));
23188
23209
  } catch {
23189
23210
  continue;
23190
23211
  }
23191
23212
  }
23192
23213
  for (const name of candidates) {
23193
- const stat6 = fs21.statSync(path23.join(targetPath, name, "SKILL.md"), { throwIfNoEntry: false });
23214
+ const stat6 = fs22.statSync(path24.join(targetPath, name, "SKILL.md"), { throwIfNoEntry: false });
23194
23215
  if (!stat6?.isFile()) continue;
23195
23216
  found.set(name, `${found.get(name) ?? ""}${stat6.ino}:${stat6.mtimeMs};`);
23196
23217
  }
@@ -23208,7 +23229,7 @@ function pruneLegacySkillDirs(projectRoot, scope, bundled = new Set(listBundledS
23208
23229
  const removed = /* @__PURE__ */ new Set();
23209
23230
  for (const { targetPath } of skillTargets) {
23210
23231
  for (const name of legacy) {
23211
- const dir = path23.join(targetPath, name);
23232
+ const dir = path24.join(targetPath, name);
23212
23233
  try {
23213
23234
  if (removePath(dir)) removed.add(name);
23214
23235
  } catch {
@@ -23228,13 +23249,13 @@ function listTrackedLegacySkills(projectRoot, scope, bundled = new Set(listBundl
23228
23249
  }
23229
23250
  function removeLockEntries(lockPath, names) {
23230
23251
  try {
23231
- const lock = JSON.parse(fs21.readFileSync(lockPath, "utf8"));
23252
+ const lock = JSON.parse(fs22.readFileSync(lockPath, "utf8"));
23232
23253
  const skills = lock.skills;
23233
23254
  if (!skills) return [];
23234
23255
  const removed = names.filter((name) => name in skills);
23235
23256
  if (removed.length === 0) return [];
23236
23257
  for (const name of removed) delete skills[name];
23237
- fs21.writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n");
23258
+ fs22.writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n");
23238
23259
  return removed;
23239
23260
  } catch {
23240
23261
  return [];
@@ -23305,7 +23326,7 @@ async function runInstall(args) {
23305
23326
  return runGlobal({ fromTar, nonInteractive, version: args.version, tel });
23306
23327
  }
23307
23328
  function installSpec(fromTar) {
23308
- return fs22.existsSync(fromTar) ? path24.resolve(fromTar) : fromTar;
23329
+ return fs23.existsSync(fromTar) ? path25.resolve(fromTar) : fromTar;
23309
23330
  }
23310
23331
  async function installLocally(opts) {
23311
23332
  const { fromTar, tel } = opts;
@@ -23612,8 +23633,8 @@ async function chooseAdapters(opts) {
23612
23633
 
23613
23634
  // ../argent-installer/src/init-scope.ts
23614
23635
  var import_picocolors6 = __toESM(require_picocolors(), 1);
23615
- import { existsSync as existsSync15 } from "node:fs";
23616
- import { resolve as resolve14 } from "node:path";
23636
+ import { existsSync as existsSync16 } from "node:fs";
23637
+ import { resolve as resolve15 } from "node:path";
23617
23638
  async function chooseScope(opts) {
23618
23639
  if (opts.installMode === "local") {
23619
23640
  return { scope: "local" };
@@ -23650,13 +23671,13 @@ async function chooseScope(opts) {
23650
23671
  placeholder: process.cwd(),
23651
23672
  validate(value) {
23652
23673
  if (!value?.trim()) return "Path cannot be empty.";
23653
- const resolved = resolve14(value.trim());
23654
- if (!existsSync15(resolved))
23674
+ const resolved = resolve15(value.trim());
23675
+ if (!existsSync16(resolved))
23655
23676
  return `Path does not exist: ${resolved}. Please verify and enter a valid path.`;
23656
23677
  }
23657
23678
  });
23658
23679
  if (isCancel(customPathInput)) throw new InitCancelled("scope");
23659
- return { scope: "custom", customRoot: resolve14(customPathInput.trim()) };
23680
+ return { scope: "custom", customRoot: resolve15(customPathInput.trim()) };
23660
23681
  }
23661
23682
 
23662
23683
  // ../argent-installer/src/init-mcp-write.ts
@@ -23957,7 +23978,7 @@ async function configureAllowlist(args) {
23957
23978
  var import_picocolors10 = __toESM(require_picocolors(), 1);
23958
23979
  import { spawn as spawn3 } from "node:child_process";
23959
23980
  import * as os4 from "node:os";
23960
- import * as path25 from "node:path";
23981
+ import * as path26 from "node:path";
23961
23982
  var REF_MISSING = /Remote branch .* not found in upstream|couldn't find remote ref|unknown revision/i;
23962
23983
  function meaningfulLine(err) {
23963
23984
  const lines = (err instanceof Error ? err.message : String(err)).split("\n").map((l2) => l2.replace(/^[│┌└■◇\s]+/, "").trim()).filter((l2) => l2 && !/^npm (warn|notice)/i.test(l2));
@@ -23965,10 +23986,10 @@ function meaningfulLine(err) {
23965
23986
  }
23966
23987
  function bundledCopyFor(version) {
23967
23988
  const local = probeLocalInstall(resolveProjectRoot2(process.cwd()));
23968
- if (local.packageDir && local.version === version) return path25.join(local.packageDir, "skills");
23989
+ if (local.packageDir && local.version === version) return path26.join(local.packageDir, "skills");
23969
23990
  const globalRoot = getGloballyInstalledPackageRoot();
23970
23991
  if (globalRoot && getGloballyInstalledVersion() === version) {
23971
- return path25.join(globalRoot, "skills");
23992
+ return path26.join(globalRoot, "skills");
23972
23993
  }
23973
23994
  return SKILLS_DIR;
23974
23995
  }
@@ -24195,7 +24216,7 @@ async function runSkillsStep(args) {
24195
24216
  async function runSkillsCli(runner, args, interactive, cwd) {
24196
24217
  if (!runner) throw new Error(NO_SKILLS_RUNNER_MESSAGE);
24197
24218
  const command = skillsCommand(runner, args);
24198
- return new Promise((resolve21, reject) => {
24219
+ return new Promise((resolve22, reject) => {
24199
24220
  const child = spawn3(command.file, command.args, {
24200
24221
  env: npxChildEnv(),
24201
24222
  stdio: interactive ? "inherit" : ["ignore", "pipe", "pipe"],
@@ -24214,7 +24235,7 @@ async function runSkillsCli(runner, args, interactive, cwd) {
24214
24235
  }
24215
24236
  child.on("close", (code, signal) => {
24216
24237
  if (code === 0) {
24217
- resolve21();
24238
+ resolve22();
24218
24239
  } else {
24219
24240
  const output = [stderr, stdout2].filter(Boolean).join("\n").trim();
24220
24241
  reject(
@@ -24535,9 +24556,9 @@ function printBanner() {
24535
24556
  // ../argent-installer/src/update.ts
24536
24557
  var import_picocolors12 = __toESM(require_picocolors(), 1);
24537
24558
  var import_semver5 = __toESM(require_semver2(), 1);
24538
- import * as fs24 from "node:fs";
24559
+ import * as fs25 from "node:fs";
24539
24560
  import * as os5 from "node:os";
24540
- import * as path31 from "node:path";
24561
+ import * as path32 from "node:path";
24541
24562
 
24542
24563
  // ../argent-installer/src/install-targets.ts
24543
24564
  function parseTargetFlags(args) {
@@ -24609,17 +24630,16 @@ async function resolveInstallableUpdateTarget(pm, current, cwd, candidate) {
24609
24630
 
24610
24631
  // ../argent-tools-client/src/launcher.ts
24611
24632
  import * as net from "node:net";
24612
- import * as fs23 from "node:fs";
24613
- import * as path26 from "node:path";
24633
+ import * as fs24 from "node:fs";
24634
+ import * as path27 from "node:path";
24614
24635
  import * as readline from "node:readline";
24615
- import { homedir as homedir7 } from "node:os";
24616
24636
  import { spawn as spawn4, execFileSync as execFileSync9 } from "node:child_process";
24617
24637
  import { createHash as createHash3, randomBytes } from "node:crypto";
24618
24638
  import { mkdir, writeFile, readFile, readdir as readdir2, unlink, rename, chmod } from "node:fs/promises";
24619
- var STATE_DIR = path26.join(homedir7(), ".argent");
24620
- var STATE_FILE = path26.join(STATE_DIR, "tool-server.json");
24621
- var LOG_FILE = path26.join(STATE_DIR, "tool-server.log");
24622
- var LOCK_FILE = path26.join(STATE_DIR, "tool-server.lock");
24639
+ var STATE_DIR = argentHomeDir();
24640
+ var STATE_FILE = path27.join(STATE_DIR, "tool-server.json");
24641
+ var LOG_FILE = path27.join(STATE_DIR, "tool-server.log");
24642
+ var LOCK_FILE = path27.join(STATE_DIR, "tool-server.lock");
24623
24643
  function isProcessAlive(pid) {
24624
24644
  try {
24625
24645
  process.kill(pid, 0);
@@ -24630,7 +24650,7 @@ function isProcessAlive(pid) {
24630
24650
  }
24631
24651
  function stateFileForBundle(bundlePath) {
24632
24652
  const key = createHash3("sha256").update(bundlePath).digest("hex").slice(0, 12);
24633
- return path26.join(STATE_DIR, `tool-server-${key}.json`);
24653
+ return path27.join(STATE_DIR, `tool-server-${key}.json`);
24634
24654
  }
24635
24655
  async function readStateFile(file) {
24636
24656
  try {
@@ -24672,7 +24692,7 @@ async function readAllToolsServerStates() {
24672
24692
  const out = [];
24673
24693
  for (const name of names) {
24674
24694
  if (!STATE_FILE_RE.test(name)) continue;
24675
- const file = path26.join(STATE_DIR, name);
24695
+ const file = path27.join(STATE_DIR, name);
24676
24696
  const state2 = await readStateFile(file);
24677
24697
  if (state2) out.push({ file, state: state2 });
24678
24698
  }
@@ -24718,21 +24738,21 @@ async function killToolServer(bundlePath) {
24718
24738
  return alive;
24719
24739
  }
24720
24740
  function isPathWithin(child, parent) {
24721
- const rel = path26.relative(parent, child);
24722
- return rel !== "" && !rel.startsWith("..") && !path26.isAbsolute(rel);
24741
+ const rel = path27.relative(parent, child);
24742
+ return rel !== "" && !rel.startsWith("..") && !path27.isAbsolute(rel);
24723
24743
  }
24724
24744
  function tryRealpath(p) {
24725
24745
  try {
24726
- return fs23.realpathSync(p);
24746
+ return fs24.realpathSync(p);
24727
24747
  } catch {
24728
24748
  return p;
24729
24749
  }
24730
24750
  }
24731
24751
  async function killToolServerForInstallDir(packageDir) {
24732
- const parents = /* @__PURE__ */ new Set([path26.resolve(packageDir), tryRealpath(packageDir)]);
24752
+ const parents = /* @__PURE__ */ new Set([path27.resolve(packageDir), tryRealpath(packageDir)]);
24733
24753
  let killed = 0;
24734
24754
  for (const { file, state: state2 } of await readAllToolsServerStates()) {
24735
- const bundles = /* @__PURE__ */ new Set([path26.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
24755
+ const bundles = /* @__PURE__ */ new Set([path27.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
24736
24756
  const matches2 = [...bundles].some((b) => [...parents].some((p) => isPathWithin(b, p)));
24737
24757
  if (!matches2) continue;
24738
24758
  const fresh = await readStateFile(file);
@@ -24750,7 +24770,7 @@ async function killToolServerForInstallDir(packageDir) {
24750
24770
  }
24751
24771
  return killed;
24752
24772
  }
24753
- var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs23.existsSync(p)) ?? "ps";
24773
+ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs24.existsSync(p)) ?? "ps";
24754
24774
  var PS_WIDTH_FLAGS = ["-ww"];
24755
24775
  var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
24756
24776
  function readProcessCommandLine(pid, flags = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
@@ -24797,14 +24817,13 @@ function couldBeOurToolServer(pid, marker) {
24797
24817
  var import_yaml4 = __toESM(require_dist2(), 1);
24798
24818
  import { readFile as readFile5 } from "node:fs/promises";
24799
24819
  import { maxHeaderSize } from "node:http";
24800
- import * as path30 from "node:path";
24820
+ import * as path31 from "node:path";
24801
24821
 
24802
24822
  // ../argent-tools-client/src/link-config.ts
24803
- import * as path27 from "node:path";
24804
- import { homedir as homedir8 } from "node:os";
24823
+ import * as path28 from "node:path";
24805
24824
  import { mkdir as mkdir2, writeFile as writeFile2, readFile as readFile2, unlink as unlink2, chmod as chmod2 } from "node:fs/promises";
24806
- var LINK_DIR = path27.join(homedir8(), ".argent");
24807
- var LINK_FILE = path27.join(LINK_DIR, "link.json");
24825
+ var LINK_DIR = argentHomeDir();
24826
+ var LINK_FILE = path28.join(LINK_DIR, "link.json");
24808
24827
 
24809
24828
  // ../argent-tools-client/src/file-inputs.ts
24810
24829
  import { createHash as createHash4, randomUUID as randomUUID6 } from "node:crypto";
@@ -24821,14 +24840,14 @@ import {
24821
24840
  writeFile as writeFile3
24822
24841
  } from "node:fs/promises";
24823
24842
  import { constants as constants2, tmpdir } from "node:os";
24824
- import * as path28 from "node:path";
24843
+ import * as path29 from "node:path";
24825
24844
 
24826
24845
  // ../archive/src/index.ts
24827
24846
  import { spawn as spawn5 } from "node:child_process";
24828
24847
  import { once } from "node:events";
24829
24848
  import { createReadStream, createWriteStream } from "node:fs";
24830
24849
  import { open, rm, readdir as readdir3 } from "node:fs/promises";
24831
- import { basename as basename5, dirname as dirname14, join as join25, resolve as resolve16, sep as sep4 } from "node:path";
24850
+ import { basename as basename5, dirname as dirname14, join as join27, resolve as resolve17, sep as sep4 } from "node:path";
24832
24851
  import { Writable } from "node:stream";
24833
24852
  import { pipeline } from "node:stream/promises";
24834
24853
  import zlib2 from "node:zlib";
@@ -24846,9 +24865,19 @@ var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
24846
24865
  // ../argent-tools-client/src/flow-files.ts
24847
24866
  var import_yaml3 = __toESM(require_dist2(), 1);
24848
24867
  import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat as stat4 } from "node:fs/promises";
24849
- import * as path29 from "node:path";
24868
+ import * as path30 from "node:path";
24850
24869
  var INLINE_MEMBERS_BYTES = 256 * 1024;
24851
24870
 
24871
+ // ../argent-tools-client/src/tools-client.ts
24872
+ var RECORDING_FILE_INPUT = {
24873
+ target: "__recording",
24874
+ path: `\${project_root}/${E2E_DIRS[0].split(path31.sep).join("/")}/\${name}.yaml`,
24875
+ paths: E2E_DIRS.map((dir) => `\${project_root}/${dir.split(path31.sep).join("/")}/\${name}.yaml`),
24876
+ kind: "file",
24877
+ optional: true,
24878
+ collect: "flow"
24879
+ };
24880
+
24852
24881
  // ../argent-tools-client/src/artifacts.ts
24853
24882
  import {
24854
24883
  copyFile,
@@ -24862,7 +24891,7 @@ import {
24862
24891
  } from "node:fs/promises";
24863
24892
  import { constants as fsConstants } from "node:fs";
24864
24893
  import { tmpdir as tmpdir2 } from "node:os";
24865
- import { basename as basename8, dirname as dirname18, extname as extname2, isAbsolute as isAbsolute10, join as join29, normalize as normalize2, resolve as resolve19, sep as sep7 } from "node:path";
24894
+ import { basename as basename8, extname as extname2, isAbsolute as isAbsolute10, join as join31, normalize as normalize2, resolve as resolve20, sep as sep8 } from "node:path";
24866
24895
  import { createHash as createHash5 } from "node:crypto";
24867
24896
  var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
24868
24897
  var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
@@ -24937,7 +24966,7 @@ function resolveUpdatePackageAction(trigger, installed) {
24937
24966
  return installed ? "standalone_update" : "standalone_install";
24938
24967
  }
24939
24968
  function isLivePinnedEntry(entry) {
24940
- return entry !== null && isPinnedGlobalEntry(entry) && fs24.existsSync(entry.command) && fs24.existsSync(entry.args[0]);
24969
+ return entry !== null && isPinnedGlobalEntry(entry) && fs25.existsSync(entry.command) && fs25.existsSync(entry.args[0]);
24941
24970
  }
24942
24971
  async function refreshConfiguration({
24943
24972
  projectRoot,
@@ -25169,7 +25198,7 @@ async function update(args) {
25169
25198
  const pm = mode === "local" ? detectProjectPackageManager(projectRoot) : detectGlobalPackageManager();
25170
25199
  if (automatic) {
25171
25200
  const globalRoot = getGloballyInstalledPackageRoot();
25172
- if (!globallyInstalled || !globalRoot || fs24.realpathSync(globalRoot) !== projectRoot || getConfigValueByKey("autoUpdate.enabled") !== true || !ownsGlobalInstall(pm, projectRoot)) {
25201
+ if (!globallyInstalled || !globalRoot || fs25.realpathSync(globalRoot) !== projectRoot || !isAutoUpdateEnabled() || !ownsGlobalInstall(pm, projectRoot)) {
25173
25202
  spinner2.stop("Could not confirm an automatic update for this installation.");
25174
25203
  return "noop";
25175
25204
  }
@@ -25370,7 +25399,7 @@ async function update(args) {
25370
25399
  process.exit(1);
25371
25400
  }
25372
25401
  if (automatic) {
25373
- const runningRoot = fs24.realpathSync(resolvePackageRoot(import.meta.dirname));
25402
+ const runningRoot = fs25.realpathSync(resolvePackageRoot(import.meta.dirname));
25374
25403
  const result = requestedVersion ? await applyUpdateForTarget("global", runningRoot) : "noop";
25375
25404
  if (result === "updated" && requestedVersion) {
25376
25405
  writeCliRecord({
@@ -25393,7 +25422,7 @@ async function update(args) {
25393
25422
  return;
25394
25423
  }
25395
25424
  const rootOverride = getProjectRootOverride(args);
25396
- const projectRoot = rootOverride ? path31.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
25425
+ const projectRoot = rootOverride ? path32.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
25397
25426
  installMode = resolveInstallMode(projectRoot);
25398
25427
  const flags = parseTargetFlags(args);
25399
25428
  const localInstalled = installMode === "local" && probeLocalInstall(projectRoot).installed;
@@ -25473,8 +25502,8 @@ async function update(args) {
25473
25502
  // ../argent-installer/src/uninstall.ts
25474
25503
  var import_picocolors13 = __toESM(require_picocolors(), 1);
25475
25504
  var import_yaml5 = __toESM(require_dist2(), 1);
25476
- import * as fs25 from "node:fs";
25477
- import * as path32 from "node:path";
25505
+ import * as fs26 from "node:fs";
25506
+ import * as path33 from "node:path";
25478
25507
  var UNINSTALL_TOOLSERVER_STOP_FAILED = {
25479
25508
  error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
25480
25509
  failure_stage: "installer_uninstall_toolserver_stop",
@@ -25495,10 +25524,10 @@ var UNINSTALL_UNCLASSIFIED_FAILED = {
25495
25524
  };
25496
25525
  function removeDirIfEmpty2(dirPath) {
25497
25526
  try {
25498
- if (!fs25.existsSync(dirPath)) return false;
25499
- if (!fs25.statSync(dirPath).isDirectory()) return false;
25500
- if (fs25.readdirSync(dirPath).length > 0) return false;
25501
- fs25.rmdirSync(dirPath);
25527
+ if (!fs26.existsSync(dirPath)) return false;
25528
+ if (!fs26.statSync(dirPath).isDirectory()) return false;
25529
+ if (fs26.readdirSync(dirPath).length > 0) return false;
25530
+ fs26.rmdirSync(dirPath);
25502
25531
  return true;
25503
25532
  } catch {
25504
25533
  return false;
@@ -25508,9 +25537,9 @@ function collectBundledPaths(sourceDir) {
25508
25537
  const files = [];
25509
25538
  const directories = [];
25510
25539
  function walk(currentDir, relativeDir = "") {
25511
- for (const entry of fs25.readdirSync(currentDir, { withFileTypes: true })) {
25512
- const relativePath = relativeDir ? path32.join(relativeDir, entry.name) : entry.name;
25513
- const absolutePath = path32.join(currentDir, entry.name);
25540
+ for (const entry of fs26.readdirSync(currentDir, { withFileTypes: true })) {
25541
+ const relativePath = relativeDir ? path33.join(relativeDir, entry.name) : entry.name;
25542
+ const absolutePath = path33.join(currentDir, entry.name);
25514
25543
  if (entry.isDirectory()) {
25515
25544
  walk(absolutePath, relativePath);
25516
25545
  directories.push(relativePath);
@@ -25523,15 +25552,15 @@ function collectBundledPaths(sourceDir) {
25523
25552
  return { files, directories };
25524
25553
  }
25525
25554
  function removeBundledContent(sourceDir, targetDir) {
25526
- if (!fs25.existsSync(sourceDir) || !fs25.existsSync(targetDir)) {
25555
+ if (!fs26.existsSync(sourceDir) || !fs26.existsSync(targetDir)) {
25527
25556
  return { removedPaths: [], removedRoot: false };
25528
25557
  }
25529
25558
  const { files, directories } = collectBundledPaths(sourceDir);
25530
25559
  const removedPaths = [];
25531
25560
  for (const relativePath of files) {
25532
- const targetPath = path32.join(targetDir, relativePath);
25561
+ const targetPath = path33.join(targetDir, relativePath);
25533
25562
  try {
25534
- const entry = fs25.lstatSync(targetPath, { throwIfNoEntry: false });
25563
+ const entry = fs26.lstatSync(targetPath, { throwIfNoEntry: false });
25535
25564
  if (!entry || entry.isDirectory()) continue;
25536
25565
  removePath(targetPath);
25537
25566
  removedPaths.push(relativePath);
@@ -25539,36 +25568,36 @@ function removeBundledContent(sourceDir, targetDir) {
25539
25568
  }
25540
25569
  }
25541
25570
  directories.sort(
25542
- (a2, b) => b.split(path32.sep).length - a2.split(path32.sep).length || b.length - a2.length
25571
+ (a2, b) => b.split(path33.sep).length - a2.split(path33.sep).length || b.length - a2.length
25543
25572
  );
25544
25573
  for (const relativePath of directories) {
25545
- const targetPath = path32.join(targetDir, relativePath);
25574
+ const targetPath = path33.join(targetDir, relativePath);
25546
25575
  try {
25547
- if (!fs25.existsSync(targetPath)) continue;
25548
- if (!fs25.statSync(targetPath).isDirectory()) continue;
25549
- if (fs25.readdirSync(targetPath).length > 0) continue;
25550
- fs25.rmdirSync(targetPath);
25576
+ if (!fs26.existsSync(targetPath)) continue;
25577
+ if (!fs26.statSync(targetPath).isDirectory()) continue;
25578
+ if (fs26.readdirSync(targetPath).length > 0) continue;
25579
+ fs26.rmdirSync(targetPath);
25551
25580
  } catch {
25552
25581
  }
25553
25582
  }
25554
25583
  let removedRoot = false;
25555
25584
  try {
25556
- if (fs25.existsSync(targetDir) && fs25.statSync(targetDir).isDirectory()) {
25557
- if (fs25.readdirSync(targetDir).length === 0) {
25558
- fs25.rmdirSync(targetDir);
25585
+ if (fs26.existsSync(targetDir) && fs26.statSync(targetDir).isDirectory()) {
25586
+ if (fs26.readdirSync(targetDir).length === 0) {
25587
+ fs26.rmdirSync(targetDir);
25559
25588
  removedRoot = true;
25560
25589
  }
25561
25590
  }
25562
25591
  } catch {
25563
25592
  }
25564
25593
  if (removedRoot) {
25565
- removeDirIfEmpty2(path32.dirname(targetDir));
25594
+ removeDirIfEmpty2(path33.dirname(targetDir));
25566
25595
  }
25567
25596
  return { removedPaths, removedRoot };
25568
25597
  }
25569
25598
  function readBundledSkillName(skillFilePath, fallbackName) {
25570
25599
  try {
25571
- const content = fs25.readFileSync(skillFilePath, "utf8");
25600
+ const content = fs26.readFileSync(skillFilePath, "utf8");
25572
25601
  const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1];
25573
25602
  if (!frontmatter) return fallbackName;
25574
25603
  const data = (0, import_yaml5.parse)(frontmatter);
@@ -25579,23 +25608,23 @@ function readBundledSkillName(skillFilePath, fallbackName) {
25579
25608
  }
25580
25609
  }
25581
25610
  function getBundledSkillNames(skillsDir) {
25582
- if (!fs25.existsSync(skillsDir)) return [];
25611
+ if (!fs26.existsSync(skillsDir)) return [];
25583
25612
  const skillNames = [];
25584
- for (const entry of fs25.readdirSync(skillsDir, { withFileTypes: true })) {
25613
+ for (const entry of fs26.readdirSync(skillsDir, { withFileTypes: true })) {
25585
25614
  if (!entry.isDirectory()) continue;
25586
- const skillFilePath = path32.join(skillsDir, entry.name, "SKILL.md");
25587
- if (!fs25.existsSync(skillFilePath)) continue;
25615
+ const skillFilePath = path33.join(skillsDir, entry.name, "SKILL.md");
25616
+ if (!fs26.existsSync(skillFilePath)) continue;
25588
25617
  skillNames.push(readBundledSkillName(skillFilePath, entry.name));
25589
25618
  }
25590
25619
  return [...new Set(skillNames)].sort();
25591
25620
  }
25592
25621
  function removeBundledSkillInstalls(skillNames, targetDir) {
25593
- if (!fs25.existsSync(targetDir)) {
25622
+ if (!fs26.existsSync(targetDir)) {
25594
25623
  return { removedPaths: [], removedRoot: false };
25595
25624
  }
25596
25625
  const removedPaths = [];
25597
25626
  for (const skillName of skillNames) {
25598
- const targetPath = path32.join(targetDir, skillName);
25627
+ const targetPath = path33.join(targetDir, skillName);
25599
25628
  try {
25600
25629
  if (removePath(targetPath)) removedPaths.push(skillName);
25601
25630
  } catch {
@@ -25603,17 +25632,17 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
25603
25632
  }
25604
25633
  const removedRoot = removeDirIfEmpty2(targetDir);
25605
25634
  if (removedRoot) {
25606
- removeDirIfEmpty2(path32.dirname(targetDir));
25635
+ removeDirIfEmpty2(path33.dirname(targetDir));
25607
25636
  }
25608
25637
  return { removedPaths, removedRoot };
25609
25638
  }
25610
25639
  function cleanupSkillsLockFile(lockPath, skillNames) {
25611
- if (!fs25.existsSync(lockPath)) {
25640
+ if (!fs26.existsSync(lockPath)) {
25612
25641
  return { removedSkills: [], removedFile: false };
25613
25642
  }
25614
25643
  let parsed;
25615
25644
  try {
25616
- parsed = JSON.parse(fs25.readFileSync(lockPath, "utf8"));
25645
+ parsed = JSON.parse(fs26.readFileSync(lockPath, "utf8"));
25617
25646
  } catch {
25618
25647
  return { removedSkills: [], removedFile: false };
25619
25648
  }
@@ -25640,10 +25669,10 @@ function cleanupSkillsLockFile(lockPath, skillNames) {
25640
25669
  parsed.skills && typeof parsed.skills === "object" && Object.keys(parsed.skills).length > 0
25641
25670
  );
25642
25671
  if (!hasSkills && otherKeys.length === 0) {
25643
- fs25.rmSync(lockPath, { force: true });
25672
+ fs26.rmSync(lockPath, { force: true });
25644
25673
  return { removedSkills, removedFile: true };
25645
25674
  }
25646
- fs25.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
25675
+ fs26.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
25647
25676
  return { removedSkills, removedFile: false };
25648
25677
  }
25649
25678
  function cleanupBundledSkills(skillNames, targets) {
@@ -25846,7 +25875,7 @@ async function uninstall(args) {
25846
25875
  ),
25847
25876
  { ask: false }
25848
25877
  );
25849
- for (const root of retired.removedRoots) removeDirIfEmpty2(path32.dirname(root));
25878
+ for (const root of retired.removedRoots) removeDirIfEmpty2(path33.dirname(root));
25850
25879
  const retiredLines = formatRetiredCleanup(retired);
25851
25880
  pruneResults.push(...retiredLines.removed.map((line) => `${import_picocolors13.default.green("+")} ${line}`));
25852
25881
  const retiredKept = retiredLines.kept.map((line) => ` ${line}`);
@@ -25965,7 +25994,7 @@ async function uninstall(args) {
25965
25994
  try {
25966
25995
  execShellCommandSync(removable.cmd, { cwd: removable.cwd, env: removable.env });
25967
25996
  const leftover = removable.kind === "global" ? getRemainingGlobalBinaryPath() : null;
25968
- const removed = !leftover || removable.installDir !== null && !fs25.existsSync(removable.installDir);
25997
+ const removed = !leftover || removable.installDir !== null && !fs26.existsSync(removable.installDir);
25969
25998
  if (removed) hasUninstalledPackage = true;
25970
25999
  if (removed && removeCliRecordFor(removable.installDir)) {
25971
26000
  log.info(import_picocolors13.default.dim("Removed ~/.argent/cli.json (provider CLI discovery record)."));