@swmansion/argent 0.35.1-next.8 → 0.35.1-next.80

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 (59) 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 +2868 -2166
  10. package/dist/cli.js +22 -3
  11. package/dist/cli.js.map +1 -1
  12. package/dist/client.js +762 -440
  13. package/dist/fatal-handlers.d.ts +1 -0
  14. package/dist/fatal-handlers.js +8 -2
  15. package/dist/fatal-handlers.js.map +1 -1
  16. package/dist/installer-help.js +4 -2
  17. package/dist/installer-help.js.map +1 -1
  18. package/dist/installer.mjs +762 -705
  19. package/dist/mcp-server.mjs +1830 -1408
  20. package/dist/tool-args.generated.d.ts +409 -326
  21. package/dist/tool-server.cjs +13617 -8219
  22. package/dylibs/libArgentAudio.dylib +0 -0
  23. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  24. package/dylibs/libKeyboardPatch.dylib +0 -0
  25. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  26. package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
  27. package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
  28. package/dylibs/tcp/argent-audio-feeder +0 -0
  29. package/dylibs/tcp/libArgentAudio.dylib +0 -0
  30. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  31. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  32. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  33. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  34. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  35. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  36. package/package.json +2 -2
  37. package/skills/argent-android-emulator-setup/SKILL.md +2 -2
  38. package/skills/argent-create-e2e/SKILL.md +2 -1
  39. package/skills/argent-create-e2e/references/e2e-yaml.md +40 -5
  40. package/skills/argent-create-e2e/references/live-authoring.md +14 -4
  41. package/skills/argent-device-interact/SKILL.md +21 -94
  42. package/skills/argent-device-interact/references/advanced.md +64 -0
  43. package/skills/argent-ios-device-interact/SKILL.md +1 -1
  44. package/skills/argent-ios-device-setup/SKILL.md +1 -1
  45. package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
  46. package/skills/argent-lens/SKILL.md +1 -1
  47. package/skills/argent-macos-app-interact/SKILL.md +3 -2
  48. package/skills/argent-macos-app-interact/references/e2e.md +1 -0
  49. package/skills/argent-metro-debugger/SKILL.md +4 -4
  50. package/skills/argent-native-profiler/SKILL.md +1 -1
  51. package/skills/argent-qa-e2e/SKILL.md +1 -1
  52. package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
  53. package/skills/argent-react-native-optimization/SKILL.md +1 -1
  54. package/skills/argent-react-native-profiler/SKILL.md +1 -1
  55. package/skills/argent-screen-recording/SKILL.md +1 -1
  56. package/skills/argent-screenshot-diff/SKILL.md +1 -1
  57. package/skills/argent-settings-permissions/SKILL.md +1 -1
  58. package/skills/argent-test-ui-flow/SKILL.md +1 -1
  59. 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,11 +2430,11 @@ 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();
2434
- var constants3 = require_constants();
2433
+ var parse6 = require_parse();
2434
+ var constants4 = require_constants();
2435
2435
  var SemVer = require_semver();
2436
2436
  var truncate = (version, truncation, options) => {
2437
- if (!constants3.RELEASE_TYPES.includes(truncation)) {
2437
+ if (!constants4.RELEASE_TYPES.includes(truncation)) {
2438
2438
  return null;
2439
2439
  }
2440
2440
  const clonedVersion = cloneInputVersion(version, 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)) {
@@ -3483,10 +3483,10 @@ var require_semver2 = __commonJS({
3483
3483
  "../../node_modules/semver/index.js"(exports, module) {
3484
3484
  "use strict";
3485
3485
  var internalRe = require_re();
3486
- var constants3 = require_constants();
3486
+ var constants4 = 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,
@@ -3567,8 +3567,8 @@ var require_semver2 = __commonJS({
3567
3567
  re: internalRe.re,
3568
3568
  src: internalRe.src,
3569
3569
  tokens: internalRe.t,
3570
- SEMVER_SPEC_VERSION: constants3.SEMVER_SPEC_VERSION,
3571
- RELEASE_TYPES: constants3.RELEASE_TYPES,
3570
+ SEMVER_SPEC_VERSION: constants4.SEMVER_SPEC_VERSION,
3571
+ RELEASE_TYPES: constants4.RELEASE_TYPES,
3572
3572
  compareIdentifiers: identifiers.compareIdentifiers,
3573
3573
  rcompareIdentifiers: identifiers.rcompareIdentifiers
3574
3574
  };
@@ -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, path35) {
3656
+ const ctrl = callVisitor(key, node, visitor, path35);
3657
3657
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3658
- replaceNode(key, path33, ctrl);
3659
- return visit_(key, ctrl, visitor, path33);
3658
+ replaceNode(key, path35, ctrl);
3659
+ return visit_(key, ctrl, visitor, path35);
3660
3660
  }
3661
3661
  if (typeof ctrl !== "symbol") {
3662
3662
  if (identity2.isCollection(node)) {
3663
- path33 = Object.freeze(path33.concat(node));
3663
+ path35 = Object.freeze(path35.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, path35);
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
+ path35 = Object.freeze(path35.concat(node));
3677
+ const ck = visit_("key", node.key, visitor, path35);
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, path35);
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, path35) {
3704
+ const ctrl = await callVisitor(key, node, visitor, path35);
3705
3705
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3706
- replaceNode(key, path33, ctrl);
3707
- return visitAsync_(key, ctrl, visitor, path33);
3706
+ replaceNode(key, path35, ctrl);
3707
+ return visitAsync_(key, ctrl, visitor, path35);
3708
3708
  }
3709
3709
  if (typeof ctrl !== "symbol") {
3710
3710
  if (identity2.isCollection(node)) {
3711
- path33 = Object.freeze(path33.concat(node));
3711
+ path35 = Object.freeze(path35.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, path35);
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
+ path35 = Object.freeze(path35.concat(node));
3725
+ const ck = await visitAsync_("key", node.key, visitor, path35);
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, path35);
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, path35) {
3758
3758
  if (typeof visitor === "function")
3759
- return visitor(key, node, path33);
3759
+ return visitor(key, node, path35);
3760
3760
  if (identity2.isMap(node))
3761
- return visitor.Map?.(key, node, path33);
3761
+ return visitor.Map?.(key, node, path35);
3762
3762
  if (identity2.isSeq(node))
3763
- return visitor.Seq?.(key, node, path33);
3763
+ return visitor.Seq?.(key, node, path35);
3764
3764
  if (identity2.isPair(node))
3765
- return visitor.Pair?.(key, node, path33);
3765
+ return visitor.Pair?.(key, node, path35);
3766
3766
  if (identity2.isScalar(node))
3767
- return visitor.Scalar?.(key, node, path33);
3767
+ return visitor.Scalar?.(key, node, path35);
3768
3768
  if (identity2.isAlias(node))
3769
- return visitor.Alias?.(key, node, path33);
3769
+ return visitor.Alias?.(key, node, path35);
3770
3770
  return void 0;
3771
3771
  }
3772
- function replaceNode(key, path33, node) {
3773
- const parent = path33[path33.length - 1];
3772
+ function replaceNode(key, path35, node) {
3773
+ const parent = path35[path35.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, path35, 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 = path35.length - 1; i2 >= 0; --i2) {
4388
+ const k = path35[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 = (path35) => path35 == null || typeof path35 === "object" && !!path35[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(path35, value) {
4438
+ if (isEmptyPath(path35))
4439
4439
  this.add(value);
4440
4440
  else {
4441
- const [key, ...rest] = path33;
4441
+ const [key, ...rest] = path35;
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(path35) {
4456
+ const [key, ...rest] = path35;
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(path35, keepScalar) {
4471
+ const [key, ...rest] = path35;
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(path35) {
4490
+ const [key, ...rest] = path35;
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(path35, value) {
4501
+ const [key, ...rest] = path35;
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(path35, value) {
7017
7017
  if (assertCollection(this.contents))
7018
- this.contents.addIn(path33, value);
7018
+ this.contents.addIn(path35, 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(path35) {
7094
+ if (Collection.isEmptyPath(path35)) {
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(path35) : 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(path35, keepScalar) {
7116
+ if (Collection.isEmptyPath(path35))
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(path35, 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(path35) {
7130
+ if (Collection.isEmptyPath(path35))
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(path35) : 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(path35, value) {
7150
+ if (Collection.isEmptyPath(path35)) {
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(path35), value);
7154
7154
  } else if (assertCollection(this.contents)) {
7155
- this.contents.setIn(path33, value);
7155
+ this.contents.setIn(path35, 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, path35) => {
9117
9117
  let item = cst;
9118
- for (const [field, index] of path33) {
9118
+ for (const [field, index] of path35) {
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, path35) => {
9128
+ const parent = visit2.itemAtPath(cst, path35.slice(0, -1));
9129
+ const field = path35[path35.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(path35, item, visitor) {
9136
+ let ctrl = visitor(item, path35);
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(path35.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, path35);
9155
9155
  }
9156
9156
  }
9157
- return typeof ctrl === "function" ? ctrl(item, path33) : ctrl;
9157
+ return typeof ctrl === "function" ? ctrl(item, path35) : 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 fs28 = this.flowScalar(this.type);
10460
10460
  if (atNextItem || it.value) {
10461
- map.items.push({ start, key: fs26, sep: [] });
10461
+ map.items.push({ start, key: fs28, sep: [] });
10462
10462
  this.onKeyLine = true;
10463
10463
  } else if (it.sep) {
10464
- this.stack.push(fs26);
10464
+ this.stack.push(fs28);
10465
10465
  } else {
10466
- Object.assign(it, { key: fs26, sep: [] });
10466
+ Object.assign(it, { key: fs28, 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 fs28 = this.flowScalar(this.type);
10595
10595
  if (!it || it.value)
10596
- fc.items.push({ start: [], key: fs26, sep: [] });
10596
+ fc.items.push({ start: [], key: fs28, sep: [] });
10597
10597
  else if (it.sep)
10598
- this.stack.push(fs26);
10598
+ this.stack.push(fs28);
10599
10599
  else
10600
- Object.assign(it, { key: fs26, sep: [] });
10600
+ Object.assign(it, { key: fs28, 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, path35) {
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 += path35;
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 '${path35}' 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 fs8 from "node:fs";
15141
15141
 
15142
15142
  // ../telemetry/src/paths.ts
15143
- import * as path7 from "node:path";
15143
+ import * as path9 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) {
@@ -15437,7 +15441,9 @@ var CONFIG_SCHEMA = [
15437
15441
  default: true,
15438
15442
  // Opt-in/out goes through the dedicated command so the live client is
15439
15443
  // drained/reset, not just the file rewritten.
15440
- manageCommand: "argent telemetry"
15444
+ manageCommand: "argent telemetry",
15445
+ // consent.ts keeps a ~/.argent opt-out under a moved home; show the same.
15446
+ userHomeOptOut: true
15441
15447
  },
15442
15448
  {
15443
15449
  key: "autoUpdate.enabled",
@@ -15446,6 +15452,8 @@ var CONFIG_SCHEMA = [
15446
15452
  parse: asBoolean,
15447
15453
  merge: "prioritize-local",
15448
15454
  default: true,
15455
+ // The global install is shared by every Argent home.
15456
+ userHomeOptOut: true,
15449
15457
  example: "false"
15450
15458
  },
15451
15459
  {
@@ -15536,7 +15544,8 @@ function getConfigDefinition(key, registry = CONFIG_SCHEMA) {
15536
15544
  }
15537
15545
 
15538
15546
  // ../configuration-core/src/config-access.ts
15539
- import * as path6 from "node:path";
15547
+ import * as fs6 from "node:fs";
15548
+ import * as path7 from "node:path";
15540
15549
  function readScopeValue(def, scope, options) {
15541
15550
  if (!def.scopes.includes(scope)) return void 0;
15542
15551
  const raw = getAtPath(readConfigObject(scope, options), def.key);
@@ -15545,8 +15554,11 @@ function readScopeValue(def, scope, options) {
15545
15554
  function getConfigValue(def, options = {}) {
15546
15555
  const local = readScopeValue(def, "project", options);
15547
15556
  const global2 = readScopeValue(def, "global", options);
15548
- const merged = applyMergePolicy(def.merge, local, global2);
15549
- return merged ?? def.default;
15557
+ const merged = applyMergePolicy(def.merge, local, global2) ?? def.default;
15558
+ if (!def.userHomeOptOut) return merged;
15559
+ const userHome = { homeDir: resolveHomeDir(options) };
15560
+ if (argentHomeDir(options) === argentHomeDir(userHome)) return merged;
15561
+ return readScopeValue(def, "global", userHome) === false ? false : merged;
15550
15562
  }
15551
15563
  function getConfigValueByKey(key, options = {}, registry = CONFIG_SCHEMA) {
15552
15564
  const def = requireDefinition(key, registry);
@@ -15567,13 +15579,23 @@ var UnknownConfigKeyError = class extends Error {
15567
15579
  }
15568
15580
  key;
15569
15581
  };
15582
+ var AUTO_UPDATE_ENABLED_KEY = "autoUpdate.enabled";
15583
+ function isAutoUpdateEnabled() {
15584
+ return getConfigValueByKey(AUTO_UPDATE_ENABLED_KEY) === true;
15585
+ }
15586
+
15587
+ // ../configuration-core/src/cloud-android.ts
15588
+ import * as fs7 from "node:fs";
15589
+ import * as os2 from "node:os";
15590
+ import * as path8 from "node:path";
15591
+ var CLOUD_ANDROID_MARKER_TTL_MS = 2 * 6e4;
15570
15592
 
15571
15593
  // ../telemetry/src/paths.ts
15572
15594
  function identityFilePath() {
15573
- return path7.join(argentHomeDir(), "telemetry-id");
15595
+ return path9.join(argentHomeDir(), "telemetry-id");
15574
15596
  }
15575
15597
  function debugLogPath() {
15576
- return path7.join(argentHomeDir(), "telemetry-debug.log");
15598
+ return path9.join(argentHomeDir(), "telemetry-debug.log");
15577
15599
  }
15578
15600
 
15579
15601
  // ../telemetry/src/debug.ts
@@ -15603,8 +15625,8 @@ function emitDebugPayload(payload) {
15603
15625
  } catch {
15604
15626
  }
15605
15627
  try {
15606
- fs6.mkdirSync(argentHomeDir(), { recursive: true });
15607
- fs6.appendFileSync(debugLogPath(), line + "\n");
15628
+ fs8.mkdirSync(argentHomeDir(), { recursive: true });
15629
+ fs8.appendFileSync(debugLogPath(), line + "\n");
15608
15630
  } catch {
15609
15631
  }
15610
15632
  }
@@ -15792,16 +15814,16 @@ var LAUNCH_PLATFORMS = ["ios", "android", "chromium", "vega", "macos"];
15792
15814
  var SELECTABLE_PLATFORMS = [...LAUNCH_PLATFORMS, "ios-remote"];
15793
15815
 
15794
15816
  // ../registry/src/flow-file-refs.ts
15795
- import * as fs8 from "node:fs/promises";
15796
- import * as path9 from "node:path";
15817
+ import * as fs10 from "node:fs/promises";
15818
+ import * as path11 from "node:path";
15797
15819
 
15798
15820
  // ../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")]);
15821
+ import * as fs9 from "node:fs/promises";
15822
+ import * as path10 from "node:path";
15823
+ var E2E_DIR = path10.join(".argent", "e2e");
15824
+ var LEGACY_E2E_DIRS = Object.freeze([path10.join(".argent", "flows")]);
15803
15825
  var E2E_DIRS = Object.freeze([E2E_DIR, ...LEGACY_E2E_DIRS]);
15804
- var E2E_DIR_NAMES = E2E_DIRS.map((dir) => path8.basename(dir));
15826
+ var E2E_DIR_NAMES = E2E_DIRS.map((dir) => path10.basename(dir));
15805
15827
 
15806
15828
  // ../registry/src/tool-ids.ts
15807
15829
  var TOOL_ID_ALIASES = Object.freeze({
@@ -16221,6 +16243,8 @@ var FAILURE_CODES = {
16221
16243
  MACOS_APP_FILE_ACCESS_FAILED: "MACOS_APP_FILE_ACCESS_FAILED",
16222
16244
  /** The app's loaded Argent library lacks support for the requested operation. */
16223
16245
  MACOS_APP_LIBRARY_OUTDATED: "MACOS_APP_LIBRARY_OUTDATED",
16246
+ /** The user clicked, scrolled or typed in the app while argent's pointer moved, and took the pointer back. */
16247
+ MACOS_APP_POINTER_TAKEN_OVER: "MACOS_APP_POINTER_TAKEN_OVER",
16224
16248
  KEYBOARD_KEY_UNSUPPORTED: "KEYBOARD_KEY_UNSUPPORTED",
16225
16249
  KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
16226
16250
  KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
@@ -16252,6 +16276,17 @@ var FAILURE_CODES = {
16252
16276
  BOOT_HARMONY_STOP_TIMEOUT: "BOOT_HARMONY_STOP_TIMEOUT",
16253
16277
  BOOT_HARMONY_MANAGER_EXITED: "BOOT_HARMONY_MANAGER_EXITED",
16254
16278
  BOOT_HARMONY_START_FAILED: "BOOT_HARMONY_START_FAILED",
16279
+ /**
16280
+ * Argent Cloud Android emulators
16281
+ * @see [leases.ts](../../tool-server/src/utils/cloud-android/leases.ts)
16282
+ */
16283
+ CLOUD_ANDROID_ACCESS_DENIED: "CLOUD_ANDROID_ACCESS_DENIED",
16284
+ CLOUD_ANDROID_ACQUIRE_FAILED: "CLOUD_ANDROID_ACQUIRE_FAILED",
16285
+ CLOUD_ANDROID_ADB_KEY_MISSING: "CLOUD_ANDROID_ADB_KEY_MISSING",
16286
+ CLOUD_ANDROID_ADB_SERVER_REMOTE: "CLOUD_ANDROID_ADB_SERVER_REMOTE",
16287
+ CLOUD_ANDROID_CONNECT_FAILED: "CLOUD_ANDROID_CONNECT_FAILED",
16288
+ CLOUD_ANDROID_LEASE_IN_USE: "CLOUD_ANDROID_LEASE_IN_USE",
16289
+ CLOUD_ANDROID_NO_EMULATOR: "CLOUD_ANDROID_NO_EMULATOR",
16255
16290
  /**
16256
16291
  * External device providers
16257
16292
  * @see [external-devices.ts](../../tool-server/src/utils/external-devices.ts)
@@ -16650,7 +16685,7 @@ function sanitize(event, raw) {
16650
16685
  import { randomUUID as randomUUID4 } from "node:crypto";
16651
16686
 
16652
16687
  // ../telemetry/src/cloud-agent-detect.ts
16653
- import { existsSync as existsSync3 } from "node:fs";
16688
+ import { existsSync as existsSync4 } from "node:fs";
16654
16689
  var CLAUDE_CLOUD_ENV_KINDS = /* @__PURE__ */ new Set(["byoc", "anthropic_cloud"]);
16655
16690
  var CLAUDE_REMOTE_ENTRYPOINTS = /* @__PURE__ */ new Set([
16656
16691
  "remote",
@@ -16681,9 +16716,9 @@ function isReplitAgent(env) {
16681
16716
  }
16682
16717
  var DEVIN_MARKER_PATH = "/opt/.devin";
16683
16718
  var JULES_MARKER_PATH = "/opt/environment_summary.sh";
16684
- function safeExists(fileExists, path33) {
16719
+ function safeExists(fileExists, path35) {
16685
16720
  try {
16686
- return fileExists(path33);
16721
+ return fileExists(path35);
16687
16722
  } catch {
16688
16723
  return false;
16689
16724
  }
@@ -16693,7 +16728,7 @@ function detectCloudAgent(env = process.env, opts = {}) {
16693
16728
  if (isCursorCloud(env)) return "cursor";
16694
16729
  if (isCopilotAgent(env)) return "copilot";
16695
16730
  if (isReplitAgent(env)) return "replit";
16696
- const fileExists = opts.fileExists ?? existsSync3;
16731
+ const fileExists = opts.fileExists ?? existsSync4;
16697
16732
  if (safeExists(fileExists, DEVIN_MARKER_PATH)) return "devin";
16698
16733
  if (safeExists(fileExists, JULES_MARKER_PATH)) return "jules";
16699
16734
  return null;
@@ -17103,7 +17138,7 @@ function isCi(env = process.env) {
17103
17138
  var SESSION_ID = randomUUID4();
17104
17139
  function readCliVersion() {
17105
17140
  if (true) {
17106
- return "0.35.1-next.7";
17141
+ return "0.35.1-next.78";
17107
17142
  }
17108
17143
  return "0.0.0";
17109
17144
  }
@@ -17136,8 +17171,8 @@ function getBaseProps(runtime) {
17136
17171
 
17137
17172
  // ../telemetry/src/identity.ts
17138
17173
  import * as crypto2 from "node:crypto";
17139
- import * as fs9 from "node:fs";
17140
- import * as path10 from "node:path";
17174
+ import * as fs11 from "node:fs";
17175
+ import * as path12 from "node:path";
17141
17176
  var FINGERPRINT_PATTERN = /^[0-9a-f]{64}$/;
17142
17177
  var cached = null;
17143
17178
  var fingerprintResolved = null;
@@ -17244,66 +17279,66 @@ function resolveFingerprintOnce(resolveFingerprint) {
17244
17279
  function isCorruptIdFile(filePath) {
17245
17280
  let isRegularFile;
17246
17281
  try {
17247
- isRegularFile = fs9.lstatSync(filePath).isFile();
17282
+ isRegularFile = fs11.lstatSync(filePath).isFile();
17248
17283
  } catch {
17249
17284
  return false;
17250
17285
  }
17251
17286
  return isRegularFile && tryReadId(filePath) === null;
17252
17287
  }
17253
17288
  function writeIdFileAtomic(finalPath, id) {
17254
- fs9.mkdirSync(argentHomeDir(), { recursive: true });
17289
+ fs11.mkdirSync(argentHomeDir(), { recursive: true });
17255
17290
  let occupant;
17256
17291
  try {
17257
- occupant = fs9.lstatSync(finalPath);
17292
+ occupant = fs11.lstatSync(finalPath);
17258
17293
  } catch (err) {
17259
17294
  if (err.code !== "ENOENT") throw err;
17260
17295
  }
17261
17296
  if (occupant && !occupant.isFile()) {
17262
17297
  throw new Error("telemetry: refusing to replace a non-regular file at the identity path");
17263
17298
  }
17264
- const tmpPath = path10.join(
17299
+ const tmpPath = path12.join(
17265
17300
  argentHomeDir(),
17266
17301
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
17267
17302
  );
17268
- const fd = fs9.openSync(tmpPath, "wx", 384);
17303
+ const fd = fs11.openSync(tmpPath, "wx", 384);
17269
17304
  try {
17270
17305
  try {
17271
- fs9.writeSync(fd, id);
17272
- fs9.fsyncSync(fd);
17306
+ fs11.writeSync(fd, id);
17307
+ fs11.fsyncSync(fd);
17273
17308
  } finally {
17274
- fs9.closeSync(fd);
17309
+ fs11.closeSync(fd);
17275
17310
  }
17276
- fs9.renameSync(tmpPath, finalPath);
17311
+ fs11.renameSync(tmpPath, finalPath);
17277
17312
  } finally {
17278
17313
  try {
17279
- fs9.unlinkSync(tmpPath);
17314
+ fs11.unlinkSync(tmpPath);
17280
17315
  } catch {
17281
17316
  }
17282
17317
  }
17283
17318
  }
17284
17319
  function mintRandomId(finalPath) {
17285
- fs9.mkdirSync(argentHomeDir(), { recursive: true });
17320
+ fs11.mkdirSync(argentHomeDir(), { recursive: true });
17286
17321
  let value = crypto2.randomUUID();
17287
17322
  for (let attempt = 0; attempt < 3; attempt++) {
17288
- const tmpPath = path10.join(
17323
+ const tmpPath = path12.join(
17289
17324
  argentHomeDir(),
17290
17325
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
17291
17326
  );
17292
17327
  let fd;
17293
17328
  try {
17294
- fd = fs9.openSync(tmpPath, "wx", 384);
17329
+ fd = fs11.openSync(tmpPath, "wx", 384);
17295
17330
  } catch (err) {
17296
17331
  if (err.code === "EEXIST") continue;
17297
17332
  throw err;
17298
17333
  }
17299
17334
  try {
17300
17335
  try {
17301
- fs9.writeSync(fd, value);
17302
- fs9.fsyncSync(fd);
17336
+ fs11.writeSync(fd, value);
17337
+ fs11.fsyncSync(fd);
17303
17338
  } finally {
17304
- fs9.closeSync(fd);
17339
+ fs11.closeSync(fd);
17305
17340
  }
17306
- fs9.linkSync(tmpPath, finalPath);
17341
+ fs11.linkSync(tmpPath, finalPath);
17307
17342
  cached = { path: finalPath, id: value };
17308
17343
  return value;
17309
17344
  } catch (err) {
@@ -17322,7 +17357,7 @@ function mintRandomId(finalPath) {
17322
17357
  throw err;
17323
17358
  } finally {
17324
17359
  try {
17325
- fs9.unlinkSync(tmpPath);
17360
+ fs11.unlinkSync(tmpPath);
17326
17361
  } catch {
17327
17362
  }
17328
17363
  }
@@ -17330,12 +17365,12 @@ function mintRandomId(finalPath) {
17330
17365
  throw new Error("telemetry: failed to create identity after retries");
17331
17366
  }
17332
17367
  function claimCorruptOccupant(finalPath) {
17333
- const claimed = path10.join(
17368
+ const claimed = path12.join(
17334
17369
  argentHomeDir(),
17335
17370
  `.telemetry-id.corrupt.${process.pid}.${crypto2.randomUUID()}`
17336
17371
  );
17337
17372
  try {
17338
- fs9.renameSync(finalPath, claimed);
17373
+ fs11.renameSync(finalPath, claimed);
17339
17374
  } catch {
17340
17375
  return null;
17341
17376
  }
@@ -17344,7 +17379,7 @@ function claimCorruptOccupant(finalPath) {
17344
17379
  grabbed = tryReadId(claimed);
17345
17380
  } finally {
17346
17381
  try {
17347
- fs9.unlinkSync(claimed);
17382
+ fs11.unlinkSync(claimed);
17348
17383
  } catch {
17349
17384
  }
17350
17385
  }
@@ -17353,7 +17388,7 @@ function claimCorruptOccupant(finalPath) {
17353
17388
  function deleteAnonId() {
17354
17389
  cached = null;
17355
17390
  try {
17356
- fs9.unlinkSync(identityFilePath());
17391
+ fs11.unlinkSync(identityFilePath());
17357
17392
  } catch (err) {
17358
17393
  if (err.code !== "ENOENT") throw err;
17359
17394
  }
@@ -17361,9 +17396,9 @@ function deleteAnonId() {
17361
17396
  function tryReadId(filePath) {
17362
17397
  let raw;
17363
17398
  try {
17364
- const stats = fs9.lstatSync(filePath);
17399
+ const stats = fs11.lstatSync(filePath);
17365
17400
  if (!stats.isFile()) return null;
17366
- raw = fs9.readFileSync(filePath, "utf8");
17401
+ raw = fs11.readFileSync(filePath, "utf8");
17367
17402
  } catch (err) {
17368
17403
  if (err.code === "ENOENT") return null;
17369
17404
  return null;
@@ -17377,12 +17412,12 @@ function tryReadId(filePath) {
17377
17412
  import { execFileSync, spawn } from "node:child_process";
17378
17413
 
17379
17414
  // ../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");
17415
+ import * as path13 from "node:path";
17416
+ import * as fs12 from "node:fs";
17417
+ var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path13.join(__dirname, "..", "dylibs");
17418
+ var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path13.join(__dirname, "..", "bin");
17419
+ var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path13.join(DYLIB_DIR, "tcp");
17420
+ var DYLIB_TVOS_DIR = path13.join(DYLIB_DIR, "tvos");
17386
17421
  function hostPlatformKey() {
17387
17422
  if (process.platform === "linux" && process.arch === "arm64") {
17388
17423
  return "linux-arm64";
@@ -17393,14 +17428,14 @@ function simulatorServerBinaryName() {
17393
17428
  return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
17394
17429
  }
17395
17430
  function platformBinDir() {
17396
- return path11.join(BIN_DIR, hostPlatformKey());
17431
+ return path13.join(BIN_DIR, hostPlatformKey());
17397
17432
  }
17398
17433
  function simulatorServerBinaryPath() {
17399
17434
  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.` : "";
17435
+ const p = path13.join(platformBinDir(), binaryName);
17436
+ if (!fs12.existsSync(p)) {
17437
+ const flat = path13.join(BIN_DIR, binaryName);
17438
+ const migrationHint = fs12.existsSync(flat) ? ` Found a binary at the old flat path ${flat}; move it to ${p} or update ARGENT_SIMULATOR_SERVER_DIR to point at the parent of the platform subdirectory.` : "";
17404
17439
  throw new Error(
17405
17440
  `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
17406
17441
  );
@@ -17429,12 +17464,12 @@ function resolveHostFingerprint() {
17429
17464
  }
17430
17465
  }
17431
17466
  function resolveHostFingerprintAsync() {
17432
- return new Promise((resolve21) => {
17467
+ return new Promise((resolve22) => {
17433
17468
  let binary;
17434
17469
  try {
17435
17470
  binary = simulatorServerBinaryPath();
17436
17471
  } catch {
17437
- resolve21(null);
17472
+ resolve22(null);
17438
17473
  return;
17439
17474
  }
17440
17475
  let settled = false;
@@ -17447,7 +17482,7 @@ function resolveHostFingerprintAsync() {
17447
17482
  child?.kill("SIGKILL");
17448
17483
  } catch {
17449
17484
  }
17450
- resolve21(value);
17485
+ resolve22(value);
17451
17486
  };
17452
17487
  const watchdog = setTimeout(() => finish(null), FINGERPRINT_TIMEOUT_MS);
17453
17488
  watchdog.unref?.();
@@ -17480,15 +17515,15 @@ function resolveHostFingerprintAsync() {
17480
17515
  }
17481
17516
 
17482
17517
  // ../telemetry/src/consent.ts
17483
- import * as fs11 from "node:fs";
17484
- import * as path12 from "node:path";
17518
+ import * as fs13 from "node:fs";
17519
+ import * as path14 from "node:path";
17485
17520
  var cache = /* @__PURE__ */ new Map();
17486
17521
  var sessionOverride = null;
17487
17522
  function readConfigOverrideAt(filePath) {
17488
17523
  const miss = { mtimeMs: null, fingerprint: null, enabledOverride: null };
17489
17524
  let stats;
17490
17525
  try {
17491
- stats = fs11.lstatSync(filePath);
17526
+ stats = fs13.lstatSync(filePath);
17492
17527
  } catch {
17493
17528
  cache.set(filePath, miss);
17494
17529
  return null;
@@ -17505,7 +17540,7 @@ function readConfigOverrideAt(filePath) {
17505
17540
  }
17506
17541
  let parsedEnabled = null;
17507
17542
  try {
17508
- const raw = fs11.readFileSync(filePath, "utf8");
17543
+ const raw = fs13.readFileSync(filePath, "utf8");
17509
17544
  const json = JSON.parse(raw);
17510
17545
  if (json && typeof json === "object") {
17511
17546
  const t2 = json.telemetry;
@@ -17522,8 +17557,12 @@ function readConfigOverrideAt(filePath) {
17522
17557
  function readPersistedConsent(cwd) {
17523
17558
  const globalPath = configFilePath("global");
17524
17559
  const projectPath = configFilePath("project", { cwd });
17560
+ const userConfigPath = path14.join(resolveHomeDir(), ".argent", "config.json");
17561
+ if (userConfigPath !== globalPath && readConfigOverrideAt(userConfigPath) === false) {
17562
+ return { enabled: false, detail: `${userConfigPath} (user)` };
17563
+ }
17525
17564
  const global2 = readConfigOverrideAt(globalPath);
17526
- const projectRoot = path12.dirname(path12.dirname(projectPath));
17565
+ const projectRoot = path14.dirname(path14.dirname(projectPath));
17527
17566
  const project = isHomeDir(projectRoot) ? null : readConfigOverrideAt(projectPath);
17528
17567
  if (project === false && global2 === false) {
17529
17568
  return { enabled: false, detail: "config.json (project and global)" };
@@ -17719,7 +17758,7 @@ var DRAIN_GRACE_MS = 250;
17719
17758
  async function raceDrain(client2, timeoutMs) {
17720
17759
  await Promise.race([
17721
17760
  client2.shutdown(timeoutMs),
17722
- new Promise((resolve21) => setTimeout(resolve21, timeoutMs + DRAIN_GRACE_MS).unref())
17761
+ new Promise((resolve22) => setTimeout(resolve22, timeoutMs + DRAIN_GRACE_MS).unref())
17723
17762
  ]);
17724
17763
  }
17725
17764
  async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
@@ -17739,8 +17778,8 @@ async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
17739
17778
  }
17740
17779
 
17741
17780
  // ../argent-installer/src/mcp-configs.ts
17742
- import * as fs18 from "node:fs";
17743
- import * as path19 from "node:path";
17781
+ import * as fs20 from "node:fs";
17782
+ import * as path21 from "node:path";
17744
17783
  import { execFileSync as execFileSync5 } from "node:child_process";
17745
17784
  import { homedir as homedir5 } from "node:os";
17746
17785
 
@@ -17755,11 +17794,11 @@ var CURSOR_ALLOWLIST_PATTERN = "argent:*";
17755
17794
 
17756
17795
  // ../argent-installer/src/utils.ts
17757
17796
  var import_semver3 = __toESM(require_semver2(), 1);
17758
- import * as fs17 from "node:fs";
17759
- import * as path18 from "node:path";
17797
+ import * as fs19 from "node:fs";
17798
+ import * as path20 from "node:path";
17760
17799
  import * as dns from "node:dns";
17761
17800
  import { createHash as createHash2 } from "node:crypto";
17762
- import * as os3 from "node:os";
17801
+ import * as os4 from "node:os";
17763
17802
  import { execFileSync as execFileSync4, execSync } from "node:child_process";
17764
17803
 
17765
17804
  // ../../node_modules/smol-toml/dist/error.js
@@ -19482,11 +19521,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19482
19521
  onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
19483
19522
  ensurePropertyComplete(offset + length);
19484
19523
  },
19485
- onSeparator: (sep9, offset, length) => {
19524
+ onSeparator: (sep10, offset, length) => {
19486
19525
  if (currentParent.type === "property") {
19487
- if (sep9 === ":") {
19526
+ if (sep10 === ":") {
19488
19527
  currentParent.colonOffset = offset;
19489
- } else if (sep9 === ",") {
19528
+ } else if (sep10 === ",") {
19490
19529
  ensurePropertyComplete(offset);
19491
19530
  }
19492
19531
  }
@@ -19502,12 +19541,12 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19502
19541
  }
19503
19542
  return result;
19504
19543
  }
19505
- function findNodeAtLocation(root, path33) {
19544
+ function findNodeAtLocation(root, path35) {
19506
19545
  if (!root) {
19507
19546
  return void 0;
19508
19547
  }
19509
19548
  let node = root;
19510
- for (let segment of path33) {
19549
+ for (let segment of path35) {
19511
19550
  if (typeof segment === "string") {
19512
19551
  if (node.type !== "object" || !Array.isArray(node.children)) {
19513
19552
  return void 0;
@@ -19861,14 +19900,14 @@ function getNodeType(value) {
19861
19900
 
19862
19901
  // ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
19863
19902
  function setProperty(text2, originalPath, value, options) {
19864
- const path33 = originalPath.slice();
19903
+ const path35 = originalPath.slice();
19865
19904
  const errors = [];
19866
19905
  const root = parseTree(text2, errors);
19867
19906
  let parent = void 0;
19868
19907
  let lastSegment = void 0;
19869
- while (path33.length > 0) {
19870
- lastSegment = path33.pop();
19871
- parent = findNodeAtLocation(root, path33);
19908
+ while (path35.length > 0) {
19909
+ lastSegment = path35.pop();
19910
+ parent = findNodeAtLocation(root, path35);
19872
19911
  if (parent === void 0 && value !== void 0) {
19873
19912
  if (typeof lastSegment === "string") {
19874
19913
  value = { [lastSegment]: value };
@@ -20054,8 +20093,8 @@ var ParseErrorCode;
20054
20093
  ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
20055
20094
  ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
20056
20095
  })(ParseErrorCode || (ParseErrorCode = {}));
20057
- function modify(text2, path33, value, options) {
20058
- return setProperty(text2, path33, value, options);
20096
+ function modify(text2, path35, value, options) {
20097
+ return setProperty(text2, path35, value, options);
20059
20098
  }
20060
20099
  function applyEdits(text2, edits) {
20061
20100
  let sortedEdits = edits.slice(0).sort((a2, b) => {
@@ -20079,39 +20118,39 @@ function applyEdits(text2, edits) {
20079
20118
  }
20080
20119
 
20081
20120
  // ../argent-installer/src/package-root.ts
20082
- import * as fs12 from "node:fs";
20083
- import * as path13 from "node:path";
20121
+ import * as fs14 from "node:fs";
20122
+ import * as path15 from "node:path";
20084
20123
  function resolvePackageRoot(dirname20) {
20085
- let current = path13.resolve(dirname20);
20124
+ let current = path15.resolve(dirname20);
20086
20125
  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);
20126
+ if (fs14.existsSync(path15.join(current, "package.json"))) return current;
20127
+ const parent = path15.dirname(current);
20128
+ if (parent === current) return path15.resolve(dirname20);
20090
20129
  current = parent;
20091
20130
  }
20092
20131
  }
20093
20132
 
20094
20133
  // ../argent-installer/src/package-manager.ts
20095
20134
  import { execFileSync as execFileSync3 } from "node:child_process";
20096
- import * as fs15 from "node:fs";
20097
- import * as os2 from "node:os";
20098
- import * as path16 from "node:path";
20135
+ import * as fs17 from "node:fs";
20136
+ import * as os3 from "node:os";
20137
+ import * as path18 from "node:path";
20099
20138
 
20100
20139
  // ../argent-installer/src/topology.ts
20101
20140
  var import_semver2 = __toESM(require_semver2(), 1);
20102
- import * as fs14 from "node:fs";
20103
- import * as path15 from "node:path";
20141
+ import * as fs16 from "node:fs";
20142
+ import * as path17 from "node:path";
20104
20143
  import { createRequire } from "node:module";
20105
20144
  import { execFileSync as execFileSync2 } from "node:child_process";
20106
20145
 
20107
20146
  // ../argent-installer/src/preflight.ts
20108
- import * as fs13 from "node:fs";
20109
- import * as path14 from "node:path";
20147
+ import * as fs15 from "node:fs";
20148
+ import * as path16 from "node:path";
20110
20149
  function hasProjectPackageJson(projectRoot) {
20111
- return fs13.existsSync(path14.join(projectRoot, "package.json"));
20150
+ return fs15.existsSync(path16.join(projectRoot, "package.json"));
20112
20151
  }
20113
20152
  function isYarnPnp(projectRoot) {
20114
- return fs13.existsSync(path14.join(projectRoot, ".pnp.cjs")) || fs13.existsSync(path14.join(projectRoot, ".pnp.loader.mjs"));
20153
+ return fs15.existsSync(path16.join(projectRoot, ".pnp.cjs")) || fs15.existsSync(path16.join(projectRoot, ".pnp.loader.mjs"));
20115
20154
  }
20116
20155
 
20117
20156
  // ../argent-installer/src/topology.ts
@@ -20137,12 +20176,12 @@ function isTempRunnerPath(binaryPath) {
20137
20176
  }
20138
20177
  function isProjectBinPath(binaryPath) {
20139
20178
  const norm = (p) => process.platform === "win32" ? p.toLowerCase() : canonicalPath(p);
20140
- const binDir = norm(path15.dirname(path15.resolve(binaryPath)));
20179
+ const binDir = norm(path17.dirname(path17.resolve(binaryPath)));
20141
20180
  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;
20181
+ if (prefix && norm(path17.join(prefix, "node_modules", ".bin")) === binDir) return true;
20182
+ for (let dir = path17.resolve(process.cwd()); ; dir = path17.dirname(dir)) {
20183
+ if (norm(path17.join(dir, "node_modules", ".bin")) === binDir) return true;
20184
+ if (path17.dirname(dir) === dir) return false;
20146
20185
  }
20147
20186
  }
20148
20187
  function getPermanentBinaryPaths() {
@@ -20190,8 +20229,8 @@ function getGloballyInstalledPackageRoot() {
20190
20229
  }
20191
20230
  function readShimScript(binaryPath) {
20192
20231
  try {
20193
- if (fs14.statSync(binaryPath).size > 64 * 1024) return null;
20194
- return fs14.readFileSync(binaryPath, "utf8");
20232
+ if (fs16.statSync(binaryPath).size > 64 * 1024) return null;
20233
+ return fs16.readFileSync(binaryPath, "utf8");
20195
20234
  } catch {
20196
20235
  return null;
20197
20236
  }
@@ -20202,7 +20241,7 @@ function shimTargetOf(binaryPath) {
20202
20241
  const trailer = /^# cmd-shim-target=(.+)$/m.exec(shim);
20203
20242
  if (trailer) return trailer[1].trim();
20204
20243
  const relative5 = /"\$basedir(?:_abs)?"?\/'?([^"'\s]*node_modules\/[^"'\s]*)/.exec(shim);
20205
- return relative5 ? path15.resolve(canonicalPath(path15.dirname(binaryPath)), relative5[1]) : null;
20244
+ return relative5 ? path17.resolve(canonicalPath(path17.dirname(binaryPath)), relative5[1]) : null;
20206
20245
  }
20207
20246
  function globalPackageRootOf(binaryPath) {
20208
20247
  const root = packageRootOf(binaryPath);
@@ -20212,9 +20251,9 @@ function globalPackageRootOf(binaryPath) {
20212
20251
  }
20213
20252
  function packageRootOf(binaryPath) {
20214
20253
  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"));
20254
+ const realPath = fs16.realpathSync(binaryPath);
20255
+ const root = resolvePackageRoot(path17.dirname(realPath));
20256
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(root, "package.json"), "utf8"));
20218
20257
  return pkg.name === PACKAGE_NAME ? root : null;
20219
20258
  } catch {
20220
20259
  return null;
@@ -20223,8 +20262,8 @@ function packageRootOf(binaryPath) {
20223
20262
  function cliPathOf(packageRoot) {
20224
20263
  const binSub = argentBinSubpath(packageRoot);
20225
20264
  if (!binSub) return null;
20226
- const cli = path15.join(packageRoot, binSub);
20227
- return fs14.existsSync(cli) ? cli : null;
20265
+ const cli = path17.join(packageRoot, binSub);
20266
+ return fs16.existsSync(cli) ? cli : null;
20228
20267
  }
20229
20268
  function getGloballyInstalledLaunchPaths() {
20230
20269
  if (process.platform === "win32") return null;
@@ -20234,8 +20273,8 @@ function getGloballyInstalledLaunchPaths() {
20234
20273
  const cli = packageRoot ? cliPathOf(packageRoot) : null;
20235
20274
  if (!cli) return null;
20236
20275
  try {
20237
- const node = path15.join(fs14.realpathSync(path15.dirname(binaryPath)), "node");
20238
- return fs14.existsSync(node) ? { node, cli } : null;
20276
+ const node = path17.join(fs16.realpathSync(path17.dirname(binaryPath)), "node");
20277
+ return fs16.existsSync(node) ? { node, cli } : null;
20239
20278
  } catch {
20240
20279
  return null;
20241
20280
  }
@@ -20244,7 +20283,7 @@ function getGloballyInstalledVersion() {
20244
20283
  const pkgRoot = getGloballyInstalledPackageRoot();
20245
20284
  if (!pkgRoot) return null;
20246
20285
  try {
20247
- const pkg = JSON.parse(fs14.readFileSync(path15.join(pkgRoot, "package.json"), "utf8"));
20286
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(pkgRoot, "package.json"), "utf8"));
20248
20287
  return pkg.version ?? null;
20249
20288
  } catch {
20250
20289
  return null;
@@ -20253,7 +20292,7 @@ function getGloballyInstalledVersion() {
20253
20292
  function readManifestDeclaration(projectRoot) {
20254
20293
  try {
20255
20294
  const pkg = JSON.parse(
20256
- fs14.readFileSync(path15.join(projectRoot, "package.json"), "utf8")
20295
+ fs16.readFileSync(path17.join(projectRoot, "package.json"), "utf8")
20257
20296
  );
20258
20297
  const spec = pkg.devDependencies?.[PACKAGE_NAME] ?? pkg.dependencies?.[PACKAGE_NAME] ?? pkg.optionalDependencies?.[PACKAGE_NAME];
20259
20298
  return typeof spec === "string" ? spec : null;
@@ -20266,11 +20305,11 @@ function isDeclaredLocally(projectRoot) {
20266
20305
  }
20267
20306
  function resolveLocalArgentDir(projectRoot) {
20268
20307
  try {
20269
- const req = createRequire(path15.join(projectRoot, "package.json"));
20270
- return path15.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
20308
+ const req = createRequire(path17.join(projectRoot, "package.json"));
20309
+ return path17.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
20271
20310
  } catch {
20272
- const plain = path15.join(projectRoot, "node_modules", PACKAGE_NAME);
20273
- return fs14.existsSync(path15.join(plain, "package.json")) ? plain : null;
20311
+ const plain = path17.join(projectRoot, "node_modules", PACKAGE_NAME);
20312
+ return fs16.existsSync(path17.join(plain, "package.json")) ? plain : null;
20274
20313
  }
20275
20314
  }
20276
20315
  function probeLocalInstall(projectRoot) {
@@ -20278,7 +20317,7 @@ function probeLocalInstall(projectRoot) {
20278
20317
  if (packageDir) {
20279
20318
  let version;
20280
20319
  try {
20281
- const pkg = JSON.parse(fs14.readFileSync(path15.join(packageDir, "package.json"), "utf8"));
20320
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(packageDir, "package.json"), "utf8"));
20282
20321
  version = pkg.version ?? null;
20283
20322
  } catch {
20284
20323
  version = null;
@@ -20301,8 +20340,8 @@ function getLocallyInstalledVersion(projectRoot) {
20301
20340
  }
20302
20341
  function readLocalPackageVersionUncached(projectRoot) {
20303
20342
  try {
20304
- const pkgPath = path15.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
20305
- const pkg = JSON.parse(fs14.readFileSync(pkgPath, "utf8"));
20343
+ const pkgPath = path17.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
20344
+ const pkg = JSON.parse(fs16.readFileSync(pkgPath, "utf8"));
20306
20345
  return pkg.version ?? null;
20307
20346
  } catch {
20308
20347
  return null;
@@ -20310,7 +20349,7 @@ function readLocalPackageVersionUncached(projectRoot) {
20310
20349
  }
20311
20350
  function argentBinSubpath(pkgDir) {
20312
20351
  try {
20313
- const pkg = JSON.parse(fs14.readFileSync(path15.join(pkgDir, "package.json"), "utf8"));
20352
+ const pkg = JSON.parse(fs16.readFileSync(path17.join(pkgDir, "package.json"), "utf8"));
20314
20353
  if (typeof pkg.bin === "string") return pkg.bin;
20315
20354
  if (pkg.bin && typeof pkg.bin === "object") {
20316
20355
  return pkg.bin[MCP_BINARY_NAME] ?? Object.values(pkg.bin)[0] ?? null;
@@ -20327,16 +20366,16 @@ function getLocalArgentBinRelPath(projectRoot) {
20327
20366
  if (!binSub) return null;
20328
20367
  let root = projectRoot;
20329
20368
  try {
20330
- root = fs14.realpathSync(projectRoot);
20369
+ root = fs16.realpathSync(projectRoot);
20331
20370
  } catch {
20332
20371
  }
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("/");
20372
+ const stableRel = path17.join("node_modules", PACKAGE_NAME, binSub);
20373
+ if (fs16.existsSync(path17.join(root, stableRel))) {
20374
+ return stableRel.split(path17.sep).join("/");
20336
20375
  }
20337
- const abs = path15.join(pkgDir, binSub);
20338
- if (!fs14.existsSync(abs)) return null;
20339
- return path15.relative(root, abs).split(path15.sep).join("/");
20376
+ const abs = path17.join(pkgDir, binSub);
20377
+ if (!fs16.existsSync(abs)) return null;
20378
+ return path17.relative(root, abs).split(path17.sep).join("/");
20340
20379
  }
20341
20380
 
20342
20381
  // ../argent-installer/src/package-manager.ts
@@ -20369,10 +20408,10 @@ function detectGlobalPackageManager() {
20369
20408
  return BUN_GLOBAL_ROOT.test(root) ? "bun" : lockfileOwnerOf(root) ?? "yarn";
20370
20409
  }
20371
20410
  if (process.platform === "win32") {
20372
- if (fs15.existsSync(path16.join(npmCopyBeside(path16.dirname(binaryPath)), "package.json"))) {
20411
+ if (fs17.existsSync(path18.join(npmCopyBeside(path18.dirname(binaryPath)), "package.json"))) {
20373
20412
  return "npm";
20374
20413
  }
20375
- if (fs15.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
20414
+ if (fs17.existsSync(binaryPath.replace(/\.exe$/i, "") + ".bunx")) return "bun";
20376
20415
  }
20377
20416
  const shim = readShimScript(binaryPath);
20378
20417
  if (shim === null || !/node_modules[\\/]/.test(shim)) return "npm";
@@ -20381,23 +20420,23 @@ function detectGlobalPackageManager() {
20381
20420
  return (target ? lockfileOwnerOf(target) : null) ?? "yarn";
20382
20421
  }
20383
20422
  function lockfileOwnerOf(root) {
20384
- for (let dir = path16.dirname(root); path16.dirname(dir) !== dir; dir = path16.dirname(dir)) {
20423
+ for (let dir = path18.dirname(root); path18.dirname(dir) !== dir; dir = path18.dirname(dir)) {
20385
20424
  const pm = pmFromLockfile(dir);
20386
20425
  if (pm) return pm;
20387
20426
  }
20388
20427
  return null;
20389
20428
  }
20390
20429
  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);
20430
+ return process.platform === "win32" ? path18.join(binDir, "node_modules", PACKAGE_NAME) : path18.join(path18.dirname(binDir), "lib", "node_modules", PACKAGE_NAME);
20392
20431
  }
20393
20432
  function isInNpmLayout(binaryPath, root) {
20394
20433
  const realRoot = canonicalPath(root);
20395
20434
  let link = binaryPath;
20396
20435
  for (let hop = 0; hop < 40; hop++) {
20397
- const binDir = canonicalPath(path16.dirname(link));
20436
+ const binDir = canonicalPath(path18.dirname(link));
20398
20437
  if (canonicalPath(npmCopyBeside(binDir)) === realRoot) return true;
20399
20438
  try {
20400
- link = path16.resolve(binDir, fs15.readlinkSync(link));
20439
+ link = path18.resolve(binDir, fs17.readlinkSync(link));
20401
20440
  } catch {
20402
20441
  return false;
20403
20442
  }
@@ -20416,7 +20455,7 @@ function asKnownPm(name) {
20416
20455
  }
20417
20456
  function pmFromPackageManagerField(dir) {
20418
20457
  try {
20419
- const pkg = JSON.parse(fs15.readFileSync(path16.join(dir, "package.json"), "utf8"));
20458
+ const pkg = JSON.parse(fs17.readFileSync(path18.join(dir, "package.json"), "utf8"));
20420
20459
  if (typeof pkg.packageManager === "string") {
20421
20460
  return asKnownPm(pkg.packageManager.split("@")[0]);
20422
20461
  }
@@ -20427,7 +20466,7 @@ function pmFromPackageManagerField(dir) {
20427
20466
  }
20428
20467
  function pmFromDevEngines(dir) {
20429
20468
  try {
20430
- const pkg = JSON.parse(fs15.readFileSync(path16.join(dir, "package.json"), "utf8"));
20469
+ const pkg = JSON.parse(fs17.readFileSync(path18.join(dir, "package.json"), "utf8"));
20431
20470
  const devEnginesPm = pkg.devEngines?.packageManager;
20432
20471
  const names = /* @__PURE__ */ new Set();
20433
20472
  for (const entry of Array.isArray(devEnginesPm) ? devEnginesPm : [devEnginesPm]) {
@@ -20440,7 +20479,7 @@ function pmFromDevEngines(dir) {
20440
20479
  }
20441
20480
  }
20442
20481
  function pmFromLockfile(dir) {
20443
- const has = (file) => fs15.existsSync(path16.join(dir, file));
20482
+ const has = (file) => fs17.existsSync(path18.join(dir, file));
20444
20483
  if (has("pnpm-lock.yaml")) return "pnpm";
20445
20484
  if (has("yarn.lock")) return "yarn";
20446
20485
  if (has("bun.lock") || has("bun.lockb")) return "bun";
@@ -20448,15 +20487,15 @@ function pmFromLockfile(dir) {
20448
20487
  return null;
20449
20488
  }
20450
20489
  function pmFromWorkspaceMarker(dir) {
20451
- return fs15.existsSync(path16.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
20490
+ return fs17.existsSync(path18.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
20452
20491
  }
20453
20492
  function detectProjectPackageManager(projectRoot) {
20454
- let dir = path16.resolve(projectRoot);
20493
+ let dir = path18.resolve(projectRoot);
20455
20494
  for (; ; ) {
20456
20495
  const pm = pmFromPackageManagerField(dir) ?? pmFromLockfile(dir) ?? pmFromDevEngines(dir) ?? pmFromWorkspaceMarker(dir);
20457
20496
  if (pm) return pm;
20458
- if (fs15.existsSync(path16.join(dir, ".git"))) break;
20459
- const parent = path16.dirname(dir);
20497
+ if (fs17.existsSync(path18.join(dir, ".git"))) break;
20498
+ const parent = path18.dirname(dir);
20460
20499
  if (parent === dir) break;
20461
20500
  dir = parent;
20462
20501
  }
@@ -20476,8 +20515,8 @@ function globalInstallCommand(pm, pkg) {
20476
20515
  }
20477
20516
  function globalCommandOptions(pm) {
20478
20517
  if (pm === "npm") return {};
20479
- const home = os2.homedir();
20480
- const cwd = fs15.existsSync(home) ? { cwd: home } : {};
20518
+ const home = os3.homedir();
20519
+ const cwd = fs17.existsSync(home) ? { cwd: home } : {};
20481
20520
  if (pm !== "yarn" || !process.env.npm_config_user_agent?.startsWith("npm/")) return cwd;
20482
20521
  const { npm_config_prefix: _npmPrefix, ...env } = process.env;
20483
20522
  return { ...cwd, env };
@@ -20509,11 +20548,11 @@ function ownsGlobalInstall(pm, runningRoot) {
20509
20548
  localBuild = !isRegistrySpec(dependency?.version);
20510
20549
  } else {
20511
20550
  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();
20551
+ if (!dir || !path18.isAbsolute(dir)) return false;
20552
+ pkg = pm === "npm" ? path18.join(dir, PACKAGE_NAME) : path18.join(dir, "node_modules", PACKAGE_NAME);
20553
+ localBuild = fs17.lstatSync(pkg).isSymbolicLink();
20515
20554
  }
20516
- return !localBuild && !!pkg && path16.isAbsolute(pkg) && fs15.realpathSync(pkg) === runningRoot;
20555
+ return !localBuild && !!pkg && path18.isAbsolute(pkg) && fs17.realpathSync(pkg) === runningRoot;
20517
20556
  } catch {
20518
20557
  return false;
20519
20558
  }
@@ -20568,15 +20607,15 @@ function localUninstallCommand(pm, pkg) {
20568
20607
  }
20569
20608
 
20570
20609
  // ../argent-installer/src/install-record.ts
20571
- import * as fs16 from "node:fs";
20572
- import * as path17 from "node:path";
20610
+ import * as fs18 from "node:fs";
20611
+ import * as path19 from "node:path";
20573
20612
  function getInstallRecordPath(projectRoot) {
20574
- return path17.join(projectRoot, ".argent", "install.json");
20613
+ return path19.join(projectRoot, ".argent", "install.json");
20575
20614
  }
20576
20615
  function readInstallRecord(projectRoot) {
20577
20616
  try {
20578
20617
  const parsed = JSON.parse(
20579
- fs16.readFileSync(getInstallRecordPath(projectRoot), "utf8")
20618
+ fs18.readFileSync(getInstallRecordPath(projectRoot), "utf8")
20580
20619
  );
20581
20620
  if (parsed && (parsed.mode === "local" || parsed.mode === "global")) return parsed;
20582
20621
  return null;
@@ -20586,17 +20625,17 @@ function readInstallRecord(projectRoot) {
20586
20625
  }
20587
20626
  function writeInstallRecord(projectRoot, record) {
20588
20627
  const recordPath = getInstallRecordPath(projectRoot);
20589
- fs16.mkdirSync(path17.dirname(recordPath), { recursive: true });
20590
- fs16.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
20628
+ fs18.mkdirSync(path19.dirname(recordPath), { recursive: true });
20629
+ fs18.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
20591
20630
  }
20592
20631
  function removeInstallRecord(projectRoot) {
20593
20632
  const recordPath = getInstallRecordPath(projectRoot);
20594
20633
  try {
20595
- if (!fs16.existsSync(recordPath)) return false;
20596
- fs16.rmSync(recordPath, { force: true });
20597
- const dir = path17.dirname(recordPath);
20634
+ if (!fs18.existsSync(recordPath)) return false;
20635
+ fs18.rmSync(recordPath, { force: true });
20636
+ const dir = path19.dirname(recordPath);
20598
20637
  try {
20599
- if (fs16.existsSync(dir) && fs16.readdirSync(dir).length === 0) fs16.rmdirSync(dir);
20638
+ if (fs18.existsSync(dir) && fs18.readdirSync(dir).length === 0) fs18.rmdirSync(dir);
20600
20639
  } catch {
20601
20640
  }
20602
20641
  return true;
@@ -20624,9 +20663,9 @@ function resolveInstallModeFromFlags(opts) {
20624
20663
  // ../argent-installer/src/utils.ts
20625
20664
  var PACKAGE_ROOT = resolvePackageRoot(import.meta.dirname);
20626
20665
  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);
20666
+ const packagedDir = path20.join(PACKAGE_ROOT, dirName);
20667
+ if (fs19.existsSync(packagedDir)) return packagedDir;
20668
+ return path20.resolve(PACKAGE_ROOT, "..", "skills", dirName);
20630
20669
  }
20631
20670
  var SKILLS_DIR = resolveBundledDir("skills");
20632
20671
  var RULES_DIR = resolveBundledDir("rules");
@@ -20638,18 +20677,18 @@ function buildArgentSkillsSource(version) {
20638
20677
  }
20639
20678
  function listBundledSkills(skillsDir = SKILLS_DIR) {
20640
20679
  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();
20680
+ return fs19.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs19.existsSync(path20.join(skillsDir, name, "SKILL.md"))).sort();
20642
20681
  } catch {
20643
20682
  return [];
20644
20683
  }
20645
20684
  }
20646
20685
  function getProjectSkillLockPath(cwd = process.cwd()) {
20647
- return path18.join(cwd, "skills-lock.json");
20686
+ return path20.join(cwd, "skills-lock.json");
20648
20687
  }
20649
20688
  function getGlobalSkillLockPath() {
20650
20689
  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");
20690
+ if (xdgStateHome) return path20.join(xdgStateHome, "skills", ".skill-lock.json");
20691
+ return path20.join(os4.homedir(), ".agents", ".skill-lock.json");
20653
20692
  }
20654
20693
  var ARGENT_SKILL_PREFIX = "argent-";
20655
20694
  var LEGACY_ARGENT_SKILL_NAMES = [
@@ -20755,7 +20794,7 @@ function hashBundledContent(content) {
20755
20794
  }
20756
20795
  function listArgentSkillsInLock(lockPath) {
20757
20796
  try {
20758
- const raw = fs17.readFileSync(lockPath, "utf8");
20797
+ const raw = fs19.readFileSync(lockPath, "utf8");
20759
20798
  const lock = JSON.parse(raw);
20760
20799
  const tracked = lock.skills ?? {};
20761
20800
  return Object.keys(tracked).filter((name) => name.startsWith(ARGENT_SKILL_PREFIX)).sort();
@@ -20778,21 +20817,21 @@ var PROJECT_ROOT_MARKERS = [
20778
20817
  "opencode.jsonc",
20779
20818
  "skills-lock.json"
20780
20819
  ];
20781
- function resolveProjectRoot2(startDir, homeDir = os3.homedir()) {
20782
- const initialDir = path18.resolve(startDir);
20820
+ function resolveProjectRoot2(startDir, homeDir = os4.homedir()) {
20821
+ const initialDir = path20.resolve(startDir);
20783
20822
  const home = canonicalPath(homeDir);
20784
20823
  let currentDir = initialDir;
20785
20824
  while (true) {
20786
20825
  if (currentDir !== initialDir && canonicalPath(currentDir) === home) {
20787
20826
  return initialDir;
20788
20827
  }
20789
- if (PROJECT_ROOT_MARKERS.some((marker) => fs17.existsSync(path18.join(currentDir, marker)))) {
20828
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs19.existsSync(path20.join(currentDir, marker)))) {
20790
20829
  return currentDir;
20791
20830
  }
20792
- if (fs17.existsSync(path18.join(currentDir, ".git"))) {
20831
+ if (fs19.existsSync(path20.join(currentDir, ".git"))) {
20793
20832
  return currentDir;
20794
20833
  }
20795
- const parentDir = path18.dirname(currentDir);
20834
+ const parentDir = path20.dirname(currentDir);
20796
20835
  if (parentDir === currentDir) {
20797
20836
  return initialDir;
20798
20837
  }
@@ -20800,20 +20839,20 @@ function resolveProjectRoot2(startDir, homeDir = os3.homedir()) {
20800
20839
  }
20801
20840
  }
20802
20841
  function readToml(filePath) {
20803
- if (!fs17.existsSync(filePath)) return {};
20842
+ if (!fs19.existsSync(filePath)) return {};
20804
20843
  try {
20805
- return parse(fs17.readFileSync(filePath, "utf8"));
20844
+ return parse(fs19.readFileSync(filePath, "utf8"));
20806
20845
  } catch {
20807
20846
  return {};
20808
20847
  }
20809
20848
  }
20810
20849
  function writeToml(filePath, data) {
20811
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20812
- fs17.writeFileSync(filePath, stringify(data) + "\n");
20850
+ fs19.mkdirSync(path20.dirname(filePath), { recursive: true });
20851
+ fs19.writeFileSync(filePath, stringify(data) + "\n");
20813
20852
  }
20814
20853
  function readYaml(filePath) {
20815
- if (!fs17.existsSync(filePath)) return new import_yaml.Document({});
20816
- const text2 = fs17.readFileSync(filePath, "utf8");
20854
+ if (!fs19.existsSync(filePath)) return new import_yaml.Document({});
20855
+ const text2 = fs19.readFileSync(filePath, "utf8");
20817
20856
  const doc = (0, import_yaml.parseDocument)(text2);
20818
20857
  if (doc.errors.length > 0) {
20819
20858
  const messages = doc.errors.map((e) => e.message).join("; ");
@@ -20822,20 +20861,20 @@ function readYaml(filePath) {
20822
20861
  return doc;
20823
20862
  }
20824
20863
  function writeYaml(filePath, doc) {
20825
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20826
- fs17.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20864
+ fs19.mkdirSync(path20.dirname(filePath), { recursive: true });
20865
+ fs19.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20827
20866
  }
20828
20867
  function readJson(filePath) {
20829
- if (!fs17.existsSync(filePath)) return {};
20868
+ if (!fs19.existsSync(filePath)) return {};
20830
20869
  try {
20831
- return JSON.parse(fs17.readFileSync(filePath, "utf8"));
20870
+ return JSON.parse(fs19.readFileSync(filePath, "utf8"));
20832
20871
  } catch {
20833
20872
  return {};
20834
20873
  }
20835
20874
  }
20836
20875
  function writeJson(filePath, data) {
20837
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20838
- fs17.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20876
+ fs19.mkdirSync(path20.dirname(filePath), { recursive: true });
20877
+ fs19.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20839
20878
  }
20840
20879
  var JSONC_FORMATTING = { tabSize: 2, insertSpaces: true };
20841
20880
  function setJsoncIn(text2, jsonPath, value) {
@@ -20843,8 +20882,8 @@ function setJsoncIn(text2, jsonPath, value) {
20843
20882
  return applyEdits(text2, edits);
20844
20883
  }
20845
20884
  function readJsoncFileRaw(filePath) {
20846
- if (!fs17.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20847
- let text2 = fs17.readFileSync(filePath, "utf8");
20885
+ if (!fs19.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20886
+ let text2 = fs19.readFileSync(filePath, "utf8");
20848
20887
  const hadBom = text2.charCodeAt(0) === 65279;
20849
20888
  if (hadBom) text2 = text2.slice(1);
20850
20889
  const wasEmpty = text2.trim() === "";
@@ -20863,26 +20902,26 @@ function isEmptyPlainObject(value) {
20863
20902
  return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0;
20864
20903
  }
20865
20904
  function removePath(targetPath) {
20866
- const entry = fs17.lstatSync(targetPath, { throwIfNoEntry: false });
20905
+ const entry = fs19.lstatSync(targetPath, { throwIfNoEntry: false });
20867
20906
  if (!entry) return false;
20868
- if (entry.isSymbolicLink()) fs17.unlinkSync(targetPath);
20869
- else fs17.rmSync(targetPath, { recursive: entry.isDirectory(), force: true });
20907
+ if (entry.isSymbolicLink()) fs19.unlinkSync(targetPath);
20908
+ else fs19.rmSync(targetPath, { recursive: entry.isDirectory(), force: true });
20870
20909
  return true;
20871
20910
  }
20872
20911
  function rmEmptyDir(dirPath) {
20873
20912
  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);
20913
+ if (!fs19.existsSync(dirPath)) return false;
20914
+ if (!fs19.statSync(dirPath).isDirectory()) return false;
20915
+ if (fs19.readdirSync(dirPath).length > 0) return false;
20916
+ fs19.rmdirSync(dirPath);
20878
20917
  return true;
20879
20918
  } catch {
20880
20919
  return false;
20881
20920
  }
20882
20921
  }
20883
20922
  function readJsonc(filePath) {
20884
- if (!fs17.existsSync(filePath)) return {};
20885
- let raw = fs17.readFileSync(filePath, "utf8");
20923
+ if (!fs19.existsSync(filePath)) return {};
20924
+ let raw = fs19.readFileSync(filePath, "utf8");
20886
20925
  if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
20887
20926
  if (raw.trim() === "") return {};
20888
20927
  const parsed = parse3(raw, [], { allowTrailingComma: true });
@@ -20903,7 +20942,7 @@ function yamlSyntaxErrorLine(raw) {
20903
20942
  function findConfigSyntaxErrorLine(filePath, jsonOptions) {
20904
20943
  let raw;
20905
20944
  try {
20906
- raw = fs17.readFileSync(filePath, "utf8");
20945
+ raw = fs19.readFileSync(filePath, "utf8");
20907
20946
  } catch {
20908
20947
  return null;
20909
20948
  }
@@ -20929,18 +20968,18 @@ function editJsoncFile(filePath, jsonPath, value) {
20929
20968
  }
20930
20969
  const parsed = parse3(text2, [], { allowTrailingComma: true });
20931
20970
  if (isEmptyPlainObject(parsed)) {
20932
- fs17.rmSync(filePath, { force: true });
20933
- rmEmptyDir(path18.dirname(filePath));
20971
+ fs19.rmSync(filePath, { force: true });
20972
+ rmEmptyDir(path20.dirname(filePath));
20934
20973
  return;
20935
20974
  }
20936
- fs17.mkdirSync(path18.dirname(filePath), { recursive: true });
20975
+ fs19.mkdirSync(path20.dirname(filePath), { recursive: true });
20937
20976
  const out = wasEmpty && !text2.endsWith("\n") ? text2 + "\n" : text2;
20938
- fs17.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20977
+ fs19.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20939
20978
  }
20940
20979
  var MAX_SYMLINK_HOPS = 40;
20941
20980
  function realpathOrSelf(p) {
20942
20981
  try {
20943
- return fs17.realpathSync(p);
20982
+ return fs19.realpathSync(p);
20944
20983
  } catch {
20945
20984
  return p;
20946
20985
  }
@@ -20950,13 +20989,13 @@ function resolveLinkedDestination(dest) {
20950
20989
  for (let hop = 0; hop < MAX_SYMLINK_HOPS; hop++) {
20951
20990
  let entry;
20952
20991
  try {
20953
- entry = fs17.lstatSync(current);
20992
+ entry = fs19.lstatSync(current);
20954
20993
  } catch {
20955
- return current === dest || dirExists(path18.dirname(current)) ? current : dest;
20994
+ return current === dest || dirExists(path20.dirname(current)) ? current : dest;
20956
20995
  }
20957
20996
  if (!entry.isSymbolicLink()) return current;
20958
20997
  try {
20959
- current = path18.resolve(realpathOrSelf(path18.dirname(current)), fs17.readlinkSync(current));
20998
+ current = path20.resolve(realpathOrSelf(path20.dirname(current)), fs19.readlinkSync(current));
20960
20999
  } catch {
20961
21000
  return dest;
20962
21001
  }
@@ -20964,30 +21003,30 @@ function resolveLinkedDestination(dest) {
20964
21003
  return dest;
20965
21004
  }
20966
21005
  function copyDir(src, dest) {
20967
- if (!fs17.existsSync(src) || !treeHasFiles(src)) return null;
21006
+ if (!fs19.existsSync(src) || !treeHasFiles(src)) return null;
20968
21007
  const target = resolveLinkedDestination(dest);
20969
21008
  copyTree(src, target);
20970
21009
  return target;
20971
21010
  }
20972
21011
  function treeHasFiles(dir) {
20973
- return fs17.readdirSync(dir, { withFileTypes: true }).some((entry) => !entry.isDirectory() || treeHasFiles(path18.join(dir, entry.name)));
21012
+ return fs19.readdirSync(dir, { withFileTypes: true }).some((entry) => !entry.isDirectory() || treeHasFiles(path20.join(dir, entry.name)));
20974
21013
  }
20975
21014
  function copyTree(src, dest) {
20976
- const entries = fs17.readdirSync(src, { withFileTypes: true });
20977
- fs17.mkdirSync(dest, { recursive: true });
21015
+ const entries = fs19.readdirSync(src, { withFileTypes: true });
21016
+ fs19.mkdirSync(dest, { recursive: true });
20978
21017
  for (const entry of entries) {
20979
- const from = path18.join(src, entry.name);
20980
- const to = resolveLinkedDestination(path18.join(dest, entry.name));
21018
+ const from = path20.join(src, entry.name);
21019
+ const to = resolveLinkedDestination(path20.join(dest, entry.name));
20981
21020
  if (entry.isDirectory()) copyTree(from, to);
20982
- else fs17.copyFileSync(from, to);
21021
+ else fs19.copyFileSync(from, to);
20983
21022
  }
20984
21023
  }
20985
21024
  function readRetiredFile(targetDir, relativePath) {
20986
- const entryPath = path18.join(resolveLinkedDestination(targetDir), ...relativePath.split("/"));
21025
+ const entryPath = path20.join(resolveLinkedDestination(targetDir), ...relativePath.split("/"));
20987
21026
  const file = resolveLinkedDestination(entryPath);
20988
21027
  try {
20989
- if (!fs17.statSync(file, { throwIfNoEntry: false })?.isFile()) return null;
20990
- return fs17.readFileSync(file, "utf8");
21028
+ if (!fs19.statSync(file, { throwIfNoEntry: false })?.isFile()) return null;
21029
+ return fs19.readFileSync(file, "utf8");
20991
21030
  } catch {
20992
21031
  return null;
20993
21032
  }
@@ -20995,7 +21034,7 @@ function readRetiredFile(targetDir, relativePath) {
20995
21034
  function findRetiredFiles(retired, bundleDir, targetDir) {
20996
21035
  const found = [];
20997
21036
  for (const { path: relativePath, shipped } of retired) {
20998
- if (bundleDir !== null && fs17.existsSync(path18.join(bundleDir, ...relativePath.split("/"))))
21037
+ if (bundleDir !== null && fs19.existsSync(path20.join(bundleDir, ...relativePath.split("/"))))
20999
21038
  continue;
21000
21039
  const content = readRetiredFile(targetDir, relativePath);
21001
21040
  if (content === null) continue;
@@ -21011,17 +21050,17 @@ function removeRetiredFiles(targetDir, files) {
21011
21050
  const content = readRetiredFile(targetDir, relativePath);
21012
21051
  if (content === null || hashBundledContent(content) !== sha256) continue;
21013
21052
  const segments = relativePath.split("/");
21014
- const entryPath = path18.join(dir, ...segments);
21053
+ const entryPath = path20.join(dir, ...segments);
21015
21054
  const file = resolveLinkedDestination(entryPath);
21016
21055
  try {
21017
- fs17.rmSync(file);
21056
+ fs19.rmSync(file);
21018
21057
  if (file !== entryPath) removePath(entryPath);
21019
21058
  removedPaths.push(relativePath);
21020
21059
  } catch {
21021
21060
  continue;
21022
21061
  }
21023
21062
  for (let depth = segments.length - 1; depth > 0; depth--) {
21024
- if (!rmEmptyDir(path18.join(dir, ...segments.slice(0, depth)))) break;
21063
+ if (!rmEmptyDir(path20.join(dir, ...segments.slice(0, depth)))) break;
21025
21064
  }
21026
21065
  }
21027
21066
  const removedRoot = removedPaths.length > 0 && dir === targetDir && rmEmptyDir(dir);
@@ -21029,15 +21068,15 @@ function removeRetiredFiles(targetDir, files) {
21029
21068
  }
21030
21069
  function dirExists(p) {
21031
21070
  try {
21032
- return fs17.statSync(p).isDirectory();
21071
+ return fs19.statSync(p).isDirectory();
21033
21072
  } catch {
21034
21073
  return false;
21035
21074
  }
21036
21075
  }
21037
21076
  function getInstalledVersion() {
21038
21077
  try {
21039
- const pkgPath = path18.join(PACKAGE_ROOT, "package.json");
21040
- const pkg = JSON.parse(fs17.readFileSync(pkgPath, "utf8"));
21078
+ const pkgPath = path20.join(PACKAGE_ROOT, "package.json");
21079
+ const pkg = JSON.parse(fs19.readFileSync(pkgPath, "utf8"));
21041
21080
  return pkg.version ?? null;
21042
21081
  } catch {
21043
21082
  return null;
@@ -21082,12 +21121,12 @@ async function isOnline(timeoutMs = PROBE_TIMEOUT_MS) {
21082
21121
  } catch {
21083
21122
  return false;
21084
21123
  }
21085
- return new Promise((resolve21) => {
21086
- const timer = setTimeout(() => resolve21(false), timeoutMs);
21124
+ return new Promise((resolve22) => {
21125
+ const timer = setTimeout(() => resolve22(false), timeoutMs);
21087
21126
  timer.unref();
21088
21127
  dns.lookup(host, (err) => {
21089
21128
  clearTimeout(timer);
21090
- resolve21(!err);
21129
+ resolve22(!err);
21091
21130
  });
21092
21131
  });
21093
21132
  }
@@ -21104,7 +21143,7 @@ function escapeStringRegexp(string) {
21104
21143
  }
21105
21144
 
21106
21145
  // ../argent-installer/src/mcp-configs.ts
21107
- var TOOL_SERVER_BUNDLE = path19.join(import.meta.dirname, "tool-server.cjs");
21146
+ var TOOL_SERVER_BUNDLE = path21.join(import.meta.dirname, "tool-server.cjs");
21108
21147
  function getAvailableToolIds() {
21109
21148
  const out = execFileSync5("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
21110
21149
  const tools = JSON.parse(out);
@@ -21167,10 +21206,10 @@ function hasCustomizingEnv(entry) {
21167
21206
  }
21168
21207
  function removeDirIfEmpty(dirPath) {
21169
21208
  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);
21209
+ if (!fs20.existsSync(dirPath)) return;
21210
+ if (!fs20.statSync(dirPath).isDirectory()) return;
21211
+ if (fs20.readdirSync(dirPath).length > 0) return;
21212
+ fs20.rmdirSync(dirPath);
21174
21213
  } catch {
21175
21214
  }
21176
21215
  }
@@ -21208,7 +21247,7 @@ function isArgentManagedEntry(entry) {
21208
21247
  return args.length === 1 && args[0] === "mcp";
21209
21248
  case "node": {
21210
21249
  if (args.length !== 2 || args[1] !== "mcp" || !args[0]) return false;
21211
- if (path19.isAbsolute(args[0])) return false;
21250
+ if (path21.isAbsolute(args[0])) return false;
21212
21251
  const normalized = args[0].split("\\").join("/");
21213
21252
  return normalized.includes(`node_modules/${PACKAGE_NAME}/`);
21214
21253
  }
@@ -21222,12 +21261,12 @@ function isArgentManagedEntry(entry) {
21222
21261
  }
21223
21262
  function isPinnedGlobalEntry(entry) {
21224
21263
  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}/`);
21264
+ return path21.isAbsolute(entry.command) && path21.basename(entry.command) === "node" && entry.args.length === 2 && subcommand === "mcp" && path21.isAbsolute(cli) && cli.includes(`/node_modules/${PACKAGE_NAME}/`);
21226
21265
  }
21227
21266
  function writeTomlOrRemove(filePath, data) {
21228
21267
  if (Object.keys(data).length === 0) {
21229
- fs18.rmSync(filePath, { force: true });
21230
- removeDirIfEmpty(path19.dirname(filePath));
21268
+ fs20.rmSync(filePath, { force: true });
21269
+ removeDirIfEmpty(path21.dirname(filePath));
21231
21270
  return;
21232
21271
  }
21233
21272
  writeToml(filePath, data);
@@ -21236,12 +21275,12 @@ function dirHasEditorEvidence(dir, looksArgentOnly) {
21236
21275
  return dirExists(dir) && !looksArgentOnly(dir);
21237
21276
  }
21238
21277
  function fileHasEditorEvidence(filePath, looksArgentOnly) {
21239
- return fs18.existsSync(filePath) && !looksArgentOnly(filePath);
21278
+ return fs20.existsSync(filePath) && !looksArgentOnly(filePath);
21240
21279
  }
21241
21280
  function parseJsoncStrict(filePath) {
21242
21281
  let raw;
21243
21282
  try {
21244
- raw = fs18.readFileSync(filePath, "utf8");
21283
+ raw = fs20.readFileSync(filePath, "utf8");
21245
21284
  } catch {
21246
21285
  return null;
21247
21286
  }
@@ -21254,14 +21293,14 @@ function parseJsoncStrict(filePath) {
21254
21293
  }
21255
21294
  function parseTomlStrict(filePath) {
21256
21295
  try {
21257
- return parse(fs18.readFileSync(filePath, "utf8"));
21296
+ return parse(fs20.readFileSync(filePath, "utf8"));
21258
21297
  } catch {
21259
21298
  return null;
21260
21299
  }
21261
21300
  }
21262
21301
  function parseYamlStrict(filePath) {
21263
21302
  try {
21264
- const parsed = (0, import_yaml2.parse)(fs18.readFileSync(filePath, "utf8"));
21303
+ const parsed = (0, import_yaml2.parse)(fs20.readFileSync(filePath, "utf8"));
21265
21304
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return null;
21266
21305
  return parsed;
21267
21306
  } catch {
@@ -21284,7 +21323,7 @@ function bundledManagedNames(kind) {
21284
21323
  if (cached2) return cached2;
21285
21324
  let names;
21286
21325
  try {
21287
- names = new Set(fs18.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
21326
+ names = new Set(fs20.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
21288
21327
  } catch {
21289
21328
  names = /* @__PURE__ */ new Set();
21290
21329
  }
@@ -21295,7 +21334,7 @@ function bundledManagedNames(kind) {
21295
21334
  function managedDirLooksArgentOnly(dir, kind) {
21296
21335
  let entries;
21297
21336
  try {
21298
- entries = fs18.readdirSync(dir);
21337
+ entries = fs20.readdirSync(dir);
21299
21338
  } catch {
21300
21339
  return false;
21301
21340
  }
@@ -21307,13 +21346,13 @@ function managedDirLooksArgentOnly(dir, kind) {
21307
21346
  function cursorDirLooksArgentOnly(dir) {
21308
21347
  let entries;
21309
21348
  try {
21310
- entries = fs18.readdirSync(dir);
21349
+ entries = fs20.readdirSync(dir);
21311
21350
  } catch {
21312
21351
  return false;
21313
21352
  }
21314
21353
  if (entries.length === 0) return false;
21315
21354
  return entries.every((entry) => {
21316
- const full = path19.join(dir, entry);
21355
+ const full = path21.join(dir, entry);
21317
21356
  if (entry === "mcp.json") {
21318
21357
  return jsonLooksArgentServerOnly(full, "mcpServers");
21319
21358
  }
@@ -21346,13 +21385,13 @@ function claudeSettingsLooksArgentOnly(filePath) {
21346
21385
  function claudeDirLooksArgentOnly(dir) {
21347
21386
  let entries;
21348
21387
  try {
21349
- entries = fs18.readdirSync(dir);
21388
+ entries = fs20.readdirSync(dir);
21350
21389
  } catch {
21351
21390
  return false;
21352
21391
  }
21353
21392
  if (entries.length === 0) return false;
21354
21393
  return entries.every((entry) => {
21355
- const full = path19.join(dir, entry);
21394
+ const full = path21.join(dir, entry);
21356
21395
  if (entry === "settings.json") return claudeSettingsLooksArgentOnly(full);
21357
21396
  if (entry === "rules" || entry === "agents" || entry === "skills") {
21358
21397
  return managedDirLooksArgentOnly(full, entry);
@@ -21363,25 +21402,25 @@ function claudeDirLooksArgentOnly(dir) {
21363
21402
  function vscodeDirLooksArgentOnly(dir) {
21364
21403
  let entries;
21365
21404
  try {
21366
- entries = fs18.readdirSync(dir);
21405
+ entries = fs20.readdirSync(dir);
21367
21406
  } catch {
21368
21407
  return false;
21369
21408
  }
21370
21409
  if (entries.length === 0) return false;
21371
21410
  return entries.every(
21372
- (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path19.join(dir, entry), "servers")
21411
+ (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path21.join(dir, entry), "servers")
21373
21412
  );
21374
21413
  }
21375
21414
  function windsurfDirLooksArgentOnly(dir) {
21376
21415
  let entries;
21377
21416
  try {
21378
- entries = fs18.readdirSync(dir);
21417
+ entries = fs20.readdirSync(dir);
21379
21418
  } catch {
21380
21419
  return false;
21381
21420
  }
21382
21421
  if (entries.length === 0) return false;
21383
21422
  return entries.every(
21384
- (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path19.join(dir, entry), "mcpServers")
21423
+ (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path21.join(dir, entry), "mcpServers")
21385
21424
  );
21386
21425
  }
21387
21426
  function zedSettingsLooksArgentOnly(filePath) {
@@ -21412,25 +21451,25 @@ function zedSettingsLooksArgentOnly(filePath) {
21412
21451
  function zedDirLooksArgentOnly(dir) {
21413
21452
  let entries;
21414
21453
  try {
21415
- entries = fs18.readdirSync(dir);
21454
+ entries = fs20.readdirSync(dir);
21416
21455
  } catch {
21417
21456
  return false;
21418
21457
  }
21419
21458
  if (entries.length === 0) return false;
21420
21459
  return entries.every(
21421
- (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path19.join(dir, entry))
21460
+ (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path21.join(dir, entry))
21422
21461
  );
21423
21462
  }
21424
21463
  function geminiDirLooksArgentOnly(dir) {
21425
21464
  let entries;
21426
21465
  try {
21427
- entries = fs18.readdirSync(dir);
21466
+ entries = fs20.readdirSync(dir);
21428
21467
  } catch {
21429
21468
  return false;
21430
21469
  }
21431
21470
  if (entries.length === 0) return false;
21432
21471
  return entries.every((entry) => {
21433
- const full = path19.join(dir, entry);
21472
+ const full = path21.join(dir, entry);
21434
21473
  if (entry === "settings.json") return jsonLooksArgentServerOnly(full, "mcpServers");
21435
21474
  if (entry === "rules" || entry === "agents") return managedDirLooksArgentOnly(full, entry);
21436
21475
  return false;
@@ -21449,48 +21488,48 @@ function hermesConfigLooksArgentOnly(filePath) {
21449
21488
  function hermesDirLooksArgentOnly(dir) {
21450
21489
  let entries;
21451
21490
  try {
21452
- entries = fs18.readdirSync(dir);
21491
+ entries = fs20.readdirSync(dir);
21453
21492
  } catch {
21454
21493
  return false;
21455
21494
  }
21456
21495
  if (entries.length === 0) return false;
21457
21496
  return entries.every(
21458
- (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path19.join(dir, entry))
21497
+ (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path21.join(dir, entry))
21459
21498
  );
21460
21499
  }
21461
21500
  function kiroDirLooksArgentOnly(dir) {
21462
21501
  let entries;
21463
21502
  try {
21464
- entries = fs18.readdirSync(dir);
21503
+ entries = fs20.readdirSync(dir);
21465
21504
  } catch {
21466
21505
  return false;
21467
21506
  }
21468
21507
  if (entries.length === 0) return false;
21469
21508
  return entries.every((entry) => {
21470
21509
  if (entry !== "settings") return false;
21471
- const settingsDir = path19.join(dir, entry);
21510
+ const settingsDir = path21.join(dir, entry);
21472
21511
  let settingsEntries;
21473
21512
  try {
21474
- settingsEntries = fs18.readdirSync(settingsDir);
21513
+ settingsEntries = fs20.readdirSync(settingsDir);
21475
21514
  } catch {
21476
21515
  return false;
21477
21516
  }
21478
21517
  if (settingsEntries.length === 0) return false;
21479
21518
  return settingsEntries.every(
21480
- (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path19.join(settingsDir, name), "mcpServers")
21519
+ (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path21.join(settingsDir, name), "mcpServers")
21481
21520
  );
21482
21521
  });
21483
21522
  }
21484
21523
  function codexDirLooksArgentOnly(dir) {
21485
21524
  let entries;
21486
21525
  try {
21487
- entries = fs18.readdirSync(dir);
21526
+ entries = fs20.readdirSync(dir);
21488
21527
  } catch {
21489
21528
  return false;
21490
21529
  }
21491
21530
  if (entries.length === 0) return false;
21492
21531
  return entries.every((entry) => {
21493
- const full = path19.join(dir, entry);
21532
+ const full = path21.join(dir, entry);
21494
21533
  if (entry === "config.toml") {
21495
21534
  const config = parseTomlStrict(full);
21496
21535
  if (config === null) return false;
@@ -21515,7 +21554,7 @@ function codexDirLooksArgentOnly(dir) {
21515
21554
  });
21516
21555
  }
21517
21556
  function cursorPermissionsPath() {
21518
- return path19.join(homedir5(), ".cursor", "permissions.json");
21557
+ return path21.join(homedir5(), ".cursor", "permissions.json");
21519
21558
  }
21520
21559
  function cursorPermissionsList() {
21521
21560
  const list = readJsonc(cursorPermissionsPath()).mcpAllowlist;
@@ -21524,13 +21563,13 @@ function cursorPermissionsList() {
21524
21563
  var cursorAdapter = {
21525
21564
  name: "Cursor",
21526
21565
  detect() {
21527
- return dirHasEditorEvidence(path19.join(homedir5(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
21566
+ return dirHasEditorEvidence(path21.join(homedir5(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path21.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
21528
21567
  },
21529
21568
  projectPath(root) {
21530
- return path19.join(root, ".cursor", "mcp.json");
21569
+ return path21.join(root, ".cursor", "mcp.json");
21531
21570
  },
21532
21571
  globalPath() {
21533
- return path19.join(homedir5(), ".cursor", "mcp.json");
21572
+ return path21.join(homedir5(), ".cursor", "mcp.json");
21534
21573
  },
21535
21574
  // Read and written as JSONC through readJsonc / editJsoncFile: path-targeted
21536
21575
  // text edits that preserve user comments and foreign servers.
@@ -21542,7 +21581,7 @@ var cursorAdapter = {
21542
21581
  });
21543
21582
  },
21544
21583
  remove(configPath) {
21545
- if (!fs18.existsSync(configPath)) return false;
21584
+ if (!fs20.existsSync(configPath)) return false;
21546
21585
  const config = readJsonc(configPath);
21547
21586
  const servers = config.mcpServers;
21548
21587
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21550,7 +21589,7 @@ var cursorAdapter = {
21550
21589
  return true;
21551
21590
  },
21552
21591
  getArgentEntry(configPath) {
21553
- if (!fs18.existsSync(configPath)) return null;
21592
+ if (!fs20.existsSync(configPath)) return null;
21554
21593
  const config = readJsonc(configPath);
21555
21594
  const servers = config.mcpServers;
21556
21595
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21575,7 +21614,7 @@ var cursorAdapter = {
21575
21614
  removeAllowlist(_root, scope) {
21576
21615
  if (scope !== "global") return;
21577
21616
  const permPath = cursorPermissionsPath();
21578
- if (!fs18.existsSync(permPath)) return;
21617
+ if (!fs20.existsSync(permPath)) return;
21579
21618
  const config = readJsonc(permPath);
21580
21619
  const list = Array.isArray(config.mcpAllowlist) ? config.mcpAllowlist : void 0;
21581
21620
  if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
@@ -21588,7 +21627,7 @@ function claudeProjectKeysForRoot(projects, root) {
21588
21627
  return Object.keys(projects).filter((key) => key === root || canonicalPath(key) === target);
21589
21628
  }
21590
21629
  function claudeDisabledListFinding(settingsPath, label, projectConfined) {
21591
- if (!fs18.existsSync(settingsPath)) return null;
21630
+ if (!fs20.existsSync(settingsPath)) return null;
21592
21631
  const disabled = readJson(settingsPath).disabledMcpjsonServers;
21593
21632
  if (!Array.isArray(disabled) || !disabled.includes(MCP_SERVER_KEY)) return null;
21594
21633
  return {
@@ -21616,13 +21655,13 @@ var claudeAdapter = {
21616
21655
  name: "Claude Code",
21617
21656
  detect() {
21618
21657
  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);
21658
+ return fileHasEditorEvidence(path21.join(process.cwd(), ".mcp.json"), mcpJsonArgentOnly) || fileHasEditorEvidence(path21.join(homedir5(), ".claude.json"), mcpJsonArgentOnly) || dirHasEditorEvidence(path21.join(process.cwd(), ".claude"), claudeDirLooksArgentOnly) || dirHasEditorEvidence(path21.join(homedir5(), ".claude"), claudeDirLooksArgentOnly);
21620
21659
  },
21621
21660
  projectPath(root) {
21622
- return path19.join(root, ".mcp.json");
21661
+ return path21.join(root, ".mcp.json");
21623
21662
  },
21624
21663
  globalPath() {
21625
- return path19.join(homedir5(), ".claude.json");
21664
+ return path21.join(homedir5(), ".claude.json");
21626
21665
  },
21627
21666
  // JSONC is a superset of JSON, so this config shares the one comment- and
21628
21667
  // foreign-server-preserving write path (see the Cursor adapter).
@@ -21635,7 +21674,7 @@ var claudeAdapter = {
21635
21674
  });
21636
21675
  },
21637
21676
  remove(configPath) {
21638
- if (!fs18.existsSync(configPath)) return false;
21677
+ if (!fs20.existsSync(configPath)) return false;
21639
21678
  const config = readJsonc(configPath);
21640
21679
  const servers = config.mcpServers;
21641
21680
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21649,7 +21688,7 @@ var claudeAdapter = {
21649
21688
  return true;
21650
21689
  },
21651
21690
  getArgentEntry(configPath) {
21652
- if (!fs18.existsSync(configPath)) return null;
21691
+ if (!fs20.existsSync(configPath)) return null;
21653
21692
  const config = readJsonc(configPath);
21654
21693
  const servers = config.mcpServers;
21655
21694
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21662,7 +21701,7 @@ var claudeAdapter = {
21662
21701
  // .mcp.json rejections (see claudeDisabledListFinding).
21663
21702
  findShadowingConfigs(root, writtenScope) {
21664
21703
  const findings = [];
21665
- const claudeJsonPath = path19.join(homedir5(), ".claude.json");
21704
+ const claudeJsonPath = path21.join(homedir5(), ".claude.json");
21666
21705
  const projects = readJson(claudeJsonPath).projects;
21667
21706
  if (isRecord(projects)) {
21668
21707
  for (const key of claudeProjectKeysForRoot(projects, root)) {
@@ -21699,9 +21738,9 @@ var claudeAdapter = {
21699
21738
  }
21700
21739
  if (writtenScope === "local") {
21701
21740
  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]
21741
+ [path21.join(root, ".claude", "settings.json"), ".claude/settings.json", true],
21742
+ [path21.join(root, ".claude", "settings.local.json"), ".claude/settings.local.json", true],
21743
+ [path21.join(homedir5(), ".claude", "settings.json"), "~/.claude/settings.json", false]
21705
21744
  ];
21706
21745
  for (const [settingsPath, label, projectConfined] of candidates) {
21707
21746
  const finding = claudeDisabledListFinding(settingsPath, label, projectConfined);
@@ -21720,10 +21759,10 @@ var claudeAdapter = {
21720
21759
  var vscodeAdapter = {
21721
21760
  name: "VS Code",
21722
21761
  detect() {
21723
- return dirHasEditorEvidence(path19.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path19.join(homedir5(), ".vscode"));
21762
+ return dirHasEditorEvidence(path21.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path21.join(homedir5(), ".vscode"));
21724
21763
  },
21725
21764
  projectPath(root) {
21726
- return path19.join(root, ".vscode", "mcp.json");
21765
+ return path21.join(root, ".vscode", "mcp.json");
21727
21766
  },
21728
21767
  globalPath() {
21729
21768
  return null;
@@ -21739,7 +21778,7 @@ var vscodeAdapter = {
21739
21778
  });
21740
21779
  },
21741
21780
  remove(configPath) {
21742
- if (!fs18.existsSync(configPath)) return false;
21781
+ if (!fs20.existsSync(configPath)) return false;
21743
21782
  const config = readJsonc(configPath);
21744
21783
  const servers = config.servers;
21745
21784
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21747,7 +21786,7 @@ var vscodeAdapter = {
21747
21786
  return true;
21748
21787
  },
21749
21788
  getArgentEntry(configPath) {
21750
- if (!fs18.existsSync(configPath)) return null;
21789
+ if (!fs20.existsSync(configPath)) return null;
21751
21790
  const config = readJsonc(configPath);
21752
21791
  const servers = config.servers;
21753
21792
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21760,7 +21799,7 @@ var vscodeAdapter = {
21760
21799
  findShadowingConfigs(_root, _writtenScope) {
21761
21800
  const findings = [];
21762
21801
  for (const userDir of vscodeUserDirs()) {
21763
- const configPath = path19.join(userDir, "mcp.json");
21802
+ const configPath = path21.join(userDir, "mcp.json");
21764
21803
  const entry = this.getArgentEntry(configPath);
21765
21804
  if (!entry) continue;
21766
21805
  findings.push({
@@ -21777,16 +21816,16 @@ var vscodeAdapter = {
21777
21816
  function vscodeUserDirs() {
21778
21817
  const bases = [];
21779
21818
  if (process.platform === "darwin") {
21780
- bases.push(path19.join(homedir5(), "Library", "Application Support"));
21819
+ bases.push(path21.join(homedir5(), "Library", "Application Support"));
21781
21820
  } else if (process.platform === "win32") {
21782
21821
  if (process.env.APPDATA) bases.push(process.env.APPDATA);
21783
21822
  } else {
21784
- bases.push(path19.join(homedir5(), ".config"));
21823
+ bases.push(path21.join(homedir5(), ".config"));
21785
21824
  }
21786
21825
  const dirs = [];
21787
21826
  for (const base of bases) {
21788
21827
  for (const product of ["Code", "Code - Insiders"]) {
21789
- const dir = path19.join(base, product, "User");
21828
+ const dir = path21.join(base, product, "User");
21790
21829
  if (dirExists(dir)) dirs.push(dir);
21791
21830
  }
21792
21831
  }
@@ -21794,18 +21833,18 @@ function vscodeUserDirs() {
21794
21833
  }
21795
21834
  function devinUserConfigPath() {
21796
21835
  if (process.platform === "win32") {
21797
- const appData = process.env.APPDATA || path19.join(homedir5(), "AppData", "Roaming");
21798
- return path19.join(appData, "devin", "config.json");
21836
+ const appData = process.env.APPDATA || path21.join(homedir5(), "AppData", "Roaming");
21837
+ return path21.join(appData, "devin", "config.json");
21799
21838
  }
21800
21839
  const xdg = process.env.XDG_CONFIG_HOME;
21801
- return path19.join(xdg || path19.join(homedir5(), ".config"), "devin", "config.json");
21840
+ return path21.join(xdg || path21.join(homedir5(), ".config"), "devin", "config.json");
21802
21841
  }
21803
21842
  var windsurfAdapter = {
21804
21843
  name: "Devin Desktop",
21805
21844
  telemetryName: "windsurf",
21806
21845
  detect() {
21807
21846
  return dirHasEditorEvidence(
21808
- path19.join(homedir5(), ".codeium", "windsurf"),
21847
+ path21.join(homedir5(), ".codeium", "windsurf"),
21809
21848
  windsurfDirLooksArgentOnly
21810
21849
  );
21811
21850
  },
@@ -21813,7 +21852,7 @@ var windsurfAdapter = {
21813
21852
  return null;
21814
21853
  },
21815
21854
  globalPath() {
21816
- return path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21855
+ return path21.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21817
21856
  },
21818
21857
  // JSONC-safe writes (see the Cursor adapter).
21819
21858
  write(configPath, entry) {
@@ -21825,7 +21864,7 @@ var windsurfAdapter = {
21825
21864
  });
21826
21865
  },
21827
21866
  remove(configPath) {
21828
- if (!fs18.existsSync(configPath)) return false;
21867
+ if (!fs20.existsSync(configPath)) return false;
21829
21868
  const config = readJsonc(configPath);
21830
21869
  const servers = config.mcpServers;
21831
21870
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21833,7 +21872,7 @@ var windsurfAdapter = {
21833
21872
  return true;
21834
21873
  },
21835
21874
  getArgentEntry(configPath) {
21836
- if (!fs18.existsSync(configPath)) return null;
21875
+ if (!fs20.existsSync(configPath)) return null;
21837
21876
  const config = readJsonc(configPath);
21838
21877
  const servers = config.mcpServers;
21839
21878
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21845,7 +21884,7 @@ var windsurfAdapter = {
21845
21884
  // servers survive. alwaysAllow serves the legacy Cascade agent; the Devin
21846
21885
  // agent needs its own permission rule.
21847
21886
  addAllowlist() {
21848
- const configPath = path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21887
+ const configPath = path21.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21849
21888
  const config = readJsonc(configPath);
21850
21889
  const servers = config.mcpServers;
21851
21890
  if (!servers?.[MCP_SERVER_KEY]) return;
@@ -21855,8 +21894,8 @@ var windsurfAdapter = {
21855
21894
  removeAllowlist(_root, scope) {
21856
21895
  if (scope !== "global") return;
21857
21896
  removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21858
- const configPath = path19.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21859
- if (!fs18.existsSync(configPath)) return;
21897
+ const configPath = path21.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
21898
+ if (!fs20.existsSync(configPath)) return;
21860
21899
  const config = readJsonc(configPath);
21861
21900
  const servers = config.mcpServers;
21862
21901
  const entry = servers?.[MCP_SERVER_KEY];
@@ -21867,13 +21906,13 @@ var windsurfAdapter = {
21867
21906
  var zedAdapter = {
21868
21907
  name: "Zed",
21869
21908
  detect() {
21870
- return dirHasEditorEvidence(path19.join(homedir5(), ".config", "zed"), zedDirLooksArgentOnly);
21909
+ return dirHasEditorEvidence(path21.join(homedir5(), ".config", "zed"), zedDirLooksArgentOnly);
21871
21910
  },
21872
21911
  projectPath(root) {
21873
- return path19.join(root, ".zed", "settings.json");
21912
+ return path21.join(root, ".zed", "settings.json");
21874
21913
  },
21875
21914
  globalPath() {
21876
- return path19.join(homedir5(), ".config", "zed", "settings.json");
21915
+ return path21.join(homedir5(), ".config", "zed", "settings.json");
21877
21916
  },
21878
21917
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
21879
21918
  // formatting outside the touched key survive (see the Cursor adapter).
@@ -21886,7 +21925,7 @@ var zedAdapter = {
21886
21925
  });
21887
21926
  },
21888
21927
  remove(configPath) {
21889
- if (!fs18.existsSync(configPath)) return false;
21928
+ if (!fs20.existsSync(configPath)) return false;
21890
21929
  const config = readJsonc(configPath);
21891
21930
  const servers = config.context_servers;
21892
21931
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21894,7 +21933,7 @@ var zedAdapter = {
21894
21933
  return true;
21895
21934
  },
21896
21935
  getArgentEntry(configPath) {
21897
- if (!fs18.existsSync(configPath)) return null;
21936
+ if (!fs20.existsSync(configPath)) return null;
21898
21937
  const config = readJsonc(configPath);
21899
21938
  const servers = config.context_servers;
21900
21939
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21905,12 +21944,12 @@ var zedAdapter = {
21905
21944
  // Zed has no server-level wildcard for MCP tools — each tool would need its
21906
21945
  // own entry — so the global default is set to "allow" instead.
21907
21946
  addAllowlist(root, scope) {
21908
- const settingsPath = scope === "global" ? path19.join(homedir5(), ".config", "zed", "settings.json") : path19.join(root, ".zed", "settings.json");
21947
+ const settingsPath = scope === "global" ? path21.join(homedir5(), ".config", "zed", "settings.json") : path21.join(root, ".zed", "settings.json");
21909
21948
  editJsoncFile(settingsPath, ["agent", "tool_permissions", "default"], "allow");
21910
21949
  },
21911
21950
  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;
21951
+ const settingsPath = scope === "global" ? path21.join(homedir5(), ".config", "zed", "settings.json") : path21.join(root, ".zed", "settings.json");
21952
+ if (!fs20.existsSync(settingsPath)) return;
21914
21953
  const config = readJsonc(settingsPath);
21915
21954
  const perms = config.agent?.tool_permissions;
21916
21955
  if (!perms || perms.default !== "allow") return;
@@ -21920,13 +21959,13 @@ var zedAdapter = {
21920
21959
  var geminiAdapter = {
21921
21960
  name: "Gemini",
21922
21961
  detect() {
21923
- return dirHasEditorEvidence(path19.join(homedir5(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21962
+ return dirHasEditorEvidence(path21.join(homedir5(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path21.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21924
21963
  },
21925
21964
  projectPath(root) {
21926
- return path19.join(root, ".gemini", "settings.json");
21965
+ return path21.join(root, ".gemini", "settings.json");
21927
21966
  },
21928
21967
  globalPath() {
21929
- return path19.join(homedir5(), ".gemini", "settings.json");
21968
+ return path21.join(homedir5(), ".gemini", "settings.json");
21930
21969
  },
21931
21970
  // JSONC-safe writes (see the Cursor adapter).
21932
21971
  write(configPath, entry) {
@@ -21938,7 +21977,7 @@ var geminiAdapter = {
21938
21977
  });
21939
21978
  },
21940
21979
  remove(configPath) {
21941
- if (!fs18.existsSync(configPath)) return false;
21980
+ if (!fs20.existsSync(configPath)) return false;
21942
21981
  const config = readJsonc(configPath);
21943
21982
  const servers = config.mcpServers;
21944
21983
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21946,7 +21985,7 @@ var geminiAdapter = {
21946
21985
  return true;
21947
21986
  },
21948
21987
  getArgentEntry(configPath) {
21949
- if (!fs18.existsSync(configPath)) return null;
21988
+ if (!fs20.existsSync(configPath)) return null;
21950
21989
  const config = readJsonc(configPath);
21951
21990
  const servers = config.mcpServers;
21952
21991
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21968,7 +22007,7 @@ var geminiAdapter = {
21968
22007
  },
21969
22008
  removeAllowlist(root, scope) {
21970
22009
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
21971
- if (!configPath || !fs18.existsSync(configPath)) {
22010
+ if (!configPath || !fs20.existsSync(configPath)) {
21972
22011
  return;
21973
22012
  }
21974
22013
  const config = readJsonc(configPath);
@@ -21982,13 +22021,13 @@ var CODEX_FILENAME = ".codex";
21982
22021
  var codexAdapter = {
21983
22022
  name: "Codex",
21984
22023
  detect() {
21985
- return dirHasEditorEvidence(path19.join(homedir5(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
22024
+ return dirHasEditorEvidence(path21.join(homedir5(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path21.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
21986
22025
  },
21987
22026
  projectPath(root) {
21988
- return path19.join(root, CODEX_FILENAME, "config.toml");
22027
+ return path21.join(root, CODEX_FILENAME, "config.toml");
21989
22028
  },
21990
22029
  globalPath() {
21991
- return path19.join(homedir5(), CODEX_FILENAME, "config.toml");
22030
+ return path21.join(homedir5(), CODEX_FILENAME, "config.toml");
21992
22031
  },
21993
22032
  write(configPath, entry) {
21994
22033
  const config = readToml(configPath);
@@ -22004,7 +22043,7 @@ var codexAdapter = {
22004
22043
  writeToml(configPath, config);
22005
22044
  },
22006
22045
  remove(configPath) {
22007
- if (!fs18.existsSync(configPath)) return false;
22046
+ if (!fs20.existsSync(configPath)) return false;
22008
22047
  const config = readToml(configPath);
22009
22048
  const servers = config.mcp_servers;
22010
22049
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22014,7 +22053,7 @@ var codexAdapter = {
22014
22053
  return true;
22015
22054
  },
22016
22055
  getArgentEntry(configPath) {
22017
- if (!fs18.existsSync(configPath)) return null;
22056
+ if (!fs20.existsSync(configPath)) return null;
22018
22057
  const config = readToml(configPath);
22019
22058
  const servers = config.mcp_servers;
22020
22059
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22046,7 +22085,7 @@ var codexAdapter = {
22046
22085
  // them, and an emptied or removed table stays as it is.
22047
22086
  refreshAllowlist(root, scope) {
22048
22087
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22049
- if (!configPath || !fs18.existsSync(configPath)) return;
22088
+ if (!configPath || !fs20.existsSync(configPath)) return;
22050
22089
  const config = readToml(configPath);
22051
22090
  const toolsConfig = config.mcp_servers?.argent?.tools;
22052
22091
  if (!toolsConfig) return;
@@ -22083,13 +22122,13 @@ var codexAdapter = {
22083
22122
  var hermesAdapter = {
22084
22123
  name: "Hermes",
22085
22124
  detect() {
22086
- return dirHasEditorEvidence(path19.join(homedir5(), ".hermes"), hermesDirLooksArgentOnly);
22125
+ return dirHasEditorEvidence(path21.join(homedir5(), ".hermes"), hermesDirLooksArgentOnly);
22087
22126
  },
22088
22127
  projectPath() {
22089
22128
  return null;
22090
22129
  },
22091
22130
  globalPath() {
22092
- return path19.join(homedir5(), ".hermes", "config.yaml");
22131
+ return path21.join(homedir5(), ".hermes", "config.yaml");
22093
22132
  },
22094
22133
  write(configPath, entry) {
22095
22134
  const doc = readYaml(configPath);
@@ -22108,7 +22147,7 @@ var hermesAdapter = {
22108
22147
  writeYaml(configPath, doc);
22109
22148
  },
22110
22149
  remove(configPath) {
22111
- if (!fs18.existsSync(configPath)) return false;
22150
+ if (!fs20.existsSync(configPath)) return false;
22112
22151
  const doc = readYaml(configPath);
22113
22152
  const servers = doc.get("mcp_servers");
22114
22153
  if (!(0, import_yaml2.isMap)(servers)) return false;
@@ -22121,7 +22160,7 @@ var hermesAdapter = {
22121
22160
  return true;
22122
22161
  },
22123
22162
  getArgentEntry(configPath) {
22124
- if (!fs18.existsSync(configPath)) return null;
22163
+ if (!fs20.existsSync(configPath)) return null;
22125
22164
  const doc = readYaml(configPath);
22126
22165
  const servers = doc.get("mcp_servers");
22127
22166
  if (!(0, import_yaml2.isMap)(servers)) return null;
@@ -22148,10 +22187,10 @@ function hasOpenCodeBinary() {
22148
22187
  }
22149
22188
  function pickOpencodeConfig(dir, candidates) {
22150
22189
  for (const name of candidates) {
22151
- const candidate = path19.join(dir, name);
22152
- if (fs18.existsSync(candidate)) return candidate;
22190
+ const candidate = path21.join(dir, name);
22191
+ if (fs20.existsSync(candidate)) return candidate;
22153
22192
  }
22154
- return path19.join(dir, "opencode.json");
22193
+ return path21.join(dir, "opencode.json");
22155
22194
  }
22156
22195
  var openCodeAdapter = {
22157
22196
  name: "opencode",
@@ -22162,7 +22201,7 @@ var openCodeAdapter = {
22162
22201
  return pickOpencodeConfig(root, OPENCODE_PROJECT_FILES);
22163
22202
  },
22164
22203
  globalPath() {
22165
- return pickOpencodeConfig(path19.join(homedir5(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
22204
+ return pickOpencodeConfig(path21.join(homedir5(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
22166
22205
  },
22167
22206
  write(configPath, entry) {
22168
22207
  editJsoncFile(configPath, ["mcp", MCP_SERVER_KEY], {
@@ -22173,7 +22212,7 @@ var openCodeAdapter = {
22173
22212
  });
22174
22213
  },
22175
22214
  remove(configPath) {
22176
- if (!fs18.existsSync(configPath)) return false;
22215
+ if (!fs20.existsSync(configPath)) return false;
22177
22216
  const config = readJsonc(configPath);
22178
22217
  const servers = config.mcp;
22179
22218
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22181,7 +22220,7 @@ var openCodeAdapter = {
22181
22220
  return true;
22182
22221
  },
22183
22222
  getArgentEntry(configPath) {
22184
- if (!fs18.existsSync(configPath)) return null;
22223
+ if (!fs20.existsSync(configPath)) return null;
22185
22224
  const config = readJsonc(configPath);
22186
22225
  const servers = config.mcp;
22187
22226
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22196,7 +22235,7 @@ var openCodeAdapter = {
22196
22235
  },
22197
22236
  removeAllowlist(root, scope) {
22198
22237
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22199
- if (!configPath || !fs18.existsSync(configPath)) return;
22238
+ if (!configPath || !fs20.existsSync(configPath)) return;
22200
22239
  const config = readJsonc(configPath);
22201
22240
  const tools = config.tools;
22202
22241
  if (!tools || !(OPENCODE_ALLOWLIST_PATTERN in tools)) return;
@@ -22207,13 +22246,13 @@ var KIRO_AUTO_APPROVE_ALL = ["*"];
22207
22246
  var kiroAdapter = {
22208
22247
  name: "Kiro",
22209
22248
  detect() {
22210
- return dirHasEditorEvidence(path19.join(homedir5(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path19.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
22249
+ return dirHasEditorEvidence(path21.join(homedir5(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path21.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
22211
22250
  },
22212
22251
  projectPath(root) {
22213
- return path19.join(root, ".kiro", "settings", "mcp.json");
22252
+ return path21.join(root, ".kiro", "settings", "mcp.json");
22214
22253
  },
22215
22254
  globalPath() {
22216
- return path19.join(homedir5(), ".kiro", "settings", "mcp.json");
22255
+ return path21.join(homedir5(), ".kiro", "settings", "mcp.json");
22217
22256
  },
22218
22257
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
22219
22258
  // foreign servers survive (see the Cursor adapter).
@@ -22226,7 +22265,7 @@ var kiroAdapter = {
22226
22265
  });
22227
22266
  },
22228
22267
  remove(configPath) {
22229
- if (!fs18.existsSync(configPath)) return false;
22268
+ if (!fs20.existsSync(configPath)) return false;
22230
22269
  const config = readJsonc(configPath);
22231
22270
  const servers = config.mcpServers;
22232
22271
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -22234,7 +22273,7 @@ var kiroAdapter = {
22234
22273
  return true;
22235
22274
  },
22236
22275
  getArgentEntry(configPath) {
22237
- if (!fs18.existsSync(configPath)) return null;
22276
+ if (!fs20.existsSync(configPath)) return null;
22238
22277
  const config = readJsonc(configPath);
22239
22278
  const servers = config.mcpServers;
22240
22279
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -22258,7 +22297,7 @@ var kiroAdapter = {
22258
22297
  },
22259
22298
  removeAllowlist(root, scope) {
22260
22299
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
22261
- if (!configPath || !fs18.existsSync(configPath)) return;
22300
+ if (!configPath || !fs20.existsSync(configPath)) return;
22262
22301
  const config = readJsonc(configPath);
22263
22302
  const servers = config.mcpServers;
22264
22303
  const entry = servers?.[MCP_SERVER_KEY];
@@ -22310,7 +22349,7 @@ function addAllowRule(settingsPath, rule) {
22310
22349
  editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
22311
22350
  }
22312
22351
  function removeAllowRule(settingsPath, rule) {
22313
- if (!fs18.existsSync(settingsPath)) return;
22352
+ if (!fs20.existsSync(settingsPath)) return;
22314
22353
  const config = readJsonc(settingsPath);
22315
22354
  const permissions = config?.permissions;
22316
22355
  const allow = permissions?.allow;
@@ -22320,7 +22359,7 @@ function removeAllowRule(settingsPath, rule) {
22320
22359
  editJsoncFile(settingsPath, ["permissions", "allow"], next.length > 0 ? next : void 0);
22321
22360
  }
22322
22361
  function claudeSettingsPath(root, scope) {
22323
- return scope === "global" ? path19.join(homedir5(), ".claude", "settings.json") : path19.join(root, ".claude", "settings.json");
22362
+ return scope === "global" ? path21.join(homedir5(), ".claude", "settings.json") : path21.join(root, ".claude", "settings.json");
22324
22363
  }
22325
22364
  function addClaudePermission(root, scope) {
22326
22365
  addAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
@@ -22333,13 +22372,13 @@ function formatCopyDestination(target, writtenPath, root) {
22333
22372
  return `${target.label} -> ${formatManagedPathLabel(writtenPath, realpathOrSelf(root))}`;
22334
22373
  }
22335
22374
  function formatManagedPathLabel(targetPath, root) {
22336
- for (const home of [path19.resolve(homedir5()), canonicalPath(homedir5())]) {
22337
- if (targetPath === home || targetPath.startsWith(`${home}${path19.sep}`)) {
22375
+ for (const home of [path21.resolve(homedir5()), canonicalPath(homedir5())]) {
22376
+ if (targetPath === home || targetPath.startsWith(`${home}${path21.sep}`)) {
22338
22377
  return `~${targetPath.slice(home.length)}`;
22339
22378
  }
22340
22379
  }
22341
- const relative5 = path19.relative(root, targetPath);
22342
- if (relative5 && !relative5.startsWith("..") && !path19.isAbsolute(relative5)) {
22380
+ const relative5 = path21.relative(root, targetPath);
22381
+ if (relative5 && !relative5.startsWith("..") && !path21.isAbsolute(relative5)) {
22343
22382
  return relative5;
22344
22383
  }
22345
22384
  return targetPath;
@@ -22353,7 +22392,7 @@ function addManagedTarget(targets, editorName, targetPath, root) {
22353
22392
  }
22354
22393
  function getAdapterBasePath(adapter, root, scope) {
22355
22394
  const configPath = scope === "global" ? adapter.globalPath() : adapter.projectPath(root);
22356
- return configPath ? path19.dirname(configPath) : null;
22395
+ return configPath ? path21.dirname(configPath) : null;
22357
22396
  }
22358
22397
  function getManagedContentTargets(adapters, root, scope) {
22359
22398
  const targets = {
@@ -22367,13 +22406,13 @@ function getManagedContentTargets(adapters, root, scope) {
22367
22406
  addManagedTarget(
22368
22407
  targets.skillTargets,
22369
22408
  "skills",
22370
- path19.join(workspaceBase, ".agents", "skills"),
22409
+ path21.join(workspaceBase, ".agents", "skills"),
22371
22410
  root
22372
22411
  );
22373
22412
  addManagedTarget(
22374
22413
  targets.skillsLockTargets,
22375
22414
  "skills",
22376
- path19.join(workspaceBase, "skills-lock.json"),
22415
+ path21.join(workspaceBase, "skills-lock.json"),
22377
22416
  root
22378
22417
  );
22379
22418
  for (const adapter of adapters) {
@@ -22381,21 +22420,21 @@ function getManagedContentTargets(adapters, root, scope) {
22381
22420
  case "Cursor": {
22382
22421
  const base = getAdapterBasePath(adapter, root, scope);
22383
22422
  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);
22423
+ addManagedTarget(targets.skillTargets, adapter.name, path21.join(base, "skills"), root);
22424
+ addManagedTarget(targets.ruleTargets, adapter.name, path21.join(base, "rules"), root);
22386
22425
  break;
22387
22426
  }
22388
22427
  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);
22428
+ const claudeBase = scope === "global" ? path21.join(homedir5(), ".claude") : path21.join(root, ".claude");
22429
+ addManagedTarget(targets.skillTargets, adapter.name, path21.join(claudeBase, "skills"), root);
22430
+ addManagedTarget(targets.ruleTargets, adapter.name, path21.join(claudeBase, "rules"), root);
22431
+ addManagedTarget(targets.agentTargets, adapter.name, path21.join(claudeBase, "agents"), root);
22393
22432
  break;
22394
22433
  }
22395
22434
  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);
22435
+ const geminiBase = scope === "global" ? path21.join(homedir5(), ".gemini") : path21.join(root, ".gemini");
22436
+ addManagedTarget(targets.ruleTargets, adapter.name, path21.join(geminiBase, "rules"), root);
22437
+ addManagedTarget(targets.agentTargets, adapter.name, path21.join(geminiBase, "agents"), root);
22399
22438
  break;
22400
22439
  }
22401
22440
  case "Codex": {
@@ -22405,19 +22444,19 @@ function getManagedContentTargets(adapters, root, scope) {
22405
22444
  break;
22406
22445
  }
22407
22446
  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);
22447
+ const base = scope === "global" ? path21.join(homedir5(), ".config", "opencode") : path21.join(root, ".opencode");
22448
+ addManagedTarget(targets.skillTargets, adapter.name, path21.join(base, "skills"), root);
22449
+ addManagedTarget(targets.agentTargets, adapter.name, path21.join(base, "agents"), root);
22411
22450
  break;
22412
22451
  }
22413
22452
  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);
22453
+ const kiroBase = scope === "global" ? path21.join(homedir5(), ".kiro") : path21.join(root, ".kiro");
22454
+ addManagedTarget(targets.skillTargets, adapter.name, path21.join(kiroBase, "skills"), root);
22416
22455
  break;
22417
22456
  }
22418
22457
  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);
22458
+ const devinBase = scope === "global" ? path21.join(process.env.XDG_CONFIG_HOME || path21.join(homedir5(), ".config"), "devin") : path21.join(root, ".devin");
22459
+ addManagedTarget(targets.skillTargets, adapter.name, path21.join(devinBase, "skills"), root);
22421
22460
  break;
22422
22461
  }
22423
22462
  }
@@ -22431,12 +22470,12 @@ function stripFrontmatter(content) {
22431
22470
  return match ? content.slice(match[0].length).trim() : content.trim();
22432
22471
  }
22433
22472
  function readAndConcatRules(rulesDir) {
22434
- if (!fs18.existsSync(rulesDir)) return null;
22435
- const files = fs18.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
22473
+ if (!fs20.existsSync(rulesDir)) return null;
22474
+ const files = fs20.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
22436
22475
  if (files.length === 0) return null;
22437
22476
  const parts = [];
22438
22477
  for (const file of files) {
22439
- const raw = fs18.readFileSync(path19.join(rulesDir, file), "utf8");
22478
+ const raw = fs20.readFileSync(path21.join(rulesDir, file), "utf8");
22440
22479
  const stripped = stripFrontmatter(raw);
22441
22480
  if (stripped) parts.push(stripped);
22442
22481
  }
@@ -22471,7 +22510,7 @@ function injectCodexRules(configPath, rulesDir) {
22471
22510
  return configPath;
22472
22511
  }
22473
22512
  function removeCodexRules(configPath) {
22474
- if (!fs18.existsSync(configPath)) return false;
22513
+ if (!fs20.existsSync(configPath)) return false;
22475
22514
  const config = readToml(configPath);
22476
22515
  const existing = config.developer_instructions;
22477
22516
  if (!existing || !existing.includes(ARGENT_RULES_START)) return false;
@@ -22563,10 +22602,10 @@ function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
22563
22602
  }
22564
22603
 
22565
22604
  // ../argent-installer/src/retired-files.ts
22566
- import * as path20 from "node:path";
22605
+ import * as path22 from "node:path";
22567
22606
  var import_picocolors = __toESM(require_picocolors(), 1);
22568
22607
  function displayPath(entry, file) {
22569
- return path20.join(entry.location, ...file.relativePath.split("/"));
22608
+ return path22.join(entry.location, ...file.relativePath.split("/"));
22570
22609
  }
22571
22610
  async function cleanupRetiredFiles(found, options) {
22572
22611
  const result = { removed: [], declined: [], failed: [], removedRoots: [] };
@@ -22617,14 +22656,14 @@ async function reportRetiredFiles(found, interactive) {
22617
22656
 
22618
22657
  // ../argent-installer/src/cli-record.ts
22619
22658
  var import_semver4 = __toESM(require_semver2(), 1);
22620
- import * as fs19 from "node:fs";
22621
- import * as path21 from "node:path";
22659
+ import * as fs21 from "node:fs";
22660
+ import * as path23 from "node:path";
22622
22661
  function cliRecordPath() {
22623
- return path21.join(argentHomeDir(), "cli.json");
22662
+ return path23.join(argentHomeDir(), "cli.json");
22624
22663
  }
22625
22664
  function readCliRecord() {
22626
22665
  try {
22627
- const parsed = JSON.parse(fs19.readFileSync(cliRecordPath(), "utf8"));
22666
+ const parsed = JSON.parse(fs21.readFileSync(cliRecordPath(), "utf8"));
22628
22667
  if (typeof parsed?.cli === "string" && typeof parsed?.node === "string") return parsed;
22629
22668
  return null;
22630
22669
  } catch {
@@ -22634,7 +22673,7 @@ function readCliRecord() {
22634
22673
  function resolveCliEntry(mode, projectRoot) {
22635
22674
  if (mode === "local") {
22636
22675
  const relative5 = getLocalArgentBinRelPath(projectRoot);
22637
- return relative5 ? path21.resolve(projectRoot, relative5) : null;
22676
+ return relative5 ? path23.resolve(projectRoot, relative5) : null;
22638
22677
  }
22639
22678
  const packageRoot = getGloballyInstalledPackageRoot();
22640
22679
  return packageRoot ? cliPathOf(packageRoot) : null;
@@ -22653,10 +22692,10 @@ function writeCliRecord(input) {
22653
22692
  function persistCliRecord(record) {
22654
22693
  const file = cliRecordPath();
22655
22694
  try {
22656
- fs19.mkdirSync(path21.dirname(file), { recursive: true });
22695
+ fs21.mkdirSync(path23.dirname(file), { recursive: true });
22657
22696
  const temporary = `${file}.${process.pid}.tmp`;
22658
- fs19.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
22659
- fs19.renameSync(temporary, file);
22697
+ fs21.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
22698
+ fs21.renameSync(temporary, file);
22660
22699
  return file;
22661
22700
  } catch {
22662
22701
  return null;
@@ -22664,10 +22703,10 @@ function persistCliRecord(record) {
22664
22703
  }
22665
22704
  function healCliRecord(input) {
22666
22705
  try {
22667
- if (!fs19.existsSync(input.cli)) return null;
22706
+ if (!fs21.existsSync(input.cli)) return null;
22668
22707
  const existing = readCliRecord();
22669
22708
  if (existing) {
22670
- const alive = fs19.existsSync(existing.node) && fs19.existsSync(existing.cli);
22709
+ const alive = fs21.existsSync(existing.node) && fs21.existsSync(existing.cli);
22671
22710
  const ourVersion = import_semver4.default.valid(input.version);
22672
22711
  const theirVersion = import_semver4.default.valid(existing.version);
22673
22712
  const newerThanExisting = ourVersion !== null && (theirVersion === null || import_semver4.default.gt(ourVersion, theirVersion));
@@ -22688,11 +22727,11 @@ function removeCliRecordFor(installDir) {
22688
22727
  if (!installDir) return false;
22689
22728
  const record = readCliRecord();
22690
22729
  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;
22730
+ const root = path23.resolve(installDir);
22731
+ const relative5 = path23.relative(root, path23.resolve(record.cli));
22732
+ if (relative5.startsWith("..") || path23.isAbsolute(relative5)) return false;
22694
22733
  try {
22695
- fs19.rmSync(cliRecordPath(), { force: true });
22734
+ fs21.rmSync(cliRecordPath(), { force: true });
22696
22735
  return true;
22697
22736
  } catch {
22698
22737
  return false;
@@ -22728,9 +22767,11 @@ async function resolveTelemetryConsent(opts) {
22728
22767
  printFirstRunNotice();
22729
22768
  return { kind: "skipped" };
22730
22769
  }
22731
- const source = getConsentState().source.source;
22770
+ const state2 = getConsentState();
22771
+ const source = state2.source.source;
22732
22772
  const envOwnsDecision = source === "env_do_not_track" || source === "env_argent_telemetry";
22733
- if (envOwnsDecision || hasShownFirstRunNotice()) {
22773
+ const configOptedOut = source === "config_file" && !state2.enabled;
22774
+ if (envOwnsDecision || configOptedOut || hasShownFirstRunNotice()) {
22734
22775
  return { kind: "skipped" };
22735
22776
  }
22736
22777
  log.info(
@@ -22916,8 +22957,8 @@ async function promptInstallMode(defaultMode = "global") {
22916
22957
 
22917
22958
  // ../argent-installer/src/install-runner.ts
22918
22959
  var import_picocolors4 = __toESM(require_picocolors(), 1);
22919
- import * as fs22 from "node:fs";
22920
- import * as path24 from "node:path";
22960
+ import * as fs24 from "node:fs";
22961
+ import * as path26 from "node:path";
22921
22962
 
22922
22963
  // ../argent-installer/src/shell.ts
22923
22964
  import { execFileSync as execFileSync6, spawn as spawn2 } from "node:child_process";
@@ -22949,7 +22990,7 @@ var ShellCommandError = class extends Error {
22949
22990
  signal;
22950
22991
  };
22951
22992
  function runShellCommand(cmd, opts = {}) {
22952
- return new Promise((resolve21, reject) => {
22993
+ return new Promise((resolve22, reject) => {
22953
22994
  const child = spawn2(cmd.bin, cmd.args, {
22954
22995
  stdio: ["ignore", "pipe", "pipe"],
22955
22996
  shell: process.platform === "win32",
@@ -22965,7 +23006,7 @@ function runShellCommand(cmd, opts = {}) {
22965
23006
  stderr += chunk.toString();
22966
23007
  });
22967
23008
  child.on("close", (code, signal) => {
22968
- if (code === 0) resolve21();
23009
+ if (code === 0) resolve22();
22969
23010
  else
22970
23011
  reject(
22971
23012
  new ShellCommandError(
@@ -22981,33 +23022,33 @@ function runShellCommand(cmd, opts = {}) {
22981
23022
 
22982
23023
  // ../argent-installer/src/skills.ts
22983
23024
  import { execFileSync as execFileSync8 } from "node:child_process";
22984
- import * as fs21 from "node:fs";
22985
- import * as path23 from "node:path";
23025
+ import * as fs23 from "node:fs";
23026
+ import * as path25 from "node:path";
22986
23027
  var import_picocolors3 = __toESM(require_picocolors(), 1);
22987
23028
 
22988
23029
  // ../argent-installer/src/skills-runner.ts
22989
23030
  import { execFileSync as execFileSync7 } from "node:child_process";
22990
- import * as fs20 from "node:fs";
22991
- import * as path22 from "node:path";
23031
+ import * as fs22 from "node:fs";
23032
+ import * as path24 from "node:path";
22992
23033
  var WIN32_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD";
22993
23034
  function findOnPath(bin, env, platform) {
22994
23035
  const pathValue = env.PATH ?? env.Path ?? "";
22995
- const dirs = pathValue.split(path22.delimiter).filter((dir) => path22.isAbsolute(dir));
23036
+ const dirs = pathValue.split(path24.delimiter).filter((dir) => path24.isAbsolute(dir));
22996
23037
  if (platform === "win32") {
22997
23038
  const exts = (env.PATHEXT ?? WIN32_DEFAULT_PATHEXT).split(";").filter(Boolean);
22998
23039
  for (const dir of dirs) {
22999
23040
  for (const ext of exts) {
23000
- const candidate = path22.join(dir, bin + ext);
23001
- if (fs20.existsSync(candidate)) return candidate;
23041
+ const candidate = path24.join(dir, bin + ext);
23042
+ if (fs22.existsSync(candidate)) return candidate;
23002
23043
  }
23003
23044
  }
23004
23045
  return null;
23005
23046
  }
23006
23047
  for (const dir of dirs) {
23007
- const candidate = path22.join(dir, bin);
23048
+ const candidate = path24.join(dir, bin);
23008
23049
  try {
23009
- if (!fs20.statSync(candidate).isFile()) continue;
23010
- fs20.accessSync(candidate, fs20.constants.X_OK);
23050
+ if (!fs22.statSync(candidate).isFile()) continue;
23051
+ fs22.accessSync(candidate, fs22.constants.X_OK);
23011
23052
  return candidate;
23012
23053
  } catch {
23013
23054
  }
@@ -23184,13 +23225,13 @@ function snapshotArgentSkills(projectRoot, scope, names) {
23184
23225
  let candidates = names;
23185
23226
  if (names.length === 0) {
23186
23227
  try {
23187
- candidates = fs21.readdirSync(targetPath).filter((n3) => n3.startsWith(ARGENT_SKILL_PREFIX));
23228
+ candidates = fs23.readdirSync(targetPath).filter((n3) => n3.startsWith(ARGENT_SKILL_PREFIX));
23188
23229
  } catch {
23189
23230
  continue;
23190
23231
  }
23191
23232
  }
23192
23233
  for (const name of candidates) {
23193
- const stat6 = fs21.statSync(path23.join(targetPath, name, "SKILL.md"), { throwIfNoEntry: false });
23234
+ const stat6 = fs23.statSync(path25.join(targetPath, name, "SKILL.md"), { throwIfNoEntry: false });
23194
23235
  if (!stat6?.isFile()) continue;
23195
23236
  found.set(name, `${found.get(name) ?? ""}${stat6.ino}:${stat6.mtimeMs};`);
23196
23237
  }
@@ -23208,7 +23249,7 @@ function pruneLegacySkillDirs(projectRoot, scope, bundled = new Set(listBundledS
23208
23249
  const removed = /* @__PURE__ */ new Set();
23209
23250
  for (const { targetPath } of skillTargets) {
23210
23251
  for (const name of legacy) {
23211
- const dir = path23.join(targetPath, name);
23252
+ const dir = path25.join(targetPath, name);
23212
23253
  try {
23213
23254
  if (removePath(dir)) removed.add(name);
23214
23255
  } catch {
@@ -23228,13 +23269,13 @@ function listTrackedLegacySkills(projectRoot, scope, bundled = new Set(listBundl
23228
23269
  }
23229
23270
  function removeLockEntries(lockPath, names) {
23230
23271
  try {
23231
- const lock = JSON.parse(fs21.readFileSync(lockPath, "utf8"));
23272
+ const lock = JSON.parse(fs23.readFileSync(lockPath, "utf8"));
23232
23273
  const skills = lock.skills;
23233
23274
  if (!skills) return [];
23234
23275
  const removed = names.filter((name) => name in skills);
23235
23276
  if (removed.length === 0) return [];
23236
23277
  for (const name of removed) delete skills[name];
23237
- fs21.writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n");
23278
+ fs23.writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n");
23238
23279
  return removed;
23239
23280
  } catch {
23240
23281
  return [];
@@ -23305,7 +23346,7 @@ async function runInstall(args) {
23305
23346
  return runGlobal({ fromTar, nonInteractive, version: args.version, tel });
23306
23347
  }
23307
23348
  function installSpec(fromTar) {
23308
- return fs22.existsSync(fromTar) ? path24.resolve(fromTar) : fromTar;
23349
+ return fs24.existsSync(fromTar) ? path26.resolve(fromTar) : fromTar;
23309
23350
  }
23310
23351
  async function installLocally(opts) {
23311
23352
  const { fromTar, tel } = opts;
@@ -23612,8 +23653,8 @@ async function chooseAdapters(opts) {
23612
23653
 
23613
23654
  // ../argent-installer/src/init-scope.ts
23614
23655
  var import_picocolors6 = __toESM(require_picocolors(), 1);
23615
- import { existsSync as existsSync15 } from "node:fs";
23616
- import { resolve as resolve14 } from "node:path";
23656
+ import { existsSync as existsSync16 } from "node:fs";
23657
+ import { resolve as resolve15 } from "node:path";
23617
23658
  async function chooseScope(opts) {
23618
23659
  if (opts.installMode === "local") {
23619
23660
  return { scope: "local" };
@@ -23650,13 +23691,13 @@ async function chooseScope(opts) {
23650
23691
  placeholder: process.cwd(),
23651
23692
  validate(value) {
23652
23693
  if (!value?.trim()) return "Path cannot be empty.";
23653
- const resolved = resolve14(value.trim());
23654
- if (!existsSync15(resolved))
23694
+ const resolved = resolve15(value.trim());
23695
+ if (!existsSync16(resolved))
23655
23696
  return `Path does not exist: ${resolved}. Please verify and enter a valid path.`;
23656
23697
  }
23657
23698
  });
23658
23699
  if (isCancel(customPathInput)) throw new InitCancelled("scope");
23659
- return { scope: "custom", customRoot: resolve14(customPathInput.trim()) };
23700
+ return { scope: "custom", customRoot: resolve15(customPathInput.trim()) };
23660
23701
  }
23661
23702
 
23662
23703
  // ../argent-installer/src/init-mcp-write.ts
@@ -23956,8 +23997,8 @@ async function configureAllowlist(args) {
23956
23997
  // ../argent-installer/src/init-skills.ts
23957
23998
  var import_picocolors10 = __toESM(require_picocolors(), 1);
23958
23999
  import { spawn as spawn3 } from "node:child_process";
23959
- import * as os4 from "node:os";
23960
- import * as path25 from "node:path";
24000
+ import * as os5 from "node:os";
24001
+ import * as path27 from "node:path";
23961
24002
  var REF_MISSING = /Remote branch .* not found in upstream|couldn't find remote ref|unknown revision/i;
23962
24003
  function meaningfulLine(err) {
23963
24004
  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 +24006,10 @@ function meaningfulLine(err) {
23965
24006
  }
23966
24007
  function bundledCopyFor(version) {
23967
24008
  const local = probeLocalInstall(resolveProjectRoot2(process.cwd()));
23968
- if (local.packageDir && local.version === version) return path25.join(local.packageDir, "skills");
24009
+ if (local.packageDir && local.version === version) return path27.join(local.packageDir, "skills");
23969
24010
  const globalRoot = getGloballyInstalledPackageRoot();
23970
24011
  if (globalRoot && getGloballyInstalledVersion() === version) {
23971
- return path25.join(globalRoot, "skills");
24012
+ return path27.join(globalRoot, "skills");
23972
24013
  }
23973
24014
  return SKILLS_DIR;
23974
24015
  }
@@ -24073,7 +24114,7 @@ async function runSkillsStep(args) {
24073
24114
  const useGitHubSource = online && !fromTar && version !== "unknown";
24074
24115
  const skillsSource = useGitHubSource ? buildArgentSkillsSource(version) : SKILLS_DIR;
24075
24116
  const bundledCopy = useGitHubSource ? bundledCopyFor(version) : SKILLS_DIR;
24076
- const skillsRoot = scope === "global" ? os4.homedir() : effectiveRoot;
24117
+ const skillsRoot = scope === "global" ? os5.homedir() : effectiveRoot;
24077
24118
  const skillsScope = scope === "global" ? "global" : "project";
24078
24119
  const expected = listBundledSkills(bundledCopy);
24079
24120
  const snapshot = () => snapshotArgentSkills(skillsRoot, skillsScope, expected);
@@ -24195,7 +24236,7 @@ async function runSkillsStep(args) {
24195
24236
  async function runSkillsCli(runner, args, interactive, cwd) {
24196
24237
  if (!runner) throw new Error(NO_SKILLS_RUNNER_MESSAGE);
24197
24238
  const command = skillsCommand(runner, args);
24198
- return new Promise((resolve21, reject) => {
24239
+ return new Promise((resolve22, reject) => {
24199
24240
  const child = spawn3(command.file, command.args, {
24200
24241
  env: npxChildEnv(),
24201
24242
  stdio: interactive ? "inherit" : ["ignore", "pipe", "pipe"],
@@ -24214,7 +24255,7 @@ async function runSkillsCli(runner, args, interactive, cwd) {
24214
24255
  }
24215
24256
  child.on("close", (code, signal) => {
24216
24257
  if (code === 0) {
24217
- resolve21();
24258
+ resolve22();
24218
24259
  } else {
24219
24260
  const output = [stderr, stdout2].filter(Boolean).join("\n").trim();
24220
24261
  reject(
@@ -24535,9 +24576,9 @@ function printBanner() {
24535
24576
  // ../argent-installer/src/update.ts
24536
24577
  var import_picocolors12 = __toESM(require_picocolors(), 1);
24537
24578
  var import_semver5 = __toESM(require_semver2(), 1);
24538
- import * as fs24 from "node:fs";
24539
- import * as os5 from "node:os";
24540
- import * as path31 from "node:path";
24579
+ import * as fs26 from "node:fs";
24580
+ import * as os7 from "node:os";
24581
+ import * as path33 from "node:path";
24541
24582
 
24542
24583
  // ../argent-installer/src/install-targets.ts
24543
24584
  function parseTargetFlags(args) {
@@ -24609,17 +24650,17 @@ async function resolveInstallableUpdateTarget(pm, current, cwd, candidate) {
24609
24650
 
24610
24651
  // ../argent-tools-client/src/launcher.ts
24611
24652
  import * as net from "node:net";
24612
- import * as fs23 from "node:fs";
24613
- import * as path26 from "node:path";
24653
+ import * as os6 from "node:os";
24654
+ import * as fs25 from "node:fs";
24655
+ import * as path28 from "node:path";
24614
24656
  import * as readline from "node:readline";
24615
- import { homedir as homedir7 } from "node:os";
24616
24657
  import { spawn as spawn4, execFileSync as execFileSync9 } from "node:child_process";
24617
24658
  import { createHash as createHash3, randomBytes } from "node:crypto";
24618
- 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");
24659
+ import { readFile, readdir as readdir2, unlink } from "node:fs/promises";
24660
+ var STATE_DIR = argentHomeDir();
24661
+ var STATE_FILE = path28.join(STATE_DIR, "tool-server.json");
24662
+ var LOG_FILE = path28.join(STATE_DIR, "tool-server.log");
24663
+ var LOCK_FILE = path28.join(STATE_DIR, "tool-server.lock");
24623
24664
  function isProcessAlive(pid) {
24624
24665
  try {
24625
24666
  process.kill(pid, 0);
@@ -24628,9 +24669,10 @@ function isProcessAlive(pid) {
24628
24669
  return false;
24629
24670
  }
24630
24671
  }
24631
- function stateFileForBundle(bundlePath) {
24672
+ function stateFileForBundle(bundlePath, cloudProfile) {
24632
24673
  const key = createHash3("sha256").update(bundlePath).digest("hex").slice(0, 12);
24633
- return path26.join(STATE_DIR, `tool-server-${key}.json`);
24674
+ const profile = cloudProfile ? `-cloud-${cloudProfile}` : "";
24675
+ return path28.join(STATE_DIR, `tool-server-${key}${profile}.json`);
24634
24676
  }
24635
24677
  async function readStateFile(file) {
24636
24678
  try {
@@ -24640,16 +24682,22 @@ async function readStateFile(file) {
24640
24682
  return null;
24641
24683
  }
24642
24684
  }
24643
- async function readToolsServerState(bundlePath) {
24685
+ async function readToolsServerState(bundlePath, cloudProfile) {
24644
24686
  if (bundlePath === void 0) return readStateFile(STATE_FILE);
24687
+ if (cloudProfile) {
24688
+ const own2 = await readStateFile(stateFileForBundle(bundlePath, cloudProfile));
24689
+ return own2?.cloudProfile === cloudProfile ? own2 : null;
24690
+ }
24645
24691
  const own = await readStateFile(stateFileForBundle(bundlePath));
24646
24692
  if (own) return own;
24647
24693
  const legacy = await readStateFile(STATE_FILE);
24648
24694
  return legacy && legacy.bundlePath === bundlePath ? legacy : null;
24649
24695
  }
24650
- async function clearToolsServerState(bundlePath) {
24696
+ async function clearToolsServerState(bundlePath, cloudProfile) {
24651
24697
  const files = [STATE_FILE];
24652
- if (bundlePath !== void 0) {
24698
+ if (bundlePath !== void 0 && cloudProfile) {
24699
+ files[0] = stateFileForBundle(bundlePath, cloudProfile);
24700
+ } else if (bundlePath !== void 0) {
24653
24701
  files[0] = stateFileForBundle(bundlePath);
24654
24702
  const legacy = await readStateFile(STATE_FILE);
24655
24703
  if (legacy && legacy.bundlePath === bundlePath) files.push(STATE_FILE);
@@ -24661,7 +24709,7 @@ async function clearToolsServerState(bundlePath) {
24661
24709
  }
24662
24710
  }
24663
24711
  }
24664
- var STATE_FILE_RE = /^tool-server(-[0-9a-f]{12})?\.json$/;
24712
+ var STATE_FILE_RE = /^tool-server(-[0-9a-f]{12}(-cloud-[0-9a-f]{12})?)?\.json$/;
24665
24713
  async function readAllToolsServerStates() {
24666
24714
  let names;
24667
24715
  try {
@@ -24672,7 +24720,7 @@ async function readAllToolsServerStates() {
24672
24720
  const out = [];
24673
24721
  for (const name of names) {
24674
24722
  if (!STATE_FILE_RE.test(name)) continue;
24675
- const file = path26.join(STATE_DIR, name);
24723
+ const file = path28.join(STATE_DIR, name);
24676
24724
  const state2 = await readStateFile(file);
24677
24725
  if (state2) out.push({ file, state: state2 });
24678
24726
  }
@@ -24707,32 +24755,32 @@ async function terminatePid(pid, stillOurs) {
24707
24755
  }
24708
24756
  await waitForExit(pid, SIGKILL_GRACE_MS);
24709
24757
  }
24710
- async function killToolServer(bundlePath) {
24711
- const state2 = await readState(bundlePath);
24758
+ async function killToolServer(bundlePath, cloudProfile) {
24759
+ const state2 = await readState(bundlePath, cloudProfile);
24712
24760
  if (!state2) return false;
24713
24761
  const stillOurs = () => couldBeOurToolServer(state2.pid, state2.bundlePath);
24714
24762
  const alive = isProcessAlive(state2.pid);
24715
24763
  if (alive && !stillOurs()) return false;
24716
24764
  if (alive) await terminatePid(state2.pid, stillOurs);
24717
- await clearToolsServerState(bundlePath ?? state2.bundlePath);
24765
+ await clearToolsServerState(bundlePath ?? state2.bundlePath, cloudProfile);
24718
24766
  return alive;
24719
24767
  }
24720
24768
  function isPathWithin(child, parent) {
24721
- const rel = path26.relative(parent, child);
24722
- return rel !== "" && !rel.startsWith("..") && !path26.isAbsolute(rel);
24769
+ const rel = path28.relative(parent, child);
24770
+ return rel !== "" && !rel.startsWith("..") && !path28.isAbsolute(rel);
24723
24771
  }
24724
24772
  function tryRealpath(p) {
24725
24773
  try {
24726
- return fs23.realpathSync(p);
24774
+ return fs25.realpathSync(p);
24727
24775
  } catch {
24728
24776
  return p;
24729
24777
  }
24730
24778
  }
24731
24779
  async function killToolServerForInstallDir(packageDir) {
24732
- const parents = /* @__PURE__ */ new Set([path26.resolve(packageDir), tryRealpath(packageDir)]);
24780
+ const parents = /* @__PURE__ */ new Set([path28.resolve(packageDir), tryRealpath(packageDir)]);
24733
24781
  let killed = 0;
24734
24782
  for (const { file, state: state2 } of await readAllToolsServerStates()) {
24735
- const bundles = /* @__PURE__ */ new Set([path26.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
24783
+ const bundles = /* @__PURE__ */ new Set([path28.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
24736
24784
  const matches2 = [...bundles].some((b) => [...parents].some((p) => isPathWithin(b, p)));
24737
24785
  if (!matches2) continue;
24738
24786
  const fresh = await readStateFile(file);
@@ -24750,7 +24798,7 @@ async function killToolServerForInstallDir(packageDir) {
24750
24798
  }
24751
24799
  return killed;
24752
24800
  }
24753
- var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs23.existsSync(p)) ?? "ps";
24801
+ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs25.existsSync(p)) ?? "ps";
24754
24802
  var PS_WIDTH_FLAGS = ["-ww"];
24755
24803
  var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
24756
24804
  function readProcessCommandLine(pid, flags = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
@@ -24797,38 +24845,37 @@ function couldBeOurToolServer(pid, marker) {
24797
24845
  var import_yaml4 = __toESM(require_dist2(), 1);
24798
24846
  import { readFile as readFile5 } from "node:fs/promises";
24799
24847
  import { maxHeaderSize } from "node:http";
24800
- import * as path30 from "node:path";
24848
+ import * as path32 from "node:path";
24801
24849
 
24802
24850
  // ../argent-tools-client/src/link-config.ts
24803
- import * as path27 from "node:path";
24804
- import { homedir as homedir8 } from "node:os";
24805
- 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");
24851
+ import * as path29 from "node:path";
24852
+ import { mkdir, writeFile, readFile as readFile2, unlink as unlink2, chmod } from "node:fs/promises";
24853
+ var LINK_DIR = argentHomeDir();
24854
+ var LINK_FILE = path29.join(LINK_DIR, "link.json");
24808
24855
 
24809
24856
  // ../argent-tools-client/src/file-inputs.ts
24810
24857
  import { createHash as createHash4, randomUUID as randomUUID6 } from "node:crypto";
24811
- import { createReadStream as createReadStream2, rmSync as rmSync6 } from "node:fs";
24858
+ import { createReadStream as createReadStream2, rmSync as rmSync7 } from "node:fs";
24812
24859
  import {
24813
- chmod as chmod3,
24860
+ chmod as chmod2,
24814
24861
  lstat,
24815
- mkdir as mkdir3,
24862
+ mkdir as mkdir2,
24816
24863
  readFile as readFile3,
24817
24864
  realpath as realpath2,
24818
- rename as rename2,
24865
+ rename,
24819
24866
  rm as rm2,
24820
24867
  stat as stat3,
24821
- writeFile as writeFile3
24868
+ writeFile as writeFile2
24822
24869
  } from "node:fs/promises";
24823
- import { constants as constants2, tmpdir } from "node:os";
24824
- import * as path28 from "node:path";
24870
+ import { constants as constants3, tmpdir } from "node:os";
24871
+ import * as path30 from "node:path";
24825
24872
 
24826
24873
  // ../archive/src/index.ts
24827
24874
  import { spawn as spawn5 } from "node:child_process";
24828
24875
  import { once } from "node:events";
24829
24876
  import { createReadStream, createWriteStream } from "node:fs";
24830
24877
  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";
24878
+ import { basename as basename5, dirname as dirname15, join as join28, resolve as resolve17, sep as sep4 } from "node:path";
24832
24879
  import { Writable } from "node:stream";
24833
24880
  import { pipeline } from "node:stream/promises";
24834
24881
  import zlib2 from "node:zlib";
@@ -24846,23 +24893,33 @@ var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
24846
24893
  // ../argent-tools-client/src/flow-files.ts
24847
24894
  var import_yaml3 = __toESM(require_dist2(), 1);
24848
24895
  import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat as stat4 } from "node:fs/promises";
24849
- import * as path29 from "node:path";
24896
+ import * as path31 from "node:path";
24850
24897
  var INLINE_MEMBERS_BYTES = 256 * 1024;
24851
24898
 
24899
+ // ../argent-tools-client/src/tools-client.ts
24900
+ var RECORDING_FILE_INPUT = {
24901
+ target: "__recording",
24902
+ path: `\${project_root}/${E2E_DIRS[0].split(path32.sep).join("/")}/\${name}.yaml`,
24903
+ paths: E2E_DIRS.map((dir) => `\${project_root}/${dir.split(path32.sep).join("/")}/\${name}.yaml`),
24904
+ kind: "file",
24905
+ optional: true,
24906
+ collect: "flow"
24907
+ };
24908
+
24852
24909
  // ../argent-tools-client/src/artifacts.ts
24853
24910
  import {
24854
24911
  copyFile,
24855
- mkdir as mkdir4,
24912
+ mkdir as mkdir3,
24856
24913
  mkdtemp,
24857
24914
  readFile as readFile6,
24858
24915
  realpath as realpath4,
24859
24916
  rm as rm3,
24860
24917
  stat as stat5,
24861
- writeFile as writeFile4
24918
+ writeFile as writeFile3
24862
24919
  } from "node:fs/promises";
24863
24920
  import { constants as fsConstants } from "node:fs";
24864
24921
  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";
24922
+ import { basename as basename8, extname as extname2, isAbsolute as isAbsolute10, join as join32, normalize as normalize2, resolve as resolve20, sep as sep8 } from "node:path";
24866
24923
  import { createHash as createHash5 } from "node:crypto";
24867
24924
  var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
24868
24925
  var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
@@ -24937,7 +24994,7 @@ function resolveUpdatePackageAction(trigger, installed) {
24937
24994
  return installed ? "standalone_update" : "standalone_install";
24938
24995
  }
24939
24996
  function isLivePinnedEntry(entry) {
24940
- return entry !== null && isPinnedGlobalEntry(entry) && fs24.existsSync(entry.command) && fs24.existsSync(entry.args[0]);
24997
+ return entry !== null && isPinnedGlobalEntry(entry) && fs26.existsSync(entry.command) && fs26.existsSync(entry.args[0]);
24941
24998
  }
24942
24999
  async function refreshConfiguration({
24943
25000
  projectRoot,
@@ -25169,7 +25226,7 @@ async function update(args) {
25169
25226
  const pm = mode === "local" ? detectProjectPackageManager(projectRoot) : detectGlobalPackageManager();
25170
25227
  if (automatic) {
25171
25228
  const globalRoot = getGloballyInstalledPackageRoot();
25172
- if (!globallyInstalled || !globalRoot || fs24.realpathSync(globalRoot) !== projectRoot || getConfigValueByKey("autoUpdate.enabled") !== true || !ownsGlobalInstall(pm, projectRoot)) {
25229
+ if (!globallyInstalled || !globalRoot || fs26.realpathSync(globalRoot) !== projectRoot || !isAutoUpdateEnabled() || !ownsGlobalInstall(pm, projectRoot)) {
25173
25230
  spinner2.stop("Could not confirm an automatic update for this installation.");
25174
25231
  return "noop";
25175
25232
  }
@@ -25370,7 +25427,7 @@ async function update(args) {
25370
25427
  process.exit(1);
25371
25428
  }
25372
25429
  if (automatic) {
25373
- const runningRoot = fs24.realpathSync(resolvePackageRoot(import.meta.dirname));
25430
+ const runningRoot = fs26.realpathSync(resolvePackageRoot(import.meta.dirname));
25374
25431
  const result = requestedVersion ? await applyUpdateForTarget("global", runningRoot) : "noop";
25375
25432
  if (result === "updated" && requestedVersion) {
25376
25433
  writeCliRecord({
@@ -25379,7 +25436,7 @@ async function update(args) {
25379
25436
  version: getGloballyInstalledVersion() ?? requestedVersion
25380
25437
  });
25381
25438
  await refreshConfiguration({
25382
- projectRoot: os5.homedir(),
25439
+ projectRoot: os7.homedir(),
25383
25440
  installMode: "global",
25384
25441
  nonInteractive: true,
25385
25442
  globalOnly: true
@@ -25393,7 +25450,7 @@ async function update(args) {
25393
25450
  return;
25394
25451
  }
25395
25452
  const rootOverride = getProjectRootOverride(args);
25396
- const projectRoot = rootOverride ? path31.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
25453
+ const projectRoot = rootOverride ? path33.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
25397
25454
  installMode = resolveInstallMode(projectRoot);
25398
25455
  const flags = parseTargetFlags(args);
25399
25456
  const localInstalled = installMode === "local" && probeLocalInstall(projectRoot).installed;
@@ -25473,8 +25530,8 @@ async function update(args) {
25473
25530
  // ../argent-installer/src/uninstall.ts
25474
25531
  var import_picocolors13 = __toESM(require_picocolors(), 1);
25475
25532
  var import_yaml5 = __toESM(require_dist2(), 1);
25476
- import * as fs25 from "node:fs";
25477
- import * as path32 from "node:path";
25533
+ import * as fs27 from "node:fs";
25534
+ import * as path34 from "node:path";
25478
25535
  var UNINSTALL_TOOLSERVER_STOP_FAILED = {
25479
25536
  error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
25480
25537
  failure_stage: "installer_uninstall_toolserver_stop",
@@ -25495,10 +25552,10 @@ var UNINSTALL_UNCLASSIFIED_FAILED = {
25495
25552
  };
25496
25553
  function removeDirIfEmpty2(dirPath) {
25497
25554
  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);
25555
+ if (!fs27.existsSync(dirPath)) return false;
25556
+ if (!fs27.statSync(dirPath).isDirectory()) return false;
25557
+ if (fs27.readdirSync(dirPath).length > 0) return false;
25558
+ fs27.rmdirSync(dirPath);
25502
25559
  return true;
25503
25560
  } catch {
25504
25561
  return false;
@@ -25508,9 +25565,9 @@ function collectBundledPaths(sourceDir) {
25508
25565
  const files = [];
25509
25566
  const directories = [];
25510
25567
  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);
25568
+ for (const entry of fs27.readdirSync(currentDir, { withFileTypes: true })) {
25569
+ const relativePath = relativeDir ? path34.join(relativeDir, entry.name) : entry.name;
25570
+ const absolutePath = path34.join(currentDir, entry.name);
25514
25571
  if (entry.isDirectory()) {
25515
25572
  walk(absolutePath, relativePath);
25516
25573
  directories.push(relativePath);
@@ -25523,15 +25580,15 @@ function collectBundledPaths(sourceDir) {
25523
25580
  return { files, directories };
25524
25581
  }
25525
25582
  function removeBundledContent(sourceDir, targetDir) {
25526
- if (!fs25.existsSync(sourceDir) || !fs25.existsSync(targetDir)) {
25583
+ if (!fs27.existsSync(sourceDir) || !fs27.existsSync(targetDir)) {
25527
25584
  return { removedPaths: [], removedRoot: false };
25528
25585
  }
25529
25586
  const { files, directories } = collectBundledPaths(sourceDir);
25530
25587
  const removedPaths = [];
25531
25588
  for (const relativePath of files) {
25532
- const targetPath = path32.join(targetDir, relativePath);
25589
+ const targetPath = path34.join(targetDir, relativePath);
25533
25590
  try {
25534
- const entry = fs25.lstatSync(targetPath, { throwIfNoEntry: false });
25591
+ const entry = fs27.lstatSync(targetPath, { throwIfNoEntry: false });
25535
25592
  if (!entry || entry.isDirectory()) continue;
25536
25593
  removePath(targetPath);
25537
25594
  removedPaths.push(relativePath);
@@ -25539,36 +25596,36 @@ function removeBundledContent(sourceDir, targetDir) {
25539
25596
  }
25540
25597
  }
25541
25598
  directories.sort(
25542
- (a2, b) => b.split(path32.sep).length - a2.split(path32.sep).length || b.length - a2.length
25599
+ (a2, b) => b.split(path34.sep).length - a2.split(path34.sep).length || b.length - a2.length
25543
25600
  );
25544
25601
  for (const relativePath of directories) {
25545
- const targetPath = path32.join(targetDir, relativePath);
25602
+ const targetPath = path34.join(targetDir, relativePath);
25546
25603
  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);
25604
+ if (!fs27.existsSync(targetPath)) continue;
25605
+ if (!fs27.statSync(targetPath).isDirectory()) continue;
25606
+ if (fs27.readdirSync(targetPath).length > 0) continue;
25607
+ fs27.rmdirSync(targetPath);
25551
25608
  } catch {
25552
25609
  }
25553
25610
  }
25554
25611
  let removedRoot = false;
25555
25612
  try {
25556
- if (fs25.existsSync(targetDir) && fs25.statSync(targetDir).isDirectory()) {
25557
- if (fs25.readdirSync(targetDir).length === 0) {
25558
- fs25.rmdirSync(targetDir);
25613
+ if (fs27.existsSync(targetDir) && fs27.statSync(targetDir).isDirectory()) {
25614
+ if (fs27.readdirSync(targetDir).length === 0) {
25615
+ fs27.rmdirSync(targetDir);
25559
25616
  removedRoot = true;
25560
25617
  }
25561
25618
  }
25562
25619
  } catch {
25563
25620
  }
25564
25621
  if (removedRoot) {
25565
- removeDirIfEmpty2(path32.dirname(targetDir));
25622
+ removeDirIfEmpty2(path34.dirname(targetDir));
25566
25623
  }
25567
25624
  return { removedPaths, removedRoot };
25568
25625
  }
25569
25626
  function readBundledSkillName(skillFilePath, fallbackName) {
25570
25627
  try {
25571
- const content = fs25.readFileSync(skillFilePath, "utf8");
25628
+ const content = fs27.readFileSync(skillFilePath, "utf8");
25572
25629
  const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1];
25573
25630
  if (!frontmatter) return fallbackName;
25574
25631
  const data = (0, import_yaml5.parse)(frontmatter);
@@ -25579,23 +25636,23 @@ function readBundledSkillName(skillFilePath, fallbackName) {
25579
25636
  }
25580
25637
  }
25581
25638
  function getBundledSkillNames(skillsDir) {
25582
- if (!fs25.existsSync(skillsDir)) return [];
25639
+ if (!fs27.existsSync(skillsDir)) return [];
25583
25640
  const skillNames = [];
25584
- for (const entry of fs25.readdirSync(skillsDir, { withFileTypes: true })) {
25641
+ for (const entry of fs27.readdirSync(skillsDir, { withFileTypes: true })) {
25585
25642
  if (!entry.isDirectory()) continue;
25586
- const skillFilePath = path32.join(skillsDir, entry.name, "SKILL.md");
25587
- if (!fs25.existsSync(skillFilePath)) continue;
25643
+ const skillFilePath = path34.join(skillsDir, entry.name, "SKILL.md");
25644
+ if (!fs27.existsSync(skillFilePath)) continue;
25588
25645
  skillNames.push(readBundledSkillName(skillFilePath, entry.name));
25589
25646
  }
25590
25647
  return [...new Set(skillNames)].sort();
25591
25648
  }
25592
25649
  function removeBundledSkillInstalls(skillNames, targetDir) {
25593
- if (!fs25.existsSync(targetDir)) {
25650
+ if (!fs27.existsSync(targetDir)) {
25594
25651
  return { removedPaths: [], removedRoot: false };
25595
25652
  }
25596
25653
  const removedPaths = [];
25597
25654
  for (const skillName of skillNames) {
25598
- const targetPath = path32.join(targetDir, skillName);
25655
+ const targetPath = path34.join(targetDir, skillName);
25599
25656
  try {
25600
25657
  if (removePath(targetPath)) removedPaths.push(skillName);
25601
25658
  } catch {
@@ -25603,17 +25660,17 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
25603
25660
  }
25604
25661
  const removedRoot = removeDirIfEmpty2(targetDir);
25605
25662
  if (removedRoot) {
25606
- removeDirIfEmpty2(path32.dirname(targetDir));
25663
+ removeDirIfEmpty2(path34.dirname(targetDir));
25607
25664
  }
25608
25665
  return { removedPaths, removedRoot };
25609
25666
  }
25610
25667
  function cleanupSkillsLockFile(lockPath, skillNames) {
25611
- if (!fs25.existsSync(lockPath)) {
25668
+ if (!fs27.existsSync(lockPath)) {
25612
25669
  return { removedSkills: [], removedFile: false };
25613
25670
  }
25614
25671
  let parsed;
25615
25672
  try {
25616
- parsed = JSON.parse(fs25.readFileSync(lockPath, "utf8"));
25673
+ parsed = JSON.parse(fs27.readFileSync(lockPath, "utf8"));
25617
25674
  } catch {
25618
25675
  return { removedSkills: [], removedFile: false };
25619
25676
  }
@@ -25640,10 +25697,10 @@ function cleanupSkillsLockFile(lockPath, skillNames) {
25640
25697
  parsed.skills && typeof parsed.skills === "object" && Object.keys(parsed.skills).length > 0
25641
25698
  );
25642
25699
  if (!hasSkills && otherKeys.length === 0) {
25643
- fs25.rmSync(lockPath, { force: true });
25700
+ fs27.rmSync(lockPath, { force: true });
25644
25701
  return { removedSkills, removedFile: true };
25645
25702
  }
25646
- fs25.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
25703
+ fs27.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
25647
25704
  return { removedSkills, removedFile: false };
25648
25705
  }
25649
25706
  function cleanupBundledSkills(skillNames, targets) {
@@ -25846,7 +25903,7 @@ async function uninstall(args) {
25846
25903
  ),
25847
25904
  { ask: false }
25848
25905
  );
25849
- for (const root of retired.removedRoots) removeDirIfEmpty2(path32.dirname(root));
25906
+ for (const root of retired.removedRoots) removeDirIfEmpty2(path34.dirname(root));
25850
25907
  const retiredLines = formatRetiredCleanup(retired);
25851
25908
  pruneResults.push(...retiredLines.removed.map((line) => `${import_picocolors13.default.green("+")} ${line}`));
25852
25909
  const retiredKept = retiredLines.kept.map((line) => ` ${line}`);
@@ -25965,10 +26022,10 @@ async function uninstall(args) {
25965
26022
  try {
25966
26023
  execShellCommandSync(removable.cmd, { cwd: removable.cwd, env: removable.env });
25967
26024
  const leftover = removable.kind === "global" ? getRemainingGlobalBinaryPath() : null;
25968
- const removed = !leftover || removable.installDir !== null && !fs25.existsSync(removable.installDir);
26025
+ const removed = !leftover || removable.installDir !== null && !fs27.existsSync(removable.installDir);
25969
26026
  if (removed) hasUninstalledPackage = true;
25970
26027
  if (removed && removeCliRecordFor(removable.installDir)) {
25971
- log.info(import_picocolors13.default.dim("Removed ~/.argent/cli.json (provider CLI discovery record)."));
26028
+ log.info(import_picocolors13.default.dim(`Removed ${cliRecordPath()} (provider CLI discovery record).`));
25972
26029
  }
25973
26030
  if (leftover) {
25974
26031
  throw new Error(