@swmansion/argent 0.27.1-next.8 → 0.28.0

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.
@@ -1192,8 +1192,8 @@ var init_esm = __esm({
1192
1192
  // ../../node_modules/dotenv/lib/main.js
1193
1193
  var require_main = __commonJS({
1194
1194
  "../../node_modules/dotenv/lib/main.js"(exports, module) {
1195
- var fs19 = __require("fs");
1196
- var path23 = __require("path");
1195
+ var fs20 = __require("fs");
1196
+ var path26 = __require("path");
1197
1197
  var os3 = __require("os");
1198
1198
  var crypto3 = __require("crypto");
1199
1199
  var TIPS = [
@@ -1324,7 +1324,7 @@ var require_main = __commonJS({
1324
1324
  if (options && options.path && options.path.length > 0) {
1325
1325
  if (Array.isArray(options.path)) {
1326
1326
  for (const filepath of options.path) {
1327
- if (fs19.existsSync(filepath)) {
1327
+ if (fs20.existsSync(filepath)) {
1328
1328
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
1329
1329
  }
1330
1330
  }
@@ -1332,15 +1332,15 @@ var require_main = __commonJS({
1332
1332
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
1333
1333
  }
1334
1334
  } else {
1335
- possibleVaultPath = path23.resolve(process.cwd(), ".env.vault");
1335
+ possibleVaultPath = path26.resolve(process.cwd(), ".env.vault");
1336
1336
  }
1337
- if (fs19.existsSync(possibleVaultPath)) {
1337
+ if (fs20.existsSync(possibleVaultPath)) {
1338
1338
  return possibleVaultPath;
1339
1339
  }
1340
1340
  return null;
1341
1341
  }
1342
1342
  function _resolveHome(envPath) {
1343
- return envPath[0] === "~" ? path23.join(os3.homedir(), envPath.slice(1)) : envPath;
1343
+ return envPath[0] === "~" ? path26.join(os3.homedir(), envPath.slice(1)) : envPath;
1344
1344
  }
1345
1345
  function _configVault(options) {
1346
1346
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -1357,7 +1357,7 @@ var require_main = __commonJS({
1357
1357
  return { parsed };
1358
1358
  }
1359
1359
  function configDotenv(options) {
1360
- const dotenvPath = path23.resolve(process.cwd(), ".env");
1360
+ const dotenvPath = path26.resolve(process.cwd(), ".env");
1361
1361
  let encoding = "utf8";
1362
1362
  let processEnv = process.env;
1363
1363
  if (options && options.processEnv != null) {
@@ -1385,13 +1385,13 @@ var require_main = __commonJS({
1385
1385
  }
1386
1386
  let lastError;
1387
1387
  const parsedAll = {};
1388
- for (const path24 of optionPaths) {
1388
+ for (const path27 of optionPaths) {
1389
1389
  try {
1390
- const parsed = DotenvModule.parse(fs19.readFileSync(path24, { encoding }));
1390
+ const parsed = DotenvModule.parse(fs20.readFileSync(path27, { encoding }));
1391
1391
  DotenvModule.populate(parsedAll, parsed, options);
1392
1392
  } catch (e) {
1393
1393
  if (debug) {
1394
- _debug(`failed to load ${path24} ${e.message}`);
1394
+ _debug(`failed to load ${path27} ${e.message}`);
1395
1395
  }
1396
1396
  lastError = e;
1397
1397
  }
@@ -1404,7 +1404,7 @@ var require_main = __commonJS({
1404
1404
  const shortPaths = [];
1405
1405
  for (const filePath of optionPaths) {
1406
1406
  try {
1407
- const relative5 = path23.relative(process.cwd(), filePath);
1407
+ const relative5 = path26.relative(process.cwd(), filePath);
1408
1408
  shortPaths.push(relative5);
1409
1409
  } catch (e) {
1410
1410
  if (debug) {
@@ -2358,10 +2358,10 @@ var require_truncate = __commonJS({
2358
2358
  "../../node_modules/semver/functions/truncate.js"(exports, module) {
2359
2359
  "use strict";
2360
2360
  var parse4 = require_parse();
2361
- var constants = require_constants();
2361
+ var constants2 = require_constants();
2362
2362
  var SemVer = require_semver();
2363
2363
  var truncate = (version, truncation, options) => {
2364
- if (!constants.RELEASE_TYPES.includes(truncation)) {
2364
+ if (!constants2.RELEASE_TYPES.includes(truncation)) {
2365
2365
  return null;
2366
2366
  }
2367
2367
  const clonedVersion = cloneInputVersion(version, options);
@@ -3410,7 +3410,7 @@ var require_semver2 = __commonJS({
3410
3410
  "../../node_modules/semver/index.js"(exports, module) {
3411
3411
  "use strict";
3412
3412
  var internalRe = require_re();
3413
- var constants = require_constants();
3413
+ var constants2 = require_constants();
3414
3414
  var SemVer = require_semver();
3415
3415
  var identifiers = require_identifiers();
3416
3416
  var parse4 = require_parse();
@@ -3494,8 +3494,8 @@ var require_semver2 = __commonJS({
3494
3494
  re: internalRe.re,
3495
3495
  src: internalRe.src,
3496
3496
  tokens: internalRe.t,
3497
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
3498
- RELEASE_TYPES: constants.RELEASE_TYPES,
3497
+ SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
3498
+ RELEASE_TYPES: constants2.RELEASE_TYPES,
3499
3499
  compareIdentifiers: identifiers.compareIdentifiers,
3500
3500
  rcompareIdentifiers: identifiers.rcompareIdentifiers
3501
3501
  };
@@ -3579,17 +3579,17 @@ var require_visit = __commonJS({
3579
3579
  visit2.BREAK = BREAK;
3580
3580
  visit2.SKIP = SKIP;
3581
3581
  visit2.REMOVE = REMOVE;
3582
- function visit_(key, node, visitor, path23) {
3583
- const ctrl = callVisitor(key, node, visitor, path23);
3582
+ function visit_(key, node, visitor, path26) {
3583
+ const ctrl = callVisitor(key, node, visitor, path26);
3584
3584
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3585
- replaceNode(key, path23, ctrl);
3586
- return visit_(key, ctrl, visitor, path23);
3585
+ replaceNode(key, path26, ctrl);
3586
+ return visit_(key, ctrl, visitor, path26);
3587
3587
  }
3588
3588
  if (typeof ctrl !== "symbol") {
3589
3589
  if (identity2.isCollection(node)) {
3590
- path23 = Object.freeze(path23.concat(node));
3590
+ path26 = Object.freeze(path26.concat(node));
3591
3591
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3592
- const ci = visit_(i2, node.items[i2], visitor, path23);
3592
+ const ci = visit_(i2, node.items[i2], visitor, path26);
3593
3593
  if (typeof ci === "number")
3594
3594
  i2 = ci - 1;
3595
3595
  else if (ci === BREAK)
@@ -3600,13 +3600,13 @@ var require_visit = __commonJS({
3600
3600
  }
3601
3601
  }
3602
3602
  } else if (identity2.isPair(node)) {
3603
- path23 = Object.freeze(path23.concat(node));
3604
- const ck = visit_("key", node.key, visitor, path23);
3603
+ path26 = Object.freeze(path26.concat(node));
3604
+ const ck = visit_("key", node.key, visitor, path26);
3605
3605
  if (ck === BREAK)
3606
3606
  return BREAK;
3607
3607
  else if (ck === REMOVE)
3608
3608
  node.key = null;
3609
- const cv = visit_("value", node.value, visitor, path23);
3609
+ const cv = visit_("value", node.value, visitor, path26);
3610
3610
  if (cv === BREAK)
3611
3611
  return BREAK;
3612
3612
  else if (cv === REMOVE)
@@ -3627,17 +3627,17 @@ var require_visit = __commonJS({
3627
3627
  visitAsync.BREAK = BREAK;
3628
3628
  visitAsync.SKIP = SKIP;
3629
3629
  visitAsync.REMOVE = REMOVE;
3630
- async function visitAsync_(key, node, visitor, path23) {
3631
- const ctrl = await callVisitor(key, node, visitor, path23);
3630
+ async function visitAsync_(key, node, visitor, path26) {
3631
+ const ctrl = await callVisitor(key, node, visitor, path26);
3632
3632
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3633
- replaceNode(key, path23, ctrl);
3634
- return visitAsync_(key, ctrl, visitor, path23);
3633
+ replaceNode(key, path26, ctrl);
3634
+ return visitAsync_(key, ctrl, visitor, path26);
3635
3635
  }
3636
3636
  if (typeof ctrl !== "symbol") {
3637
3637
  if (identity2.isCollection(node)) {
3638
- path23 = Object.freeze(path23.concat(node));
3638
+ path26 = Object.freeze(path26.concat(node));
3639
3639
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3640
- const ci = await visitAsync_(i2, node.items[i2], visitor, path23);
3640
+ const ci = await visitAsync_(i2, node.items[i2], visitor, path26);
3641
3641
  if (typeof ci === "number")
3642
3642
  i2 = ci - 1;
3643
3643
  else if (ci === BREAK)
@@ -3648,13 +3648,13 @@ var require_visit = __commonJS({
3648
3648
  }
3649
3649
  }
3650
3650
  } else if (identity2.isPair(node)) {
3651
- path23 = Object.freeze(path23.concat(node));
3652
- const ck = await visitAsync_("key", node.key, visitor, path23);
3651
+ path26 = Object.freeze(path26.concat(node));
3652
+ const ck = await visitAsync_("key", node.key, visitor, path26);
3653
3653
  if (ck === BREAK)
3654
3654
  return BREAK;
3655
3655
  else if (ck === REMOVE)
3656
3656
  node.key = null;
3657
- const cv = await visitAsync_("value", node.value, visitor, path23);
3657
+ const cv = await visitAsync_("value", node.value, visitor, path26);
3658
3658
  if (cv === BREAK)
3659
3659
  return BREAK;
3660
3660
  else if (cv === REMOVE)
@@ -3681,23 +3681,23 @@ var require_visit = __commonJS({
3681
3681
  }
3682
3682
  return visitor;
3683
3683
  }
3684
- function callVisitor(key, node, visitor, path23) {
3684
+ function callVisitor(key, node, visitor, path26) {
3685
3685
  if (typeof visitor === "function")
3686
- return visitor(key, node, path23);
3686
+ return visitor(key, node, path26);
3687
3687
  if (identity2.isMap(node))
3688
- return visitor.Map?.(key, node, path23);
3688
+ return visitor.Map?.(key, node, path26);
3689
3689
  if (identity2.isSeq(node))
3690
- return visitor.Seq?.(key, node, path23);
3690
+ return visitor.Seq?.(key, node, path26);
3691
3691
  if (identity2.isPair(node))
3692
- return visitor.Pair?.(key, node, path23);
3692
+ return visitor.Pair?.(key, node, path26);
3693
3693
  if (identity2.isScalar(node))
3694
- return visitor.Scalar?.(key, node, path23);
3694
+ return visitor.Scalar?.(key, node, path26);
3695
3695
  if (identity2.isAlias(node))
3696
- return visitor.Alias?.(key, node, path23);
3696
+ return visitor.Alias?.(key, node, path26);
3697
3697
  return void 0;
3698
3698
  }
3699
- function replaceNode(key, path23, node) {
3700
- const parent = path23[path23.length - 1];
3699
+ function replaceNode(key, path26, node) {
3700
+ const parent = path26[path26.length - 1];
3701
3701
  if (identity2.isCollection(parent)) {
3702
3702
  parent.items[key] = node;
3703
3703
  } else if (identity2.isPair(parent)) {
@@ -4307,10 +4307,10 @@ var require_Collection = __commonJS({
4307
4307
  var createNode = require_createNode();
4308
4308
  var identity2 = require_identity();
4309
4309
  var Node = require_Node();
4310
- function collectionFromPath(schema, path23, value) {
4310
+ function collectionFromPath(schema, path26, value) {
4311
4311
  let v = value;
4312
- for (let i2 = path23.length - 1; i2 >= 0; --i2) {
4313
- const k = path23[i2];
4312
+ for (let i2 = path26.length - 1; i2 >= 0; --i2) {
4313
+ const k = path26[i2];
4314
4314
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4315
4315
  const a3 = [];
4316
4316
  a3[k] = v;
@@ -4329,7 +4329,7 @@ var require_Collection = __commonJS({
4329
4329
  sourceObjects: /* @__PURE__ */ new Map()
4330
4330
  });
4331
4331
  }
4332
- var isEmptyPath = (path23) => path23 == null || typeof path23 === "object" && !!path23[Symbol.iterator]().next().done;
4332
+ var isEmptyPath = (path26) => path26 == null || typeof path26 === "object" && !!path26[Symbol.iterator]().next().done;
4333
4333
  var Collection = class extends Node.NodeBase {
4334
4334
  constructor(type, schema) {
4335
4335
  super(type);
@@ -4359,11 +4359,11 @@ var require_Collection = __commonJS({
4359
4359
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4360
4360
  * that already exists in the map.
4361
4361
  */
4362
- addIn(path23, value) {
4363
- if (isEmptyPath(path23))
4362
+ addIn(path26, value) {
4363
+ if (isEmptyPath(path26))
4364
4364
  this.add(value);
4365
4365
  else {
4366
- const [key, ...rest] = path23;
4366
+ const [key, ...rest] = path26;
4367
4367
  const node = this.get(key, true);
4368
4368
  if (identity2.isCollection(node))
4369
4369
  node.addIn(rest, value);
@@ -4377,8 +4377,8 @@ var require_Collection = __commonJS({
4377
4377
  * Removes a value from the collection.
4378
4378
  * @returns `true` if the item was found and removed.
4379
4379
  */
4380
- deleteIn(path23) {
4381
- const [key, ...rest] = path23;
4380
+ deleteIn(path26) {
4381
+ const [key, ...rest] = path26;
4382
4382
  if (rest.length === 0)
4383
4383
  return this.delete(key);
4384
4384
  const node = this.get(key, true);
@@ -4392,8 +4392,8 @@ var require_Collection = __commonJS({
4392
4392
  * scalar values from their surrounding node; to disable set `keepScalar` to
4393
4393
  * `true` (collections are always returned intact).
4394
4394
  */
4395
- getIn(path23, keepScalar) {
4396
- const [key, ...rest] = path23;
4395
+ getIn(path26, keepScalar) {
4396
+ const [key, ...rest] = path26;
4397
4397
  const node = this.get(key, true);
4398
4398
  if (rest.length === 0)
4399
4399
  return !keepScalar && identity2.isScalar(node) ? node.value : node;
@@ -4411,8 +4411,8 @@ var require_Collection = __commonJS({
4411
4411
  /**
4412
4412
  * Checks if the collection includes a value with the key `key`.
4413
4413
  */
4414
- hasIn(path23) {
4415
- const [key, ...rest] = path23;
4414
+ hasIn(path26) {
4415
+ const [key, ...rest] = path26;
4416
4416
  if (rest.length === 0)
4417
4417
  return this.has(key);
4418
4418
  const node = this.get(key, true);
@@ -4422,8 +4422,8 @@ var require_Collection = __commonJS({
4422
4422
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4423
4423
  * boolean to add/remove the item from the set.
4424
4424
  */
4425
- setIn(path23, value) {
4426
- const [key, ...rest] = path23;
4425
+ setIn(path26, value) {
4426
+ const [key, ...rest] = path26;
4427
4427
  if (rest.length === 0) {
4428
4428
  this.set(key, value);
4429
4429
  } else {
@@ -6938,9 +6938,9 @@ var require_Document = __commonJS({
6938
6938
  this.contents.add(value);
6939
6939
  }
6940
6940
  /** Adds a value to the document. */
6941
- addIn(path23, value) {
6941
+ addIn(path26, value) {
6942
6942
  if (assertCollection(this.contents))
6943
- this.contents.addIn(path23, value);
6943
+ this.contents.addIn(path26, value);
6944
6944
  }
6945
6945
  /**
6946
6946
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -7015,14 +7015,14 @@ var require_Document = __commonJS({
7015
7015
  * Removes a value from the document.
7016
7016
  * @returns `true` if the item was found and removed.
7017
7017
  */
7018
- deleteIn(path23) {
7019
- if (Collection.isEmptyPath(path23)) {
7018
+ deleteIn(path26) {
7019
+ if (Collection.isEmptyPath(path26)) {
7020
7020
  if (this.contents == null)
7021
7021
  return false;
7022
7022
  this.contents = null;
7023
7023
  return true;
7024
7024
  }
7025
- return assertCollection(this.contents) ? this.contents.deleteIn(path23) : false;
7025
+ return assertCollection(this.contents) ? this.contents.deleteIn(path26) : false;
7026
7026
  }
7027
7027
  /**
7028
7028
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -7037,10 +7037,10 @@ var require_Document = __commonJS({
7037
7037
  * scalar values from their surrounding node; to disable set `keepScalar` to
7038
7038
  * `true` (collections are always returned intact).
7039
7039
  */
7040
- getIn(path23, keepScalar) {
7041
- if (Collection.isEmptyPath(path23))
7040
+ getIn(path26, keepScalar) {
7041
+ if (Collection.isEmptyPath(path26))
7042
7042
  return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
7043
- return identity2.isCollection(this.contents) ? this.contents.getIn(path23, keepScalar) : void 0;
7043
+ return identity2.isCollection(this.contents) ? this.contents.getIn(path26, keepScalar) : void 0;
7044
7044
  }
7045
7045
  /**
7046
7046
  * Checks if the document includes a value with the key `key`.
@@ -7051,10 +7051,10 @@ var require_Document = __commonJS({
7051
7051
  /**
7052
7052
  * Checks if the document includes a value at `path`.
7053
7053
  */
7054
- hasIn(path23) {
7055
- if (Collection.isEmptyPath(path23))
7054
+ hasIn(path26) {
7055
+ if (Collection.isEmptyPath(path26))
7056
7056
  return this.contents !== void 0;
7057
- return identity2.isCollection(this.contents) ? this.contents.hasIn(path23) : false;
7057
+ return identity2.isCollection(this.contents) ? this.contents.hasIn(path26) : false;
7058
7058
  }
7059
7059
  /**
7060
7060
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -7071,13 +7071,13 @@ var require_Document = __commonJS({
7071
7071
  * Sets a value in this document. For `!!set`, `value` needs to be a
7072
7072
  * boolean to add/remove the item from the set.
7073
7073
  */
7074
- setIn(path23, value) {
7075
- if (Collection.isEmptyPath(path23)) {
7074
+ setIn(path26, value) {
7075
+ if (Collection.isEmptyPath(path26)) {
7076
7076
  this.contents = value;
7077
7077
  } else if (this.contents == null) {
7078
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path23), value);
7078
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path26), value);
7079
7079
  } else if (assertCollection(this.contents)) {
7080
- this.contents.setIn(path23, value);
7080
+ this.contents.setIn(path26, value);
7081
7081
  }
7082
7082
  }
7083
7083
  /**
@@ -7463,10 +7463,10 @@ var require_resolve_block_map = __commonJS({
7463
7463
  let offset = bm.offset;
7464
7464
  let commentEnd = null;
7465
7465
  for (const collItem of bm.items) {
7466
- const { start, key, sep: sep6, value } = collItem;
7466
+ const { start, key, sep: sep8, value } = collItem;
7467
7467
  const keyProps = resolveProps.resolveProps(start, {
7468
7468
  indicator: "explicit-key-ind",
7469
- next: key ?? sep6?.[0],
7469
+ next: key ?? sep8?.[0],
7470
7470
  offset,
7471
7471
  onError,
7472
7472
  parentIndent: bm.indent,
@@ -7480,7 +7480,7 @@ var require_resolve_block_map = __commonJS({
7480
7480
  else if ("indent" in key && key.indent !== bm.indent)
7481
7481
  onError(offset, "BAD_INDENT", startColMsg);
7482
7482
  }
7483
- if (!keyProps.anchor && !keyProps.tag && !sep6) {
7483
+ if (!keyProps.anchor && !keyProps.tag && !sep8) {
7484
7484
  commentEnd = keyProps.end;
7485
7485
  if (keyProps.comment) {
7486
7486
  if (map.comment)
@@ -7504,7 +7504,7 @@ var require_resolve_block_map = __commonJS({
7504
7504
  ctx.atKey = false;
7505
7505
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
7506
7506
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
7507
- const valueProps = resolveProps.resolveProps(sep6 ?? [], {
7507
+ const valueProps = resolveProps.resolveProps(sep8 ?? [], {
7508
7508
  indicator: "map-value-ind",
7509
7509
  next: value,
7510
7510
  offset: keyNode.range[2],
@@ -7520,7 +7520,7 @@ var require_resolve_block_map = __commonJS({
7520
7520
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
7521
7521
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
7522
7522
  }
7523
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep6, null, valueProps, onError);
7523
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep8, null, valueProps, onError);
7524
7524
  if (ctx.schema.compat)
7525
7525
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
7526
7526
  offset = valueNode.range[2];
@@ -7611,7 +7611,7 @@ var require_resolve_end = __commonJS({
7611
7611
  let comment = "";
7612
7612
  if (end) {
7613
7613
  let hasSpace = false;
7614
- let sep6 = "";
7614
+ let sep8 = "";
7615
7615
  for (const token of end) {
7616
7616
  const { source, type } = token;
7617
7617
  switch (type) {
@@ -7625,13 +7625,13 @@ var require_resolve_end = __commonJS({
7625
7625
  if (!comment)
7626
7626
  comment = cb;
7627
7627
  else
7628
- comment += sep6 + cb;
7629
- sep6 = "";
7628
+ comment += sep8 + cb;
7629
+ sep8 = "";
7630
7630
  break;
7631
7631
  }
7632
7632
  case "newline":
7633
7633
  if (comment)
7634
- sep6 += source;
7634
+ sep8 += source;
7635
7635
  hasSpace = true;
7636
7636
  break;
7637
7637
  default:
@@ -7674,18 +7674,18 @@ var require_resolve_flow_collection = __commonJS({
7674
7674
  let offset = fc.offset + fc.start.source.length;
7675
7675
  for (let i2 = 0; i2 < fc.items.length; ++i2) {
7676
7676
  const collItem = fc.items[i2];
7677
- const { start, key, sep: sep6, value } = collItem;
7677
+ const { start, key, sep: sep8, value } = collItem;
7678
7678
  const props = resolveProps.resolveProps(start, {
7679
7679
  flow: fcName,
7680
7680
  indicator: "explicit-key-ind",
7681
- next: key ?? sep6?.[0],
7681
+ next: key ?? sep8?.[0],
7682
7682
  offset,
7683
7683
  onError,
7684
7684
  parentIndent: fc.indent,
7685
7685
  startOnNewline: false
7686
7686
  });
7687
7687
  if (!props.found) {
7688
- if (!props.anchor && !props.tag && !sep6 && !value) {
7688
+ if (!props.anchor && !props.tag && !sep8 && !value) {
7689
7689
  if (i2 === 0 && props.comma)
7690
7690
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
7691
7691
  else if (i2 < fc.items.length - 1)
@@ -7739,8 +7739,8 @@ var require_resolve_flow_collection = __commonJS({
7739
7739
  }
7740
7740
  }
7741
7741
  }
7742
- if (!isMap2 && !sep6 && !props.found) {
7743
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep6, null, props, onError);
7742
+ if (!isMap2 && !sep8 && !props.found) {
7743
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep8, null, props, onError);
7744
7744
  coll.items.push(valueNode);
7745
7745
  offset = valueNode.range[2];
7746
7746
  if (isBlock(value))
@@ -7752,7 +7752,7 @@ var require_resolve_flow_collection = __commonJS({
7752
7752
  if (isBlock(key))
7753
7753
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
7754
7754
  ctx.atKey = false;
7755
- const valueProps = resolveProps.resolveProps(sep6 ?? [], {
7755
+ const valueProps = resolveProps.resolveProps(sep8 ?? [], {
7756
7756
  flow: fcName,
7757
7757
  indicator: "map-value-ind",
7758
7758
  next: value,
@@ -7763,8 +7763,8 @@ var require_resolve_flow_collection = __commonJS({
7763
7763
  });
7764
7764
  if (valueProps.found) {
7765
7765
  if (!isMap2 && !props.found && ctx.options.strict) {
7766
- if (sep6)
7767
- for (const st of sep6) {
7766
+ if (sep8)
7767
+ for (const st of sep8) {
7768
7768
  if (st === valueProps.found)
7769
7769
  break;
7770
7770
  if (st.type === "newline") {
@@ -7781,7 +7781,7 @@ var require_resolve_flow_collection = __commonJS({
7781
7781
  else
7782
7782
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
7783
7783
  }
7784
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep6, null, valueProps, onError) : null;
7784
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep8, null, valueProps, onError) : null;
7785
7785
  if (valueNode) {
7786
7786
  if (isBlock(value))
7787
7787
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -7961,7 +7961,7 @@ var require_resolve_block_scalar = __commonJS({
7961
7961
  chompStart = i2 + 1;
7962
7962
  }
7963
7963
  let value = "";
7964
- let sep6 = "";
7964
+ let sep8 = "";
7965
7965
  let prevMoreIndented = false;
7966
7966
  for (let i2 = 0; i2 < contentStart; ++i2)
7967
7967
  value += lines[i2][0].slice(trimIndent) + "\n";
@@ -7978,24 +7978,24 @@ var require_resolve_block_scalar = __commonJS({
7978
7978
  indent = "";
7979
7979
  }
7980
7980
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
7981
- value += sep6 + indent.slice(trimIndent) + content;
7982
- sep6 = "\n";
7981
+ value += sep8 + indent.slice(trimIndent) + content;
7982
+ sep8 = "\n";
7983
7983
  } else if (indent.length > trimIndent || content[0] === " ") {
7984
- if (sep6 === " ")
7985
- sep6 = "\n";
7986
- else if (!prevMoreIndented && sep6 === "\n")
7987
- sep6 = "\n\n";
7988
- value += sep6 + indent.slice(trimIndent) + content;
7989
- sep6 = "\n";
7984
+ if (sep8 === " ")
7985
+ sep8 = "\n";
7986
+ else if (!prevMoreIndented && sep8 === "\n")
7987
+ sep8 = "\n\n";
7988
+ value += sep8 + indent.slice(trimIndent) + content;
7989
+ sep8 = "\n";
7990
7990
  prevMoreIndented = true;
7991
7991
  } else if (content === "") {
7992
- if (sep6 === "\n")
7992
+ if (sep8 === "\n")
7993
7993
  value += "\n";
7994
7994
  else
7995
- sep6 = "\n";
7995
+ sep8 = "\n";
7996
7996
  } else {
7997
- value += sep6 + content;
7998
- sep6 = " ";
7997
+ value += sep8 + content;
7998
+ sep8 = " ";
7999
7999
  prevMoreIndented = false;
8000
8000
  }
8001
8001
  }
@@ -8177,25 +8177,25 @@ var require_resolve_flow_scalar = __commonJS({
8177
8177
  if (!match)
8178
8178
  return source;
8179
8179
  let res = match[1];
8180
- let sep6 = " ";
8180
+ let sep8 = " ";
8181
8181
  let pos = first.lastIndex;
8182
8182
  line.lastIndex = pos;
8183
8183
  while (match = line.exec(source)) {
8184
8184
  if (match[1] === "") {
8185
- if (sep6 === "\n")
8186
- res += sep6;
8185
+ if (sep8 === "\n")
8186
+ res += sep8;
8187
8187
  else
8188
- sep6 = "\n";
8188
+ sep8 = "\n";
8189
8189
  } else {
8190
- res += sep6 + match[1];
8191
- sep6 = " ";
8190
+ res += sep8 + match[1];
8191
+ sep8 = " ";
8192
8192
  }
8193
8193
  pos = line.lastIndex;
8194
8194
  }
8195
8195
  const last = /[ \t]*(.*)/sy;
8196
8196
  last.lastIndex = pos;
8197
8197
  match = last.exec(source);
8198
- return res + sep6 + (match?.[1] ?? "");
8198
+ return res + sep8 + (match?.[1] ?? "");
8199
8199
  }
8200
8200
  function doubleQuotedValue(source, onError) {
8201
8201
  let res = "";
@@ -9005,14 +9005,14 @@ var require_cst_stringify = __commonJS({
9005
9005
  }
9006
9006
  }
9007
9007
  }
9008
- function stringifyItem({ start, key, sep: sep6, value }) {
9008
+ function stringifyItem({ start, key, sep: sep8, value }) {
9009
9009
  let res = "";
9010
9010
  for (const st of start)
9011
9011
  res += st.source;
9012
9012
  if (key)
9013
9013
  res += stringifyToken(key);
9014
- if (sep6)
9015
- for (const st of sep6)
9014
+ if (sep8)
9015
+ for (const st of sep8)
9016
9016
  res += st.source;
9017
9017
  if (value)
9018
9018
  res += stringifyToken(value);
@@ -9037,9 +9037,9 @@ var require_cst_visit = __commonJS({
9037
9037
  visit2.BREAK = BREAK;
9038
9038
  visit2.SKIP = SKIP;
9039
9039
  visit2.REMOVE = REMOVE;
9040
- visit2.itemAtPath = (cst, path23) => {
9040
+ visit2.itemAtPath = (cst, path26) => {
9041
9041
  let item = cst;
9042
- for (const [field, index] of path23) {
9042
+ for (const [field, index] of path26) {
9043
9043
  const tok = item?.[field];
9044
9044
  if (tok && "items" in tok) {
9045
9045
  item = tok.items[index];
@@ -9048,23 +9048,23 @@ var require_cst_visit = __commonJS({
9048
9048
  }
9049
9049
  return item;
9050
9050
  };
9051
- visit2.parentCollection = (cst, path23) => {
9052
- const parent = visit2.itemAtPath(cst, path23.slice(0, -1));
9053
- const field = path23[path23.length - 1][0];
9051
+ visit2.parentCollection = (cst, path26) => {
9052
+ const parent = visit2.itemAtPath(cst, path26.slice(0, -1));
9053
+ const field = path26[path26.length - 1][0];
9054
9054
  const coll = parent?.[field];
9055
9055
  if (coll && "items" in coll)
9056
9056
  return coll;
9057
9057
  throw new Error("Parent collection not found");
9058
9058
  };
9059
- function _visit(path23, item, visitor) {
9060
- let ctrl = visitor(item, path23);
9059
+ function _visit(path26, item, visitor) {
9060
+ let ctrl = visitor(item, path26);
9061
9061
  if (typeof ctrl === "symbol")
9062
9062
  return ctrl;
9063
9063
  for (const field of ["key", "value"]) {
9064
9064
  const token = item[field];
9065
9065
  if (token && "items" in token) {
9066
9066
  for (let i2 = 0; i2 < token.items.length; ++i2) {
9067
- const ci = _visit(Object.freeze(path23.concat([[field, i2]])), token.items[i2], visitor);
9067
+ const ci = _visit(Object.freeze(path26.concat([[field, i2]])), token.items[i2], visitor);
9068
9068
  if (typeof ci === "number")
9069
9069
  i2 = ci - 1;
9070
9070
  else if (ci === BREAK)
@@ -9075,10 +9075,10 @@ var require_cst_visit = __commonJS({
9075
9075
  }
9076
9076
  }
9077
9077
  if (typeof ctrl === "function" && field === "key")
9078
- ctrl = ctrl(item, path23);
9078
+ ctrl = ctrl(item, path26);
9079
9079
  }
9080
9080
  }
9081
- return typeof ctrl === "function" ? ctrl(item, path23) : ctrl;
9081
+ return typeof ctrl === "function" ? ctrl(item, path26) : ctrl;
9082
9082
  }
9083
9083
  exports.visit = visit2;
9084
9084
  }
@@ -10179,18 +10179,18 @@ var require_parser = __commonJS({
10179
10179
  if (this.type === "map-value-ind") {
10180
10180
  const prev = getPrevProps(this.peek(2));
10181
10181
  const start = getFirstKeyStartProps(prev);
10182
- let sep6;
10182
+ let sep8;
10183
10183
  if (scalar.end) {
10184
- sep6 = scalar.end;
10185
- sep6.push(this.sourceToken);
10184
+ sep8 = scalar.end;
10185
+ sep8.push(this.sourceToken);
10186
10186
  delete scalar.end;
10187
10187
  } else
10188
- sep6 = [this.sourceToken];
10188
+ sep8 = [this.sourceToken];
10189
10189
  const map = {
10190
10190
  type: "block-map",
10191
10191
  offset: scalar.offset,
10192
10192
  indent: scalar.indent,
10193
- items: [{ start, key: scalar, sep: sep6 }]
10193
+ items: [{ start, key: scalar, sep: sep8 }]
10194
10194
  };
10195
10195
  this.onKeyLine = true;
10196
10196
  this.stack[this.stack.length - 1] = map;
@@ -10343,15 +10343,15 @@ var require_parser = __commonJS({
10343
10343
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
10344
10344
  const start2 = getFirstKeyStartProps(it.start);
10345
10345
  const key = it.key;
10346
- const sep6 = it.sep;
10347
- sep6.push(this.sourceToken);
10346
+ const sep8 = it.sep;
10347
+ sep8.push(this.sourceToken);
10348
10348
  delete it.key;
10349
10349
  delete it.sep;
10350
10350
  this.stack.push({
10351
10351
  type: "block-map",
10352
10352
  offset: this.offset,
10353
10353
  indent: this.indent,
10354
- items: [{ start: start2, key, sep: sep6 }]
10354
+ items: [{ start: start2, key, sep: sep8 }]
10355
10355
  });
10356
10356
  } else if (start.length > 0) {
10357
10357
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -10380,14 +10380,14 @@ var require_parser = __commonJS({
10380
10380
  case "scalar":
10381
10381
  case "single-quoted-scalar":
10382
10382
  case "double-quoted-scalar": {
10383
- const fs19 = this.flowScalar(this.type);
10383
+ const fs20 = this.flowScalar(this.type);
10384
10384
  if (atNextItem || it.value) {
10385
- map.items.push({ start, key: fs19, sep: [] });
10385
+ map.items.push({ start, key: fs20, sep: [] });
10386
10386
  this.onKeyLine = true;
10387
10387
  } else if (it.sep) {
10388
- this.stack.push(fs19);
10388
+ this.stack.push(fs20);
10389
10389
  } else {
10390
- Object.assign(it, { key: fs19, sep: [] });
10390
+ Object.assign(it, { key: fs20, sep: [] });
10391
10391
  this.onKeyLine = true;
10392
10392
  }
10393
10393
  return;
@@ -10515,13 +10515,13 @@ var require_parser = __commonJS({
10515
10515
  case "scalar":
10516
10516
  case "single-quoted-scalar":
10517
10517
  case "double-quoted-scalar": {
10518
- const fs19 = this.flowScalar(this.type);
10518
+ const fs20 = this.flowScalar(this.type);
10519
10519
  if (!it || it.value)
10520
- fc.items.push({ start: [], key: fs19, sep: [] });
10520
+ fc.items.push({ start: [], key: fs20, sep: [] });
10521
10521
  else if (it.sep)
10522
- this.stack.push(fs19);
10522
+ this.stack.push(fs20);
10523
10523
  else
10524
- Object.assign(it, { key: fs19, sep: [] });
10524
+ Object.assign(it, { key: fs20, sep: [] });
10525
10525
  return;
10526
10526
  }
10527
10527
  case "flow-map-end":
@@ -10545,13 +10545,13 @@ var require_parser = __commonJS({
10545
10545
  const prev = getPrevProps(parent);
10546
10546
  const start = getFirstKeyStartProps(prev);
10547
10547
  fixFlowSeqItems(fc);
10548
- const sep6 = fc.end.splice(1, fc.end.length);
10549
- sep6.push(this.sourceToken);
10548
+ const sep8 = fc.end.splice(1, fc.end.length);
10549
+ sep8.push(this.sourceToken);
10550
10550
  const map = {
10551
10551
  type: "block-map",
10552
10552
  offset: fc.offset,
10553
10553
  indent: fc.indent,
10554
- items: [{ start, key: fc, sep: sep6 }]
10554
+ items: [{ start, key: fc, sep: sep8 }]
10555
10555
  };
10556
10556
  this.onKeyLine = true;
10557
10557
  this.stack[this.stack.length - 1] = map;
@@ -10932,13 +10932,13 @@ var require_min_release_age = __commonJS({
10932
10932
  return Number.isFinite(days) && days > 0 ? days * config_parse_1.DAY_MS : 0;
10933
10933
  }
10934
10934
  function probe(p) {
10935
- return new Promise((resolve15) => {
10935
+ return new Promise((resolve16) => {
10936
10936
  (0, node_child_process_1.exec)(p.command, { timeout: PROBE_TIMEOUT_MS2, windowsHide: true }, (err, stdout2) => {
10937
10937
  if (err) {
10938
- resolve15(0);
10938
+ resolve16(0);
10939
10939
  return;
10940
10940
  }
10941
- resolve15(p.parse(stdout2));
10941
+ resolve16(p.parse(stdout2));
10942
10942
  });
10943
10943
  });
10944
10944
  }
@@ -10971,12 +10971,12 @@ var require_registry = __commonJS({
10971
10971
  var node_https_1 = __importDefault(__require("node:https"));
10972
10972
  var REQUEST_TIMEOUT_MS = 1e4;
10973
10973
  function fetchRegistryInfo2(url) {
10974
- return new Promise((resolve15) => {
10974
+ return new Promise((resolve16) => {
10975
10975
  let resolved = false;
10976
10976
  const safeResolve = (value) => {
10977
10977
  if (!resolved) {
10978
10978
  resolved = true;
10979
- resolve15(value);
10979
+ resolve16(value);
10980
10980
  }
10981
10981
  };
10982
10982
  const req = node_https_1.default.get(url, { timeout: REQUEST_TIMEOUT_MS }, (res) => {
@@ -12884,8 +12884,8 @@ var Deferred = class {
12884
12884
  _resolve;
12885
12885
  _reject;
12886
12886
  constructor() {
12887
- this._promise = new Promise((resolve15, reject) => {
12888
- this._resolve = resolve15;
12887
+ this._promise = new Promise((resolve16, reject) => {
12888
+ this._resolve = resolve16;
12889
12889
  this._reject = reject;
12890
12890
  });
12891
12891
  }
@@ -13778,8 +13778,8 @@ var ExportOperation = class {
13778
13778
  _metrics;
13779
13779
  _exportScheduledResolve;
13780
13780
  constructor(exporter, logRecords, exportTimeoutMillis, metrics) {
13781
- this._exportScheduledPromise = new Promise((resolve15) => {
13782
- this._exportScheduledResolve = resolve15;
13781
+ this._exportScheduledPromise = new Promise((resolve16) => {
13782
+ this._exportScheduledResolve = resolve16;
13783
13783
  });
13784
13784
  this._exportCompleted = this._executeExport(exporter, logRecords, exportTimeoutMillis);
13785
13785
  this._metrics = metrics;
@@ -13804,7 +13804,7 @@ var ExportOperation = class {
13804
13804
  }
13805
13805
  }
13806
13806
  async _exportWithTimeout(exporter, logRecords, exportTimeoutMillis) {
13807
- return new Promise((resolve15, reject) => {
13807
+ return new Promise((resolve16, reject) => {
13808
13808
  const timer = setTimeout(() => {
13809
13809
  reject(new Error("Timeout"));
13810
13810
  }, exportTimeoutMillis);
@@ -13812,7 +13812,7 @@ var ExportOperation = class {
13812
13812
  this._metrics.finishLogs(logRecords.length, result.error);
13813
13813
  clearTimeout(timer);
13814
13814
  if (result.code === ExportResultCode.SUCCESS) {
13815
- resolve15();
13815
+ resolve16();
13816
13816
  } else {
13817
13817
  reject(result.error ?? new Error("BatchLogRecordProcessor: log record export failed"));
13818
13818
  }
@@ -14593,7 +14593,7 @@ function parseRetryAfterToMills(retryAfter) {
14593
14593
  var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION4}`;
14594
14594
  var MAX_RESPONSE_BODY_SIZE = 4 * 1024 * 1024;
14595
14595
  function sendWithHttp(request, url, headers, compression, userAgent, agent, data, timeoutMillis) {
14596
- return new Promise((resolve15) => {
14596
+ return new Promise((resolve16) => {
14597
14597
  const parsedUrl = new URL(url);
14598
14598
  if (userAgent) {
14599
14599
  headers["User-Agent"] = `${userAgent} ${DEFAULT_USER_AGENT}`;
@@ -14612,7 +14612,7 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14612
14612
  responseSize += chunk.length;
14613
14613
  if (responseSize > MAX_RESPONSE_BODY_SIZE) {
14614
14614
  const sizeError = new Error(`OTLP export response body exceeded size limit of ${MAX_RESPONSE_BODY_SIZE} bytes`);
14615
- resolve15({ status: "failure", error: sizeError });
14615
+ resolve16({ status: "failure", error: sizeError });
14616
14616
  res.destroy();
14617
14617
  return;
14618
14618
  }
@@ -14620,18 +14620,18 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14620
14620
  });
14621
14621
  res.on("end", () => {
14622
14622
  if (res.statusCode && res.statusCode <= 299) {
14623
- resolve15({
14623
+ resolve16({
14624
14624
  status: "success",
14625
14625
  data: Buffer.concat(responseData)
14626
14626
  });
14627
14627
  } else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
14628
- resolve15({
14628
+ resolve16({
14629
14629
  status: "retryable",
14630
14630
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
14631
14631
  });
14632
14632
  } else {
14633
14633
  const error = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
14634
- resolve15({
14634
+ resolve16({
14635
14635
  status: "failure",
14636
14636
  error
14637
14637
  });
@@ -14639,17 +14639,17 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14639
14639
  });
14640
14640
  res.on("error", (error) => {
14641
14641
  if (res.statusCode && res.statusCode <= 299) {
14642
- resolve15({
14642
+ resolve16({
14643
14643
  status: "success"
14644
14644
  });
14645
14645
  } else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
14646
- resolve15({
14646
+ resolve16({
14647
14647
  status: "retryable",
14648
14648
  error,
14649
14649
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
14650
14650
  });
14651
14651
  } else {
14652
- resolve15({
14652
+ resolve16({
14653
14653
  status: "failure",
14654
14654
  error
14655
14655
  });
@@ -14658,26 +14658,26 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
14658
14658
  });
14659
14659
  req.setTimeout(timeoutMillis, () => {
14660
14660
  req.destroy();
14661
- resolve15({
14661
+ resolve16({
14662
14662
  status: "retryable",
14663
14663
  error: new Error("Request timed out")
14664
14664
  });
14665
14665
  });
14666
14666
  req.on("error", (error) => {
14667
14667
  if (isHttpTransportNetworkErrorRetryable(error)) {
14668
- resolve15({
14668
+ resolve16({
14669
14669
  status: "retryable",
14670
14670
  error
14671
14671
  });
14672
14672
  } else {
14673
- resolve15({
14673
+ resolve16({
14674
14674
  status: "failure",
14675
14675
  error
14676
14676
  });
14677
14677
  }
14678
14678
  });
14679
14679
  compressAndSend(req, compression, data, (error) => {
14680
- resolve15({
14680
+ resolve16({
14681
14681
  status: "failure",
14682
14682
  error
14683
14683
  });
@@ -14767,9 +14767,9 @@ var RetryingTransport = class {
14767
14767
  this._transport = transport;
14768
14768
  }
14769
14769
  retry(data, timeoutMillis, inMillis) {
14770
- return new Promise((resolve15, reject) => {
14770
+ return new Promise((resolve16, reject) => {
14771
14771
  setTimeout(() => {
14772
- this._transport.send(data, timeoutMillis).then(resolve15, reject);
14772
+ this._transport.send(data, timeoutMillis).then(resolve16, reject);
14773
14773
  }, inMillis);
14774
14774
  });
14775
14775
  }
@@ -14904,7 +14904,7 @@ function appendRootPathToUrlIfNeeded(url) {
14904
14904
  return void 0;
14905
14905
  }
14906
14906
  }
14907
- function appendResourcePathToUrl(url, path23) {
14907
+ function appendResourcePathToUrl(url, path26) {
14908
14908
  try {
14909
14909
  new URL(url);
14910
14910
  } catch {
@@ -14914,11 +14914,11 @@ function appendResourcePathToUrl(url, path23) {
14914
14914
  if (!url.endsWith("/")) {
14915
14915
  url = url + "/";
14916
14916
  }
14917
- url += path23;
14917
+ url += path26;
14918
14918
  try {
14919
14919
  new URL(url);
14920
14920
  } catch {
14921
- diag2.warn(`Configuration: Provided URL appended with '${path23}' is not a valid URL, using 'undefined' instead of '${url}'`);
14921
+ diag2.warn(`Configuration: Provided URL appended with '${path26}' is not a valid URL, using 'undefined' instead of '${url}'`);
14922
14922
  return void 0;
14923
14923
  }
14924
14924
  return url;
@@ -15617,6 +15617,10 @@ var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
15617
15617
  var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
15618
15618
  var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
15619
15619
 
15620
+ // ../registry/src/flow-file-refs.ts
15621
+ import * as fs6 from "node:fs/promises";
15622
+ import * as path8 from "node:path";
15623
+
15620
15624
  // ../registry/src/failure-codes.ts
15621
15625
  var FAILURE_CODES = {
15622
15626
  ARGENT_UNCLASSIFIED_FAILURE: "ARGENT_UNCLASSIFIED_FAILURE",
@@ -15631,6 +15635,8 @@ var FAILURE_CODES = {
15631
15635
  HTTP_CAPABILITY_UNSUPPORTED_OPERATION: "HTTP_CAPABILITY_UNSUPPORTED_OPERATION",
15632
15636
  HTTP_DEVICE_RESOLUTION_FAILED: "HTTP_DEVICE_RESOLUTION_FAILED",
15633
15637
  HTTP_DEPENDENCY_PREFLIGHT_MISSING: "HTTP_DEPENDENCY_PREFLIGHT_MISSING",
15638
+ // The client's POST /upload of a file input was refused, so the call was not sent.
15639
+ FILE_INPUT_UPLOAD_FAILED: "FILE_INPUT_UPLOAD_FAILED",
15634
15640
  CLI_RUN_TOOL_NOT_FOUND: "CLI_RUN_TOOL_NOT_FOUND",
15635
15641
  CLI_RUN_FLAG_PARSE_FAILED: "CLI_RUN_FLAG_PARSE_FAILED",
15636
15642
  CLI_RUN_ARGS_NOT_OBJECT: "CLI_RUN_ARGS_NOT_OBJECT",
@@ -16307,9 +16313,9 @@ function isReplitAgent(env) {
16307
16313
  }
16308
16314
  var DEVIN_MARKER_PATH = "/opt/.devin";
16309
16315
  var JULES_MARKER_PATH = "/opt/environment_summary.sh";
16310
- function safeExists(fileExists, path23) {
16316
+ function safeExists(fileExists, path26) {
16311
16317
  try {
16312
- return fileExists(path23);
16318
+ return fileExists(path26);
16313
16319
  } catch {
16314
16320
  return false;
16315
16321
  }
@@ -16730,7 +16736,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16730
16736
  var SESSION_ID = randomUUID4();
16731
16737
  function readCliVersion() {
16732
16738
  if (true) {
16733
- return "0.27.1-next.8";
16739
+ return "0.28.0";
16734
16740
  }
16735
16741
  return "0.0.0";
16736
16742
  }
@@ -16763,8 +16769,8 @@ function getBaseProps(runtime) {
16763
16769
 
16764
16770
  // ../telemetry/src/identity.ts
16765
16771
  import * as crypto2 from "node:crypto";
16766
- import * as fs6 from "node:fs";
16767
- import * as path8 from "node:path";
16772
+ import * as fs7 from "node:fs";
16773
+ import * as path9 from "node:path";
16768
16774
  var FINGERPRINT_PATTERN = /^[0-9a-f]{64}$/;
16769
16775
  var cached = null;
16770
16776
  var fingerprintResolved = null;
@@ -16871,66 +16877,66 @@ function resolveFingerprintOnce(resolveFingerprint) {
16871
16877
  function isCorruptIdFile(filePath) {
16872
16878
  let isRegularFile;
16873
16879
  try {
16874
- isRegularFile = fs6.lstatSync(filePath).isFile();
16880
+ isRegularFile = fs7.lstatSync(filePath).isFile();
16875
16881
  } catch {
16876
16882
  return false;
16877
16883
  }
16878
16884
  return isRegularFile && tryReadId(filePath) === null;
16879
16885
  }
16880
16886
  function writeIdFileAtomic(finalPath, id) {
16881
- fs6.mkdirSync(argentHomeDir(), { recursive: true });
16887
+ fs7.mkdirSync(argentHomeDir(), { recursive: true });
16882
16888
  let occupant;
16883
16889
  try {
16884
- occupant = fs6.lstatSync(finalPath);
16890
+ occupant = fs7.lstatSync(finalPath);
16885
16891
  } catch (err) {
16886
16892
  if (err.code !== "ENOENT") throw err;
16887
16893
  }
16888
16894
  if (occupant && !occupant.isFile()) {
16889
16895
  throw new Error("telemetry: refusing to replace a non-regular file at the identity path");
16890
16896
  }
16891
- const tmpPath = path8.join(
16897
+ const tmpPath = path9.join(
16892
16898
  argentHomeDir(),
16893
16899
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
16894
16900
  );
16895
- const fd = fs6.openSync(tmpPath, "wx", 384);
16901
+ const fd = fs7.openSync(tmpPath, "wx", 384);
16896
16902
  try {
16897
16903
  try {
16898
- fs6.writeSync(fd, id);
16899
- fs6.fsyncSync(fd);
16904
+ fs7.writeSync(fd, id);
16905
+ fs7.fsyncSync(fd);
16900
16906
  } finally {
16901
- fs6.closeSync(fd);
16907
+ fs7.closeSync(fd);
16902
16908
  }
16903
- fs6.renameSync(tmpPath, finalPath);
16909
+ fs7.renameSync(tmpPath, finalPath);
16904
16910
  } finally {
16905
16911
  try {
16906
- fs6.unlinkSync(tmpPath);
16912
+ fs7.unlinkSync(tmpPath);
16907
16913
  } catch {
16908
16914
  }
16909
16915
  }
16910
16916
  }
16911
16917
  function mintRandomId(finalPath) {
16912
- fs6.mkdirSync(argentHomeDir(), { recursive: true });
16918
+ fs7.mkdirSync(argentHomeDir(), { recursive: true });
16913
16919
  let value = crypto2.randomUUID();
16914
16920
  for (let attempt = 0; attempt < 3; attempt++) {
16915
- const tmpPath = path8.join(
16921
+ const tmpPath = path9.join(
16916
16922
  argentHomeDir(),
16917
16923
  `.telemetry-id.tmp.${process.pid}.${crypto2.randomUUID()}`
16918
16924
  );
16919
16925
  let fd;
16920
16926
  try {
16921
- fd = fs6.openSync(tmpPath, "wx", 384);
16927
+ fd = fs7.openSync(tmpPath, "wx", 384);
16922
16928
  } catch (err) {
16923
16929
  if (err.code === "EEXIST") continue;
16924
16930
  throw err;
16925
16931
  }
16926
16932
  try {
16927
16933
  try {
16928
- fs6.writeSync(fd, value);
16929
- fs6.fsyncSync(fd);
16934
+ fs7.writeSync(fd, value);
16935
+ fs7.fsyncSync(fd);
16930
16936
  } finally {
16931
- fs6.closeSync(fd);
16937
+ fs7.closeSync(fd);
16932
16938
  }
16933
- fs6.linkSync(tmpPath, finalPath);
16939
+ fs7.linkSync(tmpPath, finalPath);
16934
16940
  cached = { path: finalPath, id: value };
16935
16941
  return value;
16936
16942
  } catch (err) {
@@ -16949,7 +16955,7 @@ function mintRandomId(finalPath) {
16949
16955
  throw err;
16950
16956
  } finally {
16951
16957
  try {
16952
- fs6.unlinkSync(tmpPath);
16958
+ fs7.unlinkSync(tmpPath);
16953
16959
  } catch {
16954
16960
  }
16955
16961
  }
@@ -16957,12 +16963,12 @@ function mintRandomId(finalPath) {
16957
16963
  throw new Error("telemetry: failed to create identity after retries");
16958
16964
  }
16959
16965
  function claimCorruptOccupant(finalPath) {
16960
- const claimed = path8.join(
16966
+ const claimed = path9.join(
16961
16967
  argentHomeDir(),
16962
16968
  `.telemetry-id.corrupt.${process.pid}.${crypto2.randomUUID()}`
16963
16969
  );
16964
16970
  try {
16965
- fs6.renameSync(finalPath, claimed);
16971
+ fs7.renameSync(finalPath, claimed);
16966
16972
  } catch {
16967
16973
  return null;
16968
16974
  }
@@ -16971,7 +16977,7 @@ function claimCorruptOccupant(finalPath) {
16971
16977
  grabbed = tryReadId(claimed);
16972
16978
  } finally {
16973
16979
  try {
16974
- fs6.unlinkSync(claimed);
16980
+ fs7.unlinkSync(claimed);
16975
16981
  } catch {
16976
16982
  }
16977
16983
  }
@@ -16980,7 +16986,7 @@ function claimCorruptOccupant(finalPath) {
16980
16986
  function deleteAnonId() {
16981
16987
  cached = null;
16982
16988
  try {
16983
- fs6.unlinkSync(identityFilePath());
16989
+ fs7.unlinkSync(identityFilePath());
16984
16990
  } catch (err) {
16985
16991
  if (err.code !== "ENOENT") throw err;
16986
16992
  }
@@ -16988,9 +16994,9 @@ function deleteAnonId() {
16988
16994
  function tryReadId(filePath) {
16989
16995
  let raw;
16990
16996
  try {
16991
- const stats = fs6.lstatSync(filePath);
16997
+ const stats = fs7.lstatSync(filePath);
16992
16998
  if (!stats.isFile()) return null;
16993
- raw = fs6.readFileSync(filePath, "utf8");
16999
+ raw = fs7.readFileSync(filePath, "utf8");
16994
17000
  } catch (err) {
16995
17001
  if (err.code === "ENOENT") return null;
16996
17002
  return null;
@@ -17004,12 +17010,12 @@ function tryReadId(filePath) {
17004
17010
  import { execFileSync, spawn } from "node:child_process";
17005
17011
 
17006
17012
  // ../native-devtools-ios/src/index.ts
17007
- import * as path9 from "node:path";
17008
- import * as fs7 from "node:fs";
17009
- var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path9.join(__dirname, "..", "dylibs");
17010
- var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path9.join(__dirname, "..", "bin");
17011
- var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path9.join(DYLIB_DIR, "tcp");
17012
- var DYLIB_TVOS_DIR = path9.join(DYLIB_DIR, "tvos");
17013
+ import * as path10 from "node:path";
17014
+ import * as fs8 from "node:fs";
17015
+ var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path10.join(__dirname, "..", "dylibs");
17016
+ var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path10.join(__dirname, "..", "bin");
17017
+ var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path10.join(DYLIB_DIR, "tcp");
17018
+ var DYLIB_TVOS_DIR = path10.join(DYLIB_DIR, "tvos");
17013
17019
  function hostPlatformKey() {
17014
17020
  if (process.platform === "linux" && process.arch === "arm64") {
17015
17021
  return "linux-arm64";
@@ -17020,14 +17026,14 @@ function simulatorServerBinaryName() {
17020
17026
  return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
17021
17027
  }
17022
17028
  function platformBinDir() {
17023
- return path9.join(BIN_DIR, hostPlatformKey());
17029
+ return path10.join(BIN_DIR, hostPlatformKey());
17024
17030
  }
17025
17031
  function simulatorServerBinaryPath() {
17026
17032
  const binaryName = simulatorServerBinaryName();
17027
- const p = path9.join(platformBinDir(), binaryName);
17028
- if (!fs7.existsSync(p)) {
17029
- const flat = path9.join(BIN_DIR, binaryName);
17030
- const migrationHint = fs7.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.` : "";
17033
+ const p = path10.join(platformBinDir(), binaryName);
17034
+ if (!fs8.existsSync(p)) {
17035
+ const flat = path10.join(BIN_DIR, binaryName);
17036
+ const migrationHint = fs8.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.` : "";
17031
17037
  throw new Error(
17032
17038
  `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
17033
17039
  );
@@ -17056,12 +17062,12 @@ function resolveHostFingerprint() {
17056
17062
  }
17057
17063
  }
17058
17064
  function resolveHostFingerprintAsync() {
17059
- return new Promise((resolve15) => {
17065
+ return new Promise((resolve16) => {
17060
17066
  let binary;
17061
17067
  try {
17062
17068
  binary = simulatorServerBinaryPath();
17063
17069
  } catch {
17064
- resolve15(null);
17070
+ resolve16(null);
17065
17071
  return;
17066
17072
  }
17067
17073
  let settled = false;
@@ -17074,7 +17080,7 @@ function resolveHostFingerprintAsync() {
17074
17080
  child?.kill("SIGKILL");
17075
17081
  } catch {
17076
17082
  }
17077
- resolve15(value);
17083
+ resolve16(value);
17078
17084
  };
17079
17085
  const watchdog = setTimeout(() => finish(null), FINGERPRINT_TIMEOUT_MS);
17080
17086
  watchdog.unref?.();
@@ -17107,14 +17113,14 @@ function resolveHostFingerprintAsync() {
17107
17113
  }
17108
17114
 
17109
17115
  // ../telemetry/src/consent.ts
17110
- import * as fs8 from "node:fs";
17116
+ import * as fs9 from "node:fs";
17111
17117
  var cache = /* @__PURE__ */ new Map();
17112
17118
  var sessionOverride = null;
17113
17119
  function readConfigOverrideAt(filePath) {
17114
17120
  const miss = { mtimeMs: null, fingerprint: null, enabledOverride: null };
17115
17121
  let stats;
17116
17122
  try {
17117
- stats = fs8.lstatSync(filePath);
17123
+ stats = fs9.lstatSync(filePath);
17118
17124
  } catch {
17119
17125
  cache.set(filePath, miss);
17120
17126
  return null;
@@ -17131,7 +17137,7 @@ function readConfigOverrideAt(filePath) {
17131
17137
  }
17132
17138
  let parsedEnabled = null;
17133
17139
  try {
17134
- const raw = fs8.readFileSync(filePath, "utf8");
17140
+ const raw = fs9.readFileSync(filePath, "utf8");
17135
17141
  const json = JSON.parse(raw);
17136
17142
  if (json && typeof json === "object") {
17137
17143
  const t2 = json.telemetry;
@@ -17344,7 +17350,7 @@ var DRAIN_GRACE_MS = 250;
17344
17350
  async function raceDrain(client2, timeoutMs) {
17345
17351
  await Promise.race([
17346
17352
  client2.shutdown(timeoutMs),
17347
- new Promise((resolve15) => setTimeout(resolve15, timeoutMs + DRAIN_GRACE_MS).unref())
17353
+ new Promise((resolve16) => setTimeout(resolve16, timeoutMs + DRAIN_GRACE_MS).unref())
17348
17354
  ]);
17349
17355
  }
17350
17356
  async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
@@ -17364,8 +17370,8 @@ async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
17364
17370
  }
17365
17371
 
17366
17372
  // ../argent-installer/src/mcp-configs.ts
17367
- import * as fs15 from "node:fs";
17368
- import * as path16 from "node:path";
17373
+ import * as fs16 from "node:fs";
17374
+ import * as path17 from "node:path";
17369
17375
  import { execFileSync as execFileSync4 } from "node:child_process";
17370
17376
  import { homedir as homedir4 } from "node:os";
17371
17377
 
@@ -17379,8 +17385,8 @@ var CURSOR_ALLOWLIST_PATTERN = "argent:*";
17379
17385
 
17380
17386
  // ../argent-installer/src/utils.ts
17381
17387
  var import_semver3 = __toESM(require_semver2(), 1);
17382
- import * as fs14 from "node:fs";
17383
- import * as path15 from "node:path";
17388
+ import * as fs15 from "node:fs";
17389
+ import * as path16 from "node:path";
17384
17390
  import * as dns from "node:dns";
17385
17391
  import * as os2 from "node:os";
17386
17392
  import { execFileSync as execFileSync3, execSync } from "node:child_process";
@@ -17710,7 +17716,7 @@ function skipVoid(str, ptr, banNewLines, banComments) {
17710
17716
  }
17711
17717
  return ptr;
17712
17718
  }
17713
- function skipUntil(str, ptr, sep6, end, banNewLines = false) {
17719
+ function skipUntil(str, ptr, sep8, end, banNewLines = false) {
17714
17720
  if (!end) {
17715
17721
  ptr = indexOfNewline(str, ptr);
17716
17722
  return ptr < 0 ? str.length : ptr;
@@ -17719,7 +17725,7 @@ function skipUntil(str, ptr, sep6, end, banNewLines = false) {
17719
17725
  let c2 = str[i2];
17720
17726
  if (c2 === "#") {
17721
17727
  i2 = indexOfNewline(str, i2);
17722
- } else if (c2 === sep6) {
17728
+ } else if (c2 === sep8) {
17723
17729
  return i2 + 1;
17724
17730
  } else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i2 + 1] === "\n")) {
17725
17731
  return i2;
@@ -18985,11 +18991,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
18985
18991
  onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
18986
18992
  ensurePropertyComplete(offset + length);
18987
18993
  },
18988
- onSeparator: (sep6, offset, length) => {
18994
+ onSeparator: (sep8, offset, length) => {
18989
18995
  if (currentParent.type === "property") {
18990
- if (sep6 === ":") {
18996
+ if (sep8 === ":") {
18991
18997
  currentParent.colonOffset = offset;
18992
- } else if (sep6 === ",") {
18998
+ } else if (sep8 === ",") {
18993
18999
  ensurePropertyComplete(offset);
18994
19000
  }
18995
19001
  }
@@ -19005,12 +19011,12 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19005
19011
  }
19006
19012
  return result;
19007
19013
  }
19008
- function findNodeAtLocation(root, path23) {
19014
+ function findNodeAtLocation(root, path26) {
19009
19015
  if (!root) {
19010
19016
  return void 0;
19011
19017
  }
19012
19018
  let node = root;
19013
- for (let segment of path23) {
19019
+ for (let segment of path26) {
19014
19020
  if (typeof segment === "string") {
19015
19021
  if (node.type !== "object" || !Array.isArray(node.children)) {
19016
19022
  return void 0;
@@ -19364,14 +19370,14 @@ function getNodeType(value) {
19364
19370
 
19365
19371
  // ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
19366
19372
  function setProperty(text2, originalPath, value, options) {
19367
- const path23 = originalPath.slice();
19373
+ const path26 = originalPath.slice();
19368
19374
  const errors = [];
19369
19375
  const root = parseTree(text2, errors);
19370
19376
  let parent = void 0;
19371
19377
  let lastSegment = void 0;
19372
- while (path23.length > 0) {
19373
- lastSegment = path23.pop();
19374
- parent = findNodeAtLocation(root, path23);
19378
+ while (path26.length > 0) {
19379
+ lastSegment = path26.pop();
19380
+ parent = findNodeAtLocation(root, path26);
19375
19381
  if (parent === void 0 && value !== void 0) {
19376
19382
  if (typeof lastSegment === "string") {
19377
19383
  value = { [lastSegment]: value };
@@ -19557,8 +19563,8 @@ var ParseErrorCode;
19557
19563
  ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
19558
19564
  ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
19559
19565
  })(ParseErrorCode || (ParseErrorCode = {}));
19560
- function modify(text2, path23, value, options) {
19561
- return setProperty(text2, path23, value, options);
19566
+ function modify(text2, path26, value, options) {
19567
+ return setProperty(text2, path26, value, options);
19562
19568
  }
19563
19569
  function applyEdits(text2, edits) {
19564
19570
  let sortedEdits = edits.slice(0).sort((a3, b) => {
@@ -19582,21 +19588,21 @@ function applyEdits(text2, edits) {
19582
19588
  }
19583
19589
 
19584
19590
  // ../argent-installer/src/package-root.ts
19585
- import * as fs9 from "node:fs";
19586
- import * as path10 from "node:path";
19587
- function resolvePackageRoot(dirname15) {
19588
- let current = path10.resolve(dirname15);
19591
+ import * as fs10 from "node:fs";
19592
+ import * as path11 from "node:path";
19593
+ function resolvePackageRoot(dirname18) {
19594
+ let current = path11.resolve(dirname18);
19589
19595
  while (true) {
19590
- if (fs9.existsSync(path10.join(current, "package.json"))) return current;
19591
- const parent = path10.dirname(current);
19592
- if (parent === current) return path10.resolve(dirname15);
19596
+ if (fs10.existsSync(path11.join(current, "package.json"))) return current;
19597
+ const parent = path11.dirname(current);
19598
+ if (parent === current) return path11.resolve(dirname18);
19593
19599
  current = parent;
19594
19600
  }
19595
19601
  }
19596
19602
 
19597
19603
  // ../argent-installer/src/package-manager.ts
19598
- import * as fs10 from "node:fs";
19599
- import * as path11 from "node:path";
19604
+ import * as fs11 from "node:fs";
19605
+ import * as path12 from "node:path";
19600
19606
  function formatShellCommand(cmd) {
19601
19607
  const parts = [cmd.bin, ...cmd.args.map((a3) => a3.includes(" ") ? `"${a3}"` : a3)];
19602
19608
  return parts.join(" ");
@@ -19616,7 +19622,7 @@ function asKnownPm(name) {
19616
19622
  }
19617
19623
  function pmFromPackageManagerField(dir) {
19618
19624
  try {
19619
- const pkg = JSON.parse(fs10.readFileSync(path11.join(dir, "package.json"), "utf8"));
19625
+ const pkg = JSON.parse(fs11.readFileSync(path12.join(dir, "package.json"), "utf8"));
19620
19626
  if (typeof pkg.packageManager === "string") {
19621
19627
  return asKnownPm(pkg.packageManager.split("@")[0]);
19622
19628
  }
@@ -19627,7 +19633,7 @@ function pmFromPackageManagerField(dir) {
19627
19633
  }
19628
19634
  function pmFromDevEngines(dir) {
19629
19635
  try {
19630
- const pkg = JSON.parse(fs10.readFileSync(path11.join(dir, "package.json"), "utf8"));
19636
+ const pkg = JSON.parse(fs11.readFileSync(path12.join(dir, "package.json"), "utf8"));
19631
19637
  const devEnginesPm = pkg.devEngines?.packageManager;
19632
19638
  const names = /* @__PURE__ */ new Set();
19633
19639
  for (const entry of Array.isArray(devEnginesPm) ? devEnginesPm : [devEnginesPm]) {
@@ -19640,7 +19646,7 @@ function pmFromDevEngines(dir) {
19640
19646
  }
19641
19647
  }
19642
19648
  function pmFromLockfile(dir) {
19643
- const has = (file) => fs10.existsSync(path11.join(dir, file));
19649
+ const has = (file) => fs11.existsSync(path12.join(dir, file));
19644
19650
  if (has("pnpm-lock.yaml")) return "pnpm";
19645
19651
  if (has("yarn.lock")) return "yarn";
19646
19652
  if (has("bun.lock") || has("bun.lockb")) return "bun";
@@ -19648,15 +19654,15 @@ function pmFromLockfile(dir) {
19648
19654
  return null;
19649
19655
  }
19650
19656
  function pmFromWorkspaceMarker(dir) {
19651
- return fs10.existsSync(path11.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
19657
+ return fs11.existsSync(path12.join(dir, "pnpm-workspace.yaml")) ? "pnpm" : null;
19652
19658
  }
19653
19659
  function detectProjectPackageManager(projectRoot) {
19654
- let dir = path11.resolve(projectRoot);
19660
+ let dir = path12.resolve(projectRoot);
19655
19661
  for (; ; ) {
19656
19662
  const pm = pmFromPackageManagerField(dir) ?? pmFromLockfile(dir) ?? pmFromDevEngines(dir) ?? pmFromWorkspaceMarker(dir);
19657
19663
  if (pm) return pm;
19658
- if (fs10.existsSync(path11.join(dir, ".git"))) break;
19659
- const parent = path11.dirname(dir);
19664
+ if (fs11.existsSync(path12.join(dir, ".git"))) break;
19665
+ const parent = path12.dirname(dir);
19660
19666
  if (parent === dir) break;
19661
19667
  dir = parent;
19662
19668
  }
@@ -19724,19 +19730,19 @@ function localUninstallCommand(pm, pkg) {
19724
19730
  }
19725
19731
 
19726
19732
  // ../argent-installer/src/preflight.ts
19727
- import * as fs11 from "node:fs";
19728
- import * as path12 from "node:path";
19733
+ import * as fs12 from "node:fs";
19734
+ import * as path13 from "node:path";
19729
19735
  function hasProjectPackageJson(projectRoot) {
19730
- return fs11.existsSync(path12.join(projectRoot, "package.json"));
19736
+ return fs12.existsSync(path13.join(projectRoot, "package.json"));
19731
19737
  }
19732
19738
  function isYarnPnp(projectRoot) {
19733
- return fs11.existsSync(path12.join(projectRoot, ".pnp.cjs")) || fs11.existsSync(path12.join(projectRoot, ".pnp.loader.mjs"));
19739
+ return fs12.existsSync(path13.join(projectRoot, ".pnp.cjs")) || fs12.existsSync(path13.join(projectRoot, ".pnp.loader.mjs"));
19734
19740
  }
19735
19741
 
19736
19742
  // ../argent-installer/src/topology.ts
19737
19743
  var import_semver2 = __toESM(require_semver2(), 1);
19738
- import * as fs12 from "node:fs";
19739
- import * as path13 from "node:path";
19744
+ import * as fs13 from "node:fs";
19745
+ import * as path14 from "node:path";
19740
19746
  import { createRequire } from "node:module";
19741
19747
  import { execFileSync as execFileSync2 } from "node:child_process";
19742
19748
  var TEMP_RUNNER_MARKERS = [
@@ -19768,9 +19774,9 @@ function getGloballyInstalledPackageRoot() {
19768
19774
  const binaryPath = getGlobalBinaryPath();
19769
19775
  if (!binaryPath) return null;
19770
19776
  try {
19771
- const realPath = fs12.realpathSync(binaryPath);
19772
- const root = resolvePackageRoot(path13.dirname(realPath));
19773
- const pkg = JSON.parse(fs12.readFileSync(path13.join(root, "package.json"), "utf8"));
19777
+ const realPath = fs13.realpathSync(binaryPath);
19778
+ const root = resolvePackageRoot(path14.dirname(realPath));
19779
+ const pkg = JSON.parse(fs13.readFileSync(path14.join(root, "package.json"), "utf8"));
19774
19780
  return pkg.name === PACKAGE_NAME ? root : null;
19775
19781
  } catch {
19776
19782
  return null;
@@ -19780,7 +19786,7 @@ function getGloballyInstalledVersion() {
19780
19786
  const pkgRoot = getGloballyInstalledPackageRoot();
19781
19787
  if (!pkgRoot) return null;
19782
19788
  try {
19783
- const pkg = JSON.parse(fs12.readFileSync(path13.join(pkgRoot, "package.json"), "utf8"));
19789
+ const pkg = JSON.parse(fs13.readFileSync(path14.join(pkgRoot, "package.json"), "utf8"));
19784
19790
  return pkg.version ?? null;
19785
19791
  } catch {
19786
19792
  return null;
@@ -19789,7 +19795,7 @@ function getGloballyInstalledVersion() {
19789
19795
  function readManifestDeclaration(projectRoot) {
19790
19796
  try {
19791
19797
  const pkg = JSON.parse(
19792
- fs12.readFileSync(path13.join(projectRoot, "package.json"), "utf8")
19798
+ fs13.readFileSync(path14.join(projectRoot, "package.json"), "utf8")
19793
19799
  );
19794
19800
  const spec = pkg.devDependencies?.[PACKAGE_NAME] ?? pkg.dependencies?.[PACKAGE_NAME] ?? pkg.optionalDependencies?.[PACKAGE_NAME];
19795
19801
  return typeof spec === "string" ? spec : null;
@@ -19802,11 +19808,11 @@ function isDeclaredLocally(projectRoot) {
19802
19808
  }
19803
19809
  function resolveLocalArgentDir(projectRoot) {
19804
19810
  try {
19805
- const req = createRequire(path13.join(projectRoot, "package.json"));
19806
- return path13.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
19811
+ const req = createRequire(path14.join(projectRoot, "package.json"));
19812
+ return path14.dirname(req.resolve(`${PACKAGE_NAME}/package.json`));
19807
19813
  } catch {
19808
- const plain = path13.join(projectRoot, "node_modules", PACKAGE_NAME);
19809
- return fs12.existsSync(path13.join(plain, "package.json")) ? plain : null;
19814
+ const plain = path14.join(projectRoot, "node_modules", PACKAGE_NAME);
19815
+ return fs13.existsSync(path14.join(plain, "package.json")) ? plain : null;
19810
19816
  }
19811
19817
  }
19812
19818
  function probeLocalInstall(projectRoot) {
@@ -19814,7 +19820,7 @@ function probeLocalInstall(projectRoot) {
19814
19820
  if (packageDir) {
19815
19821
  let version;
19816
19822
  try {
19817
- const pkg = JSON.parse(fs12.readFileSync(path13.join(packageDir, "package.json"), "utf8"));
19823
+ const pkg = JSON.parse(fs13.readFileSync(path14.join(packageDir, "package.json"), "utf8"));
19818
19824
  version = pkg.version ?? null;
19819
19825
  } catch {
19820
19826
  version = null;
@@ -19837,8 +19843,8 @@ function getLocallyInstalledVersion(projectRoot) {
19837
19843
  }
19838
19844
  function readLocalPackageVersionUncached(projectRoot) {
19839
19845
  try {
19840
- const pkgPath = path13.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
19841
- const pkg = JSON.parse(fs12.readFileSync(pkgPath, "utf8"));
19846
+ const pkgPath = path14.join(projectRoot, "node_modules", PACKAGE_NAME, "package.json");
19847
+ const pkg = JSON.parse(fs13.readFileSync(pkgPath, "utf8"));
19842
19848
  return pkg.version ?? null;
19843
19849
  } catch {
19844
19850
  return null;
@@ -19846,7 +19852,7 @@ function readLocalPackageVersionUncached(projectRoot) {
19846
19852
  }
19847
19853
  function argentBinSubpath(pkgDir) {
19848
19854
  try {
19849
- const pkg = JSON.parse(fs12.readFileSync(path13.join(pkgDir, "package.json"), "utf8"));
19855
+ const pkg = JSON.parse(fs13.readFileSync(path14.join(pkgDir, "package.json"), "utf8"));
19850
19856
  if (typeof pkg.bin === "string") return pkg.bin;
19851
19857
  if (pkg.bin && typeof pkg.bin === "object") {
19852
19858
  return pkg.bin[MCP_BINARY_NAME] ?? Object.values(pkg.bin)[0] ?? null;
@@ -19863,28 +19869,28 @@ function getLocalArgentBinRelPath(projectRoot) {
19863
19869
  if (!binSub) return null;
19864
19870
  let root = projectRoot;
19865
19871
  try {
19866
- root = fs12.realpathSync(projectRoot);
19872
+ root = fs13.realpathSync(projectRoot);
19867
19873
  } catch {
19868
19874
  }
19869
- const stableRel = path13.join("node_modules", PACKAGE_NAME, binSub);
19870
- if (fs12.existsSync(path13.join(root, stableRel))) {
19871
- return stableRel.split(path13.sep).join("/");
19875
+ const stableRel = path14.join("node_modules", PACKAGE_NAME, binSub);
19876
+ if (fs13.existsSync(path14.join(root, stableRel))) {
19877
+ return stableRel.split(path14.sep).join("/");
19872
19878
  }
19873
- const abs = path13.join(pkgDir, binSub);
19874
- if (!fs12.existsSync(abs)) return null;
19875
- return path13.relative(root, abs).split(path13.sep).join("/");
19879
+ const abs = path14.join(pkgDir, binSub);
19880
+ if (!fs13.existsSync(abs)) return null;
19881
+ return path14.relative(root, abs).split(path14.sep).join("/");
19876
19882
  }
19877
19883
 
19878
19884
  // ../argent-installer/src/install-record.ts
19879
- import * as fs13 from "node:fs";
19880
- import * as path14 from "node:path";
19885
+ import * as fs14 from "node:fs";
19886
+ import * as path15 from "node:path";
19881
19887
  function getInstallRecordPath(projectRoot) {
19882
- return path14.join(projectRoot, ".argent", "install.json");
19888
+ return path15.join(projectRoot, ".argent", "install.json");
19883
19889
  }
19884
19890
  function readInstallRecord(projectRoot) {
19885
19891
  try {
19886
19892
  const parsed = JSON.parse(
19887
- fs13.readFileSync(getInstallRecordPath(projectRoot), "utf8")
19893
+ fs14.readFileSync(getInstallRecordPath(projectRoot), "utf8")
19888
19894
  );
19889
19895
  if (parsed && (parsed.mode === "local" || parsed.mode === "global")) return parsed;
19890
19896
  return null;
@@ -19894,17 +19900,17 @@ function readInstallRecord(projectRoot) {
19894
19900
  }
19895
19901
  function writeInstallRecord(projectRoot, record) {
19896
19902
  const recordPath = getInstallRecordPath(projectRoot);
19897
- fs13.mkdirSync(path14.dirname(recordPath), { recursive: true });
19898
- fs13.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
19903
+ fs14.mkdirSync(path15.dirname(recordPath), { recursive: true });
19904
+ fs14.writeFileSync(recordPath, JSON.stringify(record, null, 2) + "\n");
19899
19905
  }
19900
19906
  function removeInstallRecord(projectRoot) {
19901
19907
  const recordPath = getInstallRecordPath(projectRoot);
19902
19908
  try {
19903
- if (!fs13.existsSync(recordPath)) return false;
19904
- fs13.rmSync(recordPath, { force: true });
19905
- const dir = path14.dirname(recordPath);
19909
+ if (!fs14.existsSync(recordPath)) return false;
19910
+ fs14.rmSync(recordPath, { force: true });
19911
+ const dir = path15.dirname(recordPath);
19906
19912
  try {
19907
- if (fs13.existsSync(dir) && fs13.readdirSync(dir).length === 0) fs13.rmdirSync(dir);
19913
+ if (fs14.existsSync(dir) && fs14.readdirSync(dir).length === 0) fs14.rmdirSync(dir);
19908
19914
  } catch {
19909
19915
  }
19910
19916
  return true;
@@ -19978,9 +19984,9 @@ async function promptInstallTargets(verb) {
19978
19984
  // ../argent-installer/src/utils.ts
19979
19985
  var PACKAGE_ROOT = resolvePackageRoot(import.meta.dirname);
19980
19986
  function resolveBundledDir(dirName) {
19981
- const packagedDir = path15.join(PACKAGE_ROOT, dirName);
19982
- if (fs14.existsSync(packagedDir)) return packagedDir;
19983
- return path15.resolve(PACKAGE_ROOT, "..", "skills", dirName);
19987
+ const packagedDir = path16.join(PACKAGE_ROOT, dirName);
19988
+ if (fs15.existsSync(packagedDir)) return packagedDir;
19989
+ return path16.resolve(PACKAGE_ROOT, "..", "skills", dirName);
19984
19990
  }
19985
19991
  var SKILLS_DIR = resolveBundledDir("skills");
19986
19992
  var RULES_DIR = resolveBundledDir("rules");
@@ -19992,23 +19998,23 @@ function buildArgentSkillsSource(version) {
19992
19998
  }
19993
19999
  function listBundledSkills(skillsDir = SKILLS_DIR) {
19994
20000
  try {
19995
- return fs14.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs14.existsSync(path15.join(skillsDir, name, "SKILL.md"))).sort();
20001
+ return fs15.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs15.existsSync(path16.join(skillsDir, name, "SKILL.md"))).sort();
19996
20002
  } catch {
19997
20003
  return [];
19998
20004
  }
19999
20005
  }
20000
20006
  function getProjectSkillLockPath(cwd = process.cwd()) {
20001
- return path15.join(cwd, "skills-lock.json");
20007
+ return path16.join(cwd, "skills-lock.json");
20002
20008
  }
20003
20009
  function getGlobalSkillLockPath() {
20004
20010
  const xdgStateHome = process.env.XDG_STATE_HOME;
20005
- if (xdgStateHome) return path15.join(xdgStateHome, "skills", ".skill-lock.json");
20006
- return path15.join(os2.homedir(), ".agents", ".skill-lock.json");
20011
+ if (xdgStateHome) return path16.join(xdgStateHome, "skills", ".skill-lock.json");
20012
+ return path16.join(os2.homedir(), ".agents", ".skill-lock.json");
20007
20013
  }
20008
20014
  var ARGENT_SKILL_PREFIX = "argent-";
20009
20015
  function listArgentSkillsInLock(lockPath) {
20010
20016
  try {
20011
- const raw = fs14.readFileSync(lockPath, "utf8");
20017
+ const raw = fs15.readFileSync(lockPath, "utf8");
20012
20018
  const lock = JSON.parse(raw);
20013
20019
  const tracked = lock.skills ?? {};
20014
20020
  return Object.keys(tracked).filter((name) => name.startsWith(ARGENT_SKILL_PREFIX)).sort();
@@ -20032,16 +20038,16 @@ var PROJECT_ROOT_MARKERS = [
20032
20038
  "skills-lock.json"
20033
20039
  ];
20034
20040
  function resolveProjectRoot2(startDir) {
20035
- const initialDir = path15.resolve(startDir);
20041
+ const initialDir = path16.resolve(startDir);
20036
20042
  let currentDir = initialDir;
20037
20043
  while (true) {
20038
- if (PROJECT_ROOT_MARKERS.some((marker) => fs14.existsSync(path15.join(currentDir, marker)))) {
20044
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs15.existsSync(path16.join(currentDir, marker)))) {
20039
20045
  return currentDir;
20040
20046
  }
20041
- if (fs14.existsSync(path15.join(currentDir, ".git"))) {
20047
+ if (fs15.existsSync(path16.join(currentDir, ".git"))) {
20042
20048
  return currentDir;
20043
20049
  }
20044
- const parentDir = path15.dirname(currentDir);
20050
+ const parentDir = path16.dirname(currentDir);
20045
20051
  if (parentDir === currentDir) {
20046
20052
  return initialDir;
20047
20053
  }
@@ -20049,20 +20055,20 @@ function resolveProjectRoot2(startDir) {
20049
20055
  }
20050
20056
  }
20051
20057
  function readToml(filePath) {
20052
- if (!fs14.existsSync(filePath)) return {};
20058
+ if (!fs15.existsSync(filePath)) return {};
20053
20059
  try {
20054
- return parse(fs14.readFileSync(filePath, "utf8"));
20060
+ return parse(fs15.readFileSync(filePath, "utf8"));
20055
20061
  } catch {
20056
20062
  return {};
20057
20063
  }
20058
20064
  }
20059
20065
  function writeToml(filePath, data) {
20060
- fs14.mkdirSync(path15.dirname(filePath), { recursive: true });
20061
- fs14.writeFileSync(filePath, stringify(data) + "\n");
20066
+ fs15.mkdirSync(path16.dirname(filePath), { recursive: true });
20067
+ fs15.writeFileSync(filePath, stringify(data) + "\n");
20062
20068
  }
20063
20069
  function readYaml(filePath) {
20064
- if (!fs14.existsSync(filePath)) return new import_yaml.Document({});
20065
- const text2 = fs14.readFileSync(filePath, "utf8");
20070
+ if (!fs15.existsSync(filePath)) return new import_yaml.Document({});
20071
+ const text2 = fs15.readFileSync(filePath, "utf8");
20066
20072
  const doc = (0, import_yaml.parseDocument)(text2);
20067
20073
  if (doc.errors.length > 0) {
20068
20074
  const messages = doc.errors.map((e) => e.message).join("; ");
@@ -20071,20 +20077,20 @@ function readYaml(filePath) {
20071
20077
  return doc;
20072
20078
  }
20073
20079
  function writeYaml(filePath, doc) {
20074
- fs14.mkdirSync(path15.dirname(filePath), { recursive: true });
20075
- fs14.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20080
+ fs15.mkdirSync(path16.dirname(filePath), { recursive: true });
20081
+ fs15.writeFileSync(filePath, doc.toString({ lineWidth: 0 }));
20076
20082
  }
20077
20083
  function readJson(filePath) {
20078
- if (!fs14.existsSync(filePath)) return {};
20084
+ if (!fs15.existsSync(filePath)) return {};
20079
20085
  try {
20080
- return JSON.parse(fs14.readFileSync(filePath, "utf8"));
20086
+ return JSON.parse(fs15.readFileSync(filePath, "utf8"));
20081
20087
  } catch {
20082
20088
  return {};
20083
20089
  }
20084
20090
  }
20085
20091
  function writeJson(filePath, data) {
20086
- fs14.mkdirSync(path15.dirname(filePath), { recursive: true });
20087
- fs14.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20092
+ fs15.mkdirSync(path16.dirname(filePath), { recursive: true });
20093
+ fs15.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
20088
20094
  }
20089
20095
  var JSONC_FORMATTING = { tabSize: 2, insertSpaces: true };
20090
20096
  function setJsoncIn(text2, jsonPath, value) {
@@ -20092,8 +20098,8 @@ function setJsoncIn(text2, jsonPath, value) {
20092
20098
  return applyEdits(text2, edits);
20093
20099
  }
20094
20100
  function readJsoncFileRaw(filePath) {
20095
- if (!fs14.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20096
- let text2 = fs14.readFileSync(filePath, "utf8");
20101
+ if (!fs15.existsSync(filePath)) return { text: "{}", hadBom: false, wasEmpty: true };
20102
+ let text2 = fs15.readFileSync(filePath, "utf8");
20097
20103
  const hadBom = text2.charCodeAt(0) === 65279;
20098
20104
  if (hadBom) text2 = text2.slice(1);
20099
20105
  const wasEmpty = text2.trim() === "";
@@ -20113,16 +20119,16 @@ function isEmptyPlainObject(value) {
20113
20119
  }
20114
20120
  function rmEmptyDir(dirPath) {
20115
20121
  try {
20116
- if (!fs14.existsSync(dirPath)) return;
20117
- if (!fs14.statSync(dirPath).isDirectory()) return;
20118
- if (fs14.readdirSync(dirPath).length > 0) return;
20119
- fs14.rmdirSync(dirPath);
20122
+ if (!fs15.existsSync(dirPath)) return;
20123
+ if (!fs15.statSync(dirPath).isDirectory()) return;
20124
+ if (fs15.readdirSync(dirPath).length > 0) return;
20125
+ fs15.rmdirSync(dirPath);
20120
20126
  } catch {
20121
20127
  }
20122
20128
  }
20123
20129
  function readJsonc(filePath) {
20124
- if (!fs14.existsSync(filePath)) return {};
20125
- let raw = fs14.readFileSync(filePath, "utf8");
20130
+ if (!fs15.existsSync(filePath)) return {};
20131
+ let raw = fs15.readFileSync(filePath, "utf8");
20126
20132
  if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
20127
20133
  if (raw.trim() === "") return {};
20128
20134
  const parsed = parse3(raw, [], { allowTrailingComma: true });
@@ -20141,18 +20147,18 @@ function editJsoncFile(filePath, jsonPath, value) {
20141
20147
  }
20142
20148
  const parsed = parse3(text2, [], { allowTrailingComma: true });
20143
20149
  if (isEmptyPlainObject(parsed)) {
20144
- fs14.rmSync(filePath, { force: true });
20145
- rmEmptyDir(path15.dirname(filePath));
20150
+ fs15.rmSync(filePath, { force: true });
20151
+ rmEmptyDir(path16.dirname(filePath));
20146
20152
  return;
20147
20153
  }
20148
- fs14.mkdirSync(path15.dirname(filePath), { recursive: true });
20154
+ fs15.mkdirSync(path16.dirname(filePath), { recursive: true });
20149
20155
  const out = wasEmpty && !text2.endsWith("\n") ? text2 + "\n" : text2;
20150
- fs14.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20156
+ fs15.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + out);
20151
20157
  }
20152
20158
  var MAX_SYMLINK_HOPS = 40;
20153
20159
  function realpathOrSelf(p) {
20154
20160
  try {
20155
- return fs14.realpathSync(p);
20161
+ return fs15.realpathSync(p);
20156
20162
  } catch {
20157
20163
  return p;
20158
20164
  }
@@ -20162,13 +20168,13 @@ function resolveLinkedDestination(dest) {
20162
20168
  for (let hop = 0; hop < MAX_SYMLINK_HOPS; hop++) {
20163
20169
  let entry;
20164
20170
  try {
20165
- entry = fs14.lstatSync(current);
20171
+ entry = fs15.lstatSync(current);
20166
20172
  } catch {
20167
- return current === dest || dirExists(path15.dirname(current)) ? current : dest;
20173
+ return current === dest || dirExists(path16.dirname(current)) ? current : dest;
20168
20174
  }
20169
20175
  if (!entry.isSymbolicLink()) return current;
20170
20176
  try {
20171
- current = path15.resolve(realpathOrSelf(path15.dirname(current)), fs14.readlinkSync(current));
20177
+ current = path16.resolve(realpathOrSelf(path16.dirname(current)), fs15.readlinkSync(current));
20172
20178
  } catch {
20173
20179
  return dest;
20174
20180
  }
@@ -20176,32 +20182,32 @@ function resolveLinkedDestination(dest) {
20176
20182
  return dest;
20177
20183
  }
20178
20184
  function copyDir(src, dest) {
20179
- if (!fs14.existsSync(src)) return null;
20185
+ if (!fs15.existsSync(src)) return null;
20180
20186
  const target = resolveLinkedDestination(dest);
20181
20187
  copyTree(src, target);
20182
20188
  return target;
20183
20189
  }
20184
20190
  function copyTree(src, dest) {
20185
- const entries = fs14.readdirSync(src, { withFileTypes: true });
20186
- fs14.mkdirSync(dest, { recursive: true });
20191
+ const entries = fs15.readdirSync(src, { withFileTypes: true });
20192
+ fs15.mkdirSync(dest, { recursive: true });
20187
20193
  for (const entry of entries) {
20188
- const from = path15.join(src, entry.name);
20189
- const to = resolveLinkedDestination(path15.join(dest, entry.name));
20194
+ const from = path16.join(src, entry.name);
20195
+ const to = resolveLinkedDestination(path16.join(dest, entry.name));
20190
20196
  if (entry.isDirectory()) copyTree(from, to);
20191
- else fs14.copyFileSync(from, to);
20197
+ else fs15.copyFileSync(from, to);
20192
20198
  }
20193
20199
  }
20194
20200
  function dirExists(p) {
20195
20201
  try {
20196
- return fs14.statSync(p).isDirectory();
20202
+ return fs15.statSync(p).isDirectory();
20197
20203
  } catch {
20198
20204
  return false;
20199
20205
  }
20200
20206
  }
20201
20207
  function getInstalledVersion() {
20202
20208
  try {
20203
- const pkgPath = path15.join(PACKAGE_ROOT, "package.json");
20204
- const pkg = JSON.parse(fs14.readFileSync(pkgPath, "utf8"));
20209
+ const pkgPath = path16.join(PACKAGE_ROOT, "package.json");
20210
+ const pkg = JSON.parse(fs15.readFileSync(pkgPath, "utf8"));
20205
20211
  return pkg.version ?? null;
20206
20212
  } catch {
20207
20213
  return null;
@@ -20239,12 +20245,12 @@ async function isOnline(timeoutMs = PROBE_TIMEOUT_MS) {
20239
20245
  } catch {
20240
20246
  return false;
20241
20247
  }
20242
- return new Promise((resolve15) => {
20243
- const timer = setTimeout(() => resolve15(false), timeoutMs);
20248
+ return new Promise((resolve16) => {
20249
+ const timer = setTimeout(() => resolve16(false), timeoutMs);
20244
20250
  timer.unref();
20245
20251
  dns.lookup(host, (err) => {
20246
20252
  clearTimeout(timer);
20247
- resolve15(!err);
20253
+ resolve16(!err);
20248
20254
  });
20249
20255
  });
20250
20256
  }
@@ -20261,7 +20267,7 @@ function escapeStringRegexp(string) {
20261
20267
  }
20262
20268
 
20263
20269
  // ../argent-installer/src/mcp-configs.ts
20264
- var TOOL_SERVER_BUNDLE = path16.join(import.meta.dirname, "tool-server.cjs");
20270
+ var TOOL_SERVER_BUNDLE = path17.join(import.meta.dirname, "tool-server.cjs");
20265
20271
  function getAvailableToolIds() {
20266
20272
  const out = execFileSync4("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
20267
20273
  const tools = JSON.parse(out);
@@ -20300,10 +20306,10 @@ function hasCustomizingEnv(entry) {
20300
20306
  }
20301
20307
  function removeDirIfEmpty(dirPath) {
20302
20308
  try {
20303
- if (!fs15.existsSync(dirPath)) return;
20304
- if (!fs15.statSync(dirPath).isDirectory()) return;
20305
- if (fs15.readdirSync(dirPath).length > 0) return;
20306
- fs15.rmdirSync(dirPath);
20309
+ if (!fs16.existsSync(dirPath)) return;
20310
+ if (!fs16.statSync(dirPath).isDirectory()) return;
20311
+ if (fs16.readdirSync(dirPath).length > 0) return;
20312
+ fs16.rmdirSync(dirPath);
20307
20313
  } catch {
20308
20314
  }
20309
20315
  }
@@ -20340,7 +20346,7 @@ function isArgentManagedEntry(entry) {
20340
20346
  return args.length === 1 && args[0] === "mcp";
20341
20347
  case "node": {
20342
20348
  if (args.length !== 2 || args[1] !== "mcp" || !args[0]) return false;
20343
- if (path16.isAbsolute(args[0])) return false;
20349
+ if (path17.isAbsolute(args[0])) return false;
20344
20350
  const normalized = args[0].split("\\").join("/");
20345
20351
  return normalized.includes(`node_modules/${PACKAGE_NAME}/`);
20346
20352
  }
@@ -20354,8 +20360,8 @@ function isArgentManagedEntry(entry) {
20354
20360
  }
20355
20361
  function writeTomlOrRemove(filePath, data) {
20356
20362
  if (Object.keys(data).length === 0) {
20357
- fs15.rmSync(filePath, { force: true });
20358
- removeDirIfEmpty(path16.dirname(filePath));
20363
+ fs16.rmSync(filePath, { force: true });
20364
+ removeDirIfEmpty(path17.dirname(filePath));
20359
20365
  return;
20360
20366
  }
20361
20367
  writeToml(filePath, data);
@@ -20364,12 +20370,12 @@ function dirHasEditorEvidence(dir, looksArgentOnly) {
20364
20370
  return dirExists(dir) && !looksArgentOnly(dir);
20365
20371
  }
20366
20372
  function fileHasEditorEvidence(filePath, looksArgentOnly) {
20367
- return fs15.existsSync(filePath) && !looksArgentOnly(filePath);
20373
+ return fs16.existsSync(filePath) && !looksArgentOnly(filePath);
20368
20374
  }
20369
20375
  function parseJsoncStrict(filePath) {
20370
20376
  let raw;
20371
20377
  try {
20372
- raw = fs15.readFileSync(filePath, "utf8");
20378
+ raw = fs16.readFileSync(filePath, "utf8");
20373
20379
  } catch {
20374
20380
  return null;
20375
20381
  }
@@ -20382,14 +20388,14 @@ function parseJsoncStrict(filePath) {
20382
20388
  }
20383
20389
  function parseTomlStrict(filePath) {
20384
20390
  try {
20385
- return parse(fs15.readFileSync(filePath, "utf8"));
20391
+ return parse(fs16.readFileSync(filePath, "utf8"));
20386
20392
  } catch {
20387
20393
  return null;
20388
20394
  }
20389
20395
  }
20390
20396
  function parseYamlStrict(filePath) {
20391
20397
  try {
20392
- const parsed = (0, import_yaml2.parse)(fs15.readFileSync(filePath, "utf8"));
20398
+ const parsed = (0, import_yaml2.parse)(fs16.readFileSync(filePath, "utf8"));
20393
20399
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return null;
20394
20400
  return parsed;
20395
20401
  } catch {
@@ -20412,7 +20418,7 @@ function bundledManagedNames(kind) {
20412
20418
  if (cached2) return cached2;
20413
20419
  let names;
20414
20420
  try {
20415
- names = new Set(fs15.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
20421
+ names = new Set(fs16.readdirSync(kind === "rules" ? RULES_DIR : AGENTS_DIR));
20416
20422
  } catch {
20417
20423
  names = /* @__PURE__ */ new Set();
20418
20424
  }
@@ -20422,7 +20428,7 @@ function bundledManagedNames(kind) {
20422
20428
  function managedDirLooksArgentOnly(dir, kind) {
20423
20429
  let entries;
20424
20430
  try {
20425
- entries = fs15.readdirSync(dir);
20431
+ entries = fs16.readdirSync(dir);
20426
20432
  } catch {
20427
20433
  return false;
20428
20434
  }
@@ -20434,13 +20440,13 @@ function managedDirLooksArgentOnly(dir, kind) {
20434
20440
  function cursorDirLooksArgentOnly(dir) {
20435
20441
  let entries;
20436
20442
  try {
20437
- entries = fs15.readdirSync(dir);
20443
+ entries = fs16.readdirSync(dir);
20438
20444
  } catch {
20439
20445
  return false;
20440
20446
  }
20441
20447
  if (entries.length === 0) return false;
20442
20448
  return entries.every((entry) => {
20443
- const full = path16.join(dir, entry);
20449
+ const full = path17.join(dir, entry);
20444
20450
  if (entry === "mcp.json") {
20445
20451
  return jsonLooksArgentServerOnly(full, "mcpServers");
20446
20452
  }
@@ -20473,13 +20479,13 @@ function claudeSettingsLooksArgentOnly(filePath) {
20473
20479
  function claudeDirLooksArgentOnly(dir) {
20474
20480
  let entries;
20475
20481
  try {
20476
- entries = fs15.readdirSync(dir);
20482
+ entries = fs16.readdirSync(dir);
20477
20483
  } catch {
20478
20484
  return false;
20479
20485
  }
20480
20486
  if (entries.length === 0) return false;
20481
20487
  return entries.every((entry) => {
20482
- const full = path16.join(dir, entry);
20488
+ const full = path17.join(dir, entry);
20483
20489
  if (entry === "settings.json") return claudeSettingsLooksArgentOnly(full);
20484
20490
  if (entry === "rules" || entry === "agents" || entry === "skills") {
20485
20491
  return managedDirLooksArgentOnly(full, entry);
@@ -20490,25 +20496,25 @@ function claudeDirLooksArgentOnly(dir) {
20490
20496
  function vscodeDirLooksArgentOnly(dir) {
20491
20497
  let entries;
20492
20498
  try {
20493
- entries = fs15.readdirSync(dir);
20499
+ entries = fs16.readdirSync(dir);
20494
20500
  } catch {
20495
20501
  return false;
20496
20502
  }
20497
20503
  if (entries.length === 0) return false;
20498
20504
  return entries.every(
20499
- (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path16.join(dir, entry), "servers")
20505
+ (entry) => entry === "mcp.json" && jsonLooksArgentServerOnly(path17.join(dir, entry), "servers")
20500
20506
  );
20501
20507
  }
20502
20508
  function windsurfDirLooksArgentOnly(dir) {
20503
20509
  let entries;
20504
20510
  try {
20505
- entries = fs15.readdirSync(dir);
20511
+ entries = fs16.readdirSync(dir);
20506
20512
  } catch {
20507
20513
  return false;
20508
20514
  }
20509
20515
  if (entries.length === 0) return false;
20510
20516
  return entries.every(
20511
- (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path16.join(dir, entry), "mcpServers")
20517
+ (entry) => entry === "mcp_config.json" && jsonLooksArgentServerOnly(path17.join(dir, entry), "mcpServers")
20512
20518
  );
20513
20519
  }
20514
20520
  function zedSettingsLooksArgentOnly(filePath) {
@@ -20539,25 +20545,25 @@ function zedSettingsLooksArgentOnly(filePath) {
20539
20545
  function zedDirLooksArgentOnly(dir) {
20540
20546
  let entries;
20541
20547
  try {
20542
- entries = fs15.readdirSync(dir);
20548
+ entries = fs16.readdirSync(dir);
20543
20549
  } catch {
20544
20550
  return false;
20545
20551
  }
20546
20552
  if (entries.length === 0) return false;
20547
20553
  return entries.every(
20548
- (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path16.join(dir, entry))
20554
+ (entry) => entry === "settings.json" && zedSettingsLooksArgentOnly(path17.join(dir, entry))
20549
20555
  );
20550
20556
  }
20551
20557
  function geminiDirLooksArgentOnly(dir) {
20552
20558
  let entries;
20553
20559
  try {
20554
- entries = fs15.readdirSync(dir);
20560
+ entries = fs16.readdirSync(dir);
20555
20561
  } catch {
20556
20562
  return false;
20557
20563
  }
20558
20564
  if (entries.length === 0) return false;
20559
20565
  return entries.every((entry) => {
20560
- const full = path16.join(dir, entry);
20566
+ const full = path17.join(dir, entry);
20561
20567
  if (entry === "settings.json") return jsonLooksArgentServerOnly(full, "mcpServers");
20562
20568
  if (entry === "rules" || entry === "agents") return managedDirLooksArgentOnly(full, entry);
20563
20569
  return false;
@@ -20576,48 +20582,48 @@ function hermesConfigLooksArgentOnly(filePath) {
20576
20582
  function hermesDirLooksArgentOnly(dir) {
20577
20583
  let entries;
20578
20584
  try {
20579
- entries = fs15.readdirSync(dir);
20585
+ entries = fs16.readdirSync(dir);
20580
20586
  } catch {
20581
20587
  return false;
20582
20588
  }
20583
20589
  if (entries.length === 0) return false;
20584
20590
  return entries.every(
20585
- (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path16.join(dir, entry))
20591
+ (entry) => entry === "config.yaml" && hermesConfigLooksArgentOnly(path17.join(dir, entry))
20586
20592
  );
20587
20593
  }
20588
20594
  function kiroDirLooksArgentOnly(dir) {
20589
20595
  let entries;
20590
20596
  try {
20591
- entries = fs15.readdirSync(dir);
20597
+ entries = fs16.readdirSync(dir);
20592
20598
  } catch {
20593
20599
  return false;
20594
20600
  }
20595
20601
  if (entries.length === 0) return false;
20596
20602
  return entries.every((entry) => {
20597
20603
  if (entry !== "settings") return false;
20598
- const settingsDir = path16.join(dir, entry);
20604
+ const settingsDir = path17.join(dir, entry);
20599
20605
  let settingsEntries;
20600
20606
  try {
20601
- settingsEntries = fs15.readdirSync(settingsDir);
20607
+ settingsEntries = fs16.readdirSync(settingsDir);
20602
20608
  } catch {
20603
20609
  return false;
20604
20610
  }
20605
20611
  if (settingsEntries.length === 0) return false;
20606
20612
  return settingsEntries.every(
20607
- (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path16.join(settingsDir, name), "mcpServers")
20613
+ (name) => name === "mcp.json" && jsonLooksArgentServerOnly(path17.join(settingsDir, name), "mcpServers")
20608
20614
  );
20609
20615
  });
20610
20616
  }
20611
20617
  function codexDirLooksArgentOnly(dir) {
20612
20618
  let entries;
20613
20619
  try {
20614
- entries = fs15.readdirSync(dir);
20620
+ entries = fs16.readdirSync(dir);
20615
20621
  } catch {
20616
20622
  return false;
20617
20623
  }
20618
20624
  if (entries.length === 0) return false;
20619
20625
  return entries.every((entry) => {
20620
- const full = path16.join(dir, entry);
20626
+ const full = path17.join(dir, entry);
20621
20627
  if (entry === "config.toml") {
20622
20628
  const config = parseTomlStrict(full);
20623
20629
  if (config === null) return false;
@@ -20644,13 +20650,13 @@ function codexDirLooksArgentOnly(dir) {
20644
20650
  var cursorAdapter = {
20645
20651
  name: "Cursor",
20646
20652
  detect() {
20647
- return dirHasEditorEvidence(path16.join(homedir4(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path16.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
20653
+ return dirHasEditorEvidence(path17.join(homedir4(), ".cursor"), cursorDirLooksArgentOnly) || dirHasEditorEvidence(path17.join(process.cwd(), ".cursor"), cursorDirLooksArgentOnly);
20648
20654
  },
20649
20655
  projectPath(root) {
20650
- return path16.join(root, ".cursor", "mcp.json");
20656
+ return path17.join(root, ".cursor", "mcp.json");
20651
20657
  },
20652
20658
  globalPath() {
20653
- return path16.join(homedir4(), ".cursor", "mcp.json");
20659
+ return path17.join(homedir4(), ".cursor", "mcp.json");
20654
20660
  },
20655
20661
  // Read and written as JSONC through readJsonc / editJsoncFile: path-targeted
20656
20662
  // text edits that preserve user comments and foreign servers.
@@ -20662,7 +20668,7 @@ var cursorAdapter = {
20662
20668
  });
20663
20669
  },
20664
20670
  remove(configPath) {
20665
- if (!fs15.existsSync(configPath)) return false;
20671
+ if (!fs16.existsSync(configPath)) return false;
20666
20672
  const config = readJsonc(configPath);
20667
20673
  const servers = config.mcpServers;
20668
20674
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -20670,7 +20676,7 @@ var cursorAdapter = {
20670
20676
  return true;
20671
20677
  },
20672
20678
  getArgentEntry(configPath) {
20673
- if (!fs15.existsSync(configPath)) return null;
20679
+ if (!fs16.existsSync(configPath)) return null;
20674
20680
  const config = readJsonc(configPath);
20675
20681
  const servers = config.mcpServers;
20676
20682
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -20681,7 +20687,7 @@ var cursorAdapter = {
20681
20687
  // The allowlist lives in a separate ~/.cursor/permissions.json that may carry
20682
20688
  // the user's own rules, so edit that one key instead of rewriting the file.
20683
20689
  addAllowlist() {
20684
- const permPath = path16.join(homedir4(), ".cursor", "permissions.json");
20690
+ const permPath = path17.join(homedir4(), ".cursor", "permissions.json");
20685
20691
  const config = readJsonc(permPath);
20686
20692
  const list = Array.isArray(config.mcpAllowlist) ? config.mcpAllowlist : [];
20687
20693
  if (list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
@@ -20689,8 +20695,8 @@ var cursorAdapter = {
20689
20695
  },
20690
20696
  removeAllowlist(_root, scope) {
20691
20697
  if (scope !== "global") return;
20692
- const permPath = path16.join(homedir4(), ".cursor", "permissions.json");
20693
- if (!fs15.existsSync(permPath)) return;
20698
+ const permPath = path17.join(homedir4(), ".cursor", "permissions.json");
20699
+ if (!fs16.existsSync(permPath)) return;
20694
20700
  const config = readJsonc(permPath);
20695
20701
  const list = Array.isArray(config.mcpAllowlist) ? config.mcpAllowlist : void 0;
20696
20702
  if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
@@ -20701,16 +20707,16 @@ var cursorAdapter = {
20701
20707
  function claudeProjectKeysForRoot(projects, root) {
20702
20708
  const canonical = (value) => {
20703
20709
  try {
20704
- return fs15.realpathSync.native(value);
20710
+ return fs16.realpathSync.native(value);
20705
20711
  } catch {
20706
- return path16.resolve(value);
20712
+ return path17.resolve(value);
20707
20713
  }
20708
20714
  };
20709
20715
  const target = canonical(root);
20710
20716
  return Object.keys(projects).filter((key) => key === root || canonical(key) === target);
20711
20717
  }
20712
20718
  function claudeDisabledListFinding(settingsPath, label, projectConfined) {
20713
- if (!fs15.existsSync(settingsPath)) return null;
20719
+ if (!fs16.existsSync(settingsPath)) return null;
20714
20720
  const disabled = readJson(settingsPath).disabledMcpjsonServers;
20715
20721
  if (!Array.isArray(disabled) || !disabled.includes(MCP_SERVER_KEY)) return null;
20716
20722
  return {
@@ -20738,13 +20744,13 @@ var claudeAdapter = {
20738
20744
  name: "Claude Code",
20739
20745
  detect() {
20740
20746
  const mcpJsonArgentOnly = (p) => jsonLooksArgentServerOnly(p, "mcpServers");
20741
- return fileHasEditorEvidence(path16.join(process.cwd(), ".mcp.json"), mcpJsonArgentOnly) || fileHasEditorEvidence(path16.join(homedir4(), ".claude.json"), mcpJsonArgentOnly) || dirHasEditorEvidence(path16.join(process.cwd(), ".claude"), claudeDirLooksArgentOnly) || dirHasEditorEvidence(path16.join(homedir4(), ".claude"), claudeDirLooksArgentOnly);
20747
+ return fileHasEditorEvidence(path17.join(process.cwd(), ".mcp.json"), mcpJsonArgentOnly) || fileHasEditorEvidence(path17.join(homedir4(), ".claude.json"), mcpJsonArgentOnly) || dirHasEditorEvidence(path17.join(process.cwd(), ".claude"), claudeDirLooksArgentOnly) || dirHasEditorEvidence(path17.join(homedir4(), ".claude"), claudeDirLooksArgentOnly);
20742
20748
  },
20743
20749
  projectPath(root) {
20744
- return path16.join(root, ".mcp.json");
20750
+ return path17.join(root, ".mcp.json");
20745
20751
  },
20746
20752
  globalPath() {
20747
- return path16.join(homedir4(), ".claude.json");
20753
+ return path17.join(homedir4(), ".claude.json");
20748
20754
  },
20749
20755
  // JSONC is a superset of JSON, so this config shares the one comment- and
20750
20756
  // foreign-server-preserving write path (see the Cursor adapter).
@@ -20757,7 +20763,7 @@ var claudeAdapter = {
20757
20763
  });
20758
20764
  },
20759
20765
  remove(configPath) {
20760
- if (!fs15.existsSync(configPath)) return false;
20766
+ if (!fs16.existsSync(configPath)) return false;
20761
20767
  const config = readJsonc(configPath);
20762
20768
  const servers = config.mcpServers;
20763
20769
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -20771,7 +20777,7 @@ var claudeAdapter = {
20771
20777
  return true;
20772
20778
  },
20773
20779
  getArgentEntry(configPath) {
20774
- if (!fs15.existsSync(configPath)) return null;
20780
+ if (!fs16.existsSync(configPath)) return null;
20775
20781
  const config = readJsonc(configPath);
20776
20782
  const servers = config.mcpServers;
20777
20783
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -20784,7 +20790,7 @@ var claudeAdapter = {
20784
20790
  // .mcp.json rejections (see claudeDisabledListFinding).
20785
20791
  findShadowingConfigs(root, writtenScope) {
20786
20792
  const findings = [];
20787
- const claudeJsonPath = path16.join(homedir4(), ".claude.json");
20793
+ const claudeJsonPath = path17.join(homedir4(), ".claude.json");
20788
20794
  const projects = readJson(claudeJsonPath).projects;
20789
20795
  if (isRecord(projects)) {
20790
20796
  for (const key of claudeProjectKeysForRoot(projects, root)) {
@@ -20821,9 +20827,9 @@ var claudeAdapter = {
20821
20827
  }
20822
20828
  if (writtenScope === "local") {
20823
20829
  const candidates = [
20824
- [path16.join(root, ".claude", "settings.json"), ".claude/settings.json", true],
20825
- [path16.join(root, ".claude", "settings.local.json"), ".claude/settings.local.json", true],
20826
- [path16.join(homedir4(), ".claude", "settings.json"), "~/.claude/settings.json", false]
20830
+ [path17.join(root, ".claude", "settings.json"), ".claude/settings.json", true],
20831
+ [path17.join(root, ".claude", "settings.local.json"), ".claude/settings.local.json", true],
20832
+ [path17.join(homedir4(), ".claude", "settings.json"), "~/.claude/settings.json", false]
20827
20833
  ];
20828
20834
  for (const [settingsPath, label, projectConfined] of candidates) {
20829
20835
  const finding = claudeDisabledListFinding(settingsPath, label, projectConfined);
@@ -20842,10 +20848,10 @@ var claudeAdapter = {
20842
20848
  var vscodeAdapter = {
20843
20849
  name: "VS Code",
20844
20850
  detect() {
20845
- return dirHasEditorEvidence(path16.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path16.join(homedir4(), ".vscode"));
20851
+ return dirHasEditorEvidence(path17.join(process.cwd(), ".vscode"), vscodeDirLooksArgentOnly) || dirExists(path17.join(homedir4(), ".vscode"));
20846
20852
  },
20847
20853
  projectPath(root) {
20848
- return path16.join(root, ".vscode", "mcp.json");
20854
+ return path17.join(root, ".vscode", "mcp.json");
20849
20855
  },
20850
20856
  globalPath() {
20851
20857
  return null;
@@ -20861,7 +20867,7 @@ var vscodeAdapter = {
20861
20867
  });
20862
20868
  },
20863
20869
  remove(configPath) {
20864
- if (!fs15.existsSync(configPath)) return false;
20870
+ if (!fs16.existsSync(configPath)) return false;
20865
20871
  const config = readJsonc(configPath);
20866
20872
  const servers = config.servers;
20867
20873
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -20869,7 +20875,7 @@ var vscodeAdapter = {
20869
20875
  return true;
20870
20876
  },
20871
20877
  getArgentEntry(configPath) {
20872
- if (!fs15.existsSync(configPath)) return null;
20878
+ if (!fs16.existsSync(configPath)) return null;
20873
20879
  const config = readJsonc(configPath);
20874
20880
  const servers = config.servers;
20875
20881
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -20882,7 +20888,7 @@ var vscodeAdapter = {
20882
20888
  findShadowingConfigs(_root, _writtenScope) {
20883
20889
  const findings = [];
20884
20890
  for (const userDir of vscodeUserDirs()) {
20885
- const configPath = path16.join(userDir, "mcp.json");
20891
+ const configPath = path17.join(userDir, "mcp.json");
20886
20892
  const entry = this.getArgentEntry(configPath);
20887
20893
  if (!entry) continue;
20888
20894
  findings.push({
@@ -20899,16 +20905,16 @@ var vscodeAdapter = {
20899
20905
  function vscodeUserDirs() {
20900
20906
  const bases = [];
20901
20907
  if (process.platform === "darwin") {
20902
- bases.push(path16.join(homedir4(), "Library", "Application Support"));
20908
+ bases.push(path17.join(homedir4(), "Library", "Application Support"));
20903
20909
  } else if (process.platform === "win32") {
20904
20910
  if (process.env.APPDATA) bases.push(process.env.APPDATA);
20905
20911
  } else {
20906
- bases.push(path16.join(homedir4(), ".config"));
20912
+ bases.push(path17.join(homedir4(), ".config"));
20907
20913
  }
20908
20914
  const dirs = [];
20909
20915
  for (const base of bases) {
20910
20916
  for (const product of ["Code", "Code - Insiders"]) {
20911
- const dir = path16.join(base, product, "User");
20917
+ const dir = path17.join(base, product, "User");
20912
20918
  if (dirExists(dir)) dirs.push(dir);
20913
20919
  }
20914
20920
  }
@@ -20918,7 +20924,7 @@ var windsurfAdapter = {
20918
20924
  name: "Windsurf",
20919
20925
  detect() {
20920
20926
  return dirHasEditorEvidence(
20921
- path16.join(homedir4(), ".codeium", "windsurf"),
20927
+ path17.join(homedir4(), ".codeium", "windsurf"),
20922
20928
  windsurfDirLooksArgentOnly
20923
20929
  );
20924
20930
  },
@@ -20926,7 +20932,7 @@ var windsurfAdapter = {
20926
20932
  return null;
20927
20933
  },
20928
20934
  globalPath() {
20929
- return path16.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20935
+ return path17.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20930
20936
  },
20931
20937
  // JSONC-safe writes (see the Cursor adapter).
20932
20938
  write(configPath, entry) {
@@ -20937,7 +20943,7 @@ var windsurfAdapter = {
20937
20943
  });
20938
20944
  },
20939
20945
  remove(configPath) {
20940
- if (!fs15.existsSync(configPath)) return false;
20946
+ if (!fs16.existsSync(configPath)) return false;
20941
20947
  const config = readJsonc(configPath);
20942
20948
  const servers = config.mcpServers;
20943
20949
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -20945,7 +20951,7 @@ var windsurfAdapter = {
20945
20951
  return true;
20946
20952
  },
20947
20953
  getArgentEntry(configPath) {
20948
- if (!fs15.existsSync(configPath)) return null;
20954
+ if (!fs16.existsSync(configPath)) return null;
20949
20955
  const config = readJsonc(configPath);
20950
20956
  const servers = config.mcpServers;
20951
20957
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -20956,7 +20962,7 @@ var windsurfAdapter = {
20956
20962
  // Targets just the argent entry's alwaysAllow key, so comments and foreign
20957
20963
  // servers survive.
20958
20964
  addAllowlist() {
20959
- const configPath = path16.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20965
+ const configPath = path17.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20960
20966
  const config = readJsonc(configPath);
20961
20967
  const servers = config.mcpServers;
20962
20968
  if (!servers?.[MCP_SERVER_KEY]) return;
@@ -20964,8 +20970,8 @@ var windsurfAdapter = {
20964
20970
  },
20965
20971
  removeAllowlist(_root, scope) {
20966
20972
  if (scope !== "global") return;
20967
- const configPath = path16.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20968
- if (!fs15.existsSync(configPath)) return;
20973
+ const configPath = path17.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
20974
+ if (!fs16.existsSync(configPath)) return;
20969
20975
  const config = readJsonc(configPath);
20970
20976
  const servers = config.mcpServers;
20971
20977
  const entry = servers?.[MCP_SERVER_KEY];
@@ -20976,13 +20982,13 @@ var windsurfAdapter = {
20976
20982
  var zedAdapter = {
20977
20983
  name: "Zed",
20978
20984
  detect() {
20979
- return dirHasEditorEvidence(path16.join(homedir4(), ".config", "zed"), zedDirLooksArgentOnly);
20985
+ return dirHasEditorEvidence(path17.join(homedir4(), ".config", "zed"), zedDirLooksArgentOnly);
20980
20986
  },
20981
20987
  projectPath(root) {
20982
- return path16.join(root, ".zed", "settings.json");
20988
+ return path17.join(root, ".zed", "settings.json");
20983
20989
  },
20984
20990
  globalPath() {
20985
- return path16.join(homedir4(), ".config", "zed", "settings.json");
20991
+ return path17.join(homedir4(), ".config", "zed", "settings.json");
20986
20992
  },
20987
20993
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
20988
20994
  // formatting outside the touched key survive (see the Cursor adapter).
@@ -20995,7 +21001,7 @@ var zedAdapter = {
20995
21001
  });
20996
21002
  },
20997
21003
  remove(configPath) {
20998
- if (!fs15.existsSync(configPath)) return false;
21004
+ if (!fs16.existsSync(configPath)) return false;
20999
21005
  const config = readJsonc(configPath);
21000
21006
  const servers = config.context_servers;
21001
21007
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21003,7 +21009,7 @@ var zedAdapter = {
21003
21009
  return true;
21004
21010
  },
21005
21011
  getArgentEntry(configPath) {
21006
- if (!fs15.existsSync(configPath)) return null;
21012
+ if (!fs16.existsSync(configPath)) return null;
21007
21013
  const config = readJsonc(configPath);
21008
21014
  const servers = config.context_servers;
21009
21015
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21014,12 +21020,12 @@ var zedAdapter = {
21014
21020
  // Zed has no server-level wildcard for MCP tools — each tool would need its
21015
21021
  // own entry — so the global default is set to "allow" instead.
21016
21022
  addAllowlist(root, scope) {
21017
- const settingsPath = scope === "global" ? path16.join(homedir4(), ".config", "zed", "settings.json") : path16.join(root, ".zed", "settings.json");
21023
+ const settingsPath = scope === "global" ? path17.join(homedir4(), ".config", "zed", "settings.json") : path17.join(root, ".zed", "settings.json");
21018
21024
  editJsoncFile(settingsPath, ["agent", "tool_permissions", "default"], "allow");
21019
21025
  },
21020
21026
  removeAllowlist(root, scope) {
21021
- const settingsPath = scope === "global" ? path16.join(homedir4(), ".config", "zed", "settings.json") : path16.join(root, ".zed", "settings.json");
21022
- if (!fs15.existsSync(settingsPath)) return;
21027
+ const settingsPath = scope === "global" ? path17.join(homedir4(), ".config", "zed", "settings.json") : path17.join(root, ".zed", "settings.json");
21028
+ if (!fs16.existsSync(settingsPath)) return;
21023
21029
  const config = readJsonc(settingsPath);
21024
21030
  const perms = config.agent?.tool_permissions;
21025
21031
  if (!perms || perms.default !== "allow") return;
@@ -21029,13 +21035,13 @@ var zedAdapter = {
21029
21035
  var geminiAdapter = {
21030
21036
  name: "Gemini",
21031
21037
  detect() {
21032
- return dirHasEditorEvidence(path16.join(homedir4(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path16.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21038
+ return dirHasEditorEvidence(path17.join(homedir4(), ".gemini"), geminiDirLooksArgentOnly) || dirHasEditorEvidence(path17.join(process.cwd(), ".gemini"), geminiDirLooksArgentOnly);
21033
21039
  },
21034
21040
  projectPath(root) {
21035
- return path16.join(root, ".gemini", "settings.json");
21041
+ return path17.join(root, ".gemini", "settings.json");
21036
21042
  },
21037
21043
  globalPath() {
21038
- return path16.join(homedir4(), ".gemini", "settings.json");
21044
+ return path17.join(homedir4(), ".gemini", "settings.json");
21039
21045
  },
21040
21046
  // JSONC-safe writes (see the Cursor adapter).
21041
21047
  write(configPath, entry) {
@@ -21046,7 +21052,7 @@ var geminiAdapter = {
21046
21052
  });
21047
21053
  },
21048
21054
  remove(configPath) {
21049
- if (!fs15.existsSync(configPath)) return false;
21055
+ if (!fs16.existsSync(configPath)) return false;
21050
21056
  const config = readJsonc(configPath);
21051
21057
  const servers = config.mcpServers;
21052
21058
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21054,7 +21060,7 @@ var geminiAdapter = {
21054
21060
  return true;
21055
21061
  },
21056
21062
  getArgentEntry(configPath) {
21057
- if (!fs15.existsSync(configPath)) return null;
21063
+ if (!fs16.existsSync(configPath)) return null;
21058
21064
  const config = readJsonc(configPath);
21059
21065
  const servers = config.mcpServers;
21060
21066
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21076,7 +21082,7 @@ var geminiAdapter = {
21076
21082
  },
21077
21083
  removeAllowlist(root, scope) {
21078
21084
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
21079
- if (!configPath || !fs15.existsSync(configPath)) {
21085
+ if (!configPath || !fs16.existsSync(configPath)) {
21080
21086
  return;
21081
21087
  }
21082
21088
  const config = readJsonc(configPath);
@@ -21090,13 +21096,13 @@ var CODEX_FILENAME = ".codex";
21090
21096
  var codexAdapter = {
21091
21097
  name: "Codex",
21092
21098
  detect() {
21093
- return dirHasEditorEvidence(path16.join(homedir4(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path16.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
21099
+ return dirHasEditorEvidence(path17.join(homedir4(), CODEX_FILENAME), codexDirLooksArgentOnly) || dirHasEditorEvidence(path17.join(process.cwd(), CODEX_FILENAME), codexDirLooksArgentOnly);
21094
21100
  },
21095
21101
  projectPath(root) {
21096
- return path16.join(root, CODEX_FILENAME, "config.toml");
21102
+ return path17.join(root, CODEX_FILENAME, "config.toml");
21097
21103
  },
21098
21104
  globalPath() {
21099
- return path16.join(homedir4(), CODEX_FILENAME, "config.toml");
21105
+ return path17.join(homedir4(), CODEX_FILENAME, "config.toml");
21100
21106
  },
21101
21107
  write(configPath, entry) {
21102
21108
  const config = readToml(configPath);
@@ -21110,7 +21116,7 @@ var codexAdapter = {
21110
21116
  writeToml(configPath, config);
21111
21117
  },
21112
21118
  remove(configPath) {
21113
- if (!fs15.existsSync(configPath)) return false;
21119
+ if (!fs16.existsSync(configPath)) return false;
21114
21120
  const config = readToml(configPath);
21115
21121
  const servers = config.mcp_servers;
21116
21122
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21120,7 +21126,7 @@ var codexAdapter = {
21120
21126
  return true;
21121
21127
  },
21122
21128
  getArgentEntry(configPath) {
21123
- if (!fs15.existsSync(configPath)) return null;
21129
+ if (!fs16.existsSync(configPath)) return null;
21124
21130
  const config = readToml(configPath);
21125
21131
  const servers = config.mcp_servers;
21126
21132
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21168,13 +21174,13 @@ var codexAdapter = {
21168
21174
  var hermesAdapter = {
21169
21175
  name: "Hermes",
21170
21176
  detect() {
21171
- return dirHasEditorEvidence(path16.join(homedir4(), ".hermes"), hermesDirLooksArgentOnly);
21177
+ return dirHasEditorEvidence(path17.join(homedir4(), ".hermes"), hermesDirLooksArgentOnly);
21172
21178
  },
21173
21179
  projectPath() {
21174
21180
  return null;
21175
21181
  },
21176
21182
  globalPath() {
21177
- return path16.join(homedir4(), ".hermes", "config.yaml");
21183
+ return path17.join(homedir4(), ".hermes", "config.yaml");
21178
21184
  },
21179
21185
  write(configPath, entry) {
21180
21186
  const doc = readYaml(configPath);
@@ -21193,7 +21199,7 @@ var hermesAdapter = {
21193
21199
  writeYaml(configPath, doc);
21194
21200
  },
21195
21201
  remove(configPath) {
21196
- if (!fs15.existsSync(configPath)) return false;
21202
+ if (!fs16.existsSync(configPath)) return false;
21197
21203
  const doc = readYaml(configPath);
21198
21204
  const servers = doc.get("mcp_servers");
21199
21205
  if (!(0, import_yaml2.isMap)(servers)) return false;
@@ -21206,7 +21212,7 @@ var hermesAdapter = {
21206
21212
  return true;
21207
21213
  },
21208
21214
  getArgentEntry(configPath) {
21209
- if (!fs15.existsSync(configPath)) return null;
21215
+ if (!fs16.existsSync(configPath)) return null;
21210
21216
  const doc = readYaml(configPath);
21211
21217
  const servers = doc.get("mcp_servers");
21212
21218
  if (!(0, import_yaml2.isMap)(servers)) return null;
@@ -21233,10 +21239,10 @@ function hasOpenCodeBinary() {
21233
21239
  }
21234
21240
  function pickOpencodeConfig(dir, candidates) {
21235
21241
  for (const name of candidates) {
21236
- const candidate = path16.join(dir, name);
21237
- if (fs15.existsSync(candidate)) return candidate;
21242
+ const candidate = path17.join(dir, name);
21243
+ if (fs16.existsSync(candidate)) return candidate;
21238
21244
  }
21239
- return path16.join(dir, "opencode.json");
21245
+ return path17.join(dir, "opencode.json");
21240
21246
  }
21241
21247
  var openCodeAdapter = {
21242
21248
  name: "opencode",
@@ -21247,7 +21253,7 @@ var openCodeAdapter = {
21247
21253
  return pickOpencodeConfig(root, OPENCODE_PROJECT_FILES);
21248
21254
  },
21249
21255
  globalPath() {
21250
- return pickOpencodeConfig(path16.join(homedir4(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
21256
+ return pickOpencodeConfig(path17.join(homedir4(), ".config", "opencode"), OPENCODE_GLOBAL_FILES);
21251
21257
  },
21252
21258
  write(configPath, entry) {
21253
21259
  editJsoncFile(configPath, ["mcp", MCP_SERVER_KEY], {
@@ -21258,7 +21264,7 @@ var openCodeAdapter = {
21258
21264
  });
21259
21265
  },
21260
21266
  remove(configPath) {
21261
- if (!fs15.existsSync(configPath)) return false;
21267
+ if (!fs16.existsSync(configPath)) return false;
21262
21268
  const config = readJsonc(configPath);
21263
21269
  const servers = config.mcp;
21264
21270
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21266,7 +21272,7 @@ var openCodeAdapter = {
21266
21272
  return true;
21267
21273
  },
21268
21274
  getArgentEntry(configPath) {
21269
- if (!fs15.existsSync(configPath)) return null;
21275
+ if (!fs16.existsSync(configPath)) return null;
21270
21276
  const config = readJsonc(configPath);
21271
21277
  const servers = config.mcp;
21272
21278
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21281,7 +21287,7 @@ var openCodeAdapter = {
21281
21287
  },
21282
21288
  removeAllowlist(root, scope) {
21283
21289
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
21284
- if (!configPath || !fs15.existsSync(configPath)) return;
21290
+ if (!configPath || !fs16.existsSync(configPath)) return;
21285
21291
  const config = readJsonc(configPath);
21286
21292
  const tools = config.tools;
21287
21293
  if (!tools || !(OPENCODE_ALLOWLIST_PATTERN in tools)) return;
@@ -21292,13 +21298,13 @@ var KIRO_AUTO_APPROVE_ALL = ["*"];
21292
21298
  var kiroAdapter = {
21293
21299
  name: "Kiro",
21294
21300
  detect() {
21295
- return dirHasEditorEvidence(path16.join(homedir4(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path16.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
21301
+ return dirHasEditorEvidence(path17.join(homedir4(), ".kiro"), kiroDirLooksArgentOnly) || dirHasEditorEvidence(path17.join(process.cwd(), ".kiro"), kiroDirLooksArgentOnly);
21296
21302
  },
21297
21303
  projectPath(root) {
21298
- return path16.join(root, ".kiro", "settings", "mcp.json");
21304
+ return path17.join(root, ".kiro", "settings", "mcp.json");
21299
21305
  },
21300
21306
  globalPath() {
21301
- return path16.join(homedir4(), ".kiro", "settings", "mcp.json");
21307
+ return path17.join(homedir4(), ".kiro", "settings", "mcp.json");
21302
21308
  },
21303
21309
  // Read and written as JSONC through readJsonc / editJsoncFile so comments and
21304
21310
  // foreign servers survive (see the Cursor adapter).
@@ -21310,7 +21316,7 @@ var kiroAdapter = {
21310
21316
  });
21311
21317
  },
21312
21318
  remove(configPath) {
21313
- if (!fs15.existsSync(configPath)) return false;
21319
+ if (!fs16.existsSync(configPath)) return false;
21314
21320
  const config = readJsonc(configPath);
21315
21321
  const servers = config.mcpServers;
21316
21322
  if (!servers?.[MCP_SERVER_KEY]) return false;
@@ -21318,7 +21324,7 @@ var kiroAdapter = {
21318
21324
  return true;
21319
21325
  },
21320
21326
  getArgentEntry(configPath) {
21321
- if (!fs15.existsSync(configPath)) return null;
21327
+ if (!fs16.existsSync(configPath)) return null;
21322
21328
  const config = readJsonc(configPath);
21323
21329
  const servers = config.mcpServers;
21324
21330
  return normalizeServerEntry(servers?.[MCP_SERVER_KEY]);
@@ -21342,7 +21348,7 @@ var kiroAdapter = {
21342
21348
  },
21343
21349
  removeAllowlist(root, scope) {
21344
21350
  const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
21345
- if (!configPath || !fs15.existsSync(configPath)) return;
21351
+ if (!configPath || !fs16.existsSync(configPath)) return;
21346
21352
  const config = readJsonc(configPath);
21347
21353
  const servers = config.mcpServers;
21348
21354
  const entry = servers?.[MCP_SERVER_KEY];
@@ -21387,7 +21393,7 @@ function findConfiguredAdapterScopes(adapters, projectRoot) {
21387
21393
  return results;
21388
21394
  }
21389
21395
  function addClaudePermission(root, scope) {
21390
- const settingsPath = scope === "global" ? path16.join(homedir4(), ".claude", "settings.json") : path16.join(root, ".claude", "settings.json");
21396
+ const settingsPath = scope === "global" ? path17.join(homedir4(), ".claude", "settings.json") : path17.join(root, ".claude", "settings.json");
21391
21397
  const config = readJsonc(settingsPath);
21392
21398
  const permissions = config.permissions ?? {};
21393
21399
  const allow = Array.isArray(permissions.allow) ? permissions.allow : [];
@@ -21395,8 +21401,8 @@ function addClaudePermission(root, scope) {
21395
21401
  editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, PERMISSION_RULE]);
21396
21402
  }
21397
21403
  function removeClaudePermission(root, scope) {
21398
- const settingsPath = scope === "global" ? path16.join(homedir4(), ".claude", "settings.json") : path16.join(root, ".claude", "settings.json");
21399
- if (!fs15.existsSync(settingsPath)) return;
21404
+ const settingsPath = scope === "global" ? path17.join(homedir4(), ".claude", "settings.json") : path17.join(root, ".claude", "settings.json");
21405
+ if (!fs16.existsSync(settingsPath)) return;
21400
21406
  const config = readJsonc(settingsPath);
21401
21407
  const permissions = config?.permissions;
21402
21408
  const allow = permissions?.allow;
@@ -21411,11 +21417,11 @@ function formatCopyDestination(target, writtenPath, root) {
21411
21417
  }
21412
21418
  function formatManagedPathLabel(targetPath, root) {
21413
21419
  const home = homedir4();
21414
- if (targetPath === home || targetPath.startsWith(`${home}${path16.sep}`)) {
21420
+ if (targetPath === home || targetPath.startsWith(`${home}${path17.sep}`)) {
21415
21421
  return `~${targetPath.slice(home.length)}`;
21416
21422
  }
21417
- const relative5 = path16.relative(root, targetPath);
21418
- if (relative5 && !relative5.startsWith("..") && !path16.isAbsolute(relative5)) {
21423
+ const relative5 = path17.relative(root, targetPath);
21424
+ if (relative5 && !relative5.startsWith("..") && !path17.isAbsolute(relative5)) {
21419
21425
  return relative5;
21420
21426
  }
21421
21427
  return targetPath;
@@ -21429,7 +21435,7 @@ function addManagedTarget(targets, editorName, targetPath, root) {
21429
21435
  }
21430
21436
  function getAdapterBasePath(adapter, root, scope) {
21431
21437
  const configPath = scope === "global" ? adapter.globalPath() : adapter.projectPath(root);
21432
- return configPath ? path16.dirname(configPath) : null;
21438
+ return configPath ? path17.dirname(configPath) : null;
21433
21439
  }
21434
21440
  function getManagedContentTargets(adapters, root, scope) {
21435
21441
  const targets = {
@@ -21443,13 +21449,13 @@ function getManagedContentTargets(adapters, root, scope) {
21443
21449
  addManagedTarget(
21444
21450
  targets.skillTargets,
21445
21451
  "skills",
21446
- path16.join(workspaceBase, ".agents", "skills"),
21452
+ path17.join(workspaceBase, ".agents", "skills"),
21447
21453
  root
21448
21454
  );
21449
21455
  addManagedTarget(
21450
21456
  targets.skillsLockTargets,
21451
21457
  "skills",
21452
- path16.join(workspaceBase, "skills-lock.json"),
21458
+ path17.join(workspaceBase, "skills-lock.json"),
21453
21459
  root
21454
21460
  );
21455
21461
  for (const adapter of adapters) {
@@ -21457,21 +21463,21 @@ function getManagedContentTargets(adapters, root, scope) {
21457
21463
  case "Cursor": {
21458
21464
  const base = getAdapterBasePath(adapter, root, scope);
21459
21465
  if (!base) break;
21460
- addManagedTarget(targets.skillTargets, adapter.name, path16.join(base, "skills"), root);
21461
- addManagedTarget(targets.ruleTargets, adapter.name, path16.join(base, "rules"), root);
21466
+ addManagedTarget(targets.skillTargets, adapter.name, path17.join(base, "skills"), root);
21467
+ addManagedTarget(targets.ruleTargets, adapter.name, path17.join(base, "rules"), root);
21462
21468
  break;
21463
21469
  }
21464
21470
  case "Claude Code": {
21465
- const claudeBase = scope === "global" ? path16.join(homedir4(), ".claude") : path16.join(root, ".claude");
21466
- addManagedTarget(targets.skillTargets, adapter.name, path16.join(claudeBase, "skills"), root);
21467
- addManagedTarget(targets.ruleTargets, adapter.name, path16.join(claudeBase, "rules"), root);
21468
- addManagedTarget(targets.agentTargets, adapter.name, path16.join(claudeBase, "agents"), root);
21471
+ const claudeBase = scope === "global" ? path17.join(homedir4(), ".claude") : path17.join(root, ".claude");
21472
+ addManagedTarget(targets.skillTargets, adapter.name, path17.join(claudeBase, "skills"), root);
21473
+ addManagedTarget(targets.ruleTargets, adapter.name, path17.join(claudeBase, "rules"), root);
21474
+ addManagedTarget(targets.agentTargets, adapter.name, path17.join(claudeBase, "agents"), root);
21469
21475
  break;
21470
21476
  }
21471
21477
  case "Gemini": {
21472
- const geminiBase = scope === "global" ? path16.join(homedir4(), ".gemini") : path16.join(root, ".gemini");
21473
- addManagedTarget(targets.ruleTargets, adapter.name, path16.join(geminiBase, "rules"), root);
21474
- addManagedTarget(targets.agentTargets, adapter.name, path16.join(geminiBase, "agents"), root);
21478
+ const geminiBase = scope === "global" ? path17.join(homedir4(), ".gemini") : path17.join(root, ".gemini");
21479
+ addManagedTarget(targets.ruleTargets, adapter.name, path17.join(geminiBase, "rules"), root);
21480
+ addManagedTarget(targets.agentTargets, adapter.name, path17.join(geminiBase, "agents"), root);
21475
21481
  break;
21476
21482
  }
21477
21483
  case "Codex": {
@@ -21481,9 +21487,9 @@ function getManagedContentTargets(adapters, root, scope) {
21481
21487
  break;
21482
21488
  }
21483
21489
  case "opencode": {
21484
- const base = scope === "global" ? path16.join(homedir4(), ".config", "opencode") : path16.join(root, ".opencode");
21485
- addManagedTarget(targets.skillTargets, adapter.name, path16.join(base, "skills"), root);
21486
- addManagedTarget(targets.agentTargets, adapter.name, path16.join(base, "agents"), root);
21490
+ const base = scope === "global" ? path17.join(homedir4(), ".config", "opencode") : path17.join(root, ".opencode");
21491
+ addManagedTarget(targets.skillTargets, adapter.name, path17.join(base, "skills"), root);
21492
+ addManagedTarget(targets.agentTargets, adapter.name, path17.join(base, "agents"), root);
21487
21493
  break;
21488
21494
  }
21489
21495
  }
@@ -21497,12 +21503,12 @@ function stripFrontmatter(content) {
21497
21503
  return match ? content.slice(match[0].length).trim() : content.trim();
21498
21504
  }
21499
21505
  function readAndConcatRules(rulesDir) {
21500
- if (!fs15.existsSync(rulesDir)) return null;
21501
- const files = fs15.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
21506
+ if (!fs16.existsSync(rulesDir)) return null;
21507
+ const files = fs16.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
21502
21508
  if (files.length === 0) return null;
21503
21509
  const parts = [];
21504
21510
  for (const file of files) {
21505
- const raw = fs15.readFileSync(path16.join(rulesDir, file), "utf8");
21511
+ const raw = fs16.readFileSync(path17.join(rulesDir, file), "utf8");
21506
21512
  const stripped = stripFrontmatter(raw);
21507
21513
  if (stripped) parts.push(stripped);
21508
21514
  }
@@ -21537,7 +21543,7 @@ function injectCodexRules(configPath, rulesDir) {
21537
21543
  return configPath;
21538
21544
  }
21539
21545
  function removeCodexRules(configPath) {
21540
- if (!fs15.existsSync(configPath)) return false;
21546
+ if (!fs16.existsSync(configPath)) return false;
21541
21547
  const config = readToml(configPath);
21542
21548
  const existing = config.developer_instructions;
21543
21549
  if (!existing || !existing.includes(ARGENT_RULES_START)) return false;
@@ -21588,14 +21594,14 @@ function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
21588
21594
 
21589
21595
  // ../argent-installer/src/cli-record.ts
21590
21596
  var import_semver4 = __toESM(require_semver2(), 1);
21591
- import * as fs16 from "node:fs";
21592
- import * as path17 from "node:path";
21597
+ import * as fs17 from "node:fs";
21598
+ import * as path18 from "node:path";
21593
21599
  function cliRecordPath() {
21594
- return path17.join(argentHomeDir(), "cli.json");
21600
+ return path18.join(argentHomeDir(), "cli.json");
21595
21601
  }
21596
21602
  function readCliRecord() {
21597
21603
  try {
21598
- const parsed = JSON.parse(fs16.readFileSync(cliRecordPath(), "utf8"));
21604
+ const parsed = JSON.parse(fs17.readFileSync(cliRecordPath(), "utf8"));
21599
21605
  if (typeof parsed?.cli === "string" && typeof parsed?.node === "string") return parsed;
21600
21606
  return null;
21601
21607
  } catch {
@@ -21605,14 +21611,14 @@ function readCliRecord() {
21605
21611
  function resolveCliEntry(mode, projectRoot) {
21606
21612
  if (mode === "local") {
21607
21613
  const relative5 = getLocalArgentBinRelPath(projectRoot);
21608
- return relative5 ? path17.resolve(projectRoot, relative5) : null;
21614
+ return relative5 ? path18.resolve(projectRoot, relative5) : null;
21609
21615
  }
21610
21616
  const packageRoot = getGloballyInstalledPackageRoot();
21611
21617
  if (!packageRoot) return null;
21612
21618
  const binSub = argentBinSubpath(packageRoot);
21613
21619
  if (!binSub) return null;
21614
- const entry = path17.join(packageRoot, binSub);
21615
- return fs16.existsSync(entry) ? entry : null;
21620
+ const entry = path18.join(packageRoot, binSub);
21621
+ return fs17.existsSync(entry) ? entry : null;
21616
21622
  }
21617
21623
  function writeCliRecord(input) {
21618
21624
  const cli = resolveCliEntry(input.mode, input.projectRoot);
@@ -21628,10 +21634,10 @@ function writeCliRecord(input) {
21628
21634
  function persistCliRecord(record) {
21629
21635
  const file = cliRecordPath();
21630
21636
  try {
21631
- fs16.mkdirSync(path17.dirname(file), { recursive: true });
21637
+ fs17.mkdirSync(path18.dirname(file), { recursive: true });
21632
21638
  const temporary = `${file}.${process.pid}.tmp`;
21633
- fs16.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
21634
- fs16.renameSync(temporary, file);
21639
+ fs17.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
21640
+ fs17.renameSync(temporary, file);
21635
21641
  return file;
21636
21642
  } catch {
21637
21643
  return null;
@@ -21639,10 +21645,10 @@ function persistCliRecord(record) {
21639
21645
  }
21640
21646
  function healCliRecord(input) {
21641
21647
  try {
21642
- if (!fs16.existsSync(input.cli)) return null;
21648
+ if (!fs17.existsSync(input.cli)) return null;
21643
21649
  const existing = readCliRecord();
21644
21650
  if (existing) {
21645
- const alive = fs16.existsSync(existing.node) && fs16.existsSync(existing.cli);
21651
+ const alive = fs17.existsSync(existing.node) && fs17.existsSync(existing.cli);
21646
21652
  const ourVersion = import_semver4.default.valid(input.version);
21647
21653
  const theirVersion = import_semver4.default.valid(existing.version);
21648
21654
  const newerThanExisting = ourVersion !== null && (theirVersion === null || import_semver4.default.gt(ourVersion, theirVersion));
@@ -21663,11 +21669,11 @@ function removeCliRecordFor(installDir) {
21663
21669
  if (!installDir) return false;
21664
21670
  const record = readCliRecord();
21665
21671
  if (!record) return false;
21666
- const root = path17.resolve(installDir);
21667
- const relative5 = path17.relative(root, path17.resolve(record.cli));
21668
- if (relative5.startsWith("..") || path17.isAbsolute(relative5)) return false;
21672
+ const root = path18.resolve(installDir);
21673
+ const relative5 = path18.relative(root, path18.resolve(record.cli));
21674
+ if (relative5.startsWith("..") || path18.isAbsolute(relative5)) return false;
21669
21675
  try {
21670
- fs16.rmSync(cliRecordPath(), { force: true });
21676
+ fs17.rmSync(cliRecordPath(), { force: true });
21671
21677
  return true;
21672
21678
  } catch {
21673
21679
  return false;
@@ -21912,7 +21918,7 @@ var ShellCommandError = class extends Error {
21912
21918
  signal;
21913
21919
  };
21914
21920
  function runShellCommand(cmd, opts = {}) {
21915
- return new Promise((resolve15, reject) => {
21921
+ return new Promise((resolve16, reject) => {
21916
21922
  const child = spawn2(cmd.bin, cmd.args, {
21917
21923
  stdio: ["ignore", "pipe", "pipe"],
21918
21924
  shell: process.platform === "win32",
@@ -21923,7 +21929,7 @@ function runShellCommand(cmd, opts = {}) {
21923
21929
  stderr += chunk.toString();
21924
21930
  });
21925
21931
  child.on("close", (code, signal) => {
21926
- if (code === 0) resolve15();
21932
+ if (code === 0) resolve16();
21927
21933
  else
21928
21934
  reject(
21929
21935
  new ShellCommandError(
@@ -22800,7 +22806,7 @@ async function runSkillsStep(args) {
22800
22806
  return skillsMethod;
22801
22807
  }
22802
22808
  function runNpxSkills(args, interactive, cwd) {
22803
- return new Promise((resolve15, reject) => {
22809
+ return new Promise((resolve16, reject) => {
22804
22810
  const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
22805
22811
  const child = spawn3(npxCmd, args, {
22806
22812
  stdio: interactive ? "inherit" : ["ignore", "pipe", "pipe"],
@@ -22819,7 +22825,7 @@ function runNpxSkills(args, interactive, cwd) {
22819
22825
  }
22820
22826
  child.on("close", (code) => {
22821
22827
  if (code === 0) {
22822
- resolve15();
22828
+ resolve16();
22823
22829
  } else {
22824
22830
  const output = [stderr, stdout2].filter(Boolean).join("\n").trim();
22825
22831
  reject(new Error(output || `npx skills exited with code ${code}`));
@@ -23104,7 +23110,7 @@ function printBanner() {
23104
23110
  // ../argent-installer/src/update.ts
23105
23111
  var import_picocolors11 = __toESM(require_picocolors(), 1);
23106
23112
  var import_semver5 = __toESM(require_semver2(), 1);
23107
- import * as path21 from "node:path";
23113
+ import * as path24 from "node:path";
23108
23114
 
23109
23115
  // ../argent-installer/src/update-target.ts
23110
23116
  var import_update_core = __toESM(require_dist2(), 1);
@@ -23123,17 +23129,17 @@ async function resolveInstallableUpdateTarget(pm, current) {
23123
23129
 
23124
23130
  // ../argent-tools-client/src/launcher.ts
23125
23131
  import * as net from "node:net";
23126
- import * as fs17 from "node:fs";
23127
- import * as path18 from "node:path";
23132
+ import * as fs18 from "node:fs";
23133
+ import * as path19 from "node:path";
23128
23134
  import * as readline from "node:readline";
23129
23135
  import { homedir as homedir5 } from "node:os";
23130
23136
  import { spawn as spawn4, execFileSync as execFileSync7 } from "node:child_process";
23131
23137
  import { createHash as createHash2, randomBytes } from "node:crypto";
23132
- import { mkdir, writeFile, readFile, readdir, unlink, rename, chmod } from "node:fs/promises";
23133
- var STATE_DIR = path18.join(homedir5(), ".argent");
23134
- var STATE_FILE = path18.join(STATE_DIR, "tool-server.json");
23135
- var LOG_FILE = path18.join(STATE_DIR, "tool-server.log");
23136
- var LOCK_FILE = path18.join(STATE_DIR, "tool-server.lock");
23138
+ import { mkdir, writeFile, readFile, readdir as readdir2, unlink, rename, chmod } from "node:fs/promises";
23139
+ var STATE_DIR = path19.join(homedir5(), ".argent");
23140
+ var STATE_FILE = path19.join(STATE_DIR, "tool-server.json");
23141
+ var LOG_FILE = path19.join(STATE_DIR, "tool-server.log");
23142
+ var LOCK_FILE = path19.join(STATE_DIR, "tool-server.lock");
23137
23143
  function isProcessAlive(pid) {
23138
23144
  try {
23139
23145
  process.kill(pid, 0);
@@ -23144,7 +23150,7 @@ function isProcessAlive(pid) {
23144
23150
  }
23145
23151
  function stateFileForBundle(bundlePath) {
23146
23152
  const key = createHash2("sha256").update(bundlePath).digest("hex").slice(0, 12);
23147
- return path18.join(STATE_DIR, `tool-server-${key}.json`);
23153
+ return path19.join(STATE_DIR, `tool-server-${key}.json`);
23148
23154
  }
23149
23155
  async function readStateFile(file) {
23150
23156
  try {
@@ -23179,14 +23185,14 @@ var STATE_FILE_RE = /^tool-server(-[0-9a-f]{12})?\.json$/;
23179
23185
  async function readAllToolsServerStates() {
23180
23186
  let names;
23181
23187
  try {
23182
- names = await readdir(STATE_DIR);
23188
+ names = await readdir2(STATE_DIR);
23183
23189
  } catch {
23184
23190
  return [];
23185
23191
  }
23186
23192
  const out = [];
23187
23193
  for (const name of names) {
23188
23194
  if (!STATE_FILE_RE.test(name)) continue;
23189
- const file = path18.join(STATE_DIR, name);
23195
+ const file = path19.join(STATE_DIR, name);
23190
23196
  const state2 = await readStateFile(file);
23191
23197
  if (state2) out.push({ file, state: state2 });
23192
23198
  }
@@ -23232,21 +23238,21 @@ async function killToolServer(bundlePath) {
23232
23238
  return alive;
23233
23239
  }
23234
23240
  function isPathWithin(child, parent) {
23235
- const rel = path18.relative(parent, child);
23236
- return rel !== "" && !rel.startsWith("..") && !path18.isAbsolute(rel);
23241
+ const rel = path19.relative(parent, child);
23242
+ return rel !== "" && !rel.startsWith("..") && !path19.isAbsolute(rel);
23237
23243
  }
23238
23244
  function tryRealpath(p) {
23239
23245
  try {
23240
- return fs17.realpathSync(p);
23246
+ return fs18.realpathSync(p);
23241
23247
  } catch {
23242
23248
  return p;
23243
23249
  }
23244
23250
  }
23245
23251
  async function killToolServerForInstallDir(packageDir) {
23246
- const parents = /* @__PURE__ */ new Set([path18.resolve(packageDir), tryRealpath(packageDir)]);
23252
+ const parents = /* @__PURE__ */ new Set([path19.resolve(packageDir), tryRealpath(packageDir)]);
23247
23253
  let killed = 0;
23248
23254
  for (const { file, state: state2 } of await readAllToolsServerStates()) {
23249
- const bundles = /* @__PURE__ */ new Set([path18.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
23255
+ const bundles = /* @__PURE__ */ new Set([path19.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
23250
23256
  const matches2 = [...bundles].some((b) => [...parents].some((p) => isPathWithin(b, p)));
23251
23257
  if (!matches2) continue;
23252
23258
  const fresh = await readStateFile(file);
@@ -23264,7 +23270,7 @@ async function killToolServerForInstallDir(packageDir) {
23264
23270
  }
23265
23271
  return killed;
23266
23272
  }
23267
- var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs17.existsSync(p)) ?? "ps";
23273
+ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs18.existsSync(p)) ?? "ps";
23268
23274
  var PS_WIDTH_FLAGS = ["-ww"];
23269
23275
  var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
23270
23276
  function readProcessCommandLine(pid, flags = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
@@ -23307,38 +23313,57 @@ function couldBeOurToolServer(pid, marker) {
23307
23313
  return false;
23308
23314
  }
23309
23315
 
23316
+ // ../argent-tools-client/src/tools-client.ts
23317
+ import * as path23 from "node:path";
23318
+
23310
23319
  // ../argent-tools-client/src/link-config.ts
23311
- import * as path19 from "node:path";
23320
+ import * as path20 from "node:path";
23312
23321
  import { homedir as homedir6 } from "node:os";
23313
23322
  import { mkdir as mkdir2, writeFile as writeFile2, readFile as readFile2, unlink as unlink2, chmod as chmod2 } from "node:fs/promises";
23314
- var LINK_DIR = path19.join(homedir6(), ".argent");
23315
- var LINK_FILE = path19.join(LINK_DIR, "link.json");
23323
+ var LINK_DIR = path20.join(homedir6(), ".argent");
23324
+ var LINK_FILE = path20.join(LINK_DIR, "link.json");
23316
23325
 
23317
23326
  // ../argent-tools-client/src/file-inputs.ts
23318
23327
  import { createHash as createHash3, randomUUID as randomUUID6 } from "node:crypto";
23319
- import { createReadStream } from "node:fs";
23320
- import { mkdir as mkdir3, readFile as readFile3, rm as rm2, stat as stat2, writeFile as writeFile3 } from "node:fs/promises";
23321
- import { tmpdir } from "node:os";
23322
- import * as path20 from "node:path";
23328
+ import { createReadStream, rmSync as rmSync6 } from "node:fs";
23329
+ import {
23330
+ chmod as chmod3,
23331
+ lstat,
23332
+ mkdir as mkdir3,
23333
+ readFile as readFile3,
23334
+ realpath as realpath2,
23335
+ rename as rename2,
23336
+ rm as rm2,
23337
+ stat as stat2,
23338
+ writeFile as writeFile3
23339
+ } from "node:fs/promises";
23340
+ import { constants, tmpdir } from "node:os";
23341
+ import * as path21 from "node:path";
23323
23342
 
23324
23343
  // ../archive/src/index.ts
23325
23344
  import { execFile } from "node:child_process";
23326
- import { rm, readdir as readdir2 } from "node:fs/promises";
23327
- import { basename as basename2, dirname as dirname11, join as join19, posix, resolve as resolve12, sep as sep3 } from "node:path";
23345
+ import { rm, readdir as readdir3 } from "node:fs/promises";
23346
+ import { basename as basename3, dirname as dirname12, join as join20, posix as posix2, resolve as resolve12, sep as sep4 } from "node:path";
23328
23347
  import { promisify } from "node:util";
23329
23348
  var execFileAsync = promisify(execFile);
23330
23349
 
23331
23350
  // ../argent-tools-client/src/file-inputs.ts
23332
23351
  var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
23333
23352
 
23353
+ // ../argent-tools-client/src/flow-files.ts
23354
+ var import_yaml3 = __toESM(require_dist(), 1);
23355
+ import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat as stat3 } from "node:fs/promises";
23356
+ import * as path22 from "node:path";
23357
+ var INLINE_MEMBERS_BYTES = 256 * 1024;
23358
+
23334
23359
  // ../argent-tools-client/src/artifacts.ts
23335
- import { copyFile, mkdir as mkdir4, readFile as readFile4, realpath, rm as rm3, stat as stat3, writeFile as writeFile4 } from "node:fs/promises";
23360
+ import { copyFile, mkdir as mkdir4, readFile as readFile5, realpath as realpath4, rm as rm3, stat as stat4, writeFile as writeFile4 } from "node:fs/promises";
23336
23361
  import { constants as fsConstants } from "node:fs";
23337
23362
  import { tmpdir as tmpdir2 } from "node:os";
23338
- import { basename as basename4, dirname as dirname13, extname as extname2, isAbsolute as isAbsolute6, join as join21, normalize, resolve as resolve13, sep as sep4 } from "node:path";
23363
+ import { basename as basename6, dirname as dirname16, extname as extname2, isAbsolute as isAbsolute8, join as join23, normalize as normalize2, resolve as resolve14, sep as sep6 } from "node:path";
23339
23364
  import { createHash as createHash4 } from "node:crypto";
23340
- var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize(".argent/recordings")]);
23341
- var RECORDINGS_SAVE_DIR = normalize(".argent/recordings");
23365
+ var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
23366
+ var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
23342
23367
  var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
23343
23368
 
23344
23369
  // ../argent-installer/src/update.ts
@@ -23694,7 +23719,7 @@ async function update(args) {
23694
23719
  process.exit(1);
23695
23720
  }
23696
23721
  const rootOverride = getProjectRootOverride(args);
23697
- const projectRoot = rootOverride ? path21.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
23722
+ const projectRoot = rootOverride ? path24.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
23698
23723
  installMode = resolveInstallMode(projectRoot);
23699
23724
  const flags = parseTargetFlags(args);
23700
23725
  const localInstalled = installMode === "local" && probeLocalInstall(projectRoot).installed;
@@ -23876,9 +23901,9 @@ async function update(args) {
23876
23901
 
23877
23902
  // ../argent-installer/src/uninstall.ts
23878
23903
  var import_picocolors12 = __toESM(require_picocolors(), 1);
23879
- var import_yaml3 = __toESM(require_dist(), 1);
23880
- import * as fs18 from "node:fs";
23881
- import * as path22 from "node:path";
23904
+ var import_yaml4 = __toESM(require_dist(), 1);
23905
+ import * as fs19 from "node:fs";
23906
+ import * as path25 from "node:path";
23882
23907
  var UNINSTALL_TOOLSERVER_STOP_FAILED = {
23883
23908
  error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
23884
23909
  failure_stage: "installer_uninstall_toolserver_stop",
@@ -23899,10 +23924,10 @@ var UNINSTALL_UNCLASSIFIED_FAILED = {
23899
23924
  };
23900
23925
  function removeDirIfEmpty2(dirPath) {
23901
23926
  try {
23902
- if (!fs18.existsSync(dirPath)) return false;
23903
- if (!fs18.statSync(dirPath).isDirectory()) return false;
23904
- if (fs18.readdirSync(dirPath).length > 0) return false;
23905
- fs18.rmdirSync(dirPath);
23927
+ if (!fs19.existsSync(dirPath)) return false;
23928
+ if (!fs19.statSync(dirPath).isDirectory()) return false;
23929
+ if (fs19.readdirSync(dirPath).length > 0) return false;
23930
+ fs19.rmdirSync(dirPath);
23906
23931
  return true;
23907
23932
  } catch {
23908
23933
  return false;
@@ -23912,9 +23937,9 @@ function collectBundledPaths(sourceDir) {
23912
23937
  const files = [];
23913
23938
  const directories = [];
23914
23939
  function walk(currentDir, relativeDir = "") {
23915
- for (const entry of fs18.readdirSync(currentDir, { withFileTypes: true })) {
23916
- const relativePath = relativeDir ? path22.join(relativeDir, entry.name) : entry.name;
23917
- const absolutePath = path22.join(currentDir, entry.name);
23940
+ for (const entry of fs19.readdirSync(currentDir, { withFileTypes: true })) {
23941
+ const relativePath = relativeDir ? path25.join(relativeDir, entry.name) : entry.name;
23942
+ const absolutePath = path25.join(currentDir, entry.name);
23918
23943
  if (entry.isDirectory()) {
23919
23944
  walk(absolutePath, relativePath);
23920
23945
  directories.push(relativePath);
@@ -23927,55 +23952,55 @@ function collectBundledPaths(sourceDir) {
23927
23952
  return { files, directories };
23928
23953
  }
23929
23954
  function removeBundledContent(sourceDir, targetDir) {
23930
- if (!fs18.existsSync(sourceDir) || !fs18.existsSync(targetDir)) {
23955
+ if (!fs19.existsSync(sourceDir) || !fs19.existsSync(targetDir)) {
23931
23956
  return { removedPaths: [], removedRoot: false };
23932
23957
  }
23933
23958
  const { files, directories } = collectBundledPaths(sourceDir);
23934
23959
  const removedPaths = [];
23935
23960
  for (const relativePath of files) {
23936
- const targetPath = path22.join(targetDir, relativePath);
23961
+ const targetPath = path25.join(targetDir, relativePath);
23937
23962
  try {
23938
- if (!fs18.existsSync(targetPath)) continue;
23939
- if (fs18.lstatSync(targetPath).isDirectory()) continue;
23940
- fs18.rmSync(targetPath, { force: true });
23963
+ if (!fs19.existsSync(targetPath)) continue;
23964
+ if (fs19.lstatSync(targetPath).isDirectory()) continue;
23965
+ fs19.rmSync(targetPath, { force: true });
23941
23966
  removedPaths.push(relativePath);
23942
23967
  } catch {
23943
23968
  }
23944
23969
  }
23945
23970
  directories.sort(
23946
- (a3, b) => b.split(path22.sep).length - a3.split(path22.sep).length || b.length - a3.length
23971
+ (a3, b) => b.split(path25.sep).length - a3.split(path25.sep).length || b.length - a3.length
23947
23972
  );
23948
23973
  for (const relativePath of directories) {
23949
- const targetPath = path22.join(targetDir, relativePath);
23974
+ const targetPath = path25.join(targetDir, relativePath);
23950
23975
  try {
23951
- if (!fs18.existsSync(targetPath)) continue;
23952
- if (!fs18.statSync(targetPath).isDirectory()) continue;
23953
- if (fs18.readdirSync(targetPath).length > 0) continue;
23954
- fs18.rmdirSync(targetPath);
23976
+ if (!fs19.existsSync(targetPath)) continue;
23977
+ if (!fs19.statSync(targetPath).isDirectory()) continue;
23978
+ if (fs19.readdirSync(targetPath).length > 0) continue;
23979
+ fs19.rmdirSync(targetPath);
23955
23980
  } catch {
23956
23981
  }
23957
23982
  }
23958
23983
  let removedRoot = false;
23959
23984
  try {
23960
- if (fs18.existsSync(targetDir) && fs18.statSync(targetDir).isDirectory()) {
23961
- if (fs18.readdirSync(targetDir).length === 0) {
23962
- fs18.rmdirSync(targetDir);
23985
+ if (fs19.existsSync(targetDir) && fs19.statSync(targetDir).isDirectory()) {
23986
+ if (fs19.readdirSync(targetDir).length === 0) {
23987
+ fs19.rmdirSync(targetDir);
23963
23988
  removedRoot = true;
23964
23989
  }
23965
23990
  }
23966
23991
  } catch {
23967
23992
  }
23968
23993
  if (removedRoot) {
23969
- removeDirIfEmpty2(path22.dirname(targetDir));
23994
+ removeDirIfEmpty2(path25.dirname(targetDir));
23970
23995
  }
23971
23996
  return { removedPaths, removedRoot };
23972
23997
  }
23973
23998
  function readBundledSkillName(skillFilePath, fallbackName) {
23974
23999
  try {
23975
- const content = fs18.readFileSync(skillFilePath, "utf8");
24000
+ const content = fs19.readFileSync(skillFilePath, "utf8");
23976
24001
  const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1];
23977
24002
  if (!frontmatter) return fallbackName;
23978
- const data = (0, import_yaml3.parse)(frontmatter);
24003
+ const data = (0, import_yaml4.parse)(frontmatter);
23979
24004
  const name = data?.name;
23980
24005
  return typeof name === "string" && name.trim() ? name.trim() : fallbackName;
23981
24006
  } catch {
@@ -23983,30 +24008,30 @@ function readBundledSkillName(skillFilePath, fallbackName) {
23983
24008
  }
23984
24009
  }
23985
24010
  function getBundledSkillNames(skillsDir) {
23986
- if (!fs18.existsSync(skillsDir)) return [];
24011
+ if (!fs19.existsSync(skillsDir)) return [];
23987
24012
  const skillNames = [];
23988
- for (const entry of fs18.readdirSync(skillsDir, { withFileTypes: true })) {
24013
+ for (const entry of fs19.readdirSync(skillsDir, { withFileTypes: true })) {
23989
24014
  if (!entry.isDirectory()) continue;
23990
- const skillFilePath = path22.join(skillsDir, entry.name, "SKILL.md");
23991
- if (!fs18.existsSync(skillFilePath)) continue;
24015
+ const skillFilePath = path25.join(skillsDir, entry.name, "SKILL.md");
24016
+ if (!fs19.existsSync(skillFilePath)) continue;
23992
24017
  skillNames.push(readBundledSkillName(skillFilePath, entry.name));
23993
24018
  }
23994
24019
  return [...new Set(skillNames)].sort();
23995
24020
  }
23996
24021
  function removeBundledSkillInstalls(skillNames, targetDir) {
23997
- if (!fs18.existsSync(targetDir)) {
24022
+ if (!fs19.existsSync(targetDir)) {
23998
24023
  return { removedPaths: [], removedRoot: false };
23999
24024
  }
24000
24025
  const removedPaths = [];
24001
24026
  for (const skillName of skillNames) {
24002
- const targetPath = path22.join(targetDir, skillName);
24027
+ const targetPath = path25.join(targetDir, skillName);
24003
24028
  try {
24004
- if (!fs18.existsSync(targetPath)) continue;
24005
- const stats = fs18.lstatSync(targetPath);
24029
+ if (!fs19.existsSync(targetPath)) continue;
24030
+ const stats = fs19.lstatSync(targetPath);
24006
24031
  if (stats.isDirectory() && !stats.isSymbolicLink()) {
24007
- fs18.rmSync(targetPath, { recursive: true, force: true });
24032
+ fs19.rmSync(targetPath, { recursive: true, force: true });
24008
24033
  } else {
24009
- fs18.rmSync(targetPath, { force: true });
24034
+ fs19.rmSync(targetPath, { force: true });
24010
24035
  }
24011
24036
  removedPaths.push(skillName);
24012
24037
  } catch {
@@ -24014,17 +24039,17 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
24014
24039
  }
24015
24040
  const removedRoot = removeDirIfEmpty2(targetDir);
24016
24041
  if (removedRoot) {
24017
- removeDirIfEmpty2(path22.dirname(targetDir));
24042
+ removeDirIfEmpty2(path25.dirname(targetDir));
24018
24043
  }
24019
24044
  return { removedPaths, removedRoot };
24020
24045
  }
24021
24046
  function cleanupSkillsLockFile(lockPath, skillNames) {
24022
- if (!fs18.existsSync(lockPath)) {
24047
+ if (!fs19.existsSync(lockPath)) {
24023
24048
  return { removedSkills: [], removedFile: false };
24024
24049
  }
24025
24050
  let parsed;
24026
24051
  try {
24027
- parsed = JSON.parse(fs18.readFileSync(lockPath, "utf8"));
24052
+ parsed = JSON.parse(fs19.readFileSync(lockPath, "utf8"));
24028
24053
  } catch {
24029
24054
  return { removedSkills: [], removedFile: false };
24030
24055
  }
@@ -24051,10 +24076,10 @@ function cleanupSkillsLockFile(lockPath, skillNames) {
24051
24076
  parsed.skills && typeof parsed.skills === "object" && Object.keys(parsed.skills).length > 0
24052
24077
  );
24053
24078
  if (!hasSkills && otherKeys.length === 0) {
24054
- fs18.rmSync(lockPath, { force: true });
24079
+ fs19.rmSync(lockPath, { force: true });
24055
24080
  return { removedSkills, removedFile: true };
24056
24081
  }
24057
- fs18.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
24082
+ fs19.writeFileSync(lockPath, JSON.stringify(parsed, null, 2) + "\n");
24058
24083
  return { removedSkills, removedFile: false };
24059
24084
  }
24060
24085
  function cleanupBundledSkills(skillNames, targets) {