@swmansion/argent 0.31.1-next.9 → 0.31.2-next.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.
Files changed (31) hide show
  1. package/bin/argent-android-devtools-0.3.0.apk +0 -0
  2. package/bin/darwin/ax-service +0 -0
  3. package/bin/darwin/tvos-ax-service +0 -0
  4. package/bin/darwin/tvos-hid-daemon +0 -0
  5. package/bin/tcp/ax-service +0 -0
  6. package/dist/cli-cmds.mjs +10 -5
  7. package/dist/installer.mjs +525 -312
  8. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift +2 -0
  9. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Gestures.swift +96 -0
  10. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerUITests-Bridging-Header.h +1 -0
  11. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentTouchSynthesizer.h +40 -0
  12. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentTouchSynthesizer.m +149 -0
  13. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/RunnerProtocol.swift +22 -5
  14. package/dist/mcp-server.mjs +7 -1
  15. package/dist/tool-args.generated.d.ts +2 -2
  16. package/dist/tool-server.cjs +1531 -992
  17. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  18. package/dylibs/libKeyboardPatch.dylib +0 -0
  19. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  20. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  21. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  22. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  23. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  24. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  25. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  26. package/package.json +1 -1
  27. package/rules/argent.md +1 -1
  28. package/skills/argent-create-e2e/SKILL.md +1 -1
  29. package/skills/argent-ios-device-interact/SKILL.md +3 -3
  30. package/skills/argent-qa-e2e/SKILL.md +1 -1
  31. package/skills/argent-screen-recording/SKILL.md +5 -4
@@ -3652,17 +3652,17 @@ var require_visit = __commonJS({
3652
3652
  visit2.BREAK = BREAK;
3653
3653
  visit2.SKIP = SKIP;
3654
3654
  visit2.REMOVE = REMOVE;
3655
- function visit_(key, node, visitor, path28) {
3656
- const ctrl = callVisitor(key, node, visitor, path28);
3655
+ function visit_(key, node, visitor, path29) {
3656
+ const ctrl = callVisitor(key, node, visitor, path29);
3657
3657
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3658
- replaceNode(key, path28, ctrl);
3659
- return visit_(key, ctrl, visitor, path28);
3658
+ replaceNode(key, path29, ctrl);
3659
+ return visit_(key, ctrl, visitor, path29);
3660
3660
  }
3661
3661
  if (typeof ctrl !== "symbol") {
3662
3662
  if (identity2.isCollection(node)) {
3663
- path28 = Object.freeze(path28.concat(node));
3663
+ path29 = Object.freeze(path29.concat(node));
3664
3664
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3665
- const ci = visit_(i2, node.items[i2], visitor, path28);
3665
+ const ci = visit_(i2, node.items[i2], visitor, path29);
3666
3666
  if (typeof ci === "number")
3667
3667
  i2 = ci - 1;
3668
3668
  else if (ci === BREAK)
@@ -3673,13 +3673,13 @@ var require_visit = __commonJS({
3673
3673
  }
3674
3674
  }
3675
3675
  } else if (identity2.isPair(node)) {
3676
- path28 = Object.freeze(path28.concat(node));
3677
- const ck = visit_("key", node.key, visitor, path28);
3676
+ path29 = Object.freeze(path29.concat(node));
3677
+ const ck = visit_("key", node.key, visitor, path29);
3678
3678
  if (ck === BREAK)
3679
3679
  return BREAK;
3680
3680
  else if (ck === REMOVE)
3681
3681
  node.key = null;
3682
- const cv = visit_("value", node.value, visitor, path28);
3682
+ const cv = visit_("value", node.value, visitor, path29);
3683
3683
  if (cv === BREAK)
3684
3684
  return BREAK;
3685
3685
  else if (cv === REMOVE)
@@ -3700,17 +3700,17 @@ var require_visit = __commonJS({
3700
3700
  visitAsync.BREAK = BREAK;
3701
3701
  visitAsync.SKIP = SKIP;
3702
3702
  visitAsync.REMOVE = REMOVE;
3703
- async function visitAsync_(key, node, visitor, path28) {
3704
- const ctrl = await callVisitor(key, node, visitor, path28);
3703
+ async function visitAsync_(key, node, visitor, path29) {
3704
+ const ctrl = await callVisitor(key, node, visitor, path29);
3705
3705
  if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
3706
- replaceNode(key, path28, ctrl);
3707
- return visitAsync_(key, ctrl, visitor, path28);
3706
+ replaceNode(key, path29, ctrl);
3707
+ return visitAsync_(key, ctrl, visitor, path29);
3708
3708
  }
3709
3709
  if (typeof ctrl !== "symbol") {
3710
3710
  if (identity2.isCollection(node)) {
3711
- path28 = Object.freeze(path28.concat(node));
3711
+ path29 = Object.freeze(path29.concat(node));
3712
3712
  for (let i2 = 0; i2 < node.items.length; ++i2) {
3713
- const ci = await visitAsync_(i2, node.items[i2], visitor, path28);
3713
+ const ci = await visitAsync_(i2, node.items[i2], visitor, path29);
3714
3714
  if (typeof ci === "number")
3715
3715
  i2 = ci - 1;
3716
3716
  else if (ci === BREAK)
@@ -3721,13 +3721,13 @@ var require_visit = __commonJS({
3721
3721
  }
3722
3722
  }
3723
3723
  } else if (identity2.isPair(node)) {
3724
- path28 = Object.freeze(path28.concat(node));
3725
- const ck = await visitAsync_("key", node.key, visitor, path28);
3724
+ path29 = Object.freeze(path29.concat(node));
3725
+ const ck = await visitAsync_("key", node.key, visitor, path29);
3726
3726
  if (ck === BREAK)
3727
3727
  return BREAK;
3728
3728
  else if (ck === REMOVE)
3729
3729
  node.key = null;
3730
- const cv = await visitAsync_("value", node.value, visitor, path28);
3730
+ const cv = await visitAsync_("value", node.value, visitor, path29);
3731
3731
  if (cv === BREAK)
3732
3732
  return BREAK;
3733
3733
  else if (cv === REMOVE)
@@ -3754,23 +3754,23 @@ var require_visit = __commonJS({
3754
3754
  }
3755
3755
  return visitor;
3756
3756
  }
3757
- function callVisitor(key, node, visitor, path28) {
3757
+ function callVisitor(key, node, visitor, path29) {
3758
3758
  if (typeof visitor === "function")
3759
- return visitor(key, node, path28);
3759
+ return visitor(key, node, path29);
3760
3760
  if (identity2.isMap(node))
3761
- return visitor.Map?.(key, node, path28);
3761
+ return visitor.Map?.(key, node, path29);
3762
3762
  if (identity2.isSeq(node))
3763
- return visitor.Seq?.(key, node, path28);
3763
+ return visitor.Seq?.(key, node, path29);
3764
3764
  if (identity2.isPair(node))
3765
- return visitor.Pair?.(key, node, path28);
3765
+ return visitor.Pair?.(key, node, path29);
3766
3766
  if (identity2.isScalar(node))
3767
- return visitor.Scalar?.(key, node, path28);
3767
+ return visitor.Scalar?.(key, node, path29);
3768
3768
  if (identity2.isAlias(node))
3769
- return visitor.Alias?.(key, node, path28);
3769
+ return visitor.Alias?.(key, node, path29);
3770
3770
  return void 0;
3771
3771
  }
3772
- function replaceNode(key, path28, node) {
3773
- const parent = path28[path28.length - 1];
3772
+ function replaceNode(key, path29, node) {
3773
+ const parent = path29[path29.length - 1];
3774
3774
  if (identity2.isCollection(parent)) {
3775
3775
  parent.items[key] = node;
3776
3776
  } else if (identity2.isPair(parent)) {
@@ -4382,10 +4382,10 @@ var require_Collection = __commonJS({
4382
4382
  var createNode = require_createNode();
4383
4383
  var identity2 = require_identity();
4384
4384
  var Node = require_Node();
4385
- function collectionFromPath(schema, path28, value) {
4385
+ function collectionFromPath(schema, path29, value) {
4386
4386
  let v = value;
4387
- for (let i2 = path28.length - 1; i2 >= 0; --i2) {
4388
- const k = path28[i2];
4387
+ for (let i2 = path29.length - 1; i2 >= 0; --i2) {
4388
+ const k = path29[i2];
4389
4389
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4390
4390
  const a2 = [];
4391
4391
  a2[k] = v;
@@ -4404,7 +4404,7 @@ var require_Collection = __commonJS({
4404
4404
  sourceObjects: /* @__PURE__ */ new Map()
4405
4405
  });
4406
4406
  }
4407
- var isEmptyPath = (path28) => path28 == null || typeof path28 === "object" && !!path28[Symbol.iterator]().next().done;
4407
+ var isEmptyPath = (path29) => path29 == null || typeof path29 === "object" && !!path29[Symbol.iterator]().next().done;
4408
4408
  var Collection = class extends Node.NodeBase {
4409
4409
  constructor(type, schema) {
4410
4410
  super(type);
@@ -4434,11 +4434,11 @@ var require_Collection = __commonJS({
4434
4434
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4435
4435
  * that already exists in the map.
4436
4436
  */
4437
- addIn(path28, value) {
4438
- if (isEmptyPath(path28))
4437
+ addIn(path29, value) {
4438
+ if (isEmptyPath(path29))
4439
4439
  this.add(value);
4440
4440
  else {
4441
- const [key, ...rest] = path28;
4441
+ const [key, ...rest] = path29;
4442
4442
  const node = this.get(key, true);
4443
4443
  if (identity2.isCollection(node))
4444
4444
  node.addIn(rest, value);
@@ -4452,8 +4452,8 @@ var require_Collection = __commonJS({
4452
4452
  * Removes a value from the collection.
4453
4453
  * @returns `true` if the item was found and removed.
4454
4454
  */
4455
- deleteIn(path28) {
4456
- const [key, ...rest] = path28;
4455
+ deleteIn(path29) {
4456
+ const [key, ...rest] = path29;
4457
4457
  if (rest.length === 0)
4458
4458
  return this.delete(key);
4459
4459
  const node = this.get(key, true);
@@ -4467,8 +4467,8 @@ var require_Collection = __commonJS({
4467
4467
  * scalar values from their surrounding node; to disable set `keepScalar` to
4468
4468
  * `true` (collections are always returned intact).
4469
4469
  */
4470
- getIn(path28, keepScalar) {
4471
- const [key, ...rest] = path28;
4470
+ getIn(path29, keepScalar) {
4471
+ const [key, ...rest] = path29;
4472
4472
  const node = this.get(key, true);
4473
4473
  if (rest.length === 0)
4474
4474
  return !keepScalar && identity2.isScalar(node) ? node.value : node;
@@ -4486,8 +4486,8 @@ var require_Collection = __commonJS({
4486
4486
  /**
4487
4487
  * Checks if the collection includes a value with the key `key`.
4488
4488
  */
4489
- hasIn(path28) {
4490
- const [key, ...rest] = path28;
4489
+ hasIn(path29) {
4490
+ const [key, ...rest] = path29;
4491
4491
  if (rest.length === 0)
4492
4492
  return this.has(key);
4493
4493
  const node = this.get(key, true);
@@ -4497,8 +4497,8 @@ var require_Collection = __commonJS({
4497
4497
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4498
4498
  * boolean to add/remove the item from the set.
4499
4499
  */
4500
- setIn(path28, value) {
4501
- const [key, ...rest] = path28;
4500
+ setIn(path29, value) {
4501
+ const [key, ...rest] = path29;
4502
4502
  if (rest.length === 0) {
4503
4503
  this.set(key, value);
4504
4504
  } else {
@@ -7013,9 +7013,9 @@ var require_Document = __commonJS({
7013
7013
  this.contents.add(value);
7014
7014
  }
7015
7015
  /** Adds a value to the document. */
7016
- addIn(path28, value) {
7016
+ addIn(path29, value) {
7017
7017
  if (assertCollection(this.contents))
7018
- this.contents.addIn(path28, value);
7018
+ this.contents.addIn(path29, value);
7019
7019
  }
7020
7020
  /**
7021
7021
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -7090,14 +7090,14 @@ var require_Document = __commonJS({
7090
7090
  * Removes a value from the document.
7091
7091
  * @returns `true` if the item was found and removed.
7092
7092
  */
7093
- deleteIn(path28) {
7094
- if (Collection.isEmptyPath(path28)) {
7093
+ deleteIn(path29) {
7094
+ if (Collection.isEmptyPath(path29)) {
7095
7095
  if (this.contents == null)
7096
7096
  return false;
7097
7097
  this.contents = null;
7098
7098
  return true;
7099
7099
  }
7100
- return assertCollection(this.contents) ? this.contents.deleteIn(path28) : false;
7100
+ return assertCollection(this.contents) ? this.contents.deleteIn(path29) : false;
7101
7101
  }
7102
7102
  /**
7103
7103
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -7112,10 +7112,10 @@ var require_Document = __commonJS({
7112
7112
  * scalar values from their surrounding node; to disable set `keepScalar` to
7113
7113
  * `true` (collections are always returned intact).
7114
7114
  */
7115
- getIn(path28, keepScalar) {
7116
- if (Collection.isEmptyPath(path28))
7115
+ getIn(path29, keepScalar) {
7116
+ if (Collection.isEmptyPath(path29))
7117
7117
  return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
7118
- return identity2.isCollection(this.contents) ? this.contents.getIn(path28, keepScalar) : void 0;
7118
+ return identity2.isCollection(this.contents) ? this.contents.getIn(path29, keepScalar) : void 0;
7119
7119
  }
7120
7120
  /**
7121
7121
  * Checks if the document includes a value with the key `key`.
@@ -7126,10 +7126,10 @@ var require_Document = __commonJS({
7126
7126
  /**
7127
7127
  * Checks if the document includes a value at `path`.
7128
7128
  */
7129
- hasIn(path28) {
7130
- if (Collection.isEmptyPath(path28))
7129
+ hasIn(path29) {
7130
+ if (Collection.isEmptyPath(path29))
7131
7131
  return this.contents !== void 0;
7132
- return identity2.isCollection(this.contents) ? this.contents.hasIn(path28) : false;
7132
+ return identity2.isCollection(this.contents) ? this.contents.hasIn(path29) : false;
7133
7133
  }
7134
7134
  /**
7135
7135
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -7146,13 +7146,13 @@ var require_Document = __commonJS({
7146
7146
  * Sets a value in this document. For `!!set`, `value` needs to be a
7147
7147
  * boolean to add/remove the item from the set.
7148
7148
  */
7149
- setIn(path28, value) {
7150
- if (Collection.isEmptyPath(path28)) {
7149
+ setIn(path29, value) {
7150
+ if (Collection.isEmptyPath(path29)) {
7151
7151
  this.contents = value;
7152
7152
  } else if (this.contents == null) {
7153
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path28), value);
7153
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path29), value);
7154
7154
  } else if (assertCollection(this.contents)) {
7155
- this.contents.setIn(path28, value);
7155
+ this.contents.setIn(path29, value);
7156
7156
  }
7157
7157
  }
7158
7158
  /**
@@ -9113,9 +9113,9 @@ var require_cst_visit = __commonJS({
9113
9113
  visit2.BREAK = BREAK;
9114
9114
  visit2.SKIP = SKIP;
9115
9115
  visit2.REMOVE = REMOVE;
9116
- visit2.itemAtPath = (cst, path28) => {
9116
+ visit2.itemAtPath = (cst, path29) => {
9117
9117
  let item = cst;
9118
- for (const [field, index] of path28) {
9118
+ for (const [field, index] of path29) {
9119
9119
  const tok = item?.[field];
9120
9120
  if (tok && "items" in tok) {
9121
9121
  item = tok.items[index];
@@ -9124,23 +9124,23 @@ var require_cst_visit = __commonJS({
9124
9124
  }
9125
9125
  return item;
9126
9126
  };
9127
- visit2.parentCollection = (cst, path28) => {
9128
- const parent = visit2.itemAtPath(cst, path28.slice(0, -1));
9129
- const field = path28[path28.length - 1][0];
9127
+ visit2.parentCollection = (cst, path29) => {
9128
+ const parent = visit2.itemAtPath(cst, path29.slice(0, -1));
9129
+ const field = path29[path29.length - 1][0];
9130
9130
  const coll = parent?.[field];
9131
9131
  if (coll && "items" in coll)
9132
9132
  return coll;
9133
9133
  throw new Error("Parent collection not found");
9134
9134
  };
9135
- function _visit(path28, item, visitor) {
9136
- let ctrl = visitor(item, path28);
9135
+ function _visit(path29, item, visitor) {
9136
+ let ctrl = visitor(item, path29);
9137
9137
  if (typeof ctrl === "symbol")
9138
9138
  return ctrl;
9139
9139
  for (const field of ["key", "value"]) {
9140
9140
  const token = item[field];
9141
9141
  if (token && "items" in token) {
9142
9142
  for (let i2 = 0; i2 < token.items.length; ++i2) {
9143
- const ci = _visit(Object.freeze(path28.concat([[field, i2]])), token.items[i2], visitor);
9143
+ const ci = _visit(Object.freeze(path29.concat([[field, i2]])), token.items[i2], visitor);
9144
9144
  if (typeof ci === "number")
9145
9145
  i2 = ci - 1;
9146
9146
  else if (ci === BREAK)
@@ -9151,10 +9151,10 @@ var require_cst_visit = __commonJS({
9151
9151
  }
9152
9152
  }
9153
9153
  if (typeof ctrl === "function" && field === "key")
9154
- ctrl = ctrl(item, path28);
9154
+ ctrl = ctrl(item, path29);
9155
9155
  }
9156
9156
  }
9157
- return typeof ctrl === "function" ? ctrl(item, path28) : ctrl;
9157
+ return typeof ctrl === "function" ? ctrl(item, path29) : ctrl;
9158
9158
  }
9159
9159
  exports.visit = visit2;
9160
9160
  }
@@ -12566,7 +12566,7 @@ ${i2}
12566
12566
  }).prompt();
12567
12567
 
12568
12568
  // ../argent-installer/src/init.ts
12569
- var import_picocolors10 = __toESM(require_picocolors(), 1);
12569
+ var import_picocolors11 = __toESM(require_picocolors(), 1);
12570
12570
 
12571
12571
  // ../../node_modules/@opentelemetry/api-logs/build/esm/types/LogRecord.js
12572
12572
  var SeverityNumber;
@@ -15012,7 +15012,7 @@ function appendRootPathToUrlIfNeeded(url) {
15012
15012
  return void 0;
15013
15013
  }
15014
15014
  }
15015
- function appendResourcePathToUrl(url, path28) {
15015
+ function appendResourcePathToUrl(url, path29) {
15016
15016
  try {
15017
15017
  new URL(url);
15018
15018
  } catch {
@@ -15022,11 +15022,11 @@ function appendResourcePathToUrl(url, path28) {
15022
15022
  if (!url.endsWith("/")) {
15023
15023
  url = url + "/";
15024
15024
  }
15025
- url += path28;
15025
+ url += path29;
15026
15026
  try {
15027
15027
  new URL(url);
15028
15028
  } catch {
15029
- diag2.warn(`Configuration: Provided URL appended with '${path28}' is not a valid URL, using 'undefined' instead of '${url}'`);
15029
+ diag2.warn(`Configuration: Provided URL appended with '${path29}' is not a valid URL, using 'undefined' instead of '${url}'`);
15030
15030
  return void 0;
15031
15031
  }
15032
15032
  return url;
@@ -16107,6 +16107,9 @@ var FAILURE_COMMANDS = [
16107
16107
  "hdc",
16108
16108
  "deveco_emulator",
16109
16109
  "xcrun_simctl",
16110
+ // The `sim-remote` CLI, which stands in for simctl (and more) against a
16111
+ // remote simulator.
16112
+ "sim_remote",
16110
16113
  "xctrace",
16111
16114
  "native_devtools",
16112
16115
  "android_devtools",
@@ -16489,9 +16492,9 @@ function isReplitAgent(env) {
16489
16492
  }
16490
16493
  var DEVIN_MARKER_PATH = "/opt/.devin";
16491
16494
  var JULES_MARKER_PATH = "/opt/environment_summary.sh";
16492
- function safeExists(fileExists, path28) {
16495
+ function safeExists(fileExists, path29) {
16493
16496
  try {
16494
- return fileExists(path28);
16497
+ return fileExists(path29);
16495
16498
  } catch {
16496
16499
  return false;
16497
16500
  }
@@ -16912,7 +16915,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16912
16915
  var SESSION_ID = randomUUID4();
16913
16916
  function readCliVersion() {
16914
16917
  if (true) {
16915
- return "0.31.1-next.8";
16918
+ return "0.31.2-next.0";
16916
16919
  }
16917
16920
  return "0.0.0";
16918
16921
  }
@@ -17565,6 +17568,7 @@ var import_semver3 = __toESM(require_semver2(), 1);
17565
17568
  import * as fs16 from "node:fs";
17566
17569
  import * as path17 from "node:path";
17567
17570
  import * as dns from "node:dns";
17571
+ import { createHash as createHash2 } from "node:crypto";
17568
17572
  import * as os2 from "node:os";
17569
17573
  import { execFileSync as execFileSync3, execSync } from "node:child_process";
17570
17574
 
@@ -19308,12 +19312,12 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19308
19312
  }
19309
19313
  return result;
19310
19314
  }
19311
- function findNodeAtLocation(root, path28) {
19315
+ function findNodeAtLocation(root, path29) {
19312
19316
  if (!root) {
19313
19317
  return void 0;
19314
19318
  }
19315
19319
  let node = root;
19316
- for (let segment of path28) {
19320
+ for (let segment of path29) {
19317
19321
  if (typeof segment === "string") {
19318
19322
  if (node.type !== "object" || !Array.isArray(node.children)) {
19319
19323
  return void 0;
@@ -19667,14 +19671,14 @@ function getNodeType(value) {
19667
19671
 
19668
19672
  // ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
19669
19673
  function setProperty(text2, originalPath, value, options) {
19670
- const path28 = originalPath.slice();
19674
+ const path29 = originalPath.slice();
19671
19675
  const errors = [];
19672
19676
  const root = parseTree(text2, errors);
19673
19677
  let parent = void 0;
19674
19678
  let lastSegment = void 0;
19675
- while (path28.length > 0) {
19676
- lastSegment = path28.pop();
19677
- parent = findNodeAtLocation(root, path28);
19679
+ while (path29.length > 0) {
19680
+ lastSegment = path29.pop();
19681
+ parent = findNodeAtLocation(root, path29);
19678
19682
  if (parent === void 0 && value !== void 0) {
19679
19683
  if (typeof lastSegment === "string") {
19680
19684
  value = { [lastSegment]: value };
@@ -19860,8 +19864,8 @@ var ParseErrorCode;
19860
19864
  ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
19861
19865
  ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
19862
19866
  })(ParseErrorCode || (ParseErrorCode = {}));
19863
- function modify(text2, path28, value, options) {
19864
- return setProperty(text2, path28, value, options);
19867
+ function modify(text2, path29, value, options) {
19868
+ return setProperty(text2, path29, value, options);
19865
19869
  }
19866
19870
  function applyEdits(text2, edits) {
19867
19871
  let sortedEdits = edits.slice(0).sort((a2, b) => {
@@ -20042,15 +20046,25 @@ import * as fs14 from "node:fs";
20042
20046
  import * as path15 from "node:path";
20043
20047
  import { createRequire } from "node:module";
20044
20048
  import { execFileSync as execFileSync2 } from "node:child_process";
20045
- var TEMP_RUNNER_MARKERS = [
20046
- "_npx",
20047
- "/dlx-",
20048
- "\\dlx-",
20049
- "bun/install/cache",
20050
- ".bun\\install\\cache"
20049
+ var TEMP_RUNNER_PATTERNS = [
20050
+ // npx: <npm cache>/_npx/<hash>/node_modules/.bin
20051
+ /\/_npx\//,
20052
+ // pnpm 9+ dlx: <pnpm cache>/dlx/<hash>/<id>/node_modules/.bin
20053
+ /\/dlx\/[^/]+\/[^/]+\/node_modules\/\.bin\//,
20054
+ // pnpm 8 dlx: <store>/tmp/dlx-<pid>/node_modules/.bin
20055
+ /\/dlx-\d+\//,
20056
+ // yarn 2+ dlx: <tmp>/xfs-<hex>/argent
20057
+ /\/xfs-[0-9a-f]{8,}\//,
20058
+ // bunx up to 1.0.28: <tmp>/<spec>--bunx/node_modules/.bin
20059
+ /--bunx\/node_modules\/\.bin\//,
20060
+ // bunx 1.0.29 to 1.4.3, and on Windows: <tmp>/bunx-<uid>-<spec>/node_modules/.bin
20061
+ /\/bunx-\d+-/,
20062
+ // bunx 1.4.4+: <bun install cache, else tmp>/.bunx-<uid>/<spec>/node_modules/.bin
20063
+ /\/\.bunx-\d+\//
20051
20064
  ];
20052
20065
  function isTempRunnerPath(binaryPath) {
20053
- return TEMP_RUNNER_MARKERS.some((marker) => binaryPath.includes(marker));
20066
+ const slashed = binaryPath.split("\\").join("/");
20067
+ return TEMP_RUNNER_PATTERNS.some((pattern) => pattern.test(slashed));
20054
20068
  }
20055
20069
  function getGlobalBinaryPath() {
20056
20070
  try {
@@ -20270,6 +20284,42 @@ var LEGACY_ARGENT_SKILL_NAMES = [
20270
20284
  "argent-simulator-setup",
20271
20285
  "argent-ios-profiler"
20272
20286
  ];
20287
+ var RETIRED_BUNDLED_PATHS = {
20288
+ agents: [
20289
+ {
20290
+ // v0.3.1 and v0.3.2, when the agent and package carried their first names.
20291
+ path: "environment-inspector.md",
20292
+ shipped: [
20293
+ "50f8d1442677a7def3117cc8652f26dd5c1e2271ae0c7c9814c5bb17dfdd7858",
20294
+ "10f998fef549503cf341e1775ff6aacafbf361c1d7ec32c554a9c42343a6998a"
20295
+ ]
20296
+ },
20297
+ {
20298
+ path: "argent-environment-inspector.md",
20299
+ shipped: [
20300
+ "1f9b285ec30b7298b60b03cae10fb934ab07bc394104ab2d974d452a4c203178",
20301
+ "9d417798147fa11f4351109e6331865b79862fc631d7f32b70f64981362b90eb",
20302
+ "0f535893b239040ebe4a001ae7c3639366c4a6fe8d98e2568a59584798454644",
20303
+ "ec5872c9bd2085d281f5d4e1d06b5eb3f32a5be29c2bf8cb5c953ca6e9d73349",
20304
+ "96cb2e5025755448186cd9d29e85ce3db3cedb3dbfd2e6c89e734c76aa7fbdff",
20305
+ "9eff92cf887390fb3ffb68e7de5789e703049795a24d5f268332af488d155531"
20306
+ ]
20307
+ },
20308
+ {
20309
+ path: "references/quality-control-checklist.md",
20310
+ shipped: [
20311
+ "40f43028524e9544e2c77d2d1ad7eaf9385efadfb079bfec2973b999817203c1",
20312
+ "12a8deb0276a3d9fcd8b6c8fc6080b58be2e3e45fd0409dc2e7594e619e2eceb",
20313
+ "f1c76c1d51aa5a88371061a2bd5f46264ea2082aa4e1c2bca517d901b836c753",
20314
+ "84ecf5920fbca4460484a241a8ad1411fe8d6c3d0c9c25f80096a5a28f219f8a"
20315
+ ]
20316
+ }
20317
+ ],
20318
+ rules: []
20319
+ };
20320
+ function hashBundledContent(content) {
20321
+ return createHash2("sha256").update(content.replace(/\r\n/g, "\n")).digest("hex");
20322
+ }
20273
20323
  function listArgentSkillsInLock(lockPath) {
20274
20324
  try {
20275
20325
  const raw = fs16.readFileSync(lockPath, "utf8");
@@ -20381,11 +20431,13 @@ function isEmptyPlainObject(value) {
20381
20431
  }
20382
20432
  function rmEmptyDir(dirPath) {
20383
20433
  try {
20384
- if (!fs16.existsSync(dirPath)) return;
20385
- if (!fs16.statSync(dirPath).isDirectory()) return;
20386
- if (fs16.readdirSync(dirPath).length > 0) return;
20434
+ if (!fs16.existsSync(dirPath)) return false;
20435
+ if (!fs16.statSync(dirPath).isDirectory()) return false;
20436
+ if (fs16.readdirSync(dirPath).length > 0) return false;
20387
20437
  fs16.rmdirSync(dirPath);
20438
+ return true;
20388
20439
  } catch {
20440
+ return false;
20389
20441
  }
20390
20442
  }
20391
20443
  function readJsonc(filePath) {
@@ -20444,11 +20496,14 @@ function resolveLinkedDestination(dest) {
20444
20496
  return dest;
20445
20497
  }
20446
20498
  function copyDir(src, dest) {
20447
- if (!fs16.existsSync(src)) return null;
20499
+ if (!fs16.existsSync(src) || !treeHasFiles(src)) return null;
20448
20500
  const target = resolveLinkedDestination(dest);
20449
20501
  copyTree(src, target);
20450
20502
  return target;
20451
20503
  }
20504
+ function treeHasFiles(dir) {
20505
+ return fs16.readdirSync(dir, { withFileTypes: true }).some((entry) => !entry.isDirectory() || treeHasFiles(path17.join(dir, entry.name)));
20506
+ }
20452
20507
  function copyTree(src, dest) {
20453
20508
  const entries = fs16.readdirSync(src, { withFileTypes: true });
20454
20509
  fs16.mkdirSync(dest, { recursive: true });
@@ -20459,6 +20514,50 @@ function copyTree(src, dest) {
20459
20514
  else fs16.copyFileSync(from, to);
20460
20515
  }
20461
20516
  }
20517
+ function readRetiredFile(targetDir, relativePath) {
20518
+ const entryPath = path17.join(resolveLinkedDestination(targetDir), ...relativePath.split("/"));
20519
+ const file = resolveLinkedDestination(entryPath);
20520
+ try {
20521
+ if (!fs16.statSync(file, { throwIfNoEntry: false })?.isFile()) return null;
20522
+ return fs16.readFileSync(file, "utf8");
20523
+ } catch {
20524
+ return null;
20525
+ }
20526
+ }
20527
+ function findRetiredFiles(retired, bundleDir, targetDir) {
20528
+ const found = [];
20529
+ for (const { path: relativePath, shipped } of retired) {
20530
+ if (fs16.existsSync(path17.join(bundleDir, ...relativePath.split("/")))) continue;
20531
+ const content = readRetiredFile(targetDir, relativePath);
20532
+ if (content === null) continue;
20533
+ const sha256 = hashBundledContent(content);
20534
+ if (shipped.includes(sha256)) found.push({ relativePath, sha256 });
20535
+ }
20536
+ return found;
20537
+ }
20538
+ function removeRetiredFiles(targetDir, files) {
20539
+ const dir = resolveLinkedDestination(targetDir);
20540
+ const removedPaths = [];
20541
+ for (const { relativePath, sha256 } of files) {
20542
+ const content = readRetiredFile(targetDir, relativePath);
20543
+ if (content === null || hashBundledContent(content) !== sha256) continue;
20544
+ const segments = relativePath.split("/");
20545
+ const entryPath = path17.join(dir, ...segments);
20546
+ const file = resolveLinkedDestination(entryPath);
20547
+ try {
20548
+ fs16.rmSync(file);
20549
+ if (file !== entryPath) fs16.rmSync(entryPath, { force: true });
20550
+ removedPaths.push(relativePath);
20551
+ } catch {
20552
+ continue;
20553
+ }
20554
+ for (let depth = segments.length - 1; depth > 0; depth--) {
20555
+ if (!rmEmptyDir(path17.join(dir, ...segments.slice(0, depth)))) break;
20556
+ }
20557
+ }
20558
+ const removedRoot = removedPaths.length > 0 && dir === targetDir && rmEmptyDir(dir);
20559
+ return { removedPaths, removedRoot };
20560
+ }
20462
20561
  function dirExists(p) {
20463
20562
  try {
20464
20563
  return fs16.statSync(p).isDirectory();
@@ -20694,6 +20793,7 @@ function bundledManagedNames(kind) {
20694
20793
  } catch {
20695
20794
  names = /* @__PURE__ */ new Set();
20696
20795
  }
20796
+ for (const retired of RETIRED_BUNDLED_PATHS[kind]) names.add(retired.path.split("/")[0]);
20697
20797
  bundledManagedNamesCache.set(kind, names);
20698
20798
  return names;
20699
20799
  }
@@ -21788,6 +21888,11 @@ function getManagedContentTargets(adapters, root, scope) {
21788
21888
  addManagedTarget(targets.skillTargets, adapter.name, path18.join(kiroBase, "skills"), root);
21789
21889
  break;
21790
21890
  }
21891
+ case "Devin Desktop": {
21892
+ const devinBase = scope === "global" ? path18.join(process.env.XDG_CONFIG_HOME || path18.join(homedir4(), ".config"), "devin") : path18.join(root, ".devin");
21893
+ addManagedTarget(targets.skillTargets, adapter.name, path18.join(devinBase, "skills"), root);
21894
+ break;
21895
+ }
21791
21896
  }
21792
21897
  }
21793
21898
  return targets;
@@ -21852,6 +21957,26 @@ function removeCodexRules(configPath) {
21852
21957
  writeTomlOrRemove(configPath, config);
21853
21958
  return true;
21854
21959
  }
21960
+ function findRetiredRulesAndAgents(scans, root, rulesDir, agentsDir) {
21961
+ const targets = scans.flatMap(({ adapters, scope }) => {
21962
+ const { ruleTargets, agentTargets } = getManagedContentTargets(adapters, root, scope);
21963
+ return [
21964
+ ...ruleTargets.map((target) => ({ kind: "rules", target, bundleDir: rulesDir })),
21965
+ ...agentTargets.map((target) => ({ kind: "agents", target, bundleDir: agentsDir }))
21966
+ ];
21967
+ });
21968
+ const found = [];
21969
+ const seen = /* @__PURE__ */ new Set();
21970
+ for (const { kind, target, bundleDir } of targets) {
21971
+ const dir = resolveLinkedDestination(target.targetPath);
21972
+ if (seen.has(`${kind}:${realpathOrSelf(dir)}`)) continue;
21973
+ seen.add(`${kind}:${realpathOrSelf(dir)}`);
21974
+ const files = findRetiredFiles(RETIRED_BUNDLED_PATHS[kind], bundleDir, target.targetPath);
21975
+ if (files.length === 0) continue;
21976
+ found.push({ kind, target, location: formatCopyDestination(target, dir, root), files });
21977
+ }
21978
+ return found;
21979
+ }
21855
21980
  function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
21856
21981
  const results = [];
21857
21982
  const managedTargets = getManagedContentTargets(adapters, root, scope);
@@ -21888,12 +22013,65 @@ function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
21888
22013
  return results;
21889
22014
  }
21890
22015
 
22016
+ // ../argent-installer/src/retired-files.ts
22017
+ import * as path19 from "node:path";
22018
+ var import_picocolors = __toESM(require_picocolors(), 1);
22019
+ function displayPath(entry, file) {
22020
+ return path19.join(entry.location, ...file.relativePath.split("/"));
22021
+ }
22022
+ async function cleanupRetiredFiles(found, options) {
22023
+ const result = { removed: [], declined: [], failed: [], removedRoots: [] };
22024
+ const paths = found.flatMap((entry) => entry.files.map((file) => displayPath(entry, file)));
22025
+ if (paths.length === 0) return result;
22026
+ if (options.ask) {
22027
+ log.warn(
22028
+ "Argent no longer ships these files, but your editors still load them:\n" + paths.map((item) => ` ${import_picocolors.default.cyan(item)}`).join("\n")
22029
+ );
22030
+ const answer = await confirm({ message: "Remove them?", initialValue: true });
22031
+ if (isCancel(answer) || answer !== true) {
22032
+ result.declined = paths;
22033
+ return result;
22034
+ }
22035
+ }
22036
+ for (const entry of found) {
22037
+ const label = entry.kind === "rules" ? "rule" : "agent";
22038
+ const { removedPaths, removedRoot } = removeRetiredFiles(entry.target.targetPath, entry.files);
22039
+ if (removedRoot) result.removedRoots.push(entry.target.targetPath);
22040
+ for (const file of entry.files) {
22041
+ if (removedPaths.includes(file.relativePath)) {
22042
+ result.removed.push(`Removed retired ${label} ${file.relativePath} from ${entry.location}`);
22043
+ } else {
22044
+ result.failed.push(displayPath(entry, file));
22045
+ }
22046
+ }
22047
+ }
22048
+ return result;
22049
+ }
22050
+ function formatRetiredCleanup(result) {
22051
+ const kept = [];
22052
+ const group = (heading, paths) => {
22053
+ if (paths.length > 0) kept.push(heading, ...paths.map((item) => ` ${item}`));
22054
+ };
22055
+ group("Kept, as you chose (rename one to keep it for good):", result.declined);
22056
+ group("Could not remove (changed since listed, or not deletable):", result.failed);
22057
+ return { removed: result.removed, kept };
22058
+ }
22059
+ async function reportRetiredFiles(found, interactive) {
22060
+ if (found.length === 0) return;
22061
+ const { removed, kept } = formatRetiredCleanup(
22062
+ await cleanupRetiredFiles(found, { ask: interactive })
22063
+ );
22064
+ const lines = [...removed, ...kept];
22065
+ if (lines.length > 0)
22066
+ note(lines.map((line) => ` ${line}`).join("\n"), "Files Argent No Longer Ships");
22067
+ }
22068
+
21891
22069
  // ../argent-installer/src/cli-record.ts
21892
22070
  var import_semver4 = __toESM(require_semver2(), 1);
21893
22071
  import * as fs18 from "node:fs";
21894
- import * as path19 from "node:path";
22072
+ import * as path20 from "node:path";
21895
22073
  function cliRecordPath() {
21896
- return path19.join(argentHomeDir(), "cli.json");
22074
+ return path20.join(argentHomeDir(), "cli.json");
21897
22075
  }
21898
22076
  function readCliRecord() {
21899
22077
  try {
@@ -21907,13 +22085,13 @@ function readCliRecord() {
21907
22085
  function resolveCliEntry(mode, projectRoot) {
21908
22086
  if (mode === "local") {
21909
22087
  const relative5 = getLocalArgentBinRelPath(projectRoot);
21910
- return relative5 ? path19.resolve(projectRoot, relative5) : null;
22088
+ return relative5 ? path20.resolve(projectRoot, relative5) : null;
21911
22089
  }
21912
22090
  const packageRoot = getGloballyInstalledPackageRoot();
21913
22091
  if (!packageRoot) return null;
21914
22092
  const binSub = argentBinSubpath(packageRoot);
21915
22093
  if (!binSub) return null;
21916
- const entry = path19.join(packageRoot, binSub);
22094
+ const entry = path20.join(packageRoot, binSub);
21917
22095
  return fs18.existsSync(entry) ? entry : null;
21918
22096
  }
21919
22097
  function writeCliRecord(input) {
@@ -21930,7 +22108,7 @@ function writeCliRecord(input) {
21930
22108
  function persistCliRecord(record) {
21931
22109
  const file = cliRecordPath();
21932
22110
  try {
21933
- fs18.mkdirSync(path19.dirname(file), { recursive: true });
22111
+ fs18.mkdirSync(path20.dirname(file), { recursive: true });
21934
22112
  const temporary = `${file}.${process.pid}.tmp`;
21935
22113
  fs18.writeFileSync(temporary, JSON.stringify(record, null, 2) + "\n");
21936
22114
  fs18.renameSync(temporary, file);
@@ -21965,9 +22143,9 @@ function removeCliRecordFor(installDir) {
21965
22143
  if (!installDir) return false;
21966
22144
  const record = readCliRecord();
21967
22145
  if (!record) return false;
21968
- const root = path19.resolve(installDir);
21969
- const relative5 = path19.relative(root, path19.resolve(record.cli));
21970
- if (relative5.startsWith("..") || path19.isAbsolute(relative5)) return false;
22146
+ const root = path20.resolve(installDir);
22147
+ const relative5 = path20.relative(root, path20.resolve(record.cli));
22148
+ if (relative5.startsWith("..") || path20.isAbsolute(relative5)) return false;
21971
22149
  try {
21972
22150
  fs18.rmSync(cliRecordPath(), { force: true });
21973
22151
  return true;
@@ -21977,16 +22155,16 @@ function removeCliRecordFor(installDir) {
21977
22155
  }
21978
22156
 
21979
22157
  // ../argent-installer/src/first-run-notice.ts
21980
- var import_picocolors = __toESM(require_picocolors(), 1);
22158
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
21981
22159
  var TELEMETRY_OPT_IN_COMMAND = "argent telemetry enable";
21982
22160
  function printFirstRunNotice() {
21983
22161
  if (!shouldShowFirstRunNotice()) return;
21984
22162
  log.info(
21985
22163
  [
21986
- import_picocolors.default.bold("Telemetry"),
21987
- ...FIRST_RUN_NOTICE_BODY_LINES.map((line) => import_picocolors.default.dim(line)),
21988
- `${import_picocolors.default.dim("Opt out anytime:")} ${import_picocolors.default.cyan(TELEMETRY_OPT_OUT_COMMAND)}`,
21989
- `${import_picocolors.default.dim("Details:")} ${import_picocolors.default.dim(TELEMETRY_DETAILS_URL)}`
22164
+ import_picocolors2.default.bold("Telemetry"),
22165
+ ...FIRST_RUN_NOTICE_BODY_LINES.map((line) => import_picocolors2.default.dim(line)),
22166
+ `${import_picocolors2.default.dim("Opt out anytime:")} ${import_picocolors2.default.cyan(TELEMETRY_OPT_OUT_COMMAND)}`,
22167
+ `${import_picocolors2.default.dim("Details:")} ${import_picocolors2.default.dim(TELEMETRY_DETAILS_URL)}`
21990
22168
  ].join("\n")
21991
22169
  );
21992
22170
  markFirstRunNoticeShown();
@@ -21995,7 +22173,7 @@ async function resolveTelemetryConsent(opts) {
21995
22173
  if (opts.disableFlag) {
21996
22174
  writeConsentFlag(false);
21997
22175
  markFirstRunNoticeShown();
21998
- log.info(`${import_picocolors.default.bold("Telemetry")} ${import_picocolors.default.dim("disabled (--no-telemetry).")}`);
22176
+ log.info(`${import_picocolors2.default.bold("Telemetry")} ${import_picocolors2.default.dim("disabled (--no-telemetry).")}`);
21999
22177
  return { kind: "disabled", reason: "flag" };
22000
22178
  }
22001
22179
  if (opts.nonInteractive) {
@@ -22009,10 +22187,10 @@ async function resolveTelemetryConsent(opts) {
22009
22187
  }
22010
22188
  log.info(
22011
22189
  [
22012
- import_picocolors.default.bold("Telemetry"),
22013
- ...FIRST_RUN_NOTICE_BODY_LINES.map((line) => import_picocolors.default.dim(line)),
22014
- `${import_picocolors.default.dim("Opt out anytime:")} ${import_picocolors.default.cyan(TELEMETRY_OPT_OUT_COMMAND)}`,
22015
- `${import_picocolors.default.dim("Details:")} ${import_picocolors.default.dim(TELEMETRY_DETAILS_URL)}`
22190
+ import_picocolors2.default.bold("Telemetry"),
22191
+ ...FIRST_RUN_NOTICE_BODY_LINES.map((line) => import_picocolors2.default.dim(line)),
22192
+ `${import_picocolors2.default.dim("Opt out anytime:")} ${import_picocolors2.default.cyan(TELEMETRY_OPT_OUT_COMMAND)}`,
22193
+ `${import_picocolors2.default.dim("Details:")} ${import_picocolors2.default.dim(TELEMETRY_DETAILS_URL)}`
22016
22194
  ].join("\n")
22017
22195
  );
22018
22196
  const choice = await select({
@@ -22033,11 +22211,11 @@ async function resolveTelemetryConsent(opts) {
22033
22211
  markFirstRunNoticeShown();
22034
22212
  };
22035
22213
  if (enabled) {
22036
- log.info(`${import_picocolors.default.bold("Telemetry")} ${import_picocolors.default.green("enabled")}.`);
22214
+ log.info(`${import_picocolors2.default.bold("Telemetry")} ${import_picocolors2.default.green("enabled")}.`);
22037
22215
  return { kind: "enabled", commit };
22038
22216
  }
22039
22217
  log.info(
22040
- `${import_picocolors.default.bold("Telemetry")} ${import_picocolors.default.dim(`disabled. Enable anytime: ${TELEMETRY_OPT_IN_COMMAND}`)}`
22218
+ `${import_picocolors2.default.bold("Telemetry")} ${import_picocolors2.default.dim(`disabled. Enable anytime: ${TELEMETRY_OPT_IN_COMMAND}`)}`
22041
22219
  );
22042
22220
  return { kind: "disabled", reason: "choice", commit };
22043
22221
  }
@@ -22182,7 +22360,7 @@ async function promptInstallMode(defaultMode = "global") {
22182
22360
  }
22183
22361
 
22184
22362
  // ../argent-installer/src/install-runner.ts
22185
- var import_picocolors3 = __toESM(require_picocolors(), 1);
22363
+ var import_picocolors4 = __toESM(require_picocolors(), 1);
22186
22364
 
22187
22365
  // ../argent-installer/src/shell.ts
22188
22366
  import { execFileSync as execFileSync5, spawn as spawn2 } from "node:child_process";
@@ -22242,8 +22420,8 @@ function runShellCommand(cmd, opts = {}) {
22242
22420
  // ../argent-installer/src/skills.ts
22243
22421
  import { execFileSync as execFileSync6 } from "node:child_process";
22244
22422
  import * as fs19 from "node:fs";
22245
- import * as path20 from "node:path";
22246
- var import_picocolors2 = __toESM(require_picocolors(), 1);
22423
+ import * as path21 from "node:path";
22424
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
22247
22425
  function getScopeSpecs(projectRoot) {
22248
22426
  return [
22249
22427
  {
@@ -22322,7 +22500,7 @@ function pruneLegacySkillDirs(projectRoot, scope, bundled = new Set(listBundledS
22322
22500
  const removed = /* @__PURE__ */ new Set();
22323
22501
  for (const { targetPath } of skillTargets) {
22324
22502
  for (const name of legacy) {
22325
- const dir = path20.join(targetPath, name);
22503
+ const dir = path21.join(targetPath, name);
22326
22504
  try {
22327
22505
  if (!fs19.lstatSync(dir, { throwIfNoEntry: false })) continue;
22328
22506
  fs19.rmSync(dir, { recursive: true, force: true });
@@ -22361,17 +22539,17 @@ function formatSkillRefreshSummary(results) {
22361
22539
  for (const r2 of results) {
22362
22540
  const parts = [];
22363
22541
  if (r2.syncError) {
22364
- parts.push(`${import_picocolors2.default.red("sync failed")} ${import_picocolors2.default.dim(`(${r2.syncError})`)}`);
22542
+ parts.push(`${import_picocolors3.default.red("sync failed")} ${import_picocolors3.default.dim(`(${r2.syncError})`)}`);
22365
22543
  } else if (r2.synced > 0) {
22366
22544
  parts.push(`synced ${r2.synced}`);
22367
22545
  }
22368
22546
  if (r2.pruneError) {
22369
- parts.push(`${import_picocolors2.default.red("prune failed")} ${import_picocolors2.default.dim(`(${r2.pruneError})`)}`);
22547
+ parts.push(`${import_picocolors3.default.red("prune failed")} ${import_picocolors3.default.dim(`(${r2.pruneError})`)}`);
22370
22548
  } else if (r2.pruned.length > 0) {
22371
22549
  parts.push(`pruned ${r2.pruned.length} (${r2.pruned.join(", ")})`);
22372
22550
  }
22373
22551
  if (parts.length > 0) {
22374
- lines.push(`${import_picocolors2.default.green("+")} ${r2.scope}: ${parts.join(", ")}`);
22552
+ lines.push(`${import_picocolors3.default.green("+")} ${r2.scope}: ${parts.join(", ")}`);
22375
22553
  }
22376
22554
  }
22377
22555
  return lines.length > 0 ? lines.join("\n") : null;
@@ -22420,8 +22598,8 @@ async function installLocally(opts) {
22420
22598
  const projectRoot = resolveProjectRoot2(process.cwd());
22421
22599
  if (!hasProjectPackageJson(projectRoot)) {
22422
22600
  log.error(
22423
- `Local install needs a package.json at ${import_picocolors3.default.cyan(projectRoot)}.
22424
- Run ${import_picocolors3.default.cyan("npm init -y")} there first, or use ${import_picocolors3.default.cyan("argent init --global")}.`
22601
+ `Local install needs a package.json at ${import_picocolors4.default.cyan(projectRoot)}.
22602
+ Run ${import_picocolors4.default.cyan("npm init -y")} there first, or use ${import_picocolors4.default.cyan("argent init --global")}.`
22425
22603
  );
22426
22604
  await tel.trackPackageAction(
22427
22605
  "fresh_install",
@@ -22434,7 +22612,7 @@ async function installLocally(opts) {
22434
22612
  }
22435
22613
  if (isDeclaredLocally(projectRoot) && isLocallyInstalled(projectRoot) && !fromTar) {
22436
22614
  const startedAt2 = performance.now();
22437
- log.info(`${PACKAGE_NAME} is already a devDependency ${import_picocolors3.default.dim(`(${projectRoot})`)}.`);
22615
+ log.info(`${PACKAGE_NAME} is already a devDependency ${import_picocolors4.default.dim(`(${projectRoot})`)}.`);
22438
22616
  await tel.trackPackageAction("already_installed", startedAt2, true);
22439
22617
  return;
22440
22618
  }
@@ -22470,23 +22648,23 @@ async function installLocally(opts) {
22470
22648
  last_attempt_duration_ms: performance.now() - lastAttemptStartedAt
22471
22649
  });
22472
22650
  if (!landed) {
22473
- spinner2.stop(import_picocolors3.default.red(interrupted ? "Local install interrupted." : "Local install failed."));
22651
+ spinner2.stop(import_picocolors4.default.red(interrupted ? "Local install interrupted." : "Local install failed."));
22474
22652
  if (missingBinary) {
22475
22653
  log.error(
22476
- `This project uses ${import_picocolors3.default.cyan(pm)}, but the ${import_picocolors3.default.cyan(pm)} command was not found on PATH.`
22654
+ `This project uses ${import_picocolors4.default.cyan(pm)}, but the ${import_picocolors4.default.cyan(pm)} command was not found on PATH.`
22477
22655
  );
22478
22656
  log.info(
22479
- `Install ${import_picocolors3.default.cyan(pm)} first` + (pm === "pnpm" || pm === "yarn" ? ` (e.g. ${import_picocolors3.default.cyan(`corepack enable ${pm}`)}, or see the ${pm} install docs)` : "") + `, then re-run ${import_picocolors3.default.cyan("argent init --local")}.`
22657
+ `Install ${import_picocolors4.default.cyan(pm)} first` + (pm === "pnpm" || pm === "yarn" ? ` (e.g. ${import_picocolors4.default.cyan(`corepack enable ${pm}`)}, or see the ${pm} install docs)` : "") + `, then re-run ${import_picocolors4.default.cyan("argent init --local")}.`
22480
22658
  );
22481
22659
  } else if (interrupted) {
22482
- log.error(`The ${import_picocolors3.default.cyan(pm)} install was interrupted before it finished.`);
22483
- log.info(`Re-run ${import_picocolors3.default.cyan("argent init --local")} to try again.`);
22660
+ log.error(`The ${import_picocolors4.default.cyan(pm)} install was interrupted before it finished.`);
22661
+ log.info(`Re-run ${import_picocolors4.default.cyan("argent init --local")} to try again.`);
22484
22662
  } else {
22485
22663
  log.error(
22486
- installError ? `${installError}` : `The install reported success but ${import_picocolors3.default.cyan(PACKAGE_NAME)} is not in node_modules.`
22664
+ installError ? `${installError}` : `The install reported success but ${import_picocolors4.default.cyan(PACKAGE_NAME)} is not in node_modules.`
22487
22665
  );
22488
22666
  log.info(
22489
- `Install manually with: ${import_picocolors3.default.cyan(`cd ${shellQuotePath(projectRoot)} && ${cmdStr}`)}`
22667
+ `Install manually with: ${import_picocolors4.default.cyan(`cd ${shellQuotePath(projectRoot)} && ${cmdStr}`)}`
22490
22668
  );
22491
22669
  }
22492
22670
  await tel.trackPackageAction(
@@ -22500,16 +22678,16 @@ async function installLocally(opts) {
22500
22678
  process.exit(1);
22501
22679
  }
22502
22680
  spinner2.stop(
22503
- import_picocolors3.default.green(
22681
+ import_picocolors4.default.green(
22504
22682
  materializeOnly ? `Installed ${PACKAGE_NAME} from the committed dependency.` : `Added ${PACKAGE_NAME} to devDependencies.`
22505
22683
  )
22506
22684
  );
22507
22685
  if (installError) {
22508
- log.warn(import_picocolors3.default.dim(`${pm} exited non-zero but ${PACKAGE_NAME} is installed \u2014 continuing.`));
22686
+ log.warn(import_picocolors4.default.dim(`${pm} exited non-zero but ${PACKAGE_NAME} is installed \u2014 continuing.`));
22509
22687
  if (pm === "pnpm") {
22510
22688
  log.info(
22511
- import_picocolors3.default.dim(
22512
- `pnpm blocks dependency build scripts by default. ${PACKAGE_NAME} does not need them; run ${import_picocolors3.default.cyan("pnpm approve-builds")} only if you want optional native features (e.g. source-level profiling).`
22689
+ import_picocolors4.default.dim(
22690
+ `pnpm blocks dependency build scripts by default. ${PACKAGE_NAME} does not need them; run ${import_picocolors4.default.cyan("pnpm approve-builds")} only if you want optional native features (e.g. source-level profiling).`
22513
22691
  )
22514
22692
  );
22515
22693
  }
@@ -22532,13 +22710,13 @@ async function runGlobal(opts) {
22532
22710
  const packageActionStartedAt2 = performance.now();
22533
22711
  try {
22534
22712
  await runShellCommand(cmd);
22535
- spinner3.stop(import_picocolors3.default.green("Installed globally."));
22713
+ spinner3.stop(import_picocolors4.default.green("Installed globally."));
22536
22714
  version = getGloballyInstalledVersion() ?? getInstalledVersion() ?? version;
22537
22715
  await tel.trackPackageAction("fresh_install", packageActionStartedAt2, true);
22538
22716
  } catch (err) {
22539
- spinner3.stop(import_picocolors3.default.red("Installation failed."));
22717
+ spinner3.stop(import_picocolors4.default.red("Installation failed."));
22540
22718
  log.error(`${err}`);
22541
- log.info(`Install Argent manually with: ${import_picocolors3.default.cyan(cmdStr)}`);
22719
+ log.info(`Install Argent manually with: ${import_picocolors4.default.cyan(cmdStr)}`);
22542
22720
  await tel.trackPackageAction(
22543
22721
  "fresh_install",
22544
22722
  packageActionStartedAt2,
@@ -22558,12 +22736,12 @@ async function runGlobal(opts) {
22558
22736
  spinner3.start(`Installing from ${fromTar}...`);
22559
22737
  try {
22560
22738
  await runShellCommand(cmd);
22561
- spinner3.stop(import_picocolors3.default.green("Installed from tarball."));
22739
+ spinner3.stop(import_picocolors4.default.green("Installed from tarball."));
22562
22740
  version = getGloballyInstalledVersion() ?? getInstalledVersion() ?? version;
22563
22741
  } catch (err) {
22564
- spinner3.stop(import_picocolors3.default.red("Installation failed."));
22742
+ spinner3.stop(import_picocolors4.default.red("Installation failed."));
22565
22743
  log.error(`${err}`);
22566
- log.info(`Install manually with: ${import_picocolors3.default.cyan(cmdStr)}`);
22744
+ log.info(`Install manually with: ${import_picocolors4.default.cyan(cmdStr)}`);
22567
22745
  await tel.finalize(INSTALL_FROM_TAR_PACKAGE_FAILED);
22568
22746
  process.exit(1);
22569
22747
  }
@@ -22581,10 +22759,10 @@ async function runGlobal(opts) {
22581
22759
  latest = getLatestVersion();
22582
22760
  } catch {
22583
22761
  }
22584
- spinner2.stop(import_picocolors3.default.dim("Version check complete."));
22762
+ spinner2.stop(import_picocolors4.default.dim("Version check complete."));
22585
22763
  if (latest && globalVersion === null) {
22586
22764
  log.warn(
22587
- `Could not determine the global install's version \u2014 skipping the update check. Run ${import_picocolors3.default.cyan("argent update")} to check for updates.`
22765
+ `Could not determine the global install's version \u2014 skipping the update check. Run ${import_picocolors4.default.cyan("argent update")} to check for updates.`
22588
22766
  );
22589
22767
  await tel.trackPackageAction("no_update", packageActionStartedAt, true);
22590
22768
  } else if (latest && isNewerVersion(latest, version)) {
@@ -22599,7 +22777,7 @@ async function runGlobal(opts) {
22599
22777
  await tel.trackPackageAction("update_skipped", packageActionStartedAt, true);
22600
22778
  } else {
22601
22779
  const updateChoice = await select({
22602
- message: `Update available: ${import_picocolors3.default.yellow(`v${version}`)} \u2192 ${import_picocolors3.default.green(`v${latest}`)}`,
22780
+ message: `Update available: ${import_picocolors4.default.yellow(`v${version}`)} \u2192 ${import_picocolors4.default.green(`v${latest}`)}`,
22603
22781
  options: [
22604
22782
  {
22605
22783
  value: "update",
@@ -22628,14 +22806,14 @@ async function runGlobal(opts) {
22628
22806
  const updateStartedAt = performance.now();
22629
22807
  try {
22630
22808
  await runShellCommand(cmd);
22631
- updateSpinner.stop(import_picocolors3.default.green(`Updated to v${latest}.`));
22809
+ updateSpinner.stop(import_picocolors4.default.green(`Updated to v${latest}.`));
22632
22810
  version = getGloballyInstalledVersion() ?? getInstalledVersion() ?? version;
22633
22811
  await tel.trackPackageAction("init_triggered_update", updateStartedAt, true);
22634
22812
  reportSkillRefresh(resolveProjectRoot2(process.cwd()), "installer_skills_refresh");
22635
22813
  } catch (err) {
22636
- updateSpinner.stop(import_picocolors3.default.red("Update failed."));
22814
+ updateSpinner.stop(import_picocolors4.default.red("Update failed."));
22637
22815
  log.error(`${err}`);
22638
- log.info(`You can update manually later: ${import_picocolors3.default.cyan(cmdStr)}`);
22816
+ log.info(`You can update manually later: ${import_picocolors4.default.cyan(cmdStr)}`);
22639
22817
  await tel.trackPackageAction(
22640
22818
  "update_failed",
22641
22819
  updateStartedAt,
@@ -22659,7 +22837,7 @@ async function runGlobal(opts) {
22659
22837
  }
22660
22838
 
22661
22839
  // ../argent-installer/src/init-adapters.ts
22662
- var import_picocolors4 = __toESM(require_picocolors(), 1);
22840
+ var import_picocolors5 = __toESM(require_picocolors(), 1);
22663
22841
  function previouslyConfiguredAdapters(eligible, installMode) {
22664
22842
  const wantedScope = installMode === "local" ? "project" : "global";
22665
22843
  const scopes = findConfiguredAdapterScopes(eligible, process.cwd());
@@ -22673,7 +22851,7 @@ async function chooseAdapters(opts) {
22673
22851
  if (globalOnly.length > 0) {
22674
22852
  eligible = ALL_ADAPTERS.filter((a2) => a2.projectPath(process.cwd()) != null);
22675
22853
  log.info(
22676
- import_picocolors4.default.dim(
22854
+ import_picocolors5.default.dim(
22677
22855
  `Local mode configures project files only \u2014 ${globalOnly.map((a2) => a2.name).join(", ")} (global-only config) not offered.`
22678
22856
  )
22679
22857
  );
@@ -22694,9 +22872,9 @@ async function chooseAdapters(opts) {
22694
22872
  const hasProject = a2.projectPath(process.cwd()) != null;
22695
22873
  const hasGlobal = a2.globalPath() != null;
22696
22874
  if (!hasProject && hasGlobal) {
22697
- parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${a2.name}'s global config`)));
22875
+ parts.push(import_picocolors5.default.italic(import_picocolors5.default.cyan(`\u24D8 will be installed into ${a2.name}'s global config`)));
22698
22876
  } else if (hasProject && !hasGlobal) {
22699
- parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${a2.name}'s project config`)));
22877
+ parts.push(import_picocolors5.default.italic(import_picocolors5.default.cyan(`\u24D8 will be installed into ${a2.name}'s project config`)));
22700
22878
  }
22701
22879
  return {
22702
22880
  value: a2,
@@ -22704,7 +22882,7 @@ async function chooseAdapters(opts) {
22704
22882
  hint: parts.length > 0 ? parts.join(", ") : void 0
22705
22883
  };
22706
22884
  });
22707
- log.message(import_picocolors4.default.dim(" Use arrow keys to move, space to toggle, enter to confirm."));
22885
+ log.message(import_picocolors5.default.dim(" Use arrow keys to move, space to toggle, enter to confirm."));
22708
22886
  const selected = await multiselect({
22709
22887
  message: "Which editors should Argent be configured for?",
22710
22888
  options: choices,
@@ -22716,7 +22894,7 @@ async function chooseAdapters(opts) {
22716
22894
  }
22717
22895
 
22718
22896
  // ../argent-installer/src/init-scope.ts
22719
- var import_picocolors5 = __toESM(require_picocolors(), 1);
22897
+ var import_picocolors6 = __toESM(require_picocolors(), 1);
22720
22898
  import { existsSync as existsSync13 } from "node:fs";
22721
22899
  import { resolve as resolve11 } from "node:path";
22722
22900
  async function chooseScope(opts) {
@@ -22726,7 +22904,7 @@ async function chooseScope(opts) {
22726
22904
  if (opts.nonInteractive) {
22727
22905
  return { scope: "local" };
22728
22906
  }
22729
- log.message(import_picocolors5.default.dim(" Use arrow keys to move, enter to confirm."));
22907
+ log.message(import_picocolors6.default.dim(" Use arrow keys to move, enter to confirm."));
22730
22908
  const scopeChoice = await select({
22731
22909
  message: "Install MCP server globally or locally?",
22732
22910
  options: [
@@ -22765,7 +22943,7 @@ async function chooseScope(opts) {
22765
22943
  }
22766
22944
 
22767
22945
  // ../argent-installer/src/init-mcp-write.ts
22768
- var import_picocolors6 = __toESM(require_picocolors(), 1);
22946
+ var import_picocolors7 = __toESM(require_picocolors(), 1);
22769
22947
  function writeMcpConfigs(args) {
22770
22948
  const { installMode, scope, effectiveRoot, projectRoot } = args;
22771
22949
  let adapters = args.selectedAdapters;
@@ -22782,14 +22960,14 @@ function writeMcpConfigs(args) {
22782
22960
  }
22783
22961
  if (adapters.length === 0) {
22784
22962
  log.warn(
22785
- import_picocolors6.default.yellow(
22786
- `No MCP config was written: none of the selected editors supports a project-level config. Re-run ${import_picocolors6.default.cyan("argent init")} and select a different editor, or use ${import_picocolors6.default.cyan("argent init --global")}.`
22963
+ import_picocolors7.default.yellow(
22964
+ `No MCP config was written: none of the selected editors supports a project-level config. Re-run ${import_picocolors7.default.cyan("argent init")} and select a different editor, or use ${import_picocolors7.default.cyan("argent init --global")}.`
22787
22965
  )
22788
22966
  );
22789
22967
  }
22790
22968
  if (localCmdMode.kind === "local-npx") {
22791
22969
  log.warn(
22792
- `Could not resolve a project-local argent binary; committing ${import_picocolors6.default.cyan("npx --no-install argent mcp")}. Run ${import_picocolors6.default.cyan("npm install")} so it resolves.`
22970
+ `Could not resolve a project-local argent binary; committing ${import_picocolors7.default.cyan("npx --no-install argent mcp")}. Run ${import_picocolors7.default.cyan("npm install")} so it resolves.`
22793
22971
  );
22794
22972
  }
22795
22973
  }
@@ -22814,51 +22992,51 @@ function writeMcpConfigs(args) {
22814
22992
  const fallback = adapter.projectPath(projectRoot);
22815
22993
  if (keepsCommittedLocalEntry(adapter, fallback, projectRoot)) {
22816
22994
  lines.push(
22817
- `${import_picocolors6.default.yellow("!")} ${adapter.name} kept the committed local-mode entry ${import_picocolors6.default.dim(fallback)}`
22995
+ `${import_picocolors7.default.yellow("!")} ${adapter.name} kept the committed local-mode entry ${import_picocolors7.default.dim(fallback)}`
22818
22996
  );
22819
22997
  continue;
22820
22998
  }
22821
22999
  try {
22822
23000
  adapter.write(fallback, entryFor("local"));
22823
- lines.push(`${import_picocolors6.default.green("+")} ${adapter.name} ${import_picocolors6.default.dim(`(local fallback: ${fallback})`)}`);
23001
+ lines.push(`${import_picocolors7.default.green("+")} ${adapter.name} ${import_picocolors7.default.dim(`(local fallback: ${fallback})`)}`);
22824
23002
  } catch (err) {
22825
- lines.push(`${import_picocolors6.default.red("x")} ${adapter.name}: ${import_picocolors6.default.dim(String(err))}`);
23003
+ lines.push(`${import_picocolors7.default.red("x")} ${adapter.name}: ${import_picocolors7.default.dim(String(err))}`);
22826
23004
  }
22827
23005
  } else if (scope !== "global" && adapter.globalPath()) {
22828
23006
  const fallback = adapter.globalPath();
22829
23007
  try {
22830
23008
  adapter.write(fallback, entryFor("global"));
22831
23009
  lines.push(
22832
- `${import_picocolors6.default.green("+")} ${adapter.name} ${import_picocolors6.default.dim(`(global fallback: ${fallback})`)}`
23010
+ `${import_picocolors7.default.green("+")} ${adapter.name} ${import_picocolors7.default.dim(`(global fallback: ${fallback})`)}`
22833
23011
  );
22834
23012
  } catch (err) {
22835
- lines.push(`${import_picocolors6.default.red("x")} ${adapter.name}: ${import_picocolors6.default.dim(String(err))}`);
23013
+ lines.push(`${import_picocolors7.default.red("x")} ${adapter.name}: ${import_picocolors7.default.dim(String(err))}`);
22836
23014
  }
22837
23015
  } else {
22838
23016
  lines.push(
22839
- `${import_picocolors6.default.yellow("-")} ${adapter.name} ${import_picocolors6.default.dim("(no config path for this scope)")}`
23017
+ `${import_picocolors7.default.yellow("-")} ${adapter.name} ${import_picocolors7.default.dim("(no config path for this scope)")}`
22840
23018
  );
22841
23019
  }
22842
23020
  continue;
22843
23021
  }
22844
23022
  if (scope !== "global" && keepsCommittedLocalEntry(adapter, configPath, effectiveRoot)) {
22845
23023
  lines.push(
22846
- `${import_picocolors6.default.yellow("!")} ${adapter.name} kept the committed local-mode entry ${import_picocolors6.default.dim(configPath)}`
23024
+ `${import_picocolors7.default.yellow("!")} ${adapter.name} kept the committed local-mode entry ${import_picocolors7.default.dim(configPath)}`
22847
23025
  );
22848
23026
  continue;
22849
23027
  }
22850
23028
  try {
22851
23029
  adapter.write(configPath, entryFor(normalizedScope));
22852
- lines.push(`${import_picocolors6.default.green("+")} ${adapter.name} ${import_picocolors6.default.dim(configPath)}`);
23030
+ lines.push(`${import_picocolors7.default.green("+")} ${adapter.name} ${import_picocolors7.default.dim(configPath)}`);
22853
23031
  } catch (err) {
22854
- lines.push(`${import_picocolors6.default.red("x")} ${adapter.name}: ${import_picocolors6.default.dim(String(err))}`);
23032
+ lines.push(`${import_picocolors7.default.red("x")} ${adapter.name}: ${import_picocolors7.default.dim(String(err))}`);
22855
23033
  }
22856
23034
  }
22857
23035
  return { adapters, lines };
22858
23036
  }
22859
23037
 
22860
23038
  // ../argent-installer/src/init-stale-config.ts
22861
- var import_picocolors7 = __toESM(require_picocolors(), 1);
23039
+ var import_picocolors8 = __toESM(require_picocolors(), 1);
22862
23040
  async function cleanupStaleMcpConfigs(args) {
22863
23041
  const { writtenAdapters, detectedAdapters, installMode, scope, effectiveRoot } = args;
22864
23042
  const lines = [];
@@ -22868,11 +23046,11 @@ async function cleanupStaleMcpConfigs(args) {
22868
23046
  const isProvablyDead = (entry) => entry !== null && entry.command === MCP_BINARY_NAME && !globalArgentOnPath && !hasCustomizingEnv(entry);
22869
23047
  const removed = (adapterName, location, what) => {
22870
23048
  removedCount += 1;
22871
- lines.push(`${import_picocolors7.default.green("+")} ${adapterName}: removed ${what} ${import_picocolors7.default.dim(`(${location})`)}`);
23049
+ lines.push(`${import_picocolors8.default.green("+")} ${adapterName}: removed ${what} ${import_picocolors8.default.dim(`(${location})`)}`);
22872
23050
  };
22873
23051
  const warned = (adapterName, location, why) => {
22874
23052
  warnedCount += 1;
22875
- lines.push(`${import_picocolors7.default.yellow("!")} ${adapterName}: ${why} ${import_picocolors7.default.dim(`(${location})`)}`);
23053
+ lines.push(`${import_picocolors8.default.yellow("!")} ${adapterName}: ${why} ${import_picocolors8.default.dim(`(${location})`)}`);
22876
23054
  };
22877
23055
  const pending = [];
22878
23056
  for (const adapter of writtenAdapters) {
@@ -23000,7 +23178,7 @@ async function cleanupStaleMcpConfigs(args) {
23000
23178
  }
23001
23179
 
23002
23180
  // ../argent-installer/src/init-allowlist.ts
23003
- var import_picocolors8 = __toESM(require_picocolors(), 1);
23181
+ var import_picocolors9 = __toESM(require_picocolors(), 1);
23004
23182
  async function configureAllowlist(args) {
23005
23183
  const { adapters, effectiveRoot, scope, nonInteractive } = args;
23006
23184
  const adaptersWithAllowlist = adapters.filter((a2) => a2.addAllowlist);
@@ -23010,12 +23188,12 @@ async function configureAllowlist(args) {
23010
23188
  log.info(
23011
23189
  `By default, editors ask for confirmation before running each MCP tool.
23012
23190
  Adding Argent to the auto-approve allowlist lets tools run without
23013
- repeated prompts. This is ${import_picocolors8.default.cyan("recommended")} for a smooth experience.`
23191
+ repeated prompts. This is ${import_picocolors9.default.cyan("recommended")} for a smooth experience.`
23014
23192
  );
23015
23193
  if (nonInteractive) {
23016
23194
  enabled = true;
23017
23195
  } else {
23018
- log.message(import_picocolors8.default.dim(" Press y for yes, n for no, enter to confirm."));
23196
+ log.message(import_picocolors9.default.dim(" Press y for yes, n for no, enter to confirm."));
23019
23197
  const allowlistChoice = await confirm({
23020
23198
  message: "Add Argent tools to editor auto-approve lists? - recommended",
23021
23199
  initialValue: true
@@ -23029,39 +23207,39 @@ async function configureAllowlist(args) {
23029
23207
  for (const adapter of adaptersWithAllowlist) {
23030
23208
  const hasPath = scope === "global" ? adapter.globalPath() : adapter.projectPath(effectiveRoot);
23031
23209
  if (!hasPath) {
23032
- lines.push(`${import_picocolors8.default.yellow("-")} ${adapter.name} ${import_picocolors8.default.dim("(no config for this scope)")}`);
23210
+ lines.push(`${import_picocolors9.default.yellow("-")} ${adapter.name} ${import_picocolors9.default.dim("(no config for this scope)")}`);
23033
23211
  continue;
23034
23212
  }
23035
23213
  try {
23036
23214
  adapter.addAllowlist(effectiveRoot, scope);
23037
- lines.push(`${import_picocolors8.default.green("+")} ${adapter.name}`);
23215
+ lines.push(`${import_picocolors9.default.green("+")} ${adapter.name}`);
23038
23216
  } catch (err) {
23039
- lines.push(`${import_picocolors8.default.red("x")} ${adapter.name}: ${import_picocolors8.default.dim(String(err))}`);
23217
+ lines.push(`${import_picocolors9.default.red("x")} ${adapter.name}: ${import_picocolors9.default.dim(String(err))}`);
23040
23218
  }
23041
23219
  }
23042
23220
  for (const adapter of adaptersWithoutAllowlist) {
23043
23221
  lines.push(
23044
- `${import_picocolors8.default.yellow("-")} ${adapter.name} ${import_picocolors8.default.dim("(no auto-approve API - configure manually)")}`
23222
+ `${import_picocolors9.default.yellow("-")} ${adapter.name} ${import_picocolors9.default.dim("(no auto-approve API - configure manually)")}`
23045
23223
  );
23046
23224
  }
23047
23225
  return { enabled, lines };
23048
23226
  }
23049
23227
 
23050
23228
  // ../argent-installer/src/init-skills.ts
23051
- var import_picocolors9 = __toESM(require_picocolors(), 1);
23229
+ var import_picocolors10 = __toESM(require_picocolors(), 1);
23052
23230
  import { spawn as spawn3 } from "node:child_process";
23053
23231
  import * as os3 from "node:os";
23054
23232
  async function runSkillsStep(args) {
23055
23233
  const { nonInteractive, fromTar, version, scope, customRoot } = args;
23056
- log.step(import_picocolors9.default.bold("Step 2: Skills Installation"));
23057
- log.warn(import_picocolors9.default.yellow("Skills installation is required for Argent to function properly."));
23234
+ log.step(import_picocolors10.default.bold("Step 2: Skills Installation"));
23235
+ log.warn(import_picocolors10.default.yellow("Skills installation is required for Argent to function properly."));
23058
23236
  let skillsMethod;
23059
23237
  const online = await isOnline();
23060
23238
  const offlineWithCache = !online && isSkillsCliAvailable();
23061
23239
  const skillsCliReady = online || offlineWithCache;
23062
23240
  if (!skillsCliReady) {
23063
23241
  log.warn(
23064
- import_picocolors9.default.yellow("You appear to be offline. ") + "Automatic skills installation requires a network connection."
23242
+ import_picocolors10.default.yellow("You appear to be offline. ") + "Automatic skills installation requires a network connection."
23065
23243
  );
23066
23244
  }
23067
23245
  if (!skillsCliReady) {
@@ -23069,7 +23247,7 @@ async function runSkillsStep(args) {
23069
23247
  } else if (nonInteractive) {
23070
23248
  skillsMethod = "default";
23071
23249
  } else {
23072
- log.message(import_picocolors9.default.dim(" Use arrow keys to move, enter to confirm."));
23250
+ log.message(import_picocolors10.default.dim(" Use arrow keys to move, enter to confirm."));
23073
23251
  const choice = await select({
23074
23252
  message: "How would you like to install skills?",
23075
23253
  options: [
@@ -23100,17 +23278,17 @@ async function runSkillsStep(args) {
23100
23278
  note(
23101
23279
  [
23102
23280
  `Skills are bundled at:`,
23103
- ` ${import_picocolors9.default.cyan(SKILLS_DIR)}`,
23281
+ ` ${import_picocolors10.default.cyan(SKILLS_DIR)}`,
23104
23282
  ``,
23105
23283
  `To install manually, copy them to your editor's skills directory:`,
23106
23284
  ``,
23107
- ` ${import_picocolors9.default.dim("# Claude Code")}`,
23285
+ ` ${import_picocolors10.default.dim("# Claude Code")}`,
23108
23286
  ` cp -r ${SKILLS_DIR}/* ${scope === "global" ? "~/.claude/skills/" : `${scope === "custom" ? customRoot : "."}/.claude/skills/`}`,
23109
23287
  ``,
23110
- ` ${import_picocolors9.default.dim("# Cursor")}`,
23288
+ ` ${import_picocolors10.default.dim("# Cursor")}`,
23111
23289
  ` cp -r ${SKILLS_DIR}/* ${scope === "global" ? "~/.cursor/skills/" : `${scope === "custom" ? customRoot : "."}/.cursor/skills/`}`,
23112
23290
  ``,
23113
- ` ${import_picocolors9.default.dim("# Or use npx skills directly:")}`,
23291
+ ` ${import_picocolors10.default.dim("# Or use npx skills directly:")}`,
23114
23292
  ` npx skills add ${skillsSource}`
23115
23293
  ].join("\n"),
23116
23294
  "Manual Skills Installation"
@@ -23126,7 +23304,7 @@ async function runSkillsStep(args) {
23126
23304
  }
23127
23305
  const baseArgs = offlineWithCache ? ["--no-install", ...skillsArgs] : skillsArgs;
23128
23306
  const npxArgs = withNpmForce(baseArgs);
23129
- log.info(`Running: ${import_picocolors9.default.dim("npx")} ${import_picocolors9.default.cyan(baseArgs.join(" "))}`);
23307
+ log.info(`Running: ${import_picocolors10.default.dim("npx")} ${import_picocolors10.default.cyan(baseArgs.join(" "))}`);
23130
23308
  const spinner2 = spinner();
23131
23309
  if (skillsMethod === "default") {
23132
23310
  spinner2.start("Installing skills...");
@@ -23162,12 +23340,12 @@ async function runSkillsStep(args) {
23162
23340
  }
23163
23341
  for (const name of pruneLegacySkillDirs(pruneRoot, pruneScope)) removed.add(name);
23164
23342
  if (removed.size > 0) {
23165
- log.info(import_picocolors9.default.dim(`Removed legacy skills: ${[...removed].sort().join(", ")}`));
23343
+ log.info(import_picocolors10.default.dim(`Removed legacy skills: ${[...removed].sort().join(", ")}`));
23166
23344
  }
23167
23345
  }
23168
23346
  } catch (err) {
23169
23347
  if (skillsMethod === "default") {
23170
- spinner2.stop(import_picocolors9.default.red("Skills installation failed."));
23348
+ spinner2.stop(import_picocolors10.default.red("Skills installation failed."));
23171
23349
  }
23172
23350
  log.error(`Failed to run npx skills: ${err}`);
23173
23351
  log.info(`You can install skills manually:
@@ -23222,9 +23400,9 @@ async function init2(args) {
23222
23400
  const tel = new InitTelemetry(initStartTime);
23223
23401
  try {
23224
23402
  printBanner();
23225
- intro(import_picocolors10.default.bgCyan(import_picocolors10.default.black(" argent init ")));
23403
+ intro(import_picocolors11.default.bgCyan(import_picocolors11.default.black(" argent init ")));
23226
23404
  let version = getInstalledVersion() ?? "unknown";
23227
- log.info(`${import_picocolors10.default.dim("Package:")} ${PACKAGE_NAME}@${version}`);
23405
+ log.info(`${import_picocolors11.default.dim("Package:")} ${PACKAGE_NAME}@${version}`);
23228
23406
  const consent = await resolveTelemetryConsent({
23229
23407
  nonInteractive: parsed.nonInteractive,
23230
23408
  disableFlag: parsed.noTelemetry
@@ -23264,7 +23442,7 @@ async function init2(args) {
23264
23442
  writeConsentFlag(false, "project", { cwd: initProjectRoot });
23265
23443
  wroteProjectTelemetryOptOut = true;
23266
23444
  log.info(
23267
- `${import_picocolors10.default.bold("Telemetry")} ${import_picocolors10.default.dim("also disabled for this project \u2014")} ${import_picocolors10.default.cyan(".argent/config.json")} ${import_picocolors10.default.dim("(commit it so the opt-out applies to every clone).")}`
23445
+ `${import_picocolors11.default.bold("Telemetry")} ${import_picocolors11.default.dim("also disabled for this project \u2014")} ${import_picocolors11.default.cyan(".argent/config.json")} ${import_picocolors11.default.dim("(commit it so the opt-out applies to every clone).")}`
23268
23446
  );
23269
23447
  } catch (err) {
23270
23448
  log.warn(`Could not write the project telemetry opt-out: ${err}`);
@@ -23277,13 +23455,13 @@ async function init2(args) {
23277
23455
  version,
23278
23456
  tel
23279
23457
  });
23280
- log.step(import_picocolors10.default.bold("Step 1: MCP Server Configuration"));
23458
+ log.step(import_picocolors11.default.bold("Step 1: MCP Server Configuration"));
23281
23459
  const { selected: selectedAdapters, detected } = await chooseAdapters({
23282
23460
  nonInteractive: parsed.nonInteractive,
23283
23461
  installMode: tel.installMode
23284
23462
  });
23285
23463
  tel.editorsConfiguredCount = selectedAdapters.length;
23286
- log.info(`Editors: ${selectedAdapters.map((a2) => import_picocolors10.default.cyan(a2.name)).join(", ")}`);
23464
+ log.info(`Editors: ${selectedAdapters.map((a2) => import_picocolors11.default.cyan(a2.name)).join(", ")}`);
23287
23465
  const { scope, customRoot } = await chooseScope({
23288
23466
  installMode: tel.installMode,
23289
23467
  nonInteractive: parsed.nonInteractive
@@ -23322,7 +23500,7 @@ async function init2(args) {
23322
23500
  log.warn(
23323
23501
  `Dead argent entries from a previous global install were found in
23324
23502
  global (cross-project) config files:
23325
- ` + items.map((item) => ` ${import_picocolors10.default.cyan(item)}`).join("\n")
23503
+ ` + items.map((item) => ` ${import_picocolors11.default.cyan(item)}`).join("\n")
23326
23504
  );
23327
23505
  const choice = await confirm({
23328
23506
  message: "Remove these dead global entries? - recommended",
@@ -23352,13 +23530,13 @@ async function init2(args) {
23352
23530
  if (isDeclaredLocally(effectiveRoot)) {
23353
23531
  if (readInstallRecord(effectiveRoot)) {
23354
23532
  log.info(
23355
- import_picocolors10.default.dim(
23356
- `Kept .argent/install.json \u2014 this project still declares ${PACKAGE_NAME} as a devDependency, so it stays in local mode. To fully convert to a global install, run ${import_picocolors10.default.cyan("argent uninstall --local")} first, then re-run ${import_picocolors10.default.cyan("argent init --global")}.`
23533
+ import_picocolors11.default.dim(
23534
+ `Kept .argent/install.json \u2014 this project still declares ${PACKAGE_NAME} as a devDependency, so it stays in local mode. To fully convert to a global install, run ${import_picocolors11.default.cyan("argent uninstall --local")} first, then re-run ${import_picocolors11.default.cyan("argent init --global")}.`
23357
23535
  )
23358
23536
  );
23359
23537
  }
23360
23538
  } else if (removeInstallRecord(effectiveRoot)) {
23361
- log.info(import_picocolors10.default.dim("Removed stale .argent/install.json (previous local-mode marker)."));
23539
+ log.info(import_picocolors11.default.dim("Removed stale .argent/install.json (previous local-mode marker)."));
23362
23540
  }
23363
23541
  }
23364
23542
  writeCliRecord({ mode: tel.installMode, projectRoot, version });
@@ -23379,7 +23557,7 @@ async function init2(args) {
23379
23557
  scope,
23380
23558
  customRoot
23381
23559
  });
23382
- log.step(import_picocolors10.default.bold("Step 3: Rules & Agents"));
23560
+ log.step(import_picocolors11.default.bold("Step 3: Rules & Agents"));
23383
23561
  const copyResults = copyRulesAndAgents(
23384
23562
  writtenAdapters,
23385
23563
  effectiveRoot,
@@ -23390,8 +23568,17 @@ async function init2(args) {
23390
23568
  if (copyResults.length > 0) {
23391
23569
  note(copyResults.join("\n"), "Rules & Agents");
23392
23570
  } else {
23393
- log.info(import_picocolors10.default.dim("No rules or agents to copy for selected editors."));
23394
- }
23571
+ log.info(import_picocolors11.default.dim("No rules or agents to copy for selected editors."));
23572
+ }
23573
+ await reportRetiredFiles(
23574
+ findRetiredRulesAndAgents(
23575
+ [{ adapters: writtenAdapters, scope: normalizedScope }],
23576
+ effectiveRoot,
23577
+ RULES_DIR,
23578
+ AGENTS_DIR
23579
+ ),
23580
+ !parsed.nonInteractive
23581
+ );
23395
23582
  printSummary({
23396
23583
  installMode: tel.installMode,
23397
23584
  selectedAdapters: writtenAdapters,
@@ -23403,15 +23590,15 @@ async function init2(args) {
23403
23590
  });
23404
23591
  note(
23405
23592
  [
23406
- import_picocolors10.default.bold(import_picocolors10.default.green("Argent is ready!")),
23593
+ import_picocolors11.default.bold(import_picocolors11.default.green("Argent is ready!")),
23407
23594
  "",
23408
- `${import_picocolors10.default.bold("Get started")} by asking your assistant:`,
23595
+ `${import_picocolors11.default.bold("Get started")} by asking your assistant:`,
23409
23596
  "",
23410
- ` ${import_picocolors10.default.bold(import_picocolors10.default.cyan(`"What can Argent do?"`))}`,
23597
+ ` ${import_picocolors11.default.bold(import_picocolors11.default.cyan(`"What can Argent do?"`))}`,
23411
23598
  "",
23412
- import_picocolors10.default.dim("It will walk you through all capabilities available.")
23599
+ import_picocolors11.default.dim("It will walk you through all capabilities available.")
23413
23600
  ].join("\n"),
23414
- import_picocolors10.default.bgGreen(import_picocolors10.default.black(" Get Started "))
23601
+ import_picocolors11.default.bgGreen(import_picocolors11.default.black(" Get Started "))
23415
23602
  );
23416
23603
  outro("Done.");
23417
23604
  tel.initSucceeded = true;
@@ -23441,25 +23628,25 @@ function printSummary({
23441
23628
  wroteProjectTelemetryOptOut
23442
23629
  }) {
23443
23630
  const summaryLines = [
23444
- `${import_picocolors10.default.green("Install mode")} ${installMode === "local" ? "local (devDependency)" : "global"}`,
23445
- selectedAdapters.length > 0 ? `${import_picocolors10.default.green("MCP server")} configured for ${selectedAdapters.map((a2) => a2.name).join(", ")} (${scope})` : `${import_picocolors10.default.yellow("MCP server")} NOT configured \u2014 no editor config was written`,
23446
- `${import_picocolors10.default.green("Auto-approve")} ${allowlistEnabled ? "enabled" : "skipped"}`,
23447
- `${import_picocolors10.default.green("Skills")} ${skillsMethod === "manual" ? "instructions printed" : "installed"}`,
23448
- `${import_picocolors10.default.green("Rules & agents")} ${copiedRules ? "copied" : "n/a"}`
23631
+ `${import_picocolors11.default.green("Install mode")} ${installMode === "local" ? "local (devDependency)" : "global"}`,
23632
+ selectedAdapters.length > 0 ? `${import_picocolors11.default.green("MCP server")} configured for ${selectedAdapters.map((a2) => a2.name).join(", ")} (${scope})` : `${import_picocolors11.default.yellow("MCP server")} NOT configured \u2014 no editor config was written`,
23633
+ `${import_picocolors11.default.green("Auto-approve")} ${allowlistEnabled ? "enabled" : "skipped"}`,
23634
+ `${import_picocolors11.default.green("Skills")} ${skillsMethod === "manual" ? "instructions printed" : "installed"}`,
23635
+ `${import_picocolors11.default.green("Rules & agents")} ${copiedRules ? "copied" : "n/a"}`
23449
23636
  ];
23450
23637
  note(summaryLines.join("\n"), "Summary");
23451
23638
  if (installMode === "local") {
23452
23639
  note(
23453
23640
  [
23454
- `Argent is installed as a ${import_picocolors10.default.bold("devDependency")} of this project.`,
23641
+ `Argent is installed as a ${import_picocolors11.default.bold("devDependency")} of this project.`,
23455
23642
  "",
23456
- `${import_picocolors10.default.bold("Commit")} so your team shares the same setup:`,
23457
- ` ${import_picocolors10.default.cyan("package.json")} + your lockfile`,
23643
+ `${import_picocolors11.default.bold("Commit")} so your team shares the same setup:`,
23644
+ ` ${import_picocolors11.default.cyan("package.json")} + your lockfile`,
23458
23645
  ` the written MCP config (.mcp.json, .cursor/mcp.json, \u2026)`,
23459
- ` ${import_picocolors10.default.cyan(".argent/install.json")}${wroteProjectTelemetryOptOut ? ` + ${import_picocolors10.default.cyan(".argent/config.json")}` : ""}, and the skills/rules/agents files`,
23646
+ ` ${import_picocolors11.default.cyan(".argent/install.json")}${wroteProjectTelemetryOptOut ? ` + ${import_picocolors11.default.cyan(".argent/config.json")}` : ""}, and the skills/rules/agents files`,
23460
23647
  "",
23461
- `Teammates then get argent on ${import_picocolors10.default.cyan("npm install")} \u2014 no global install, no ${import_picocolors10.default.cyan("argent init")}.`,
23462
- import_picocolors10.default.dim(
23648
+ `Teammates then get argent on ${import_picocolors11.default.cyan("npm install")} \u2014 no global install, no ${import_picocolors11.default.cyan("argent init")}.`,
23649
+ import_picocolors11.default.dim(
23463
23650
  "Note: the bare `argent` command will not be on their PATH; the MCP config runs the local copy."
23464
23651
  )
23465
23652
  ].join("\n"),
@@ -23482,14 +23669,14 @@ function printBanner() {
23482
23669
  console.log(line);
23483
23670
  }
23484
23671
  const attribution = "by Software Mansion";
23485
- console.log(" ".repeat(width - attribution.length) + import_picocolors10.default.dim(attribution));
23672
+ console.log(" ".repeat(width - attribution.length) + import_picocolors11.default.dim(attribution));
23486
23673
  console.log();
23487
23674
  }
23488
23675
 
23489
23676
  // ../argent-installer/src/update.ts
23490
- var import_picocolors11 = __toESM(require_picocolors(), 1);
23677
+ var import_picocolors12 = __toESM(require_picocolors(), 1);
23491
23678
  var import_semver5 = __toESM(require_semver2(), 1);
23492
- import * as path26 from "node:path";
23679
+ import * as path27 from "node:path";
23493
23680
 
23494
23681
  // ../argent-installer/src/install-targets.ts
23495
23682
  function parseTargetFlags(args) {
@@ -23555,16 +23742,16 @@ async function resolveInstallableUpdateTarget(pm, current) {
23555
23742
  // ../argent-tools-client/src/launcher.ts
23556
23743
  import * as net from "node:net";
23557
23744
  import * as fs20 from "node:fs";
23558
- import * as path21 from "node:path";
23745
+ import * as path22 from "node:path";
23559
23746
  import * as readline from "node:readline";
23560
23747
  import { homedir as homedir6 } from "node:os";
23561
23748
  import { spawn as spawn4, execFileSync as execFileSync7 } from "node:child_process";
23562
- import { createHash as createHash2, randomBytes } from "node:crypto";
23749
+ import { createHash as createHash3, randomBytes } from "node:crypto";
23563
23750
  import { mkdir, writeFile, readFile, readdir as readdir2, unlink, rename, chmod } from "node:fs/promises";
23564
- var STATE_DIR = path21.join(homedir6(), ".argent");
23565
- var STATE_FILE = path21.join(STATE_DIR, "tool-server.json");
23566
- var LOG_FILE = path21.join(STATE_DIR, "tool-server.log");
23567
- var LOCK_FILE = path21.join(STATE_DIR, "tool-server.lock");
23751
+ var STATE_DIR = path22.join(homedir6(), ".argent");
23752
+ var STATE_FILE = path22.join(STATE_DIR, "tool-server.json");
23753
+ var LOG_FILE = path22.join(STATE_DIR, "tool-server.log");
23754
+ var LOCK_FILE = path22.join(STATE_DIR, "tool-server.lock");
23568
23755
  function isProcessAlive(pid) {
23569
23756
  try {
23570
23757
  process.kill(pid, 0);
@@ -23574,8 +23761,8 @@ function isProcessAlive(pid) {
23574
23761
  }
23575
23762
  }
23576
23763
  function stateFileForBundle(bundlePath) {
23577
- const key = createHash2("sha256").update(bundlePath).digest("hex").slice(0, 12);
23578
- return path21.join(STATE_DIR, `tool-server-${key}.json`);
23764
+ const key = createHash3("sha256").update(bundlePath).digest("hex").slice(0, 12);
23765
+ return path22.join(STATE_DIR, `tool-server-${key}.json`);
23579
23766
  }
23580
23767
  async function readStateFile(file) {
23581
23768
  try {
@@ -23617,7 +23804,7 @@ async function readAllToolsServerStates() {
23617
23804
  const out = [];
23618
23805
  for (const name of names) {
23619
23806
  if (!STATE_FILE_RE.test(name)) continue;
23620
- const file = path21.join(STATE_DIR, name);
23807
+ const file = path22.join(STATE_DIR, name);
23621
23808
  const state2 = await readStateFile(file);
23622
23809
  if (state2) out.push({ file, state: state2 });
23623
23810
  }
@@ -23663,8 +23850,8 @@ async function killToolServer(bundlePath) {
23663
23850
  return alive;
23664
23851
  }
23665
23852
  function isPathWithin(child, parent) {
23666
- const rel = path21.relative(parent, child);
23667
- return rel !== "" && !rel.startsWith("..") && !path21.isAbsolute(rel);
23853
+ const rel = path22.relative(parent, child);
23854
+ return rel !== "" && !rel.startsWith("..") && !path22.isAbsolute(rel);
23668
23855
  }
23669
23856
  function tryRealpath(p) {
23670
23857
  try {
@@ -23674,10 +23861,10 @@ function tryRealpath(p) {
23674
23861
  }
23675
23862
  }
23676
23863
  async function killToolServerForInstallDir(packageDir) {
23677
- const parents = /* @__PURE__ */ new Set([path21.resolve(packageDir), tryRealpath(packageDir)]);
23864
+ const parents = /* @__PURE__ */ new Set([path22.resolve(packageDir), tryRealpath(packageDir)]);
23678
23865
  let killed = 0;
23679
23866
  for (const { file, state: state2 } of await readAllToolsServerStates()) {
23680
- const bundles = /* @__PURE__ */ new Set([path21.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
23867
+ const bundles = /* @__PURE__ */ new Set([path22.resolve(state2.bundlePath), tryRealpath(state2.bundlePath)]);
23681
23868
  const matches2 = [...bundles].some((b) => [...parents].some((p) => isPathWithin(b, p)));
23682
23869
  if (!matches2) continue;
23683
23870
  const fresh = await readStateFile(file);
@@ -23742,17 +23929,17 @@ function couldBeOurToolServer(pid, marker) {
23742
23929
  var import_yaml4 = __toESM(require_dist2(), 1);
23743
23930
  import { readFile as readFile5 } from "node:fs/promises";
23744
23931
  import { maxHeaderSize } from "node:http";
23745
- import * as path25 from "node:path";
23932
+ import * as path26 from "node:path";
23746
23933
 
23747
23934
  // ../argent-tools-client/src/link-config.ts
23748
- import * as path22 from "node:path";
23935
+ import * as path23 from "node:path";
23749
23936
  import { homedir as homedir7 } from "node:os";
23750
23937
  import { mkdir as mkdir2, writeFile as writeFile2, readFile as readFile2, unlink as unlink2, chmod as chmod2 } from "node:fs/promises";
23751
- var LINK_DIR = path22.join(homedir7(), ".argent");
23752
- var LINK_FILE = path22.join(LINK_DIR, "link.json");
23938
+ var LINK_DIR = path23.join(homedir7(), ".argent");
23939
+ var LINK_FILE = path23.join(LINK_DIR, "link.json");
23753
23940
 
23754
23941
  // ../argent-tools-client/src/file-inputs.ts
23755
- import { createHash as createHash3, randomUUID as randomUUID6 } from "node:crypto";
23942
+ import { createHash as createHash4, randomUUID as randomUUID6 } from "node:crypto";
23756
23943
  import { createReadStream, rmSync as rmSync7 } from "node:fs";
23757
23944
  import {
23758
23945
  chmod as chmod3,
@@ -23766,12 +23953,12 @@ import {
23766
23953
  writeFile as writeFile3
23767
23954
  } from "node:fs/promises";
23768
23955
  import { constants, tmpdir } from "node:os";
23769
- import * as path23 from "node:path";
23956
+ import * as path24 from "node:path";
23770
23957
 
23771
23958
  // ../archive/src/index.ts
23772
23959
  import { execFile } from "node:child_process";
23773
23960
  import { rm, readdir as readdir3 } from "node:fs/promises";
23774
- import { basename as basename4, dirname as dirname13, join as join22, posix as posix2, resolve as resolve13, sep as sep4 } from "node:path";
23961
+ import { basename as basename4, dirname as dirname13, join as join23, posix as posix2, resolve as resolve13, sep as sep4 } from "node:path";
23775
23962
  import { promisify } from "node:util";
23776
23963
  var execFileAsync = promisify(execFile);
23777
23964
 
@@ -23781,15 +23968,15 @@ var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
23781
23968
  // ../argent-tools-client/src/flow-files.ts
23782
23969
  var import_yaml3 = __toESM(require_dist2(), 1);
23783
23970
  import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat as stat4 } from "node:fs/promises";
23784
- import * as path24 from "node:path";
23971
+ import * as path25 from "node:path";
23785
23972
  var INLINE_MEMBERS_BYTES = 256 * 1024;
23786
23973
 
23787
23974
  // ../argent-tools-client/src/artifacts.ts
23788
23975
  import { copyFile, mkdir as mkdir4, readFile as readFile6, realpath as realpath4, rm as rm3, stat as stat5, writeFile as writeFile4 } from "node:fs/promises";
23789
23976
  import { constants as fsConstants } from "node:fs";
23790
23977
  import { tmpdir as tmpdir2 } from "node:os";
23791
- import { basename as basename7, dirname as dirname17, extname as extname2, isAbsolute as isAbsolute8, join as join26, normalize as normalize2, resolve as resolve15, sep as sep6 } from "node:path";
23792
- import { createHash as createHash4 } from "node:crypto";
23978
+ import { basename as basename7, dirname as dirname17, extname as extname2, isAbsolute as isAbsolute8, join as join27, normalize as normalize2, resolve as resolve15, sep as sep6 } from "node:path";
23979
+ import { createHash as createHash5 } from "node:crypto";
23793
23980
  var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
23794
23981
  var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
23795
23982
  var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
@@ -23904,10 +24091,10 @@ async function update(args) {
23904
24091
  const applyUpdateForTarget = async (mode, projectRoot) => {
23905
24092
  if (mode === "local") {
23906
24093
  log.info(
23907
- `Target: ${import_picocolors11.default.cyan("local install")} \u2014 this project's ${PACKAGE_NAME} devDependency ${import_picocolors11.default.dim(`(${projectRoot})`)}.`
24094
+ `Target: ${import_picocolors12.default.cyan("local install")} \u2014 this project's ${PACKAGE_NAME} devDependency ${import_picocolors12.default.dim(`(${projectRoot})`)}.`
23908
24095
  );
23909
24096
  } else {
23910
- log.info(`Target: ${import_picocolors11.default.cyan("global install")} \u2014 the argent command on your PATH.`);
24097
+ log.info(`Target: ${import_picocolors12.default.cyan("global install")} \u2014 the argent command on your PATH.`);
23911
24098
  }
23912
24099
  const localProbe = mode === "local" ? probeLocalInstall(projectRoot) : null;
23913
24100
  const globallyInstalled = mode === "global" && isGloballyInstalled();
@@ -23928,7 +24115,7 @@ async function update(args) {
23928
24115
  `${PACKAGE_NAME} is resolvable from this project but is not declared in its package.json.`
23929
24116
  );
23930
24117
  log.info(
23931
- `A hoisted or transitive copy is not this project's install. Run ${import_picocolors11.default.cyan("argent init --local")} to adopt it as a devDependency, or ${import_picocolors11.default.cyan("argent update --global")} for the global install.`
24118
+ `A hoisted or transitive copy is not this project's install. Run ${import_picocolors12.default.cyan("argent init --local")} to adopt it as a devDependency, or ${import_picocolors12.default.cyan("argent update --global")} for the global install.`
23932
24119
  );
23933
24120
  await trackPackageAction("no_update", updateStartTime, true);
23934
24121
  return "noop";
@@ -23937,15 +24124,15 @@ async function update(args) {
23937
24124
  log.warn(`${PACKAGE_NAME} is not installed in this project yet.`);
23938
24125
  if (isDeclaredLocally(projectRoot)) {
23939
24126
  log.info(
23940
- `It is declared in package.json \u2014 run your package manager's install (e.g. ${import_picocolors11.default.cyan("npm install")}), then re-run ${import_picocolors11.default.cyan("argent update")}.`
24127
+ `It is declared in package.json \u2014 run your package manager's install (e.g. ${import_picocolors12.default.cyan("npm install")}), then re-run ${import_picocolors12.default.cyan("argent update")}.`
23941
24128
  );
23942
24129
  } else if (hasProjectPackageJson(projectRoot)) {
23943
24130
  log.info(
23944
- `It is not a dependency of this project. Run ${import_picocolors11.default.cyan("argent init --local")} to add it, or ${import_picocolors11.default.cyan("argent update --global")} for the global install.`
24131
+ `It is not a dependency of this project. Run ${import_picocolors12.default.cyan("argent init --local")} to add it, or ${import_picocolors12.default.cyan("argent update --global")} for the global install.`
23945
24132
  );
23946
24133
  } else {
23947
24134
  log.info(
23948
- `No package.json at ${import_picocolors11.default.cyan(projectRoot)}. Run ${import_picocolors11.default.cyan("argent init")} in the project directory, or remove ${import_picocolors11.default.cyan(".argent/install.json")}.`
24135
+ `No package.json at ${import_picocolors12.default.cyan(projectRoot)}. Run ${import_picocolors12.default.cyan("argent init")} in the project directory, or remove ${import_picocolors12.default.cyan(".argent/install.json")}.`
23949
24136
  );
23950
24137
  }
23951
24138
  await trackPackageAction("no_update", updateStartTime, true);
@@ -23969,7 +24156,7 @@ async function update(args) {
23969
24156
  try {
23970
24157
  resolved = await resolveInstallableUpdateTarget(pm, installed);
23971
24158
  } catch (err) {
23972
- spinner2.stop(import_picocolors11.default.red("Could not reach registry."));
24159
+ spinner2.stop(import_picocolors12.default.red("Could not reach registry."));
23973
24160
  await trackPackageAction(
23974
24161
  "update_failed",
23975
24162
  updateStartTime,
@@ -23980,7 +24167,7 @@ async function update(args) {
23980
24167
  return { failed: UPDATE_REGISTRY_CHECK_FAILED };
23981
24168
  }
23982
24169
  if (resolved === null) {
23983
- spinner2.stop(import_picocolors11.default.red("Could not reach registry."));
24170
+ spinner2.stop(import_picocolors12.default.red("Could not reach registry."));
23984
24171
  await trackPackageAction(
23985
24172
  "update_failed",
23986
24173
  updateStartTime,
@@ -23996,44 +24183,44 @@ async function update(args) {
23996
24183
  }
23997
24184
  spinner2.stop("Version check complete.");
23998
24185
  if (installed) {
23999
- log.info(`Installed: ${import_picocolors11.default.cyan(`v${installed}`)}`);
24186
+ log.info(`Installed: ${import_picocolors12.default.cyan(`v${installed}`)}`);
24000
24187
  } else if (isInstalledForMode) {
24001
- log.info(`Installed: ${import_picocolors11.default.cyan("version unknown")} ${import_picocolors11.default.dim("(Yarn PnP)")}`);
24188
+ log.info(`Installed: ${import_picocolors12.default.cyan("version unknown")} ${import_picocolors12.default.dim("(Yarn PnP)")}`);
24002
24189
  } else {
24003
24190
  log.warn(
24004
24191
  mode === "local" ? `${PACKAGE_NAME} is not installed in this project.` : `${PACKAGE_NAME} is not installed globally.`
24005
24192
  );
24006
24193
  }
24007
24194
  if (latest) {
24008
- log.info(`Latest: ${import_picocolors11.default.cyan(`v${latest}`)}`);
24195
+ log.info(`Latest: ${import_picocolors12.default.cyan(`v${latest}`)}`);
24009
24196
  }
24010
24197
  if (target) {
24011
24198
  const label = latest && latest !== target ? "Target: " : "Version: ";
24012
- const suffix = latest && latest !== target ? import_picocolors11.default.dim(" (newest installable)") : "";
24013
- log.info(`${label}${import_picocolors11.default.cyan(`v${target}`)}${suffix}`);
24199
+ const suffix = latest && latest !== target ? import_picocolors12.default.dim(" (newest installable)") : "";
24200
+ log.info(`${label}${import_picocolors12.default.cyan(`v${target}`)}${suffix}`);
24014
24201
  }
24015
24202
  const versionUnknown = isInstalledForMode && installed === null;
24016
24203
  const needsInstall = target !== null && (!isInstalledForMode || (versionUnknown ? requestedVersion !== null : !installed || isNewerVersion(target, installed)));
24017
24204
  const latestIsNewer = latest !== null && (!installed || isNewerVersion(latest, installed));
24018
24205
  if (needsInstall && target !== null) {
24019
24206
  if (installed) {
24020
- log.warn(`Update available: ${import_picocolors11.default.yellow(`v${installed}`)} -> ${import_picocolors11.default.green(`v${target}`)}`);
24207
+ log.warn(`Update available: ${import_picocolors12.default.yellow(`v${installed}`)} -> ${import_picocolors12.default.green(`v${target}`)}`);
24021
24208
  }
24022
24209
  const cmd = mode === "local" ? localInstallCommand(pm, `${PACKAGE_NAME}@${target}`) : globalInstallCommand(pm, `${PACKAGE_NAME}@${target}`);
24023
24210
  const cmdStr = formatShellCommand(cmd);
24024
24211
  if (!nonInteractive) {
24025
- log.message(import_picocolors11.default.dim(" Press y for yes, n for no, enter to confirm."));
24212
+ log.message(import_picocolors12.default.dim(" Press y for yes, n for no, enter to confirm."));
24026
24213
  const proceed = await confirm({
24027
24214
  message: isInstalledForMode ? `Update to v${target}?` : mode === "local" ? `Add ${PACKAGE_NAME}@${target} to this project's devDependencies?` : `Install ${PACKAGE_NAME}@${target} globally?`,
24028
24215
  initialValue: true
24029
24216
  });
24030
24217
  if (isCancel(proceed) || !proceed) {
24031
24218
  await trackPackageAction("update_skipped", updateStartTime, true);
24032
- log.info(import_picocolors11.default.dim(`Skipped the ${mode} install.`));
24219
+ log.info(import_picocolors12.default.dim(`Skipped the ${mode} install.`));
24033
24220
  return "declined";
24034
24221
  }
24035
24222
  }
24036
- log.info(`Running: ${import_picocolors11.default.dim(cmdStr)}`);
24223
+ log.info(`Running: ${import_picocolors12.default.dim(cmdStr)}`);
24037
24224
  const installDirToStop = mode === "local" ? localProbe.packageDir : getGloballyInstalledPackageRoot();
24038
24225
  try {
24039
24226
  if (installDirToStop) {
@@ -24089,7 +24276,7 @@ async function update(args) {
24089
24276
  return { failed: UPDATE_PACKAGE_ACTION_FAILED };
24090
24277
  }
24091
24278
  log.warn(
24092
- import_picocolors11.default.dim(
24279
+ import_picocolors12.default.dim(
24093
24280
  `Your package manager exited non-zero but ${PACKAGE_NAME}@${landedVersion} is installed \u2014 continuing.`
24094
24281
  )
24095
24282
  );
@@ -24111,11 +24298,11 @@ async function update(args) {
24111
24298
  await trackPackageAction("no_update", updateStartTime, true);
24112
24299
  if (versionUnknown) {
24113
24300
  log.warn(
24114
- `Could not determine the installed version (Yarn PnP). Pass ${import_picocolors11.default.cyan("--version <x.y.z>")} to update to a specific version.`
24301
+ `Could not determine the installed version (Yarn PnP). Pass ${import_picocolors12.default.cyan("--version <x.y.z>")} to update to a specific version.`
24115
24302
  );
24116
24303
  } else if (latest && target === null && latestIsNewer && minReleaseAgeMs > 0) {
24117
24304
  log.warn(
24118
- `Latest version ${import_picocolors11.default.cyan(`v${latest}`)} is still held by your minimum-release-age policy.`
24305
+ `Latest version ${import_picocolors12.default.cyan(`v${latest}`)} is still held by your minimum-release-age policy.`
24119
24306
  );
24120
24307
  log.info("No installable update is available yet.");
24121
24308
  } else if (latest && target && latest !== target) {
@@ -24131,7 +24318,7 @@ async function update(args) {
24131
24318
  return "noop";
24132
24319
  };
24133
24320
  try {
24134
- intro(import_picocolors11.default.bgCyan(import_picocolors11.default.black(" argent update ")));
24321
+ intro(import_picocolors12.default.bgCyan(import_picocolors12.default.black(" argent update ")));
24135
24322
  await resolveTelemetryConsent({ nonInteractive: true, disableFlag: noTelemetry });
24136
24323
  warmTelemetryIdentitySync();
24137
24324
  track("installation:cli_update_start", {});
@@ -24147,7 +24334,7 @@ async function update(args) {
24147
24334
  process.exit(1);
24148
24335
  }
24149
24336
  const rootOverride = getProjectRootOverride(args);
24150
- const projectRoot = rootOverride ? path26.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
24337
+ const projectRoot = rootOverride ? path27.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
24151
24338
  installMode = resolveInstallMode(projectRoot);
24152
24339
  const flags = parseTargetFlags(args);
24153
24340
  const localInstalled = installMode === "local" && probeLocalInstall(projectRoot).installed;
@@ -24155,7 +24342,7 @@ async function update(args) {
24155
24342
  const defaultTarget = localInstalled ? "local" : globalInstalled ? "global" : installMode;
24156
24343
  if (installMode === "local" && !localInstalled && !flags.local) {
24157
24344
  log.warn(
24158
- `${PACKAGE_NAME} is declared for this project but not installed \u2014 run your package manager's install, or ${import_picocolors11.default.cyan("argent update --local")} for guidance.`
24345
+ `${PACKAGE_NAME} is declared for this project but not installed \u2014 run your package manager's install, or ${import_picocolors12.default.cyan("argent update --local")} for guidance.`
24159
24346
  );
24160
24347
  }
24161
24348
  const decision = decideInstallTargets({
@@ -24179,7 +24366,7 @@ async function update(args) {
24179
24366
  targets = decision.targets;
24180
24367
  if (decision.reason === "noninteractive-both") {
24181
24368
  log.info(
24182
- import_picocolors11.default.dim(
24369
+ import_picocolors12.default.dim(
24183
24370
  "Both a global and a project-local install were found; updating both (pass --global or --local to narrow)."
24184
24371
  )
24185
24372
  );
@@ -24207,7 +24394,7 @@ async function update(args) {
24207
24394
  }
24208
24395
  if (firstFailure && !outcomes.includes("updated")) {
24209
24396
  await failUpdateTelemetry(firstFailure);
24210
- outro(import_picocolors11.default.red("Update failed."));
24397
+ outro(import_picocolors12.default.red("Update failed."));
24211
24398
  process.exit(1);
24212
24399
  }
24213
24400
  {
@@ -24235,19 +24422,19 @@ async function update(args) {
24235
24422
  const isUnreadableSentinel = existing !== null && existing.command === "" && existing.args.length === 0;
24236
24423
  if (existing !== null && !isUnreadableSentinel && !isArgentManagedEntry(existing)) {
24237
24424
  results.push(
24238
- `${import_picocolors11.default.yellow("!")} ${adapter.name} left a customized entry untouched ${import_picocolors11.default.dim(configPath)}`
24425
+ `${import_picocolors12.default.yellow("!")} ${adapter.name} left a customized entry untouched ${import_picocolors12.default.dim(configPath)}`
24239
24426
  );
24240
24427
  continue;
24241
24428
  }
24242
24429
  try {
24243
24430
  adapter.write(configPath, entryFor(normScope));
24244
- results.push(`${import_picocolors11.default.green("+")} ${adapter.name} ${import_picocolors11.default.dim(configPath)}`);
24431
+ results.push(`${import_picocolors12.default.green("+")} ${adapter.name} ${import_picocolors12.default.dim(configPath)}`);
24245
24432
  } catch {
24246
24433
  }
24247
24434
  }
24248
24435
  if (skipEntryRewrite && configuredScopes.some(({ scope }) => scope === "project")) {
24249
24436
  log.info(
24250
- import_picocolors11.default.dim(
24437
+ import_picocolors12.default.dim(
24251
24438
  "Left project MCP entries unchanged \u2014 the repo-local argent binary can't be resolved right now (fresh checkout: run your package manager's install; after an out-of-band version bump, just re-run argent update)."
24252
24439
  )
24253
24440
  );
@@ -24273,7 +24460,7 @@ async function update(args) {
24273
24460
  spinner2.stop("Configuration refreshed.");
24274
24461
  if (allowlistDisabled) {
24275
24462
  log.info(
24276
- import_picocolors11.default.dim("Left editor auto-approve allowlists alone (allowlist.enabled is false).")
24463
+ import_picocolors12.default.dim("Left editor auto-approve allowlists alone (allowlist.enabled is false).")
24277
24464
  );
24278
24465
  }
24279
24466
  if (results.length > 0) {
@@ -24293,7 +24480,7 @@ async function update(args) {
24293
24480
  log.warn(
24294
24481
  `Dead argent entries from a previous global install were found in
24295
24482
  global (cross-project) config files:
24296
- ` + items.map((item) => ` ${import_picocolors11.default.cyan(item)}`).join("\n")
24483
+ ` + items.map((item) => ` ${import_picocolors12.default.cyan(item)}`).join("\n")
24297
24484
  );
24298
24485
  const choice = await confirm({
24299
24486
  message: "Remove these dead global entries? - recommended",
@@ -24312,15 +24499,27 @@ async function update(args) {
24312
24499
  if (ruleResults.length > 0) {
24313
24500
  note(ruleResults.join("\n"), "Rules & Agents Updated");
24314
24501
  }
24502
+ await reportRetiredFiles(
24503
+ findRetiredRulesAndAgents(
24504
+ [
24505
+ { adapters: globalAdapters, scope: "global" },
24506
+ { adapters: localAdapters, scope: "local" }
24507
+ ],
24508
+ projectRoot,
24509
+ RULES_DIR,
24510
+ AGENTS_DIR
24511
+ ),
24512
+ !nonInteractive
24513
+ );
24315
24514
  reportSkillRefresh(projectRoot, "installer_update_skills_refresh");
24316
24515
  }
24317
24516
  if (firstFailure) {
24318
24517
  await failUpdateTelemetry(firstFailure);
24319
- outro(import_picocolors11.default.yellow("Update finished with errors \u2014 see above."));
24518
+ outro(import_picocolors12.default.yellow("Update finished with errors \u2014 see above."));
24320
24519
  process.exit(1);
24321
24520
  }
24322
24521
  await completeUpdateTelemetry();
24323
- outro(import_picocolors11.default.green("Update complete."));
24522
+ outro(import_picocolors12.default.green("Update complete."));
24324
24523
  } catch (err) {
24325
24524
  await failUpdateTelemetry(UPDATE_UNCLASSIFIED_FAILED);
24326
24525
  throw err;
@@ -24328,10 +24527,10 @@ async function update(args) {
24328
24527
  }
24329
24528
 
24330
24529
  // ../argent-installer/src/uninstall.ts
24331
- var import_picocolors12 = __toESM(require_picocolors(), 1);
24530
+ var import_picocolors13 = __toESM(require_picocolors(), 1);
24332
24531
  var import_yaml5 = __toESM(require_dist2(), 1);
24333
24532
  import * as fs21 from "node:fs";
24334
- import * as path27 from "node:path";
24533
+ import * as path28 from "node:path";
24335
24534
  var UNINSTALL_TOOLSERVER_STOP_FAILED = {
24336
24535
  error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
24337
24536
  failure_stage: "installer_uninstall_toolserver_stop",
@@ -24366,8 +24565,8 @@ function collectBundledPaths(sourceDir) {
24366
24565
  const directories = [];
24367
24566
  function walk(currentDir, relativeDir = "") {
24368
24567
  for (const entry of fs21.readdirSync(currentDir, { withFileTypes: true })) {
24369
- const relativePath = relativeDir ? path27.join(relativeDir, entry.name) : entry.name;
24370
- const absolutePath = path27.join(currentDir, entry.name);
24568
+ const relativePath = relativeDir ? path28.join(relativeDir, entry.name) : entry.name;
24569
+ const absolutePath = path28.join(currentDir, entry.name);
24371
24570
  if (entry.isDirectory()) {
24372
24571
  walk(absolutePath, relativePath);
24373
24572
  directories.push(relativePath);
@@ -24386,7 +24585,7 @@ function removeBundledContent(sourceDir, targetDir) {
24386
24585
  const { files, directories } = collectBundledPaths(sourceDir);
24387
24586
  const removedPaths = [];
24388
24587
  for (const relativePath of files) {
24389
- const targetPath = path27.join(targetDir, relativePath);
24588
+ const targetPath = path28.join(targetDir, relativePath);
24390
24589
  try {
24391
24590
  if (!fs21.existsSync(targetPath)) continue;
24392
24591
  if (fs21.lstatSync(targetPath).isDirectory()) continue;
@@ -24396,10 +24595,10 @@ function removeBundledContent(sourceDir, targetDir) {
24396
24595
  }
24397
24596
  }
24398
24597
  directories.sort(
24399
- (a2, b) => b.split(path27.sep).length - a2.split(path27.sep).length || b.length - a2.length
24598
+ (a2, b) => b.split(path28.sep).length - a2.split(path28.sep).length || b.length - a2.length
24400
24599
  );
24401
24600
  for (const relativePath of directories) {
24402
- const targetPath = path27.join(targetDir, relativePath);
24601
+ const targetPath = path28.join(targetDir, relativePath);
24403
24602
  try {
24404
24603
  if (!fs21.existsSync(targetPath)) continue;
24405
24604
  if (!fs21.statSync(targetPath).isDirectory()) continue;
@@ -24419,7 +24618,7 @@ function removeBundledContent(sourceDir, targetDir) {
24419
24618
  } catch {
24420
24619
  }
24421
24620
  if (removedRoot) {
24422
- removeDirIfEmpty2(path27.dirname(targetDir));
24621
+ removeDirIfEmpty2(path28.dirname(targetDir));
24423
24622
  }
24424
24623
  return { removedPaths, removedRoot };
24425
24624
  }
@@ -24440,7 +24639,7 @@ function getBundledSkillNames(skillsDir) {
24440
24639
  const skillNames = [];
24441
24640
  for (const entry of fs21.readdirSync(skillsDir, { withFileTypes: true })) {
24442
24641
  if (!entry.isDirectory()) continue;
24443
- const skillFilePath = path27.join(skillsDir, entry.name, "SKILL.md");
24642
+ const skillFilePath = path28.join(skillsDir, entry.name, "SKILL.md");
24444
24643
  if (!fs21.existsSync(skillFilePath)) continue;
24445
24644
  skillNames.push(readBundledSkillName(skillFilePath, entry.name));
24446
24645
  }
@@ -24452,7 +24651,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
24452
24651
  }
24453
24652
  const removedPaths = [];
24454
24653
  for (const skillName of skillNames) {
24455
- const targetPath = path27.join(targetDir, skillName);
24654
+ const targetPath = path28.join(targetDir, skillName);
24456
24655
  try {
24457
24656
  const stats = fs21.lstatSync(targetPath, { throwIfNoEntry: false });
24458
24657
  if (!stats) continue;
@@ -24467,7 +24666,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
24467
24666
  }
24468
24667
  const removedRoot = removeDirIfEmpty2(targetDir);
24469
24668
  if (removedRoot) {
24470
- removeDirIfEmpty2(path27.dirname(targetDir));
24669
+ removeDirIfEmpty2(path28.dirname(targetDir));
24471
24670
  }
24472
24671
  return { removedPaths, removedRoot };
24473
24672
  }
@@ -24519,10 +24718,10 @@ function cleanupBundledSkills(skillNames, targets) {
24519
24718
  const itemsLabel = removedPaths.length === 1 ? "skill entry" : "skill entries";
24520
24719
  const rootLabel = removedRoot ? " and removed the now-empty directory" : "";
24521
24720
  results.push(
24522
- `${import_picocolors12.default.green("+")} Removed ${removedPaths.length} Argent ${itemsLabel} from ${label}${rootLabel}`
24721
+ `${import_picocolors13.default.green("+")} Removed ${removedPaths.length} Argent ${itemsLabel} from ${label}${rootLabel}`
24523
24722
  );
24524
24723
  } catch (err) {
24525
- results.push(`${import_picocolors12.default.red("x")} Could not clean ${label}: ${err}`);
24724
+ results.push(`${import_picocolors13.default.red("x")} Could not clean ${label}: ${err}`);
24526
24725
  }
24527
24726
  }
24528
24727
  return results;
@@ -24536,10 +24735,10 @@ function cleanupBundledTargets(sourceDir, targets, contentLabel) {
24536
24735
  const itemsLabel = removedPaths.length === 1 ? `${contentLabel} file` : `${contentLabel} files`;
24537
24736
  const rootLabel = removedRoot ? " and removed the now-empty directory" : "";
24538
24737
  results.push(
24539
- `${import_picocolors12.default.green("+")} Removed ${removedPaths.length} Argent ${itemsLabel} from ${label}${rootLabel}`
24738
+ `${import_picocolors13.default.green("+")} Removed ${removedPaths.length} Argent ${itemsLabel} from ${label}${rootLabel}`
24540
24739
  );
24541
24740
  } catch (err) {
24542
- results.push(`${import_picocolors12.default.red("x")} Could not clean ${label}: ${err}`);
24741
+ results.push(`${import_picocolors13.default.red("x")} Could not clean ${label}: ${err}`);
24543
24742
  }
24544
24743
  }
24545
24744
  return results;
@@ -24567,9 +24766,9 @@ async function uninstall(args) {
24567
24766
  let hasUninstalledPackage = false;
24568
24767
  let hasUninstalledGlobalPackage = false;
24569
24768
  try {
24570
- intro(import_picocolors12.default.bgRed(import_picocolors12.default.white(" argent uninstall ")));
24769
+ intro(import_picocolors13.default.bgRed(import_picocolors13.default.white(" argent uninstall ")));
24571
24770
  if (!nonInteractive) {
24572
- log.message(import_picocolors12.default.dim(" Press y for yes, n for no, enter to confirm."));
24771
+ log.message(import_picocolors13.default.dim(" Press y for yes, n for no, enter to confirm."));
24573
24772
  const proceed = await confirm({
24574
24773
  message: "Remove argent configuration from this workspace?",
24575
24774
  initialValue: true
@@ -24618,7 +24817,7 @@ async function uninstall(args) {
24618
24817
  scopesToClean.delete("local");
24619
24818
  }
24620
24819
  const results = [];
24621
- log.step(import_picocolors12.default.bold("Removing MCP server entries..."));
24820
+ log.step(import_picocolors13.default.bold("Removing MCP server entries..."));
24622
24821
  for (const adapter of ALL_ADAPTERS) {
24623
24822
  const scopedPaths = [
24624
24823
  ["local", adapter.projectPath(projectRoot)],
@@ -24630,7 +24829,7 @@ async function uninstall(args) {
24630
24829
  try {
24631
24830
  const removed = adapter.remove(configPath);
24632
24831
  if (removed) {
24633
- results.push(`${import_picocolors12.default.green("+")} Removed from ${adapter.name} ${import_picocolors12.default.dim(configPath)}`);
24832
+ results.push(`${import_picocolors13.default.green("+")} Removed from ${adapter.name} ${import_picocolors13.default.dim(configPath)}`);
24634
24833
  }
24635
24834
  } catch {
24636
24835
  }
@@ -24642,7 +24841,7 @@ async function uninstall(args) {
24642
24841
  if (!scopesToClean.has(s)) continue;
24643
24842
  try {
24644
24843
  adapter.removeAllowlist(projectRoot, s);
24645
- results.push(`${import_picocolors12.default.green("+")} Removed ${adapter.name} allowlist ${import_picocolors12.default.dim(`(${s})`)}`);
24844
+ results.push(`${import_picocolors13.default.green("+")} Removed ${adapter.name} allowlist ${import_picocolors13.default.dim(`(${s})`)}`);
24646
24845
  } catch {
24647
24846
  }
24648
24847
  }
@@ -24650,10 +24849,10 @@ async function uninstall(args) {
24650
24849
  if (results.length > 0) {
24651
24850
  note(results.join("\n"), "MCP Entries Removed");
24652
24851
  } else {
24653
- log.info(import_picocolors12.default.dim("No MCP entries found to remove."));
24852
+ log.info(import_picocolors13.default.dim("No MCP entries found to remove."));
24654
24853
  }
24655
24854
  if (!nonInteractive) {
24656
- log.message(import_picocolors12.default.dim(" Press y for yes, n for no, enter to confirm."));
24855
+ log.message(import_picocolors13.default.dim(" Press y for yes, n for no, enter to confirm."));
24657
24856
  const pruneChoice = await confirm({
24658
24857
  message: "Also remove Argent-owned skills, rules, and agents?",
24659
24858
  initialValue: true
@@ -24695,12 +24894,25 @@ async function uninstall(args) {
24695
24894
  const itemsLabel = removedSkills.length === 1 ? "skill" : "skills";
24696
24895
  const fileLabel = removedFile ? " and removed the now-empty lockfile" : "";
24697
24896
  pruneResults.push(
24698
- `${import_picocolors12.default.green("+")} Removed ${removedSkills.length} Argent ${itemsLabel} from ${label}${fileLabel}`
24897
+ `${import_picocolors13.default.green("+")} Removed ${removedSkills.length} Argent ${itemsLabel} from ${label}${fileLabel}`
24699
24898
  );
24700
24899
  } catch (err) {
24701
- pruneResults.push(`${import_picocolors12.default.red("x")} Could not clean ${label}: ${err}`);
24900
+ pruneResults.push(`${import_picocolors13.default.red("x")} Could not clean ${label}: ${err}`);
24702
24901
  }
24703
24902
  }
24903
+ const retired = await cleanupRetiredFiles(
24904
+ findRetiredRulesAndAgents(
24905
+ [...scopesToClean].map((scope) => ({ adapters: ALL_ADAPTERS, scope })),
24906
+ projectRoot,
24907
+ RULES_DIR,
24908
+ AGENTS_DIR
24909
+ ),
24910
+ { ask: false }
24911
+ );
24912
+ for (const root of retired.removedRoots) removeDirIfEmpty2(path28.dirname(root));
24913
+ const retiredLines = formatRetiredCleanup(retired);
24914
+ pruneResults.push(...retiredLines.removed.map((line) => `${import_picocolors13.default.green("+")} ${line}`));
24915
+ const retiredKept = retiredLines.kept.map((line) => ` ${line}`);
24704
24916
  const bundledTargets = [
24705
24917
  {
24706
24918
  sourceDir: AGENTS_DIR,
@@ -24725,36 +24937,37 @@ async function uninstall(args) {
24725
24937
  ]) {
24726
24938
  try {
24727
24939
  if (removeCodexRules(targetPath)) {
24728
- pruneResults.push(`${import_picocolors12.default.green("+")} Removed argent rules from ${label}`);
24940
+ pruneResults.push(`${import_picocolors13.default.green("+")} Removed argent rules from ${label}`);
24729
24941
  }
24730
24942
  } catch (err) {
24731
- pruneResults.push(`${import_picocolors12.default.red("x")} Could not clean ${label}: ${err}`);
24943
+ pruneResults.push(`${import_picocolors13.default.red("x")} Could not clean ${label}: ${err}`);
24732
24944
  }
24733
24945
  }
24734
24946
  if (scopesToClean.has("local")) {
24735
24947
  try {
24736
24948
  if (removeInstallRecord(projectRoot)) {
24737
- pruneResults.push(`${import_picocolors12.default.green("+")} Removed .argent/install.json`);
24949
+ pruneResults.push(`${import_picocolors13.default.green("+")} Removed .argent/install.json`);
24738
24950
  }
24739
24951
  } catch (err) {
24740
- pruneResults.push(`${import_picocolors12.default.red("x")} Could not remove .argent/install.json: ${err}`);
24952
+ pruneResults.push(`${import_picocolors13.default.red("x")} Could not remove .argent/install.json: ${err}`);
24741
24953
  }
24742
24954
  }
24743
24955
  if (pruneResults.length > 0) {
24744
- note(pruneResults.join("\n"), "Pruned Argent Content");
24956
+ note([...pruneResults, ...retiredKept].join("\n"), "Pruned Argent Content");
24745
24957
  } else {
24746
- log.info(import_picocolors12.default.dim("No Argent-owned skills, rules, or agents found to remove."));
24958
+ if (retiredKept.length > 0) note(retiredKept.join("\n"), "Files Argent No Longer Ships");
24959
+ log.info(import_picocolors13.default.dim("No Argent-owned skills, rules, or agents found to remove."));
24747
24960
  }
24748
24961
  hasPrunedContent = pruneResults.length > 0;
24749
24962
  } else {
24750
- log.info(import_picocolors12.default.dim("Kept Argent-owned skills, rules, and agents."));
24963
+ log.info(import_picocolors13.default.dim("Kept Argent-owned skills, rules, and agents."));
24751
24964
  }
24752
24965
  const buildRemovable = (kind) => {
24753
24966
  if (kind === "local") {
24754
24967
  if (!uninstallLocalProbe.installed) return null;
24755
24968
  if (installMode !== "local" && !isDeclaredLocally(projectRoot)) {
24756
24969
  log.info(
24757
- import_picocolors12.default.dim(
24970
+ import_picocolors13.default.dim(
24758
24971
  `${PACKAGE_NAME} is resolvable from this project but not declared in its package.json \u2014 skipping the local package removal.`
24759
24972
  )
24760
24973
  );
@@ -24781,7 +24994,7 @@ async function uninstall(args) {
24781
24994
  const removables = removeTargets.map((t2) => buildRemovable(t2)).filter((r2) => r2 !== null);
24782
24995
  if (removables.length === 0) {
24783
24996
  log.info(
24784
- import_picocolors12.default.dim(
24997
+ import_picocolors13.default.dim(
24785
24998
  `Skipped package removal: no matching ${PACKAGE_NAME} install detected. If it is installed elsewhere, remove it manually.`
24786
24999
  )
24787
25000
  );
@@ -24789,7 +25002,7 @@ async function uninstall(args) {
24789
25002
  for (const removable of removables) {
24790
25003
  let shouldRemove = nonInteractive || removePreconfirmed;
24791
25004
  if (!nonInteractive && !removePreconfirmed) {
24792
- log.message(import_picocolors12.default.dim(" Press y for yes, n for no, enter to confirm."));
25005
+ log.message(import_picocolors13.default.dim(" Press y for yes, n for no, enter to confirm."));
24793
25006
  const choice = await confirm({
24794
25007
  message: removable.prompt,
24795
25008
  initialValue: removable.defaultRemove
@@ -24808,17 +25021,17 @@ async function uninstall(args) {
24808
25021
  );
24809
25022
  throw err;
24810
25023
  }
24811
- log.info(`Running: ${import_picocolors12.default.dim(formatShellCommand(removable.cmd))}`);
25024
+ log.info(`Running: ${import_picocolors13.default.dim(formatShellCommand(removable.cmd))}`);
24812
25025
  try {
24813
25026
  execShellCommandSync(removable.cmd, removable.cwd ? { cwd: removable.cwd } : {});
24814
25027
  log.success(`Removed ${removable.kind} package.`);
24815
25028
  hasUninstalledPackage = true;
24816
25029
  if (removable.kind === "global") hasUninstalledGlobalPackage = true;
24817
25030
  if (removable.kind === "local" && removeInstallRecord(projectRoot)) {
24818
- log.info(import_picocolors12.default.dim("Removed .argent/install.json (local mode marker)."));
25031
+ log.info(import_picocolors13.default.dim("Removed .argent/install.json (local mode marker)."));
24819
25032
  }
24820
25033
  if (removeCliRecordFor(removable.installDir)) {
24821
- log.info(import_picocolors12.default.dim("Removed ~/.argent/cli.json (provider CLI discovery record)."));
25034
+ log.info(import_picocolors13.default.dim("Removed ~/.argent/cli.json (provider CLI discovery record)."));
24822
25035
  }
24823
25036
  } catch (err) {
24824
25037
  log.error(`${removable.kind} uninstall failed: ${err}`);
@@ -24837,7 +25050,7 @@ async function uninstall(args) {
24837
25050
  } catch {
24838
25051
  }
24839
25052
  }
24840
- outro(import_picocolors12.default.green("argent has been removed."));
25053
+ outro(import_picocolors13.default.green("argent has been removed."));
24841
25054
  } catch (err) {
24842
25055
  await finalizeUninstallTelemetry(
24843
25056
  hasPrunedContent,