nexrall-code 0.5.181 → 0.5.182

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 (2) hide show
  1. package/dist/index.js +919 -524
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -11501,13 +11501,13 @@ var require_memory = __commonJS({
11501
11501
  var fs33 = __importStar(__require("fs"));
11502
11502
  var os21 = __importStar(__require("os"));
11503
11503
  var path34 = __importStar(__require("path"));
11504
- var crypto9 = __importStar(__require("crypto"));
11504
+ var crypto6 = __importStar(__require("crypto"));
11505
11505
  var MEMORY_ROOT = process.env.NEXRALL_MEMORY_DIR || path34.join(os21.homedir(), ".nexrall", "memory");
11506
11506
  var GLOBAL_FILE = path34.join(MEMORY_ROOT, "global.md");
11507
11507
  function memoryFilePath2(scope, workDir) {
11508
11508
  if (scope === "global" || !workDir)
11509
11509
  return GLOBAL_FILE;
11510
- const key = crypto9.createHash("sha1").update(path34.resolve(workDir)).digest("hex").slice(0, 16);
11510
+ const key = crypto6.createHash("sha1").update(path34.resolve(workDir)).digest("hex").slice(0, 16);
11511
11511
  return path34.join(MEMORY_ROOT, `project-${key}.md`);
11512
11512
  }
11513
11513
  exports2.MEMORY_ENTRY_MAX_CHARS = 400;
@@ -14453,7 +14453,7 @@ var require_crossProcessLock = __commonJS({
14453
14453
  var fs33 = __importStar(__require("fs"));
14454
14454
  var os21 = __importStar(__require("os"));
14455
14455
  var path34 = __importStar(__require("path"));
14456
- var crypto9 = __importStar(__require("crypto"));
14456
+ var crypto6 = __importStar(__require("crypto"));
14457
14457
  var STALE_MS = 2 * 60 * 1e3;
14458
14458
  var ACQUIRE_TIMEOUT_MS = 2e4;
14459
14459
  var POLL_MS = 40;
@@ -14469,12 +14469,12 @@ var require_crossProcessLock = __commonJS({
14469
14469
  fs33.accessSync(dir, fs33.constants.W_OK);
14470
14470
  return sibling;
14471
14471
  } catch {
14472
- const hash2 = crypto9.createHash("sha256").update(key).digest("hex").slice(0, 32);
14472
+ const hash2 = crypto6.createHash("sha256").update(key).digest("hex").slice(0, 32);
14473
14473
  return path34.join(locksRoot(), `${hash2}.lock`);
14474
14474
  }
14475
14475
  }
14476
14476
  const scoped = `${workDir ?? ""}\0${key}`;
14477
- const hash = crypto9.createHash("sha256").update(scoped).digest("hex").slice(0, 32);
14477
+ const hash = crypto6.createHash("sha256").update(scoped).digest("hex").slice(0, 32);
14478
14478
  return path34.join(locksRoot(), `${hash}.lock`);
14479
14479
  }
14480
14480
  function isStale(lockFile) {
@@ -14507,7 +14507,7 @@ var require_crossProcessLock = __commonJS({
14507
14507
  fs33.mkdirSync(lockDir, { recursive: true });
14508
14508
  const payload = JSON.stringify({ pid: process.pid, ts: Date.now() });
14509
14509
  const deadline = Date.now() + ACQUIRE_TIMEOUT_MS;
14510
- const tempFile = `${lockFile}.${process.pid}.${crypto9.randomBytes(4).toString("hex")}.tmp`;
14510
+ const tempFile = `${lockFile}.${process.pid}.${crypto6.randomBytes(4).toString("hex")}.tmp`;
14511
14511
  for (; ; ) {
14512
14512
  try {
14513
14513
  fs33.writeFileSync(tempFile, payload);
@@ -14620,7 +14620,7 @@ var require_sharedTasks = __commonJS({
14620
14620
  var fs33 = __importStar(__require("fs"));
14621
14621
  var os21 = __importStar(__require("os"));
14622
14622
  var path34 = __importStar(__require("path"));
14623
- var crypto9 = __importStar(__require("crypto"));
14623
+ var crypto6 = __importStar(__require("crypto"));
14624
14624
  var crossProcessLock_1 = require_crossProcessLock();
14625
14625
  var CLAIM_STALE_MS = 30 * 60 * 1e3;
14626
14626
  var MIN_CLAIM_AGE_FOR_DEATH_CHECK_MS = 2e3;
@@ -14628,7 +14628,7 @@ var require_sharedTasks = __commonJS({
14628
14628
  return process.env.NEXRALL_SHARED_TASKS_DIR || path34.join(os21.homedir(), ".nexrall", "peers", "tasks");
14629
14629
  }
14630
14630
  function scopeDir(workDir) {
14631
- const hash = crypto9.createHash("sha256").update(path34.resolve(workDir)).digest("hex").slice(0, 24);
14631
+ const hash = crypto6.createHash("sha256").update(path34.resolve(workDir)).digest("hex").slice(0, 24);
14632
14632
  return path34.join(tasksRoot(), hash);
14633
14633
  }
14634
14634
  function taskPath(workDir, taskId) {
@@ -14694,7 +14694,7 @@ var require_sharedTasks = __commonJS({
14694
14694
  return out;
14695
14695
  }
14696
14696
  function createSharedTask(workDir, content, opts = {}) {
14697
- const id = opts.id ?? crypto9.randomBytes(6).toString("hex");
14697
+ const id = opts.id ?? crypto6.randomBytes(6).toString("hex");
14698
14698
  const now = Date.now();
14699
14699
  const task = {
14700
14700
  id,
@@ -14818,7 +14818,7 @@ var require_peerRegistry = __commonJS({
14818
14818
  var fs33 = __importStar(__require("fs"));
14819
14819
  var os21 = __importStar(__require("os"));
14820
14820
  var path34 = __importStar(__require("path"));
14821
- var crypto9 = __importStar(__require("crypto"));
14821
+ var crypto6 = __importStar(__require("crypto"));
14822
14822
  var HEARTBEAT_STALE_MS = 2e4;
14823
14823
  var HEARTBEAT_INTERVAL_MS = 1e4;
14824
14824
  function peersRoot() {
@@ -14860,12 +14860,12 @@ var require_peerRegistry = __commonJS({
14860
14860
  var ADJECTIVES = ["graceful", "quiet", "brave", "calm", "swift", "keen", "bold", "clear", "gentle", "sharp", "steady", "curious"];
14861
14861
  var NOUNS = ["unicorn", "falcon", "otter", "harbor", "meadow", "ember", "summit", "cedar", "quartz", "heron", "lynx", "delta"];
14862
14862
  function randomPeerName() {
14863
- const a = ADJECTIVES[crypto9.randomInt(ADJECTIVES.length)];
14864
- const n = NOUNS[crypto9.randomInt(NOUNS.length)];
14863
+ const a = ADJECTIVES[crypto6.randomInt(ADJECTIVES.length)];
14864
+ const n = NOUNS[crypto6.randomInt(NOUNS.length)];
14865
14865
  return `${a}-${n}`;
14866
14866
  }
14867
14867
  function registerPeer2(opts) {
14868
- const id = crypto9.randomBytes(8).toString("hex");
14868
+ const id = crypto6.randomBytes(8).toString("hex");
14869
14869
  const takenNames = new Set(listPeers3().map((p) => p.name));
14870
14870
  let name = opts.name?.trim();
14871
14871
  if (name && takenNames.has(name)) {
@@ -17504,7 +17504,7 @@ var require_dist2 = __commonJS({
17504
17504
  var require_floor = /* @__PURE__ */ __commonJSMin((exports3, module3) => {
17505
17505
  module3.exports = Math.floor;
17506
17506
  });
17507
- var require_max = /* @__PURE__ */ __commonJSMin((exports3, module3) => {
17507
+ var require_max2 = /* @__PURE__ */ __commonJSMin((exports3, module3) => {
17508
17508
  module3.exports = Math.max;
17509
17509
  });
17510
17510
  var require_min = /* @__PURE__ */ __commonJSMin((exports3, module3) => {
@@ -17709,7 +17709,7 @@ var require_dist2 = __commonJS({
17709
17709
  var $URIError = require_uri();
17710
17710
  var abs = require_abs();
17711
17711
  var floor = require_floor();
17712
- var max = require_max();
17712
+ var max = require_max2();
17713
17713
  var min = require_min();
17714
17714
  var pow = require_pow();
17715
17715
  var round = require_round();
@@ -31633,12 +31633,12 @@ var require_dist2 = __commonJS({
31633
31633
  return Array.from(this.referenceConfigMap.values());
31634
31634
  }
31635
31635
  };
31636
- var createCompatibilitySetting = (version2) => new BuilderElement({
31636
+ var createCompatibilitySetting = (version) => new BuilderElement({
31637
31637
  name: "w:compatSetting",
31638
31638
  attributes: {
31639
31639
  version: {
31640
31640
  key: "w:val",
31641
- value: version2
31641
+ value: version
31642
31642
  },
31643
31643
  name: {
31644
31644
  key: "w:name",
@@ -40816,7 +40816,7 @@ var require_data_validations = __commonJS({
40816
40816
  var require_encryptor = __commonJS({
40817
40817
  "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/encryptor.js"(exports2, module2) {
40818
40818
  "use strict";
40819
- var crypto9 = __require("crypto");
40819
+ var crypto6 = __require("crypto");
40820
40820
  var Encryptor = {
40821
40821
  /**
40822
40822
  * Calculate a hash of the concatenated buffers with the given algorithm.
@@ -40824,7 +40824,7 @@ var require_encryptor = __commonJS({
40824
40824
  * @returns {Buffer} The hash
40825
40825
  */
40826
40826
  hash(algorithm, ...buffers) {
40827
- const hash = crypto9.createHash(algorithm);
40827
+ const hash = crypto6.createHash(algorithm);
40828
40828
  hash.update(Buffer.concat(buffers));
40829
40829
  return hash.digest();
40830
40830
  },
@@ -40840,7 +40840,7 @@ var require_encryptor = __commonJS({
40840
40840
  */
40841
40841
  convertPasswordToHash(password, hashAlgorithm, saltValue, spinCount) {
40842
40842
  hashAlgorithm = hashAlgorithm.toLowerCase();
40843
- const hashes = crypto9.getHashes();
40843
+ const hashes = crypto6.getHashes();
40844
40844
  if (hashes.indexOf(hashAlgorithm) < 0) {
40845
40845
  throw new Error(`Hash algorithm '${hashAlgorithm}' not supported!`);
40846
40846
  }
@@ -40858,7 +40858,7 @@ var require_encryptor = __commonJS({
40858
40858
  * @param size The size argument is a number indicating the number of bytes to generate.
40859
40859
  */
40860
40860
  randomBytes(size) {
40861
- return crypto9.randomBytes(size);
40861
+ return crypto6.randomBytes(size);
40862
40862
  }
40863
40863
  };
40864
40864
  module2.exports = Encryptor;
@@ -56221,9 +56221,9 @@ var require_saxes = __commonJS({
56221
56221
  }
56222
56222
  }
56223
56223
  }
56224
- setXMLVersion(version2) {
56225
- this.currentXMLVersion = version2;
56226
- if (version2 === "1.0") {
56224
+ setXMLVersion(version) {
56225
+ this.currentXMLVersion = version;
56226
+ if (version === "1.0") {
56227
56227
  this.isChar = isChar10;
56228
56228
  this.getCode = this.getCode10;
56229
56229
  } else {
@@ -56700,12 +56700,12 @@ var require_saxes = __commonJS({
56700
56700
  switch (this.name) {
56701
56701
  case "version": {
56702
56702
  this.xmlDeclExpects = ["encoding", "standalone"];
56703
- const version2 = value2;
56704
- this.xmlDecl.version = version2;
56705
- if (!/^1\.[0-9]+$/.test(version2)) {
56703
+ const version = value2;
56704
+ this.xmlDecl.version = version;
56705
+ if (!/^1\.[0-9]+$/.test(version)) {
56706
56706
  this.fail("version number must match /^1\\.[0-9]+$/.");
56707
56707
  } else if (!this.opt.forceXMLVersion) {
56708
- this.setXMLVersion(version2);
56708
+ this.setXMLVersion(version);
56709
56709
  }
56710
56710
  break;
56711
56711
  }
@@ -63694,336 +63694,592 @@ var require_conditional_formattings_xform = __commonJS({
63694
63694
  }
63695
63695
  });
63696
63696
 
63697
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js
63698
- import crypto from "crypto";
63699
- function rng() {
63700
- if (poolPtr > rnds8Pool.length - 16) {
63701
- crypto.randomFillSync(rnds8Pool);
63702
- poolPtr = 0;
63697
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/max.js
63698
+ var require_max = __commonJS({
63699
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/max.js"(exports2) {
63700
+ "use strict";
63701
+ Object.defineProperty(exports2, "__esModule", { value: true });
63702
+ exports2.default = "ffffffff-ffff-ffff-ffff-ffffffffffff";
63703
63703
  }
63704
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
63705
- }
63706
- var rnds8Pool, poolPtr;
63707
- var init_rng = __esm({
63708
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js"() {
63709
- rnds8Pool = new Uint8Array(256);
63710
- poolPtr = rnds8Pool.length;
63704
+ });
63705
+
63706
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/nil.js
63707
+ var require_nil = __commonJS({
63708
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/nil.js"(exports2) {
63709
+ "use strict";
63710
+ Object.defineProperty(exports2, "__esModule", { value: true });
63711
+ exports2.default = "00000000-0000-0000-0000-000000000000";
63711
63712
  }
63712
63713
  });
63713
63714
 
63714
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js
63715
- var regex_default;
63716
- var init_regex = __esm({
63717
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js"() {
63718
- regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
63715
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/regex.js
63716
+ var require_regex = __commonJS({
63717
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/regex.js"(exports2) {
63718
+ "use strict";
63719
+ Object.defineProperty(exports2, "__esModule", { value: true });
63720
+ exports2.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
63719
63721
  }
63720
63722
  });
63721
63723
 
63722
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js
63723
- function validate(uuid) {
63724
- return typeof uuid === "string" && regex_default.test(uuid);
63725
- }
63726
- var validate_default;
63727
- var init_validate = __esm({
63728
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js"() {
63729
- init_regex();
63730
- validate_default = validate;
63724
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/validate.js
63725
+ var require_validate = __commonJS({
63726
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/validate.js"(exports2) {
63727
+ "use strict";
63728
+ Object.defineProperty(exports2, "__esModule", { value: true });
63729
+ var regex_js_1 = require_regex();
63730
+ function validate2(uuid) {
63731
+ return typeof uuid === "string" && regex_js_1.default.test(uuid);
63732
+ }
63733
+ exports2.default = validate2;
63731
63734
  }
63732
63735
  });
63733
63736
 
63734
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js
63735
- function stringify(arr, offset = 0) {
63736
- const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
63737
- if (!validate_default(uuid)) {
63738
- throw TypeError("Stringified UUID is invalid");
63737
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/parse.js
63738
+ var require_parse = __commonJS({
63739
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/parse.js"(exports2) {
63740
+ "use strict";
63741
+ Object.defineProperty(exports2, "__esModule", { value: true });
63742
+ var validate_js_1 = require_validate();
63743
+ function parse3(uuid) {
63744
+ if (!(0, validate_js_1.default)(uuid)) {
63745
+ throw TypeError("Invalid UUID");
63746
+ }
63747
+ let v;
63748
+ return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
63749
+ }
63750
+ exports2.default = parse3;
63739
63751
  }
63740
- return uuid;
63741
- }
63742
- var byteToHex, stringify_default;
63743
- var init_stringify = __esm({
63744
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js"() {
63745
- init_validate();
63746
- byteToHex = [];
63752
+ });
63753
+
63754
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/stringify.js
63755
+ var require_stringify = __commonJS({
63756
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/stringify.js"(exports2) {
63757
+ "use strict";
63758
+ Object.defineProperty(exports2, "__esModule", { value: true });
63759
+ exports2.unsafeStringify = void 0;
63760
+ var validate_js_1 = require_validate();
63761
+ var byteToHex = [];
63747
63762
  for (let i2 = 0; i2 < 256; ++i2) {
63748
- byteToHex.push((i2 + 256).toString(16).substr(1));
63749
- }
63750
- stringify_default = stringify;
63751
- }
63752
- });
63753
-
63754
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js
63755
- function v1(options, buf, offset) {
63756
- let i2 = buf && offset || 0;
63757
- const b = buf || new Array(16);
63758
- options = options || {};
63759
- let node = options.node || _nodeId;
63760
- let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;
63761
- if (node == null || clockseq == null) {
63762
- const seedBytes = options.random || (options.rng || rng)();
63763
- if (node == null) {
63764
- node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
63765
- }
63766
- if (clockseq == null) {
63767
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
63768
- }
63769
- }
63770
- let msecs = options.msecs !== void 0 ? options.msecs : Date.now();
63771
- let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;
63772
- const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
63773
- if (dt < 0 && options.clockseq === void 0) {
63774
- clockseq = clockseq + 1 & 16383;
63775
- }
63776
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {
63777
- nsecs = 0;
63778
- }
63779
- if (nsecs >= 1e4) {
63780
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
63781
- }
63782
- _lastMSecs = msecs;
63783
- _lastNSecs = nsecs;
63784
- _clockseq = clockseq;
63785
- msecs += 122192928e5;
63786
- const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
63787
- b[i2++] = tl >>> 24 & 255;
63788
- b[i2++] = tl >>> 16 & 255;
63789
- b[i2++] = tl >>> 8 & 255;
63790
- b[i2++] = tl & 255;
63791
- const tmh = msecs / 4294967296 * 1e4 & 268435455;
63792
- b[i2++] = tmh >>> 8 & 255;
63793
- b[i2++] = tmh & 255;
63794
- b[i2++] = tmh >>> 24 & 15 | 16;
63795
- b[i2++] = tmh >>> 16 & 255;
63796
- b[i2++] = clockseq >>> 8 | 128;
63797
- b[i2++] = clockseq & 255;
63798
- for (let n = 0; n < 6; ++n) {
63799
- b[i2 + n] = node[n];
63800
- }
63801
- return buf || stringify_default(b);
63802
- }
63803
- var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;
63804
- var init_v1 = __esm({
63805
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js"() {
63806
- init_rng();
63807
- init_stringify();
63808
- _lastMSecs = 0;
63809
- _lastNSecs = 0;
63810
- v1_default = v1;
63811
- }
63812
- });
63813
-
63814
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js
63815
- function parse(uuid) {
63816
- if (!validate_default(uuid)) {
63817
- throw TypeError("Invalid UUID");
63818
- }
63819
- let v;
63820
- const arr = new Uint8Array(16);
63821
- arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
63822
- arr[1] = v >>> 16 & 255;
63823
- arr[2] = v >>> 8 & 255;
63824
- arr[3] = v & 255;
63825
- arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
63826
- arr[5] = v & 255;
63827
- arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
63828
- arr[7] = v & 255;
63829
- arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
63830
- arr[9] = v & 255;
63831
- arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
63832
- arr[11] = v / 4294967296 & 255;
63833
- arr[12] = v >>> 24 & 255;
63834
- arr[13] = v >>> 16 & 255;
63835
- arr[14] = v >>> 8 & 255;
63836
- arr[15] = v & 255;
63837
- return arr;
63838
- }
63839
- var parse_default;
63840
- var init_parse = __esm({
63841
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js"() {
63842
- init_validate();
63843
- parse_default = parse;
63844
- }
63845
- });
63846
-
63847
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js
63848
- function stringToBytes(str) {
63849
- str = unescape(encodeURIComponent(str));
63850
- const bytes = [];
63851
- for (let i2 = 0; i2 < str.length; ++i2) {
63852
- bytes.push(str.charCodeAt(i2));
63853
- }
63854
- return bytes;
63855
- }
63856
- function v35_default(name, version2, hashfunc) {
63857
- function generateUUID(value2, namespace, buf, offset) {
63858
- if (typeof value2 === "string") {
63859
- value2 = stringToBytes(value2);
63763
+ byteToHex.push((i2 + 256).toString(16).slice(1));
63860
63764
  }
63861
- if (typeof namespace === "string") {
63862
- namespace = parse_default(namespace);
63765
+ function unsafeStringify(arr, offset = 0) {
63766
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
63863
63767
  }
63864
- if (namespace.length !== 16) {
63865
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
63866
- }
63867
- let bytes = new Uint8Array(16 + value2.length);
63868
- bytes.set(namespace);
63869
- bytes.set(value2, namespace.length);
63870
- bytes = hashfunc(bytes);
63871
- bytes[6] = bytes[6] & 15 | version2;
63872
- bytes[8] = bytes[8] & 63 | 128;
63873
- if (buf) {
63874
- offset = offset || 0;
63875
- for (let i2 = 0; i2 < 16; ++i2) {
63876
- buf[offset + i2] = bytes[i2];
63768
+ exports2.unsafeStringify = unsafeStringify;
63769
+ function stringify(arr, offset = 0) {
63770
+ const uuid = unsafeStringify(arr, offset);
63771
+ if (!(0, validate_js_1.default)(uuid)) {
63772
+ throw TypeError("Stringified UUID is invalid");
63877
63773
  }
63878
- return buf;
63774
+ return uuid;
63879
63775
  }
63880
- return stringify_default(bytes);
63776
+ exports2.default = stringify;
63881
63777
  }
63882
- try {
63883
- generateUUID.name = name;
63884
- } catch (err) {
63778
+ });
63779
+
63780
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/rng.js
63781
+ var require_rng = __commonJS({
63782
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/rng.js"(exports2) {
63783
+ "use strict";
63784
+ Object.defineProperty(exports2, "__esModule", { value: true });
63785
+ var crypto_1 = __require("crypto");
63786
+ var rnds8Pool = new Uint8Array(256);
63787
+ var poolPtr = rnds8Pool.length;
63788
+ function rng() {
63789
+ if (poolPtr > rnds8Pool.length - 16) {
63790
+ (0, crypto_1.randomFillSync)(rnds8Pool);
63791
+ poolPtr = 0;
63792
+ }
63793
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
63794
+ }
63795
+ exports2.default = rng;
63885
63796
  }
63886
- generateUUID.DNS = DNS;
63887
- generateUUID.URL = URL2;
63888
- return generateUUID;
63889
- }
63890
- var DNS, URL2;
63891
- var init_v35 = __esm({
63892
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js"() {
63893
- init_stringify();
63894
- init_parse();
63895
- DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
63896
- URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
63797
+ });
63798
+
63799
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v1.js
63800
+ var require_v1 = __commonJS({
63801
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v1.js"(exports2) {
63802
+ "use strict";
63803
+ Object.defineProperty(exports2, "__esModule", { value: true });
63804
+ exports2.updateV1State = void 0;
63805
+ var rng_js_1 = require_rng();
63806
+ var stringify_js_1 = require_stringify();
63807
+ var _state2 = {};
63808
+ function v1(options, buf, offset) {
63809
+ let bytes;
63810
+ const isV6 = options?._v6 ?? false;
63811
+ if (options) {
63812
+ const optionsKeys = Object.keys(options);
63813
+ if (optionsKeys.length === 1 && optionsKeys[0] === "_v6") {
63814
+ options = void 0;
63815
+ }
63816
+ }
63817
+ if (options) {
63818
+ bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);
63819
+ } else {
63820
+ const now = Date.now();
63821
+ const rnds = (0, rng_js_1.default)();
63822
+ updateV1State(_state2, now, rnds);
63823
+ bytes = v1Bytes(rnds, _state2.msecs, _state2.nsecs, isV6 ? void 0 : _state2.clockseq, isV6 ? void 0 : _state2.node, buf, offset);
63824
+ }
63825
+ return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);
63826
+ }
63827
+ function updateV1State(state, now, rnds) {
63828
+ state.msecs ??= -Infinity;
63829
+ state.nsecs ??= 0;
63830
+ if (now === state.msecs) {
63831
+ state.nsecs++;
63832
+ if (state.nsecs >= 1e4) {
63833
+ state.node = void 0;
63834
+ state.nsecs = 0;
63835
+ }
63836
+ } else if (now > state.msecs) {
63837
+ state.nsecs = 0;
63838
+ } else if (now < state.msecs) {
63839
+ state.node = void 0;
63840
+ }
63841
+ if (!state.node) {
63842
+ state.node = rnds.slice(10, 16);
63843
+ state.node[0] |= 1;
63844
+ state.clockseq = (rnds[8] << 8 | rnds[9]) & 16383;
63845
+ }
63846
+ state.msecs = now;
63847
+ return state;
63848
+ }
63849
+ exports2.updateV1State = updateV1State;
63850
+ function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
63851
+ if (rnds.length < 16) {
63852
+ throw new Error("Random bytes length must be >= 16");
63853
+ }
63854
+ if (!buf) {
63855
+ buf = new Uint8Array(16);
63856
+ offset = 0;
63857
+ } else {
63858
+ if (offset < 0 || offset + 16 > buf.length) {
63859
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
63860
+ }
63861
+ }
63862
+ msecs ??= Date.now();
63863
+ nsecs ??= 0;
63864
+ clockseq ??= (rnds[8] << 8 | rnds[9]) & 16383;
63865
+ node ??= rnds.slice(10, 16);
63866
+ msecs += 122192928e5;
63867
+ const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
63868
+ buf[offset++] = tl >>> 24 & 255;
63869
+ buf[offset++] = tl >>> 16 & 255;
63870
+ buf[offset++] = tl >>> 8 & 255;
63871
+ buf[offset++] = tl & 255;
63872
+ const tmh = msecs / 4294967296 * 1e4 & 268435455;
63873
+ buf[offset++] = tmh >>> 8 & 255;
63874
+ buf[offset++] = tmh & 255;
63875
+ buf[offset++] = tmh >>> 24 & 15 | 16;
63876
+ buf[offset++] = tmh >>> 16 & 255;
63877
+ buf[offset++] = clockseq >>> 8 | 128;
63878
+ buf[offset++] = clockseq & 255;
63879
+ for (let n = 0; n < 6; ++n) {
63880
+ buf[offset++] = node[n];
63881
+ }
63882
+ return buf;
63883
+ }
63884
+ exports2.default = v1;
63897
63885
  }
63898
63886
  });
63899
63887
 
63900
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js
63901
- import crypto2 from "crypto";
63902
- function md5(bytes) {
63903
- if (Array.isArray(bytes)) {
63904
- bytes = Buffer.from(bytes);
63905
- } else if (typeof bytes === "string") {
63906
- bytes = Buffer.from(bytes, "utf8");
63888
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v1ToV6.js
63889
+ var require_v1ToV6 = __commonJS({
63890
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v1ToV6.js"(exports2) {
63891
+ "use strict";
63892
+ Object.defineProperty(exports2, "__esModule", { value: true });
63893
+ var parse_js_1 = require_parse();
63894
+ var stringify_js_1 = require_stringify();
63895
+ function v1ToV6(uuid) {
63896
+ const v1Bytes = typeof uuid === "string" ? (0, parse_js_1.default)(uuid) : uuid;
63897
+ const v6Bytes = _v1ToV6(v1Bytes);
63898
+ return typeof uuid === "string" ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes;
63899
+ }
63900
+ exports2.default = v1ToV6;
63901
+ function _v1ToV6(v1Bytes) {
63902
+ return Uint8Array.of((v1Bytes[6] & 15) << 4 | v1Bytes[7] >> 4 & 15, (v1Bytes[7] & 15) << 4 | (v1Bytes[4] & 240) >> 4, (v1Bytes[4] & 15) << 4 | (v1Bytes[5] & 240) >> 4, (v1Bytes[5] & 15) << 4 | (v1Bytes[0] & 240) >> 4, (v1Bytes[0] & 15) << 4 | (v1Bytes[1] & 240) >> 4, (v1Bytes[1] & 15) << 4 | (v1Bytes[2] & 240) >> 4, 96 | v1Bytes[2] & 15, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
63903
+ }
63907
63904
  }
63908
- return crypto2.createHash("md5").update(bytes).digest();
63909
- }
63910
- var md5_default;
63911
- var init_md5 = __esm({
63912
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js"() {
63913
- md5_default = md5;
63905
+ });
63906
+
63907
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/md5.js
63908
+ var require_md5 = __commonJS({
63909
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/md5.js"(exports2) {
63910
+ "use strict";
63911
+ Object.defineProperty(exports2, "__esModule", { value: true });
63912
+ var crypto_1 = __require("crypto");
63913
+ function md5(bytes) {
63914
+ if (Array.isArray(bytes)) {
63915
+ bytes = Buffer.from(bytes);
63916
+ } else if (typeof bytes === "string") {
63917
+ bytes = Buffer.from(bytes, "utf8");
63918
+ }
63919
+ return (0, crypto_1.createHash)("md5").update(bytes).digest();
63920
+ }
63921
+ exports2.default = md5;
63914
63922
  }
63915
63923
  });
63916
63924
 
63917
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js
63918
- var v3, v3_default;
63919
- var init_v3 = __esm({
63920
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js"() {
63921
- init_v35();
63922
- init_md5();
63923
- v3 = v35_default("v3", 48, md5_default);
63924
- v3_default = v3;
63925
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v35.js
63926
+ var require_v35 = __commonJS({
63927
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v35.js"(exports2) {
63928
+ "use strict";
63929
+ Object.defineProperty(exports2, "__esModule", { value: true });
63930
+ exports2.URL = exports2.DNS = exports2.stringToBytes = void 0;
63931
+ var parse_js_1 = require_parse();
63932
+ var stringify_js_1 = require_stringify();
63933
+ function stringToBytes(str) {
63934
+ str = unescape(encodeURIComponent(str));
63935
+ const bytes = new Uint8Array(str.length);
63936
+ for (let i2 = 0; i2 < str.length; ++i2) {
63937
+ bytes[i2] = str.charCodeAt(i2);
63938
+ }
63939
+ return bytes;
63940
+ }
63941
+ exports2.stringToBytes = stringToBytes;
63942
+ exports2.DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
63943
+ exports2.URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
63944
+ function v35(version, hash, value2, namespace, buf, offset) {
63945
+ const valueBytes = typeof value2 === "string" ? stringToBytes(value2) : value2;
63946
+ const namespaceBytes = typeof namespace === "string" ? (0, parse_js_1.default)(namespace) : namespace;
63947
+ if (typeof namespace === "string") {
63948
+ namespace = (0, parse_js_1.default)(namespace);
63949
+ }
63950
+ if (namespace?.length !== 16) {
63951
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
63952
+ }
63953
+ let bytes = new Uint8Array(16 + valueBytes.length);
63954
+ bytes.set(namespaceBytes);
63955
+ bytes.set(valueBytes, namespaceBytes.length);
63956
+ bytes = hash(bytes);
63957
+ bytes[6] = bytes[6] & 15 | version;
63958
+ bytes[8] = bytes[8] & 63 | 128;
63959
+ if (buf) {
63960
+ offset = offset || 0;
63961
+ if (offset < 0 || offset + 16 > buf.length) {
63962
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
63963
+ }
63964
+ for (let i2 = 0; i2 < 16; ++i2) {
63965
+ buf[offset + i2] = bytes[i2];
63966
+ }
63967
+ return buf;
63968
+ }
63969
+ return (0, stringify_js_1.unsafeStringify)(bytes);
63970
+ }
63971
+ exports2.default = v35;
63925
63972
  }
63926
63973
  });
63927
63974
 
63928
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js
63929
- function v4(options, buf, offset) {
63930
- options = options || {};
63931
- const rnds = options.random || (options.rng || rng)();
63932
- rnds[6] = rnds[6] & 15 | 64;
63933
- rnds[8] = rnds[8] & 63 | 128;
63934
- if (buf) {
63935
- offset = offset || 0;
63936
- for (let i2 = 0; i2 < 16; ++i2) {
63937
- buf[offset + i2] = rnds[i2];
63975
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v3.js
63976
+ var require_v3 = __commonJS({
63977
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v3.js"(exports2) {
63978
+ "use strict";
63979
+ Object.defineProperty(exports2, "__esModule", { value: true });
63980
+ exports2.URL = exports2.DNS = void 0;
63981
+ var md5_js_1 = require_md5();
63982
+ var v35_js_1 = require_v35();
63983
+ var v35_js_2 = require_v35();
63984
+ Object.defineProperty(exports2, "DNS", { enumerable: true, get: function() {
63985
+ return v35_js_2.DNS;
63986
+ } });
63987
+ Object.defineProperty(exports2, "URL", { enumerable: true, get: function() {
63988
+ return v35_js_2.URL;
63989
+ } });
63990
+ function v3(value2, namespace, buf, offset) {
63991
+ return (0, v35_js_1.default)(48, md5_js_1.default, value2, namespace, buf, offset);
63938
63992
  }
63939
- return buf;
63993
+ v3.DNS = v35_js_1.DNS;
63994
+ v3.URL = v35_js_1.URL;
63995
+ exports2.default = v3;
63940
63996
  }
63941
- return stringify_default(rnds);
63942
- }
63943
- var v4_default;
63944
- var init_v4 = __esm({
63945
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js"() {
63946
- init_rng();
63947
- init_stringify();
63948
- v4_default = v4;
63997
+ });
63998
+
63999
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/native.js
64000
+ var require_native = __commonJS({
64001
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/native.js"(exports2) {
64002
+ "use strict";
64003
+ Object.defineProperty(exports2, "__esModule", { value: true });
64004
+ var crypto_1 = __require("crypto");
64005
+ exports2.default = { randomUUID: crypto_1.randomUUID };
63949
64006
  }
63950
64007
  });
63951
64008
 
63952
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js
63953
- import crypto3 from "crypto";
63954
- function sha1(bytes) {
63955
- if (Array.isArray(bytes)) {
63956
- bytes = Buffer.from(bytes);
63957
- } else if (typeof bytes === "string") {
63958
- bytes = Buffer.from(bytes, "utf8");
64009
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v4.js
64010
+ var require_v4 = __commonJS({
64011
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v4.js"(exports2) {
64012
+ "use strict";
64013
+ Object.defineProperty(exports2, "__esModule", { value: true });
64014
+ var native_js_1 = require_native();
64015
+ var rng_js_1 = require_rng();
64016
+ var stringify_js_1 = require_stringify();
64017
+ function v4(options, buf, offset) {
64018
+ if (native_js_1.default.randomUUID && !buf && !options) {
64019
+ return native_js_1.default.randomUUID();
64020
+ }
64021
+ options = options || {};
64022
+ const rnds = options.random ?? options.rng?.() ?? (0, rng_js_1.default)();
64023
+ if (rnds.length < 16) {
64024
+ throw new Error("Random bytes length must be >= 16");
64025
+ }
64026
+ rnds[6] = rnds[6] & 15 | 64;
64027
+ rnds[8] = rnds[8] & 63 | 128;
64028
+ if (buf) {
64029
+ offset = offset || 0;
64030
+ if (offset < 0 || offset + 16 > buf.length) {
64031
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
64032
+ }
64033
+ for (let i2 = 0; i2 < 16; ++i2) {
64034
+ buf[offset + i2] = rnds[i2];
64035
+ }
64036
+ return buf;
64037
+ }
64038
+ return (0, stringify_js_1.unsafeStringify)(rnds);
64039
+ }
64040
+ exports2.default = v4;
63959
64041
  }
63960
- return crypto3.createHash("sha1").update(bytes).digest();
63961
- }
63962
- var sha1_default;
63963
- var init_sha1 = __esm({
63964
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js"() {
63965
- sha1_default = sha1;
64042
+ });
64043
+
64044
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/sha1.js
64045
+ var require_sha1 = __commonJS({
64046
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/sha1.js"(exports2) {
64047
+ "use strict";
64048
+ Object.defineProperty(exports2, "__esModule", { value: true });
64049
+ var crypto_1 = __require("crypto");
64050
+ function sha1(bytes) {
64051
+ if (Array.isArray(bytes)) {
64052
+ bytes = Buffer.from(bytes);
64053
+ } else if (typeof bytes === "string") {
64054
+ bytes = Buffer.from(bytes, "utf8");
64055
+ }
64056
+ return (0, crypto_1.createHash)("sha1").update(bytes).digest();
64057
+ }
64058
+ exports2.default = sha1;
63966
64059
  }
63967
64060
  });
63968
64061
 
63969
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js
63970
- var v5, v5_default;
63971
- var init_v5 = __esm({
63972
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js"() {
63973
- init_v35();
63974
- init_sha1();
63975
- v5 = v35_default("v5", 80, sha1_default);
63976
- v5_default = v5;
64062
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v5.js
64063
+ var require_v5 = __commonJS({
64064
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v5.js"(exports2) {
64065
+ "use strict";
64066
+ Object.defineProperty(exports2, "__esModule", { value: true });
64067
+ exports2.URL = exports2.DNS = void 0;
64068
+ var sha1_js_1 = require_sha1();
64069
+ var v35_js_1 = require_v35();
64070
+ var v35_js_2 = require_v35();
64071
+ Object.defineProperty(exports2, "DNS", { enumerable: true, get: function() {
64072
+ return v35_js_2.DNS;
64073
+ } });
64074
+ Object.defineProperty(exports2, "URL", { enumerable: true, get: function() {
64075
+ return v35_js_2.URL;
64076
+ } });
64077
+ function v5(value2, namespace, buf, offset) {
64078
+ return (0, v35_js_1.default)(80, sha1_js_1.default, value2, namespace, buf, offset);
64079
+ }
64080
+ v5.DNS = v35_js_1.DNS;
64081
+ v5.URL = v35_js_1.URL;
64082
+ exports2.default = v5;
63977
64083
  }
63978
64084
  });
63979
64085
 
63980
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js
63981
- var nil_default;
63982
- var init_nil = __esm({
63983
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js"() {
63984
- nil_default = "00000000-0000-0000-0000-000000000000";
64086
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v6.js
64087
+ var require_v6 = __commonJS({
64088
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v6.js"(exports2) {
64089
+ "use strict";
64090
+ Object.defineProperty(exports2, "__esModule", { value: true });
64091
+ var stringify_js_1 = require_stringify();
64092
+ var v1_js_1 = require_v1();
64093
+ var v1ToV6_js_1 = require_v1ToV6();
64094
+ function v6(options, buf, offset) {
64095
+ options ??= {};
64096
+ offset ??= 0;
64097
+ let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16));
64098
+ bytes = (0, v1ToV6_js_1.default)(bytes);
64099
+ if (buf) {
64100
+ if (offset < 0 || offset + 16 > buf.length) {
64101
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
64102
+ }
64103
+ for (let i2 = 0; i2 < 16; i2++) {
64104
+ buf[offset + i2] = bytes[i2];
64105
+ }
64106
+ return buf;
64107
+ }
64108
+ return (0, stringify_js_1.unsafeStringify)(bytes);
64109
+ }
64110
+ exports2.default = v6;
63985
64111
  }
63986
64112
  });
63987
64113
 
63988
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js
63989
- function version(uuid) {
63990
- if (!validate_default(uuid)) {
63991
- throw TypeError("Invalid UUID");
64114
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v6ToV1.js
64115
+ var require_v6ToV1 = __commonJS({
64116
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v6ToV1.js"(exports2) {
64117
+ "use strict";
64118
+ Object.defineProperty(exports2, "__esModule", { value: true });
64119
+ var parse_js_1 = require_parse();
64120
+ var stringify_js_1 = require_stringify();
64121
+ function v6ToV1(uuid) {
64122
+ const v6Bytes = typeof uuid === "string" ? (0, parse_js_1.default)(uuid) : uuid;
64123
+ const v1Bytes = _v6ToV1(v6Bytes);
64124
+ return typeof uuid === "string" ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes;
64125
+ }
64126
+ exports2.default = v6ToV1;
64127
+ function _v6ToV1(v6Bytes) {
64128
+ return Uint8Array.of((v6Bytes[3] & 15) << 4 | v6Bytes[4] >> 4 & 15, (v6Bytes[4] & 15) << 4 | (v6Bytes[5] & 240) >> 4, (v6Bytes[5] & 15) << 4 | v6Bytes[6] & 15, v6Bytes[7], (v6Bytes[1] & 15) << 4 | (v6Bytes[2] & 240) >> 4, (v6Bytes[2] & 15) << 4 | (v6Bytes[3] & 240) >> 4, 16 | (v6Bytes[0] & 240) >> 4, (v6Bytes[0] & 15) << 4 | (v6Bytes[1] & 240) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
64129
+ }
63992
64130
  }
63993
- return parseInt(uuid.substr(14, 1), 16);
63994
- }
63995
- var version_default;
63996
- var init_version = __esm({
63997
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js"() {
63998
- init_validate();
63999
- version_default = version;
64131
+ });
64132
+
64133
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v7.js
64134
+ var require_v7 = __commonJS({
64135
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/v7.js"(exports2) {
64136
+ "use strict";
64137
+ Object.defineProperty(exports2, "__esModule", { value: true });
64138
+ exports2.updateV7State = void 0;
64139
+ var rng_js_1 = require_rng();
64140
+ var stringify_js_1 = require_stringify();
64141
+ var _state2 = {};
64142
+ function v7(options, buf, offset) {
64143
+ let bytes;
64144
+ if (options) {
64145
+ bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset);
64146
+ } else {
64147
+ const now = Date.now();
64148
+ const rnds = (0, rng_js_1.default)();
64149
+ updateV7State(_state2, now, rnds);
64150
+ bytes = v7Bytes(rnds, _state2.msecs, _state2.seq, buf, offset);
64151
+ }
64152
+ return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);
64153
+ }
64154
+ function updateV7State(state, now, rnds) {
64155
+ state.msecs ??= -Infinity;
64156
+ state.seq ??= 0;
64157
+ if (now > state.msecs) {
64158
+ state.seq = rnds[6] << 23 | rnds[7] << 16 | rnds[8] << 8 | rnds[9];
64159
+ state.msecs = now;
64160
+ } else {
64161
+ state.seq = state.seq + 1 | 0;
64162
+ if (state.seq === 0) {
64163
+ state.msecs++;
64164
+ }
64165
+ }
64166
+ return state;
64167
+ }
64168
+ exports2.updateV7State = updateV7State;
64169
+ function v7Bytes(rnds, msecs, seq2, buf, offset = 0) {
64170
+ if (rnds.length < 16) {
64171
+ throw new Error("Random bytes length must be >= 16");
64172
+ }
64173
+ if (!buf) {
64174
+ buf = new Uint8Array(16);
64175
+ offset = 0;
64176
+ } else {
64177
+ if (offset < 0 || offset + 16 > buf.length) {
64178
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
64179
+ }
64180
+ }
64181
+ msecs ??= Date.now();
64182
+ seq2 ??= rnds[6] * 127 << 24 | rnds[7] << 16 | rnds[8] << 8 | rnds[9];
64183
+ buf[offset++] = msecs / 1099511627776 & 255;
64184
+ buf[offset++] = msecs / 4294967296 & 255;
64185
+ buf[offset++] = msecs / 16777216 & 255;
64186
+ buf[offset++] = msecs / 65536 & 255;
64187
+ buf[offset++] = msecs / 256 & 255;
64188
+ buf[offset++] = msecs & 255;
64189
+ buf[offset++] = 112 | seq2 >>> 28 & 15;
64190
+ buf[offset++] = seq2 >>> 20 & 255;
64191
+ buf[offset++] = 128 | seq2 >>> 14 & 63;
64192
+ buf[offset++] = seq2 >>> 6 & 255;
64193
+ buf[offset++] = seq2 << 2 & 255 | rnds[10] & 3;
64194
+ buf[offset++] = rnds[11];
64195
+ buf[offset++] = rnds[12];
64196
+ buf[offset++] = rnds[13];
64197
+ buf[offset++] = rnds[14];
64198
+ buf[offset++] = rnds[15];
64199
+ return buf;
64200
+ }
64201
+ exports2.default = v7;
64000
64202
  }
64001
64203
  });
64002
64204
 
64003
- // ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js
64004
- var esm_node_exports = {};
64005
- __export(esm_node_exports, {
64006
- NIL: () => nil_default,
64007
- parse: () => parse_default,
64008
- stringify: () => stringify_default,
64009
- v1: () => v1_default,
64010
- v3: () => v3_default,
64011
- v4: () => v4_default,
64012
- v5: () => v5_default,
64013
- validate: () => validate_default,
64014
- version: () => version_default
64205
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/version.js
64206
+ var require_version = __commonJS({
64207
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/version.js"(exports2) {
64208
+ "use strict";
64209
+ Object.defineProperty(exports2, "__esModule", { value: true });
64210
+ var validate_js_1 = require_validate();
64211
+ function version(uuid) {
64212
+ if (!(0, validate_js_1.default)(uuid)) {
64213
+ throw TypeError("Invalid UUID");
64214
+ }
64215
+ return parseInt(uuid.slice(14, 15), 16);
64216
+ }
64217
+ exports2.default = version;
64218
+ }
64015
64219
  });
64016
- var init_esm_node = __esm({
64017
- "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js"() {
64018
- init_v1();
64019
- init_v3();
64020
- init_v4();
64021
- init_v5();
64022
- init_nil();
64023
- init_version();
64024
- init_validate();
64025
- init_stringify();
64026
- init_parse();
64220
+
64221
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/index.js
64222
+ var require_cjs = __commonJS({
64223
+ "../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/cjs/index.js"(exports2) {
64224
+ "use strict";
64225
+ Object.defineProperty(exports2, "__esModule", { value: true });
64226
+ exports2.version = exports2.validate = exports2.v7 = exports2.v6ToV1 = exports2.v6 = exports2.v5 = exports2.v4 = exports2.v3 = exports2.v1ToV6 = exports2.v1 = exports2.stringify = exports2.parse = exports2.NIL = exports2.MAX = void 0;
64227
+ var max_js_1 = require_max();
64228
+ Object.defineProperty(exports2, "MAX", { enumerable: true, get: function() {
64229
+ return max_js_1.default;
64230
+ } });
64231
+ var nil_js_1 = require_nil();
64232
+ Object.defineProperty(exports2, "NIL", { enumerable: true, get: function() {
64233
+ return nil_js_1.default;
64234
+ } });
64235
+ var parse_js_1 = require_parse();
64236
+ Object.defineProperty(exports2, "parse", { enumerable: true, get: function() {
64237
+ return parse_js_1.default;
64238
+ } });
64239
+ var stringify_js_1 = require_stringify();
64240
+ Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
64241
+ return stringify_js_1.default;
64242
+ } });
64243
+ var v1_js_1 = require_v1();
64244
+ Object.defineProperty(exports2, "v1", { enumerable: true, get: function() {
64245
+ return v1_js_1.default;
64246
+ } });
64247
+ var v1ToV6_js_1 = require_v1ToV6();
64248
+ Object.defineProperty(exports2, "v1ToV6", { enumerable: true, get: function() {
64249
+ return v1ToV6_js_1.default;
64250
+ } });
64251
+ var v3_js_1 = require_v3();
64252
+ Object.defineProperty(exports2, "v3", { enumerable: true, get: function() {
64253
+ return v3_js_1.default;
64254
+ } });
64255
+ var v4_js_1 = require_v4();
64256
+ Object.defineProperty(exports2, "v4", { enumerable: true, get: function() {
64257
+ return v4_js_1.default;
64258
+ } });
64259
+ var v5_js_1 = require_v5();
64260
+ Object.defineProperty(exports2, "v5", { enumerable: true, get: function() {
64261
+ return v5_js_1.default;
64262
+ } });
64263
+ var v6_js_1 = require_v6();
64264
+ Object.defineProperty(exports2, "v6", { enumerable: true, get: function() {
64265
+ return v6_js_1.default;
64266
+ } });
64267
+ var v6ToV1_js_1 = require_v6ToV1();
64268
+ Object.defineProperty(exports2, "v6ToV1", { enumerable: true, get: function() {
64269
+ return v6ToV1_js_1.default;
64270
+ } });
64271
+ var v7_js_1 = require_v7();
64272
+ Object.defineProperty(exports2, "v7", { enumerable: true, get: function() {
64273
+ return v7_js_1.default;
64274
+ } });
64275
+ var validate_js_1 = require_validate();
64276
+ Object.defineProperty(exports2, "validate", { enumerable: true, get: function() {
64277
+ return validate_js_1.default;
64278
+ } });
64279
+ var version_js_1 = require_version();
64280
+ Object.defineProperty(exports2, "version", { enumerable: true, get: function() {
64281
+ return version_js_1.default;
64282
+ } });
64027
64283
  }
64028
64284
  });
64029
64285
 
@@ -64279,7 +64535,7 @@ var require_icon_set_ext_xform = __commonJS({
64279
64535
  // ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js
64280
64536
  var require_cf_rule_ext_xform = __commonJS({
64281
64537
  "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js"(exports2, module2) {
64282
- var { v4: uuidv4 } = (init_esm_node(), __toCommonJS(esm_node_exports));
64538
+ var { v4: uuidv4 } = require_cjs();
64283
64539
  var BaseXform = require_base_xform();
64284
64540
  var CompositeXform = require_composite_xform();
64285
64541
  var DatabarExtXform = require_databar_ext_xform();
@@ -68833,7 +69089,7 @@ var require_types3 = __commonJS({
68833
69089
  Object.defineProperty(exports2, "__esModule", { value: true });
68834
69090
  exports2.isSyncValidate = exports2.isSyncTransform = void 0;
68835
69091
  exports2.isSyncTransform = (transform) => transform.length === 1;
68836
- exports2.isSyncValidate = (validate3) => validate3.length === 1;
69092
+ exports2.isSyncValidate = (validate2) => validate2.length === 1;
68837
69093
  }
68838
69094
  });
68839
69095
 
@@ -72049,9 +72305,9 @@ var require_balanced_match = __commonJS({
72049
72305
  }
72050
72306
  });
72051
72307
 
72052
- // ../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js
72308
+ // ../../node_modules/.pnpm/brace-expansion@2.1.7/node_modules/brace-expansion/index.js
72053
72309
  var require_brace_expansion = __commonJS({
72054
- "../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js"(exports2, module2) {
72310
+ "../../node_modules/.pnpm/brace-expansion@2.1.7/node_modules/brace-expansion/index.js"(exports2, module2) {
72055
72311
  var balanced = require_balanced_match();
72056
72312
  module2.exports = expandTop;
72057
72313
  var escSlash = "\0SLASH" + Math.random() + "\0";
@@ -72061,6 +72317,8 @@ var require_brace_expansion = __commonJS({
72061
72317
  var escPeriod = "\0PERIOD" + Math.random() + "\0";
72062
72318
  var EXPANSION_MAX = 1e5;
72063
72319
  var EXPANSION_MAX_LENGTH = 4e6;
72320
+ var EXPANSION_MAX_DEPTH = 1e3;
72321
+ var EXPANSION_MAX_REWRITES = 1e3;
72064
72322
  function numeric(str) {
72065
72323
  return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
72066
72324
  }
@@ -72070,25 +72328,36 @@ var require_brace_expansion = __commonJS({
72070
72328
  function unescapeBraces(str) {
72071
72329
  return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
72072
72330
  }
72331
+ function pushAll(target, items) {
72332
+ for (var i2 = 0; i2 < items.length; i2++) {
72333
+ target.push(items[i2]);
72334
+ }
72335
+ }
72073
72336
  function parseCommaParts(str) {
72074
- if (!str)
72075
- return [""];
72076
72337
  var parts2 = [];
72077
- var m2 = balanced("{", "}", str);
72078
- if (!m2)
72079
- return str.split(",");
72080
- var pre = m2.pre;
72081
- var body = m2.body;
72082
- var post = m2.post;
72083
- var p = pre.split(",");
72084
- p[p.length - 1] += "{" + body + "}";
72085
- var postParts = parseCommaParts(post);
72086
- if (post.length) {
72087
- p[p.length - 1] += postParts.shift();
72088
- p.push.apply(p, postParts);
72089
- }
72090
- parts2.push.apply(parts2, p);
72091
- return parts2;
72338
+ var carry = "";
72339
+ for (; ; ) {
72340
+ var m2 = balanced("{", "}", str);
72341
+ if (!m2) {
72342
+ var tail = str.split(",");
72343
+ tail[0] = carry + tail[0];
72344
+ pushAll(parts2, tail);
72345
+ return parts2;
72346
+ }
72347
+ var pre = m2.pre;
72348
+ var body = m2.body;
72349
+ var post = m2.post;
72350
+ var p = pre.split(",");
72351
+ p[0] = carry + p[0];
72352
+ p[p.length - 1] += "{" + body + "}";
72353
+ if (!post.length) {
72354
+ pushAll(parts2, p);
72355
+ return parts2;
72356
+ }
72357
+ carry = p.pop();
72358
+ pushAll(parts2, p);
72359
+ str = post;
72360
+ }
72092
72361
  }
72093
72362
  function expandTop(str, options) {
72094
72363
  if (!str)
@@ -72096,10 +72365,12 @@ var require_brace_expansion = __commonJS({
72096
72365
  options = options || {};
72097
72366
  var max = options.max == null ? EXPANSION_MAX : options.max;
72098
72367
  var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength;
72368
+ var maxDepth = options.maxDepth == null ? EXPANSION_MAX_DEPTH : options.maxDepth;
72369
+ var maxRewrites = options.maxRewrites == null ? EXPANSION_MAX_REWRITES : options.maxRewrites;
72099
72370
  if (str.substr(0, 2) === "{}") {
72100
72371
  str = "\\{\\}" + str.substr(2);
72101
72372
  }
72102
- return expand(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
72373
+ return expand(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
72103
72374
  }
72104
72375
  function embrace(str) {
72105
72376
  return "{" + str + "}";
@@ -72177,8 +72448,12 @@ var require_brace_expansion = __commonJS({
72177
72448
  }
72178
72449
  return N;
72179
72450
  }
72180
- function expand(str, max, maxLength, isTop) {
72451
+ function expand(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
72452
+ if (depth > maxDepth) {
72453
+ return [str];
72454
+ }
72181
72455
  var acc = [""];
72456
+ var rewrites = 0;
72182
72457
  var dropEmpties = false;
72183
72458
  var firstGroup = true;
72184
72459
  for (; ; ) {
@@ -72207,7 +72482,8 @@ var require_brace_expansion = __commonJS({
72207
72482
  var isSequence = isNumericSequence || isAlphaSequence;
72208
72483
  var isOptions = m2.body.indexOf(",") >= 0;
72209
72484
  if (!isSequence && !isOptions) {
72210
- if (m2.post.match(/,(?!,).*\}/)) {
72485
+ if (rewrites < maxRewrites && m2.post.match(/,(?!,).*\}/)) {
72486
+ rewrites++;
72211
72487
  str = m2.pre + "{" + m2.body + escClose + m2.post;
72212
72488
  isTop = true;
72213
72489
  continue;
@@ -72231,7 +72507,7 @@ var require_brace_expansion = __commonJS({
72231
72507
  } else {
72232
72508
  var n = parseCommaParts(m2.body);
72233
72509
  if (n.length === 1 && n[0] !== void 0) {
72234
- n = expand(n[0], max, maxLength, false).map(embrace);
72510
+ n = expand(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
72235
72511
  if (n.length === 1) {
72236
72512
  acc = combine(
72237
72513
  acc,
@@ -72257,7 +72533,7 @@ var require_brace_expansion = __commonJS({
72257
72533
  var valuesLength = 0;
72258
72534
  outer:
72259
72535
  for (var j = 0; j < n.length; j++) {
72260
- var expanded = expand(n[j], max, maxLength, false);
72536
+ var expanded = expand(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
72261
72537
  for (var k = 0; k < expanded.length; k++) {
72262
72538
  var v = expanded[k];
72263
72539
  if (dropsEmpties && !v)
@@ -77319,8 +77595,8 @@ var require_fs = __commonJS({
77319
77595
  var fs33 = __require("fs");
77320
77596
  var origRealpath = fs33.realpath;
77321
77597
  var origRealpathSync = fs33.realpathSync;
77322
- var version2 = process.version;
77323
- var ok = /^v[0-5]\./.test(version2);
77598
+ var version = process.version;
77599
+ var ok = /^v[0-5]\./.test(version);
77324
77600
  var old = require_old();
77325
77601
  function newError(er) {
77326
77602
  return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
@@ -77386,9 +77662,9 @@ var require_concat_map = __commonJS({
77386
77662
  }
77387
77663
  });
77388
77664
 
77389
- // ../../node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js
77665
+ // ../../node_modules/.pnpm/brace-expansion@1.1.21/node_modules/brace-expansion/index.js
77390
77666
  var require_brace_expansion2 = __commonJS({
77391
- "../../node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js"(exports2, module2) {
77667
+ "../../node_modules/.pnpm/brace-expansion@1.1.21/node_modules/brace-expansion/index.js"(exports2, module2) {
77392
77668
  var concatMap = require_concat_map();
77393
77669
  var balanced = require_balanced_match();
77394
77670
  module2.exports = expandTop;
@@ -77397,6 +77673,10 @@ var require_brace_expansion2 = __commonJS({
77397
77673
  var escClose = "\0CLOSE" + Math.random() + "\0";
77398
77674
  var escComma = "\0COMMA" + Math.random() + "\0";
77399
77675
  var escPeriod = "\0PERIOD" + Math.random() + "\0";
77676
+ var EXPANSION_MAX = 1e5;
77677
+ var EXPANSION_MAX_LENGTH = 4e6;
77678
+ var EXPANSION_MAX_DEPTH = 1e3;
77679
+ var EXPANSION_MAX_REWRITES = 1e3;
77400
77680
  function numeric(str) {
77401
77681
  return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
77402
77682
  }
@@ -77406,35 +77686,49 @@ var require_brace_expansion2 = __commonJS({
77406
77686
  function unescapeBraces(str) {
77407
77687
  return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
77408
77688
  }
77689
+ function pushAll(target, items) {
77690
+ for (var i2 = 0; i2 < items.length; i2++) {
77691
+ target.push(items[i2]);
77692
+ }
77693
+ }
77409
77694
  function parseCommaParts(str) {
77410
- if (!str)
77411
- return [""];
77412
77695
  var parts2 = [];
77413
- var m2 = balanced("{", "}", str);
77414
- if (!m2)
77415
- return str.split(",");
77416
- var pre = m2.pre;
77417
- var body = m2.body;
77418
- var post = m2.post;
77419
- var p = pre.split(",");
77420
- p[p.length - 1] += "{" + body + "}";
77421
- var postParts = parseCommaParts(post);
77422
- if (post.length) {
77423
- p[p.length - 1] += postParts.shift();
77424
- p.push.apply(p, postParts);
77425
- }
77426
- parts2.push.apply(parts2, p);
77427
- return parts2;
77696
+ var carry = "";
77697
+ for (; ; ) {
77698
+ var m2 = balanced("{", "}", str);
77699
+ if (!m2) {
77700
+ var tail = str.split(",");
77701
+ tail[0] = carry + tail[0];
77702
+ pushAll(parts2, tail);
77703
+ return parts2;
77704
+ }
77705
+ var pre = m2.pre;
77706
+ var body = m2.body;
77707
+ var post = m2.post;
77708
+ var p = pre.split(",");
77709
+ p[0] = carry + p[0];
77710
+ p[p.length - 1] += "{" + body + "}";
77711
+ if (!post.length) {
77712
+ pushAll(parts2, p);
77713
+ return parts2;
77714
+ }
77715
+ carry = p.pop();
77716
+ pushAll(parts2, p);
77717
+ str = post;
77718
+ }
77428
77719
  }
77429
77720
  function expandTop(str, options) {
77430
77721
  if (!str)
77431
77722
  return [];
77432
77723
  options = options || {};
77433
- var max = options.max == null ? Infinity : options.max;
77724
+ var max = options.max == null ? EXPANSION_MAX : options.max;
77725
+ var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength;
77726
+ var maxDepth = options.maxDepth == null ? EXPANSION_MAX_DEPTH : options.maxDepth;
77727
+ var maxRewrites = options.maxRewrites == null ? EXPANSION_MAX_REWRITES : options.maxRewrites;
77434
77728
  if (str.substr(0, 2) === "{}") {
77435
77729
  str = "\\{\\}" + str.substr(2);
77436
77730
  }
77437
- return expand(escapeBraces(str), max, true).map(unescapeBraces);
77731
+ return expand(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
77438
77732
  }
77439
77733
  function embrace(str) {
77440
77734
  return "{" + str + "}";
@@ -77448,87 +77742,188 @@ var require_brace_expansion2 = __commonJS({
77448
77742
  function gte(i2, y) {
77449
77743
  return i2 >= y;
77450
77744
  }
77451
- function expand(str, max, isTop) {
77452
- var expansions = [];
77453
- var m2 = balanced("{", "}", str);
77454
- if (!m2 || /\$$/.test(m2.pre))
77455
- return [str];
77456
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m2.body);
77457
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m2.body);
77458
- var isSequence = isNumericSequence || isAlphaSequence;
77459
- var isOptions = m2.body.indexOf(",") >= 0;
77460
- if (!isSequence && !isOptions) {
77461
- if (m2.post.match(/,(?!,).*\}/)) {
77462
- str = m2.pre + "{" + m2.body + escClose + m2.post;
77463
- return expand(str, max, true);
77745
+ function combine(acc, base, pre, values, max, maxLength, dropEmpties, outBase) {
77746
+ var out = [];
77747
+ var length = 0;
77748
+ for (var a = 0; a < acc.length; a++) {
77749
+ for (var v = 0; v < values.length; v++) {
77750
+ if (out.length >= max)
77751
+ return out;
77752
+ var expansion = acc[a] + pre + values[v];
77753
+ if (dropEmpties && expansion.length === base[a])
77754
+ continue;
77755
+ if (length + expansion.length > maxLength)
77756
+ return out;
77757
+ out.push(expansion);
77758
+ outBase.push(base[a]);
77759
+ length += expansion.length;
77464
77760
  }
77465
- return [str];
77466
77761
  }
77467
- var n;
77468
- if (isSequence) {
77469
- n = m2.body.split(/\.\./);
77470
- } else {
77471
- n = parseCommaParts(m2.body);
77472
- if (n.length === 1) {
77473
- n = expand(n[0], max, false).map(embrace);
77474
- if (n.length === 1) {
77475
- var post = m2.post.length ? expand(m2.post, max, false) : [""];
77476
- return post.map(function(p) {
77477
- return m2.pre + n[0] + p;
77478
- });
77479
- }
77480
- }
77762
+ return out;
77763
+ }
77764
+ function expandSequence(body, isAlphaSequence, max, maxLength) {
77765
+ var n = body.split(/\.\./);
77766
+ var N = [];
77767
+ if (n[0] === void 0 || n[1] === void 0) {
77768
+ return N;
77481
77769
  }
77482
- var pre = m2.pre;
77483
- var post = m2.post.length ? expand(m2.post, max, false) : [""];
77484
- var N;
77485
- if (isSequence) {
77486
- var x2 = numeric(n[0]);
77487
- var y = numeric(n[1]);
77488
- var width = Math.max(n[0].length, n[1].length);
77489
- var incr = n.length == 3 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
77490
- var test = lte;
77491
- var reverse = y < x2;
77492
- if (reverse) {
77493
- incr *= -1;
77494
- test = gte;
77495
- }
77496
- var pad4 = n.some(isPadded);
77497
- N = [];
77498
- for (var i2 = x2; test(i2, y) && N.length < max; i2 += incr) {
77499
- var c;
77500
- if (isAlphaSequence) {
77501
- c = String.fromCharCode(i2);
77502
- if (c === "\\")
77503
- c = "";
77504
- } else {
77505
- c = String(i2);
77506
- if (pad4) {
77507
- var need = width - c.length;
77508
- if (need > 0) {
77509
- var z = new Array(need + 1).join("0");
77510
- if (i2 < 0)
77511
- c = "-" + z + c.slice(1);
77512
- else
77513
- c = z + c;
77770
+ var x2 = numeric(n[0]);
77771
+ var y = numeric(n[1]);
77772
+ var width = Math.max(n[0].length, n[1].length);
77773
+ var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
77774
+ var test = lte;
77775
+ var reverse = y < x2;
77776
+ if (reverse) {
77777
+ incr *= -1;
77778
+ test = gte;
77779
+ }
77780
+ var pad4 = n.some(isPadded);
77781
+ var length = 0;
77782
+ for (var i2 = x2; test(i2, y) && N.length < max; i2 += incr) {
77783
+ var c;
77784
+ if (isAlphaSequence) {
77785
+ c = String.fromCharCode(i2);
77786
+ if (c === "\\") {
77787
+ c = "";
77788
+ }
77789
+ } else {
77790
+ c = String(i2);
77791
+ if (pad4) {
77792
+ var need = width - c.length;
77793
+ if (need > 0) {
77794
+ var z = new Array(need + 1).join("0");
77795
+ if (i2 < 0) {
77796
+ c = "-" + z + c.slice(1);
77797
+ } else {
77798
+ c = z + c;
77514
77799
  }
77515
77800
  }
77516
77801
  }
77517
- N.push(c);
77518
77802
  }
77519
- } else {
77520
- N = concatMap(n, function(el) {
77521
- return expand(el, max, false);
77522
- });
77803
+ if (length + c.length > maxLength)
77804
+ break;
77805
+ N.push(c);
77806
+ length += c.length;
77523
77807
  }
77524
- for (var j = 0; j < N.length; j++) {
77525
- for (var k = 0; k < post.length && expansions.length < max; k++) {
77526
- var expansion = pre + N[j] + post[k];
77527
- if (!isTop || isSequence || expansion)
77528
- expansions.push(expansion);
77808
+ return N;
77809
+ }
77810
+ function expand(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
77811
+ if (depth > maxDepth) {
77812
+ return [str];
77813
+ }
77814
+ var acc = [""];
77815
+ var accBase = [0];
77816
+ var rewrites = 0;
77817
+ var dropEmpties = false;
77818
+ var firstGroup = true;
77819
+ var nextBase;
77820
+ for (; ; ) {
77821
+ var m2 = balanced("{", "}", str);
77822
+ if (!m2) {
77823
+ return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []);
77824
+ }
77825
+ var pre = m2.pre;
77826
+ if (/\$$/.test(pre)) {
77827
+ return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []);
77828
+ }
77829
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m2.body);
77830
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m2.body);
77831
+ var isSequence = isNumericSequence || isAlphaSequence;
77832
+ var isOptions = m2.body.indexOf(",") >= 0;
77833
+ if (!isSequence && !isOptions) {
77834
+ if (rewrites < maxRewrites && m2.post.match(/,(?!,).*\}/)) {
77835
+ rewrites++;
77836
+ str = m2.pre + "{" + m2.body + escClose + m2.post;
77837
+ isTop = true;
77838
+ firstGroup = true;
77839
+ dropEmpties = false;
77840
+ accBase = [];
77841
+ for (var b = 0; b < acc.length; b++) {
77842
+ accBase.push(acc[b].length);
77843
+ }
77844
+ continue;
77845
+ }
77846
+ return combine(
77847
+ acc,
77848
+ accBase,
77849
+ pre + "{" + m2.body + "}" + m2.post,
77850
+ [""],
77851
+ max,
77852
+ maxLength,
77853
+ dropEmpties,
77854
+ []
77855
+ );
77856
+ }
77857
+ if (firstGroup) {
77858
+ dropEmpties = isTop && !isSequence;
77859
+ firstGroup = false;
77860
+ }
77861
+ var values;
77862
+ if (isSequence) {
77863
+ values = expandSequence(m2.body, isAlphaSequence, max, maxLength);
77864
+ } else {
77865
+ var n = parseCommaParts(m2.body);
77866
+ if (n.length === 1 && n[0] !== void 0) {
77867
+ n = expand(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
77868
+ if (n.length === 1) {
77869
+ nextBase = [];
77870
+ acc = combine(
77871
+ acc,
77872
+ accBase,
77873
+ pre + n[0],
77874
+ [""],
77875
+ max,
77876
+ maxLength,
77877
+ dropEmpties && !m2.post.length,
77878
+ nextBase
77879
+ );
77880
+ accBase = nextBase;
77881
+ if (!m2.post.length)
77882
+ break;
77883
+ str = m2.post;
77884
+ continue;
77885
+ }
77886
+ }
77887
+ var dropsEmpties = dropEmpties && !m2.post.length && !pre;
77888
+ for (var d = 0; dropsEmpties && d < acc.length; d++) {
77889
+ if (acc[d].length !== accBase[d]) {
77890
+ dropsEmpties = false;
77891
+ }
77892
+ }
77893
+ values = [];
77894
+ var valuesLength = 0;
77895
+ outer:
77896
+ for (var j = 0; j < n.length; j++) {
77897
+ var expanded = expand(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
77898
+ for (var k = 0; k < expanded.length; k++) {
77899
+ var v = expanded[k];
77900
+ if (dropsEmpties && !v)
77901
+ continue;
77902
+ if (values.length >= max || valuesLength + v.length > maxLength) {
77903
+ break outer;
77904
+ }
77905
+ values.push(v);
77906
+ valuesLength += v.length;
77907
+ }
77908
+ }
77529
77909
  }
77910
+ nextBase = [];
77911
+ acc = combine(
77912
+ acc,
77913
+ accBase,
77914
+ pre,
77915
+ values,
77916
+ max,
77917
+ maxLength,
77918
+ dropEmpties && !m2.post.length,
77919
+ nextBase
77920
+ );
77921
+ accBase = nextBase;
77922
+ if (!m2.post.length)
77923
+ break;
77924
+ str = m2.post;
77530
77925
  }
77531
- return expansions;
77926
+ return acc;
77532
77927
  }
77533
77928
  }
77534
77929
  });
@@ -77730,9 +78125,9 @@ var require_minimatch2 = __commonJS({
77730
78125
  throw new TypeError("pattern is too long");
77731
78126
  }
77732
78127
  };
77733
- Minimatch.prototype.parse = parse4;
78128
+ Minimatch.prototype.parse = parse3;
77734
78129
  var SUBPARSE = {};
77735
- function parse4(pattern, isSub) {
78130
+ function parse3(pattern, isSub) {
77736
78131
  assertValidPattern(pattern);
77737
78132
  var options = this.options;
77738
78133
  if (pattern === "**") {
@@ -85504,7 +85899,7 @@ var require_binary = __commonJS({
85504
85899
  });
85505
85900
  return stream;
85506
85901
  };
85507
- exports2.parse = function parse4(buffer) {
85902
+ exports2.parse = function parse3(buffer) {
85508
85903
  var self2 = words3(function(bytes, cb) {
85509
85904
  return function(name) {
85510
85905
  if (offset + bytes <= buffer.length) {
@@ -86048,8 +86443,8 @@ var require_util4 = __commonJS({
86048
86443
  domainBind
86049
86444
  };
86050
86445
  ret.isRecentNode = ret.isNode && function() {
86051
- var version2 = process.versions.node.split(".").map(Number);
86052
- return version2[0] === 0 && version2[1] > 10 || version2[0] > 0;
86446
+ var version = process.versions.node.split(".").map(Number);
86447
+ return version[0] === 0 && version[1] > 10 || version[0] > 0;
86053
86448
  }();
86054
86449
  if (ret.isNode)
86055
86450
  ret.toFastProperties(process);
@@ -91043,7 +91438,7 @@ var require_parseDateTime = __commonJS({
91043
91438
  });
91044
91439
 
91045
91440
  // ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js
91046
- var require_parse = __commonJS({
91441
+ var require_parse2 = __commonJS({
91047
91442
  "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js"(exports2, module2) {
91048
91443
  var util = __require("util");
91049
91444
  var zlib2 = __require("zlib");
@@ -91309,7 +91704,7 @@ var require_duplexer2 = __commonJS({
91309
91704
  var require_parseOne = __commonJS({
91310
91705
  "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseOne.js"(exports2, module2) {
91311
91706
  var Stream4 = __require("stream");
91312
- var Parse = require_parse();
91707
+ var Parse = require_parse2();
91313
91708
  var duplexer2 = require_duplexer2();
91314
91709
  var BufferStream = require_BufferStream();
91315
91710
  if (!Stream4.Writable || !Stream4.Writable.prototype.destroy)
@@ -93285,7 +93680,7 @@ var require_fstream = __commonJS({
93285
93680
  var require_extract2 = __commonJS({
93286
93681
  "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/extract.js"(exports2, module2) {
93287
93682
  module2.exports = Extract;
93288
- var Parse = require_parse();
93683
+ var Parse = require_parse2();
93289
93684
  var Writer = require_fstream().Writer;
93290
93685
  var path34 = __require("path");
93291
93686
  var stream = __require("stream");
@@ -94161,14 +94556,14 @@ var require_BigInteger = __commonJS({
94161
94556
  return millerRabinTest(n, a);
94162
94557
  };
94163
94558
  NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime;
94164
- BigInteger.prototype.isProbablePrime = function(iterations, rng2) {
94559
+ BigInteger.prototype.isProbablePrime = function(iterations, rng) {
94165
94560
  var isPrime = isBasicPrime(this);
94166
94561
  if (isPrime !== undefined2)
94167
94562
  return isPrime;
94168
94563
  var n = this.abs();
94169
94564
  var t2 = iterations === undefined2 ? 5 : iterations;
94170
94565
  for (var a = [], i3 = 0; i3 < t2; i3++) {
94171
- a.push(bigInt.randBetween(2, n.minus(2), rng2));
94566
+ a.push(bigInt.randBetween(2, n.minus(2), rng));
94172
94567
  }
94173
94568
  return millerRabinTest(n, a);
94174
94569
  };
@@ -94394,10 +94789,10 @@ var require_BigInteger = __commonJS({
94394
94789
  b = parseValue(b).abs();
94395
94790
  return a.divide(gcd(a, b)).multiply(b);
94396
94791
  }
94397
- function randBetween(a, b, rng2) {
94792
+ function randBetween(a, b, rng) {
94398
94793
  a = parseValue(a);
94399
94794
  b = parseValue(b);
94400
- var usedRNG = rng2 || Math.random;
94795
+ var usedRNG = rng || Math.random;
94401
94796
  var low = min(a, b), high = max(a, b);
94402
94797
  var range = high.subtract(low).add(1);
94403
94798
  if (range.isSmall)
@@ -94465,7 +94860,7 @@ var require_BigInteger = __commonJS({
94465
94860
  }
94466
94861
  return isNegative ? val.negate() : val;
94467
94862
  }
94468
- function stringify2(digit, alphabet) {
94863
+ function stringify(digit, alphabet) {
94469
94864
  alphabet = alphabet || DEFAULT_ALPHABET;
94470
94865
  if (digit < alphabet.length) {
94471
94866
  return alphabet[digit];
@@ -94528,7 +94923,7 @@ var require_BigInteger = __commonJS({
94528
94923
  function toBaseString(n, base, alphabet) {
94529
94924
  var arr = toBase(n, base);
94530
94925
  return (arr.isNegative ? "-" : "") + arr.value.map(function(x2) {
94531
- return stringify2(x2, alphabet);
94926
+ return stringify(x2, alphabet);
94532
94927
  }).join("");
94533
94928
  }
94534
94929
  BigInteger.prototype.toArray = function(radix) {
@@ -95068,7 +95463,7 @@ var require_unzip2 = __commonJS({
95068
95463
  require_listenercount();
95069
95464
  require_buffer_indexof_polyfill();
95070
95465
  require_setImmediate();
95071
- exports2.Parse = require_parse();
95466
+ exports2.Parse = require_parse2();
95072
95467
  exports2.ParseOne = require_parseOne();
95073
95468
  exports2.Extract = require_extract2();
95074
95469
  exports2.Open = require_Open();
@@ -95081,7 +95476,7 @@ var require_tmp = __commonJS({
95081
95476
  var fs33 = __require("fs");
95082
95477
  var os21 = __require("os");
95083
95478
  var path34 = __require("path");
95084
- var crypto9 = __require("crypto");
95479
+ var crypto6 = __require("crypto");
95085
95480
  var _c = { fs: fs33.constants, os: os21.constants };
95086
95481
  var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
95087
95482
  var TEMPLATE_PATTERN = /XXXXXX/;
@@ -95275,9 +95670,9 @@ var require_tmp = __commonJS({
95275
95670
  function _randomChars(howMany) {
95276
95671
  let value2 = [], rnd = null;
95277
95672
  try {
95278
- rnd = crypto9.randomBytes(howMany);
95673
+ rnd = crypto6.randomBytes(howMany);
95279
95674
  } catch (e2) {
95280
- rnd = crypto9.pseudoRandomBytes(howMany);
95675
+ rnd = crypto6.pseudoRandomBytes(howMany);
95281
95676
  }
95282
95677
  for (let i2 = 0; i2 < howMany; i2++) {
95283
95678
  value2.push(RANDOM_CHARS[rnd[i2] % RANDOM_CHARS.length]);
@@ -103089,9 +103484,9 @@ ${diff3}${xfile}${sec}`,
103089
103484
  var MAX_REDIRECTS = 10;
103090
103485
  var FETCH_USER_AGENT = "Nexrall-Code/1.0 (+https://nexrall.com)";
103091
103486
  function isPrivateIp(ip) {
103092
- const v42 = ip.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
103093
- if (v42) {
103094
- const [a, b] = [Number(v42[1]), Number(v42[2])];
103487
+ const v4 = ip.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
103488
+ if (v4) {
103489
+ const [a, b] = [Number(v4[1]), Number(v4[2])];
103095
103490
  if (a === 10)
103096
103491
  return true;
103097
103492
  if (a === 127)
@@ -105235,7 +105630,7 @@ var require_modePolicy = __commonJS({
105235
105630
  return "allow";
105236
105631
  if (exports2.BASH_TOOLS.has(tool) && isReadOnlyBash4(command) && !req.destructive)
105237
105632
  return "allow";
105238
- if (req.destructive && mode !== "auto")
105633
+ if (req.destructive)
105239
105634
  return "confirm";
105240
105635
  if (mode === "plan")
105241
105636
  return "deny";
@@ -105258,7 +105653,7 @@ var require_modePolicy = __commonJS({
105258
105653
  case "edit":
105259
105654
  return "edit \u2014 edits files freely; asks before shell commands";
105260
105655
  case "auto":
105261
- return "auto \u2014 runs every tool on its own, including irreversible commands";
105656
+ return "auto \u2014 runs every tool on its own; still confirms irreversible actions";
105262
105657
  }
105263
105658
  }
105264
105659
  function parseMode3(raw) {
@@ -106104,7 +106499,7 @@ var require_worktree = __commonJS({
106104
106499
  var fs33 = __importStar(__require("fs"));
106105
106500
  var path34 = __importStar(__require("path"));
106106
106501
  var child_process_1 = __require("child_process");
106107
- var crypto9 = __importStar(__require("crypto"));
106502
+ var crypto6 = __importStar(__require("crypto"));
106108
106503
  var WORKTREE_ROOT_DIRNAME = ".nexrall/worktrees";
106109
106504
  var COPY_SKIP_DIRS = /* @__PURE__ */ new Set([
106110
106505
  ".git",
@@ -106135,9 +106530,9 @@ var require_worktree = __commonJS({
106135
106530
  function randomWorktreeName() {
106136
106531
  const adjectives = ["bright", "quiet", "brave", "calm", "swift", "keen", "bold", "clear", "gentle", "sharp"];
106137
106532
  const nouns = ["fox", "river", "falcon", "harbor", "meadow", "ember", "summit", "cedar", "otter", "quartz"];
106138
- const a = adjectives[crypto9.randomInt(adjectives.length)];
106139
- const n = nouns[crypto9.randomInt(nouns.length)];
106140
- const suffix = crypto9.randomBytes(2).toString("hex");
106533
+ const a = adjectives[crypto6.randomInt(adjectives.length)];
106534
+ const n = nouns[crypto6.randomInt(nouns.length)];
106535
+ const suffix = crypto6.randomBytes(2).toString("hex");
106141
106536
  return `${a}-${n}-${suffix}`;
106142
106537
  }
106143
106538
  function safeName(name) {
@@ -112885,7 +113280,7 @@ var require_server = __commonJS({
112885
113280
  const log = opts.log ?? ((m2) => process.stderr.write(`[nexrall mcp] ${m2}
112886
113281
  `));
112887
113282
  const tools = opts.tools ?? readOnlyMcpTools2();
112888
- const version2 = opts.version ?? "0.0.0";
113283
+ const version = opts.version ?? "0.0.0";
112889
113284
  const byName = new Map(tools.map((t2) => [t2.name, t2]));
112890
113285
  const send = (msg) => {
112891
113286
  output.write(JSON.stringify(msg) + "\n");
@@ -112903,7 +113298,7 @@ var require_server = __commonJS({
112903
113298
  reply(id, {
112904
113299
  protocolVersion: SUPPORTED_PROTOCOLS.includes(asked) ? asked : DEFAULT_PROTOCOL,
112905
113300
  capabilities: { tools: {} },
112906
- serverInfo: { name: SERVER_NAME, version: version2 },
113301
+ serverInfo: { name: SERVER_NAME, version },
112907
113302
  instructions: `Read-only file access to ${opts.workDir}. Tools: ${tools.map((t2) => t2.name).join(", ")}. Nothing here writes, deletes or runs commands.`
112908
113303
  });
112909
113304
  log(`initialize from ${typeof params.clientInfo === "object" && params.clientInfo ? JSON.stringify(params.clientInfo.name ?? "client") : "client"}`);
@@ -113052,7 +113447,7 @@ var require_manager2 = __commonJS({
113052
113447
  var fs33 = __importStar(__require("fs"));
113053
113448
  var os21 = __importStar(__require("os"));
113054
113449
  var path34 = __importStar(__require("path"));
113055
- var crypto9 = __importStar(__require("crypto"));
113450
+ var crypto6 = __importStar(__require("crypto"));
113056
113451
  var child_process_1 = __require("child_process");
113057
113452
  var MAX_SNAPSHOT_BYTES = 2 * 1024 * 1024;
113058
113453
  var MAX_PERSISTED_TURNS = 50;
@@ -113114,7 +113509,7 @@ var require_manager2 = __commonJS({
113114
113509
  this.turns = [];
113115
113510
  this.current = null;
113116
113511
  this.nextId = 1;
113117
- const key = crypto9.createHash("sha1").update(path34.resolve(workDir) + "\0" + (scope ?? "")).digest("hex").slice(0, 16);
113512
+ const key = crypto6.createHash("sha1").update(path34.resolve(workDir) + "\0" + (scope ?? "")).digest("hex").slice(0, 16);
113118
113513
  const base = process.env.NEXRALL_CHECKPOINT_DIR || path34.join(os21.homedir(), ".nexrall", "checkpoints");
113119
113514
  this.storeDir = path34.join(base, key);
113120
113515
  this.loadFromDisk();
@@ -113636,8 +114031,8 @@ var require_installer = __commonJS({
113636
114031
  if (!/^[\w.-]+$/.test(trimmed) || seen.has(trimmed))
113637
114032
  continue;
113638
114033
  seen.add(trimmed);
113639
- const version2 = typeof obj2?.version === "string" ? obj2.version : void 0;
113640
- out.push(version2 ? { name: trimmed, version: version2 } : { name: trimmed });
114034
+ const version = typeof obj2?.version === "string" ? obj2.version : void 0;
114035
+ out.push(version ? { name: trimmed, version } : { name: trimmed });
113641
114036
  }
113642
114037
  return out;
113643
114038
  } catch {
@@ -119940,7 +120335,7 @@ var require_XMLHttpRequest = __commonJS({
119940
120335
  });
119941
120336
 
119942
120337
  // ../../node_modules/.pnpm/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/index.js
119943
- var require_cjs = __commonJS({
120338
+ var require_cjs2 = __commonJS({
119944
120339
  "../../node_modules/.pnpm/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/index.js"(exports2) {
119945
120340
  exports2.Emitter = Emitter7;
119946
120341
  function Emitter7(obj2) {
@@ -120031,7 +120426,7 @@ var require_ms = __commonJS({
120031
120426
  options = options || {};
120032
120427
  var type = typeof val;
120033
120428
  if (type === "string" && val.length > 0) {
120034
- return parse4(val);
120429
+ return parse3(val);
120035
120430
  } else if (type === "number" && isFinite(val)) {
120036
120431
  return options.long ? fmtLong(val) : fmtShort(val);
120037
120432
  }
@@ -120039,7 +120434,7 @@ var require_ms = __commonJS({
120039
120434
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
120040
120435
  );
120041
120436
  };
120042
- function parse4(str) {
120437
+ function parse3(str) {
120043
120438
  str = String(str);
120044
120439
  if (str.length > 100) {
120045
120440
  return;
@@ -120556,10 +120951,10 @@ var require_supports_color = __commonJS({
120556
120951
  return 3;
120557
120952
  }
120558
120953
  if ("TERM_PROGRAM" in env4) {
120559
- const version2 = parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
120954
+ const version = parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
120560
120955
  switch (env4.TERM_PROGRAM) {
120561
120956
  case "iTerm.app":
120562
- return version2 >= 3 ? 3 : 2;
120957
+ return version >= 3 ? 3 : 2;
120563
120958
  case "Apple_Terminal":
120564
120959
  return 2;
120565
120960
  }
@@ -122890,7 +123285,7 @@ var require_extension = __commonJS({
122890
123285
  else
122891
123286
  dest[name].push(elem);
122892
123287
  }
122893
- function parse4(header) {
123288
+ function parse3(header) {
122894
123289
  const offers = /* @__PURE__ */ Object.create(null);
122895
123290
  let params = /* @__PURE__ */ Object.create(null);
122896
123291
  let mustUnescape = false;
@@ -123045,7 +123440,7 @@ var require_extension = __commonJS({
123045
123440
  }).join(", ");
123046
123441
  }).join(", ");
123047
123442
  }
123048
- module2.exports = { format, parse: parse4 };
123443
+ module2.exports = { format, parse: parse3 };
123049
123444
  }
123050
123445
  });
123051
123446
 
@@ -123060,7 +123455,7 @@ var require_websocket = __commonJS({
123060
123455
  var tls = __require("tls");
123061
123456
  var { randomBytes: randomBytes5, createHash: createHash3 } = __require("crypto");
123062
123457
  var { Duplex, Readable } = __require("stream");
123063
- var { URL: URL3 } = __require("url");
123458
+ var { URL: URL2 } = __require("url");
123064
123459
  var PerMessageDeflate2 = require_permessage_deflate();
123065
123460
  var Receiver2 = require_receiver();
123066
123461
  var Sender2 = require_sender();
@@ -123079,7 +123474,7 @@ var require_websocket = __commonJS({
123079
123474
  var {
123080
123475
  EventTarget: { addEventListener: addEventListener2, removeEventListener: removeEventListener2 }
123081
123476
  } = require_event_target();
123082
- var { format, parse: parse4 } = require_extension();
123477
+ var { format, parse: parse3 } = require_extension();
123083
123478
  var { toBuffer: toBuffer2 } = require_buffer_util();
123084
123479
  var kAborted = Symbol("kAborted");
123085
123480
  var protocolVersions = [8, 13];
@@ -123578,11 +123973,11 @@ var require_websocket = __commonJS({
123578
123973
  );
123579
123974
  }
123580
123975
  let parsedUrl;
123581
- if (address instanceof URL3) {
123976
+ if (address instanceof URL2) {
123582
123977
  parsedUrl = address;
123583
123978
  } else {
123584
123979
  try {
123585
- parsedUrl = new URL3(address);
123980
+ parsedUrl = new URL2(address);
123586
123981
  } catch {
123587
123982
  throw new SyntaxError(`Invalid URL: ${address}`);
123588
123983
  }
@@ -123721,7 +124116,7 @@ var require_websocket = __commonJS({
123721
124116
  req.abort();
123722
124117
  let addr;
123723
124118
  try {
123724
- addr = new URL3(location2, address);
124119
+ addr = new URL2(location2, address);
123725
124120
  } catch (e2) {
123726
124121
  const err = new SyntaxError(`Invalid URL: ${location2}`);
123727
124122
  emitErrorAndClose(websocket, err);
@@ -123777,7 +124172,7 @@ var require_websocket = __commonJS({
123777
124172
  }
123778
124173
  let extensions;
123779
124174
  try {
123780
- extensions = parse4(secWebSocketExtensions);
124175
+ extensions = parse3(secWebSocketExtensions);
123781
124176
  } catch (err) {
123782
124177
  const message = "Invalid Sec-WebSocket-Extensions header";
123783
124178
  abortHandshake(websocket, socket, message);
@@ -124085,7 +124480,7 @@ var require_subprotocol = __commonJS({
124085
124480
  "../../node_modules/.pnpm/ws@8.21.2/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
124086
124481
  "use strict";
124087
124482
  var { tokenChars } = require_validation();
124088
- function parse4(header) {
124483
+ function parse3(header) {
124089
124484
  const protocols = /* @__PURE__ */ new Set();
124090
124485
  let start = -1;
124091
124486
  let end = -1;
@@ -124124,7 +124519,7 @@ var require_subprotocol = __commonJS({
124124
124519
  protocols.add(protocol4);
124125
124520
  return protocols;
124126
124521
  }
124127
- module2.exports = { parse: parse4 };
124522
+ module2.exports = { parse: parse3 };
124128
124523
  }
124129
124524
  });
124130
124525
 
@@ -124341,7 +124736,7 @@ var require_websocket_server = __commonJS({
124341
124736
  socket.on("error", socketOnError);
124342
124737
  const key = req.headers["sec-websocket-key"];
124343
124738
  const upgrade = req.headers.upgrade;
124344
- const version2 = +req.headers["sec-websocket-version"];
124739
+ const version = +req.headers["sec-websocket-version"];
124345
124740
  if (req.method !== "GET") {
124346
124741
  const message = "Invalid HTTP method";
124347
124742
  abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
@@ -124357,7 +124752,7 @@ var require_websocket_server = __commonJS({
124357
124752
  abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
124358
124753
  return;
124359
124754
  }
124360
- if (version2 !== 13 && version2 !== 8) {
124755
+ if (version !== 13 && version !== 8) {
124361
124756
  const message = "Missing or invalid Sec-WebSocket-Version header";
124362
124757
  abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
124363
124758
  "Sec-WebSocket-Version": "13, 8"
@@ -124401,7 +124796,7 @@ var require_websocket_server = __commonJS({
124401
124796
  }
124402
124797
  if (this.options.verifyClient) {
124403
124798
  const info = {
124404
- origin: req.headers[`${version2 === 8 ? "sec-websocket-origin" : "origin"}`],
124799
+ origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`],
124405
124800
  secure: !!(req.socket.authorized || req.socket.encrypted),
124406
124801
  req
124407
124802
  };
@@ -149825,10 +150220,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
149825
150220
  return 3;
149826
150221
  }
149827
150222
  if ("TERM_PROGRAM" in env2) {
149828
- const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
150223
+ const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
149829
150224
  switch (env2.TERM_PROGRAM) {
149830
150225
  case "iTerm.app": {
149831
- return version2 >= 3 ? 3 : 2;
150226
+ return version >= 3 ? 3 : 2;
149832
150227
  }
149833
150228
  case "Apple_Terminal": {
149834
150229
  return 2;
@@ -150128,13 +150523,13 @@ var isWide = (codePoint) => {
150128
150523
  };
150129
150524
 
150130
150525
  // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js
150131
- function validate2(codePoint) {
150526
+ function validate(codePoint) {
150132
150527
  if (!Number.isSafeInteger(codePoint)) {
150133
150528
  throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
150134
150529
  }
150135
150530
  }
150136
150531
  function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
150137
- validate2(codePoint);
150532
+ validate(codePoint);
150138
150533
  if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
150139
150534
  return 2;
150140
150535
  }
@@ -151943,7 +152338,7 @@ import * as fs2 from "fs";
151943
152338
  import * as os2 from "os";
151944
152339
  import * as path2 from "path";
151945
152340
  import * as http3 from "http";
151946
- import * as crypto4 from "crypto";
152341
+ import * as crypto from "crypto";
151947
152342
  import { spawn } from "child_process";
151948
152343
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1e3;
151949
152344
  function tokensFile(env4 = process.env) {
@@ -152266,9 +152661,9 @@ async function authorizeServer(o) {
152266
152661
  try {
152267
152662
  o.onStep?.(`Registering with ${new URL(meta.token_endpoint).origin}\u2026`);
152268
152663
  const clientId = await registerClient(meta, redirectUri, f3);
152269
- const verifier = b64url(crypto4.randomBytes(32));
152270
- const challengeB64 = b64url(crypto4.createHash("sha256").update(verifier).digest());
152271
- const state = b64url(crypto4.randomBytes(16));
152664
+ const verifier = b64url(crypto.randomBytes(32));
152665
+ const challengeB64 = b64url(crypto.createHash("sha256").update(verifier).digest());
152666
+ const state = b64url(crypto.randomBytes(16));
152272
152667
  const authUrl = buildAuthorizeUrl(meta, { clientId, redirectUri, codeChallenge: challengeB64, state });
152273
152668
  o.onStep?.("Opening your browser to authorize\u2026");
152274
152669
  await o.openUrl(authUrl);
@@ -156243,7 +156638,7 @@ function createPacketDecoderStream(maxPayload, binaryType) {
156243
156638
  var protocol = 4;
156244
156639
 
156245
156640
  // ../../node_modules/.pnpm/engine.io-client@6.6.7/node_modules/engine.io-client/build/esm-debug/transport.js
156246
- var import_component_emitter = __toESM(require_cjs(), 1);
156641
+ var import_component_emitter = __toESM(require_cjs2(), 1);
156247
156642
 
156248
156643
  // ../../node_modules/.pnpm/engine.io-client@6.6.7/node_modules/engine.io-client/build/esm-debug/globals.node.js
156249
156644
  var nextTick = process.nextTick;
@@ -156252,7 +156647,7 @@ var defaultBinaryType = "nodebuffer";
156252
156647
  function createCookieJar() {
156253
156648
  return new CookieJar();
156254
156649
  }
156255
- function parse2(setCookieString) {
156650
+ function parse(setCookieString) {
156256
156651
  const parts2 = setCookieString.split("; ");
156257
156652
  const i2 = parts2[0].indexOf("=");
156258
156653
  if (i2 === -1) {
@@ -156300,7 +156695,7 @@ var CookieJar = class {
156300
156695
  return;
156301
156696
  }
156302
156697
  values.forEach((value2) => {
156303
- const parsed = parse2(value2);
156698
+ const parsed = parse(value2);
156304
156699
  if (parsed) {
156305
156700
  this._cookies.set(parsed.name, parsed);
156306
156701
  }
@@ -156683,7 +157078,7 @@ var Polling = class extends Transport {
156683
157078
  };
156684
157079
 
156685
157080
  // ../../node_modules/.pnpm/engine.io-client@6.6.7/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js
156686
- var import_component_emitter2 = __toESM(require_cjs(), 1);
157081
+ var import_component_emitter2 = __toESM(require_cjs2(), 1);
156687
157082
 
156688
157083
  // ../../node_modules/.pnpm/engine.io-client@6.6.7/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js
156689
157084
  var value = false;
@@ -157156,7 +157551,7 @@ var parts = [
157156
157551
  "query",
157157
157552
  "anchor"
157158
157553
  ];
157159
- function parse3(str) {
157554
+ function parse2(str) {
157160
157555
  if (str.length > 8e3) {
157161
157556
  throw "URI too long";
157162
157557
  }
@@ -157199,7 +157594,7 @@ function queryKey(uri, query) {
157199
157594
  }
157200
157595
 
157201
157596
  // ../../node_modules/.pnpm/engine.io-client@6.6.7/node_modules/engine.io-client/build/esm-debug/socket.js
157202
- var import_component_emitter3 = __toESM(require_cjs(), 1);
157597
+ var import_component_emitter3 = __toESM(require_cjs2(), 1);
157203
157598
  var import_debug6 = __toESM(require_src5(), 1);
157204
157599
  var debug6 = (0, import_debug6.default)("engine.io-client:socket");
157205
157600
  var withEventListeners = typeof addEventListener === "function" && typeof removeEventListener === "function";
@@ -157227,14 +157622,14 @@ var Socket = class _Socket extends import_component_emitter3.Emitter {
157227
157622
  uri = null;
157228
157623
  }
157229
157624
  if (uri) {
157230
- const parsedUri = parse3(uri);
157625
+ const parsedUri = parse2(uri);
157231
157626
  opts.hostname = parsedUri.host;
157232
157627
  opts.secure = parsedUri.protocol === "https" || parsedUri.protocol === "wss";
157233
157628
  opts.port = parsedUri.port;
157234
157629
  if (parsedUri.query)
157235
157630
  opts.query = parsedUri.query;
157236
157631
  } else if (opts.host) {
157237
- opts.hostname = parse3(opts.host).host;
157632
+ opts.hostname = parse2(opts.host).host;
157238
157633
  }
157239
157634
  installTimerFunctions(this, opts);
157240
157635
  this.secure = null != opts.secure ? opts.secure : typeof location !== "undefined" && "https:" === location.protocol;
@@ -157806,7 +158201,7 @@ function url(uri, path34 = "", loc) {
157806
158201
  }
157807
158202
  }
157808
158203
  debug7("parse %s", uri);
157809
- obj2 = parse3(uri);
158204
+ obj2 = parse2(uri);
157810
158205
  }
157811
158206
  if (!obj2.port) {
157812
158207
  if (/^(http|ws)$/.test(obj2.protocol)) {
@@ -157832,7 +158227,7 @@ __export(esm_debug_exports, {
157832
158227
  isPacketValid: () => isPacketValid,
157833
158228
  protocol: () => protocol3
157834
158229
  });
157835
- var import_component_emitter4 = __toESM(require_cjs(), 1);
158230
+ var import_component_emitter4 = __toESM(require_cjs2(), 1);
157836
158231
 
157837
158232
  // ../../node_modules/.pnpm/socket.io-parser@4.2.7/node_modules/socket.io-parser/build/esm-debug/is-binary.js
157838
158233
  var withNativeArrayBuffer = typeof ArrayBuffer === "function";
@@ -158243,7 +158638,7 @@ function on(obj2, ev, fn) {
158243
158638
  }
158244
158639
 
158245
158640
  // ../../node_modules/.pnpm/socket.io-client@4.8.4/node_modules/socket.io-client/build/esm-debug/socket.js
158246
- var import_component_emitter5 = __toESM(require_cjs(), 1);
158641
+ var import_component_emitter5 = __toESM(require_cjs2(), 1);
158247
158642
  var import_debug9 = __toESM(require_src5(), 1);
158248
158643
  var debug9 = (0, import_debug9.default)("socket.io-client:socket");
158249
158644
  var RESERVED_EVENTS2 = Object.freeze({
@@ -159070,7 +159465,7 @@ Backoff.prototype.setJitter = function(jitter) {
159070
159465
  };
159071
159466
 
159072
159467
  // ../../node_modules/.pnpm/socket.io-client@4.8.4/node_modules/socket.io-client/build/esm-debug/manager.js
159073
- var import_component_emitter6 = __toESM(require_cjs(), 1);
159468
+ var import_component_emitter6 = __toESM(require_cjs2(), 1);
159074
159469
  var import_debug10 = __toESM(require_src5(), 1);
159075
159470
  var debug10 = (0, import_debug10.default)("socket.io-client:manager");
159076
159471
  var Manager = class extends import_component_emitter6.Emitter {
@@ -162297,7 +162692,7 @@ function confirmMatches(env4, typed) {
162297
162692
  // src/commands/chat.ts
162298
162693
  var import_code_core21 = __toESM(require_dist3(), 1);
162299
162694
  import * as os18 from "os";
162300
- import * as crypto7 from "crypto";
162695
+ import * as crypto4 from "crypto";
162301
162696
  import { createRequire } from "module";
162302
162697
  import { fileURLToPath as fileURLToPath2 } from "url";
162303
162698
  import { execFile as execFile2, execFileSync as execFileSync5 } from "child_process";
@@ -163265,7 +163660,7 @@ async function requestPermissionInner(req) {
163265
163660
  return false;
163266
163661
  }
163267
163662
  const destructive = (0, import_code_core8.isDestructiveBash)(tool, input);
163268
- if (destructive && process.env.NEXRALL_ALLOW_DESTRUCTIVE !== "1" && _mode !== "auto") {
163663
+ if (destructive && process.env.NEXRALL_ALLOW_DESTRUCTIVE !== "1") {
163269
163664
  return serialisePrompt(async () => {
163270
163665
  announceAgent(req);
163271
163666
  const command = input.command ?? input.cmd ?? "";
@@ -164127,7 +164522,7 @@ async function runDoctor(p) {
164127
164522
  detail: `${p.workDir}${repo.inRepo ? ` (git${repo.branch ? `: ${repo.branch}` : ""})` : " (not a git repo)"}${proj.instructions ? ", has nexrall.md" : ", no nexrall.md"}`
164128
164523
  });
164129
164524
  if (p.yolo) {
164130
- out.push({ id: "permissions", label: "Permissions", status: "warn", detail: "yolo \u2014 every tool call is auto-approved", fix: "Restart without --yolo/`/yolo`; use `--mode auto` instead." });
164525
+ out.push({ id: "permissions", label: "Permissions", status: "warn", detail: "yolo \u2014 every tool call is auto-approved", fix: "Restart without --yolo/`/yolo`; use `--mode auto` (still confirms irreversible actions) instead." });
164131
164526
  } else if (p.modeLocked) {
164132
164527
  out.push({ id: "permissions", label: "Permissions", status: "ok", detail: "read-only (--readonly), locked" });
164133
164528
  } else {
@@ -164283,7 +164678,7 @@ function realProbes(c) {
164283
164678
  import * as fs17 from "fs";
164284
164679
  import * as path18 from "path";
164285
164680
  import * as os9 from "os";
164286
- import * as crypto5 from "crypto";
164681
+ import * as crypto2 from "crypto";
164287
164682
  var SESSIONS_DIR = process.env.NEXRALL_CLI_SESSIONS_DIR || path18.join(os9.homedir(), ".nexrall", "cli-sessions");
164288
164683
  function ensureDir() {
164289
164684
  fs17.mkdirSync(SESSIONS_DIR, { recursive: true });
@@ -164433,7 +164828,7 @@ function importSession(bundle) {
164433
164828
  let title = bundle.session.title || "";
164434
164829
  let renamed = false;
164435
164830
  if (loadSession(id)) {
164436
- id = crypto5.randomBytes(8).toString("hex");
164831
+ id = crypto2.randomBytes(8).toString("hex");
164437
164832
  title = title ? `${title.slice(0, 68)} (imported)` : "";
164438
164833
  renamed = true;
164439
164834
  }
@@ -164720,8 +165115,8 @@ async function fetchLatestVersion() {
164720
165115
  const meta = JSON.parse(raw);
164721
165116
  return meta.version ?? "0.0.0";
164722
165117
  }
164723
- function installArgs(version2) {
164724
- return ["install", "-g", `nexrall-code@${version2}`, "--prefer-online"];
165118
+ function installArgs(version) {
165119
+ return ["install", "-g", `nexrall-code@${version}`, "--prefer-online"];
164725
165120
  }
164726
165121
  function installedGlobalVersion() {
164727
165122
  try {
@@ -164732,10 +165127,10 @@ function installedGlobalVersion() {
164732
165127
  return null;
164733
165128
  }
164734
165129
  }
164735
- function npmInstallGlobal(version2) {
165130
+ function npmInstallGlobal(version) {
164736
165131
  return new Promise((resolve14) => {
164737
165132
  const { spawn: spawn6 } = __require("child_process");
164738
- const child = spawn6("npm", installArgs(version2), { stdio: "pipe" });
165133
+ const child = spawn6("npm", installArgs(version), { stdio: "pipe" });
164739
165134
  let stderr = "";
164740
165135
  child.stderr?.on("data", (c) => {
164741
165136
  stderr += c.toString();
@@ -164744,7 +165139,7 @@ function npmInstallGlobal(version2) {
164744
165139
  if (code === 0)
164745
165140
  return resolve14({ ok: true, usedSudo: false });
164746
165141
  if (/EACCES|permission denied/i.test(stderr)) {
164747
- const sudo = spawn6("sudo", ["npm", ...installArgs(version2)], { stdio: "inherit" });
165142
+ const sudo = spawn6("sudo", ["npm", ...installArgs(version)], { stdio: "inherit" });
164748
165143
  sudo.on("close", (sudoCode) => resolve14({ ok: sudoCode === 0, usedSudo: true }));
164749
165144
  } else {
164750
165145
  console.error(paint.dim(stderr.trim()));
@@ -175442,14 +175837,14 @@ import { execFile, execFileSync as execFileSync4 } from "child_process";
175442
175837
  import * as fs26 from "fs";
175443
175838
  import * as os16 from "os";
175444
175839
  import * as path26 from "path";
175445
- import * as crypto6 from "crypto";
175840
+ import * as crypto3 from "crypto";
175446
175841
  var EMPTY_CONTEXT_SET = { pinned: [], excluded: [] };
175447
175842
  function contextRoot() {
175448
175843
  return process.env.NEXRALL_CLI_CONTEXT_DIR || path26.join(os16.homedir(), ".nexrall", "cli-context");
175449
175844
  }
175450
175845
  function contextSetPath(workDir) {
175451
175846
  const abs = path26.resolve(workDir);
175452
- const key = crypto6.createHash("sha1").update(abs).digest("hex").slice(0, 12);
175847
+ const key = crypto3.createHash("sha1").update(abs).digest("hex").slice(0, 12);
175453
175848
  const label = path26.basename(abs).replace(/[^\w.-]+/g, "-").slice(0, 24) || "project";
175454
175849
  return path26.join(contextRoot(), `${label}-${key}.json`);
175455
175850
  }
@@ -178869,7 +179264,7 @@ function explainAction(rules, mode, workDir, action, opts = {}) {
178869
179264
  const rule = (0, import_code_core18.evaluatePermission)(rules, action.tool, action.input, workDir);
178870
179265
  if (rule === "deny")
178871
179266
  return { mark: "\u2717", reason: "denied by a permission rule" };
178872
- if ((0, import_code_core18.isDestructiveBash)(action.tool, action.input) && !opts.allowDestructive && mode !== "auto") {
179267
+ if ((0, import_code_core18.isDestructiveBash)(action.tool, action.input) && !opts.allowDestructive) {
178873
179268
  return { mark: "\u26A0", reason: 'irreversible \u2014 always asks (type "yes")' };
178874
179269
  }
178875
179270
  if (rule === "allow")
@@ -181067,7 +181462,7 @@ async function runTurnHeadless(messages, modelAlias, workDir, _abortSignal, env4
181067
181462
  emit({ type: "permission_denied", tool, reason: "tools" });
181068
181463
  return false;
181069
181464
  }
181070
- const d = (0, import_code_core23.parseMode)(mode) === "auto" ? null : (0, import_code_core21.isDestructiveBash)(tool, input);
181465
+ const d = (0, import_code_core21.isDestructiveBash)(tool, input);
181071
181466
  const policy = (0, import_code_core22.decide)({ tool, input, mode: (0, import_code_core23.parseMode)(mode), bypass: isYoloMode(), destructive: !!d });
181072
181467
  const v = headlessVerdict({
181073
181468
  rule: (0, import_code_core23.evaluatePermission)((0, import_code_core23.loadSettings)(workDir).permissions, tool, input, workDir),
@@ -181487,7 +181882,7 @@ Resume it with: nex --worktree ${worktreeState.name}
181487
181882
  (0, import_code_core22.setHookEventListener)(streamHookEvents ? (evt) => {
181488
181883
  if (!allHookEvents && evt.hookEvent !== "SessionStart" && evt.hookEvent !== "Setup")
181489
181884
  return;
181490
- process.stdout.write(JSON.stringify(hookEventPayload({ ...evt, sessionId: activeSessionIdGetter() ?? "", uuid: crypto7.randomUUID() })) + "\n");
181885
+ process.stdout.write(JSON.stringify(hookEventPayload({ ...evt, sessionId: activeSessionIdGetter() ?? "", uuid: crypto4.randomUUID() })) + "\n");
181491
181886
  } : null);
181492
181887
  const saveSession2 = options.noSessionPersistence ? () => {
181493
181888
  } : saveSession;
@@ -181569,7 +181964,7 @@ Resume it with: nex --worktree ${worktreeState.name}
181569
181964
  ));
181570
181965
  }
181571
181966
  let messages = [];
181572
- let sessionId = options.newSessionId ?? crypto7.randomBytes(8).toString("hex");
181967
+ let sessionId = options.newSessionId ?? crypto4.randomBytes(8).toString("hex");
181573
181968
  activeSessionIdGetter = () => sessionId;
181574
181969
  let sessionTitle = options.sessionName ?? "";
181575
181970
  const fileWatcher = noDiscovery ? null : (0, import_code_core21.startFileChangedWatcher)(workDir, sessionId, {
@@ -181664,7 +182059,7 @@ Resume it with: nex --worktree ${worktreeState.name}
181664
182059
  sessionId = stored.id;
181665
182060
  sessionTitle = stored.title;
181666
182061
  if (options.forkSession) {
181667
- sessionId = options.newSessionId ?? crypto7.randomBytes(8).toString("hex");
182062
+ sessionId = options.newSessionId ?? crypto4.randomBytes(8).toString("hex");
181668
182063
  sessionTitle = options.sessionName ?? forkTitle(stored.title, "");
181669
182064
  } else if (options.sessionName) {
181670
182065
  sessionTitle = options.sessionName;
@@ -182624,7 +183019,7 @@ ${text}` : "");
182624
183019
  turnsCache = null;
182625
183020
  lastPromptTokens = void 0;
182626
183021
  emitEvent("session.completed", { id: liveSessionId, reason: "clear" });
182627
- sessionId = crypto7.randomBytes(8).toString("hex");
183022
+ sessionId = crypto4.randomBytes(8).toString("hex");
182628
183023
  sessionTitle = "";
182629
183024
  (0, import_code_core23.resetSessionSubAgentBudget)();
182630
183025
  sessionUsage.reset();
@@ -182677,7 +183072,7 @@ ${text}` : "");
182677
183072
  const wanted = arg.trim();
182678
183073
  updateTitle();
182679
183074
  saveSession2(parentId, parentTitle, workDir, messages);
182680
- sessionId = crypto7.randomBytes(8).toString("hex");
183075
+ sessionId = crypto4.randomBytes(8).toString("hex");
182681
183076
  sessionTitle = forkTitle(sessionTitle, wanted);
182682
183077
  saveSession2(sessionId, sessionTitle || "Untitled", workDir, messages);
182683
183078
  startSessionLog(sessionId, false, { workDir, forkOf: parentId });
@@ -184469,7 +184864,7 @@ ${text}
184469
184864
  mkdir: async (p) => {
184470
184865
  await fs30.promises.mkdir(p, { recursive: true });
184471
184866
  },
184472
- randomSuffix: () => crypto7.randomBytes(4).toString("hex")
184867
+ randomSuffix: () => crypto4.randomBytes(4).toString("hex")
184473
184868
  });
184474
184869
  switch (outcome.kind) {
184475
184870
  case "installed":
@@ -185485,7 +185880,7 @@ var import_code_core27 = __toESM(require_dist3(), 1);
185485
185880
  import * as fs31 from "node:fs";
185486
185881
  import * as os19 from "node:os";
185487
185882
  import * as path31 from "node:path";
185488
- import * as crypto8 from "node:crypto";
185883
+ import * as crypto5 from "node:crypto";
185489
185884
  import { spawn as spawn5 } from "node:child_process";
185490
185885
  function bgDir(env4 = process.env) {
185491
185886
  return env4.NEXRALL_CLI_BG_DIR || path31.join(os19.homedir(), ".nexrall", "cli-bg");
@@ -185544,7 +185939,7 @@ function resolveJob(idOrPrefix, dir = bgDir()) {
185544
185939
  function startJob(o) {
185545
185940
  const dir = o.dir ?? bgDir();
185546
185941
  fs31.mkdirSync(dir, { recursive: true });
185547
- const id = crypto8.randomBytes(4).toString("hex");
185942
+ const id = crypto5.randomBytes(4).toString("hex");
185548
185943
  const log = path31.join(dir, `${id}.log`);
185549
185944
  const codeFile = path31.join(dir, `${id}.code`);
185550
185945
  const fd = fs31.openSync(log, "a");
@@ -186225,7 +186620,7 @@ program2.command("sessions").description("List, export, import, or delete saved
186225
186620
  console.log(paint.dim(" nex sessions --events <id> [--json] to follow its event stream"));
186226
186621
  console.log();
186227
186622
  });
186228
- program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, --turbo", "Use Claude Sonnet 5.5 (fast)").option("-u, --ultra", "Use Claude Fable 5.1 (most powerful)").option("-y, --yolo", "Auto-approve all tool calls (no permission prompts)").option("-d, --dir <path>", "Set working directory (default: current directory)").option("-m, --model <name>", "Explicit model, e.g. claude-opus-5-5 | gpt-5.4 | gpt-4.1").option("-r, --resume [id]", "Resume last session, or a specific session id").option("-c, --continue", "Continue the latest conversation in this folder").option("--plan", "Start in plan mode (read-only; /mode or Shift+Tab can leave it)").option("--readonly", "Read-only for the whole session: plan mode that cannot be switched off").option("--auto", "Start in auto mode (the default \u2014 edits and commands run without asking)").option("--mode <mode>", "Starting permission mode: ask | edit | auto | plan").option("--fullscreen", "Draw the whole session on the terminal's alternate screen: the transcript re-wraps on resize and PgUp/PgDn page through it (no terminal scrollback while it is on; /fullscreen toggles it)").option("--ax-screen-reader", "Screen-reader mode: flat labelled lines (you:/claude:/tool:), no spinner repaints, no box-drawing chrome, numbered menus, bell when the session needs you. Also NEXRALL_AX_SCREEN_READER=1 or the axScreenReader setting").option("--bg", "Run the prompt in the background (headless); returns a job id. See: nex jobs | logs | attach | kill").option("--debug", "Write request timing, retries and errors to a debug log file").option("--no-color", "Disable colored output (also honours NO_COLOR)").option("-w, --worktree [name]", "Isolate this session in its own worktree \u2014 a separate directory (and, in a git repo, its own branch) so it can never overwrite files another session (or you) are touching in the main checkout. Omit a name for an auto-generated one; pass an existing name to resume that same worktree.").option("-e, --effort <level>", "Thinking effort \u2014 real levels depend on the model (e.g. DeepSeek: low|high|max, Qwen: low|high); run `nex --model <id>` then `/effort` with no argument to see a model's scale").option("--no-banner", "Skip the ASCII banner (useful in scripts/pipes)").option("--print", "One-shot, non-interactive run that prints the answer and exits (same as --output-format text). Claude Code's `-p` is spelled --print here because `-p` already means --pro").option("--output-format <fmt>", "One-shot output format: text | json | stream-json (implies auto-approve)").option("--audit [path]", "Log every tool call (and refusal) to a JSONL trail (default: .nexrall/audit/<session>.jsonl)").option("--permission-mode <mode>", "Permission mode: ask | edit | auto | plan (also Claude Code names: default | acceptEdits | dontAsk | bypassPermissions). With --output-format, anything that would prompt is DENIED instead of auto-approved").option("--allowedTools, --allowed-tools <tools...>", 'Tools/rules to allow without asking, e.g. "Bash(git *)" Edit (comma or space separated; put the prompt BEFORE this flag)').option("--disallowedTools, --disallowed-tools <tools...>", 'Tools/rules to deny, e.g. "Bash(rm *)" (deny always wins)').option("--append-system-prompt <text>", "Extra instructions appended to the project brief for this run").option("--max-budget-usd <amount>", "Stop a one-shot run once it has spent this many dollars (needs --output-format)").option("--mcp-config <configs...>", 'Load MCP servers from JSON files or inline JSON ({"mcpServers":{\u2026}}) for this run').option("--strict-mcp-config", "With --mcp-config: use ONLY those servers, ignoring ~/.nexrall/mcp.json and the project one").option("--add-dir <dirs...>", "Extra directories the agent may read and edit besides the project folder").option("--input-format <format>", "text (default) | stream-json \u2014 read the prompt as Claude-Code-style NDJSON user messages on stdin").option("--json-schema <schema>", 'JSON Schema (inline or file) the final answer must satisfy; needs --output-format. Result gains "structured_output"; exit 3 if it does not validate').option("--no-session-persistence", "Do not save this run to disk (needs --output-format; it cannot be resumed)").option("--max-turns <n>", "Stop a headless run after N agent rounds (needs --output-format; exit 4 when it hits the limit)").option("--permission-prompt-tool <t>", "MCP tool (mcp__server__tool) that answers permission prompts in non-interactive runs \u2014 instead of nex denying them").option("--append-system-prompt-file <path>", "Like --append-system-prompt, read from a file").option("--system-prompt <text>", "REPLACE the project brief (nexrall.md + memory + global instructions) with this text for this run").option("--system-prompt-file <path>", "Like --system-prompt, read from a file").option("--verbose", "Print progress detail (tool calls, timings, usage) to stderr while a one-shot run works").option("--include-partial-messages", "Stream model deltas as they arrive (needs --output-format stream-json)").option("--include-hook-events", "Include hook lifecycle events in the stream-json output (system: hook_started / hook_progress / hook_response)").option("--replay-user-messages", "Echo each stdin message back on stdout as it is consumed (needs --input-format stream-json --output-format stream-json)").option("--agents <json-or-file>", 'Define extra sub-agents for this run: a JSON object { "name": { "description", "prompt", "tools", "model" } } or @file.json').option("--agent <name>", "Run this session AS that agent (its prompt, tools and model), from .nexrall/agents, a plugin, --agents or a builtin").option("--bare", "Start without discovery: no nexrall.md/memory, skills, plugins, hooks or MCP config files").option("--safe-mode", "Same as --bare (Claude Code's troubleshooting name)").option("--tools <list>", 'Exactly these built-in tools ("Bash,Read,Edit", "default", or "" for none); the rest are removed, not just unapproved').option("--session-id <id>", "Use this id for a NEW conversation (letters, digits, - _), so a script can find it again").option("-n, --name <name>", "Name the conversation; `nex -r <name>` resumes it by that name").option("--fork-session", "With --resume/--continue: branch into a new session instead of continuing the original").option("--fallback-model <name>", "If the main model is overloaded or unreachable, retry the turn once on this model (needs --output-format)").option("--settings <file|json>", "Settings (permissions, hooks\u2026) for this run only: a JSON file or an inline JSON object; merged over the user/project settings").option("--debug-file <path>", "Write the --debug diagnostics log to this file (implies --debug)").argument("[prompt...]", "One-shot prompt \u2014 if omitted, starts interactive mode").action(async (promptParts, options) => {
186623
+ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, --turbo", "Use Claude Sonnet 5.5 (fast)").option("-u, --ultra", "Use Claude Fable 5.1 (most powerful)").option("-y, --yolo", "Auto-approve all tool calls (no permission prompts)").option("-d, --dir <path>", "Set working directory (default: current directory)").option("-m, --model <name>", "Explicit model, e.g. claude-opus-5-5 | gpt-5.4 | gpt-4.1").option("-r, --resume [id]", "Resume last session, or a specific session id").option("-c, --continue", "Continue the latest conversation in this folder").option("--plan", "Start in plan mode (read-only; /mode or Shift+Tab can leave it)").option("--readonly", "Read-only for the whole session: plan mode that cannot be switched off").option("--auto", "Start in auto mode (the default \u2014 edits and commands run without asking; irreversible actions are still confirmed)").option("--mode <mode>", "Starting permission mode: ask | edit | auto | plan").option("--fullscreen", "Draw the whole session on the terminal's alternate screen: the transcript re-wraps on resize and PgUp/PgDn page through it (no terminal scrollback while it is on; /fullscreen toggles it)").option("--ax-screen-reader", "Screen-reader mode: flat labelled lines (you:/claude:/tool:), no spinner repaints, no box-drawing chrome, numbered menus, bell when the session needs you. Also NEXRALL_AX_SCREEN_READER=1 or the axScreenReader setting").option("--bg", "Run the prompt in the background (headless); returns a job id. See: nex jobs | logs | attach | kill").option("--debug", "Write request timing, retries and errors to a debug log file").option("--no-color", "Disable colored output (also honours NO_COLOR)").option("-w, --worktree [name]", "Isolate this session in its own worktree \u2014 a separate directory (and, in a git repo, its own branch) so it can never overwrite files another session (or you) are touching in the main checkout. Omit a name for an auto-generated one; pass an existing name to resume that same worktree.").option("-e, --effort <level>", "Thinking effort \u2014 real levels depend on the model (e.g. DeepSeek: low|high|max, Qwen: low|high); run `nex --model <id>` then `/effort` with no argument to see a model's scale").option("--no-banner", "Skip the ASCII banner (useful in scripts/pipes)").option("--print", "One-shot, non-interactive run that prints the answer and exits (same as --output-format text). Claude Code's `-p` is spelled --print here because `-p` already means --pro").option("--output-format <fmt>", "One-shot output format: text | json | stream-json (implies auto-approve)").option("--audit [path]", "Log every tool call (and refusal) to a JSONL trail (default: .nexrall/audit/<session>.jsonl)").option("--permission-mode <mode>", "Permission mode: ask | edit | auto | plan (also Claude Code names: default | acceptEdits | dontAsk | bypassPermissions). With --output-format, anything that would prompt is DENIED instead of auto-approved").option("--allowedTools, --allowed-tools <tools...>", 'Tools/rules to allow without asking, e.g. "Bash(git *)" Edit (comma or space separated; put the prompt BEFORE this flag)').option("--disallowedTools, --disallowed-tools <tools...>", 'Tools/rules to deny, e.g. "Bash(rm *)" (deny always wins)').option("--append-system-prompt <text>", "Extra instructions appended to the project brief for this run").option("--max-budget-usd <amount>", "Stop a one-shot run once it has spent this many dollars (needs --output-format)").option("--mcp-config <configs...>", 'Load MCP servers from JSON files or inline JSON ({"mcpServers":{\u2026}}) for this run').option("--strict-mcp-config", "With --mcp-config: use ONLY those servers, ignoring ~/.nexrall/mcp.json and the project one").option("--add-dir <dirs...>", "Extra directories the agent may read and edit besides the project folder").option("--input-format <format>", "text (default) | stream-json \u2014 read the prompt as Claude-Code-style NDJSON user messages on stdin").option("--json-schema <schema>", 'JSON Schema (inline or file) the final answer must satisfy; needs --output-format. Result gains "structured_output"; exit 3 if it does not validate').option("--no-session-persistence", "Do not save this run to disk (needs --output-format; it cannot be resumed)").option("--max-turns <n>", "Stop a headless run after N agent rounds (needs --output-format; exit 4 when it hits the limit)").option("--permission-prompt-tool <t>", "MCP tool (mcp__server__tool) that answers permission prompts in non-interactive runs \u2014 instead of nex denying them").option("--append-system-prompt-file <path>", "Like --append-system-prompt, read from a file").option("--system-prompt <text>", "REPLACE the project brief (nexrall.md + memory + global instructions) with this text for this run").option("--system-prompt-file <path>", "Like --system-prompt, read from a file").option("--verbose", "Print progress detail (tool calls, timings, usage) to stderr while a one-shot run works").option("--include-partial-messages", "Stream model deltas as they arrive (needs --output-format stream-json)").option("--include-hook-events", "Include hook lifecycle events in the stream-json output (system: hook_started / hook_progress / hook_response)").option("--replay-user-messages", "Echo each stdin message back on stdout as it is consumed (needs --input-format stream-json --output-format stream-json)").option("--agents <json-or-file>", 'Define extra sub-agents for this run: a JSON object { "name": { "description", "prompt", "tools", "model" } } or @file.json').option("--agent <name>", "Run this session AS that agent (its prompt, tools and model), from .nexrall/agents, a plugin, --agents or a builtin").option("--bare", "Start without discovery: no nexrall.md/memory, skills, plugins, hooks or MCP config files").option("--safe-mode", "Same as --bare (Claude Code's troubleshooting name)").option("--tools <list>", 'Exactly these built-in tools ("Bash,Read,Edit", "default", or "" for none); the rest are removed, not just unapproved').option("--session-id <id>", "Use this id for a NEW conversation (letters, digits, - _), so a script can find it again").option("-n, --name <name>", "Name the conversation; `nex -r <name>` resumes it by that name").option("--fork-session", "With --resume/--continue: branch into a new session instead of continuing the original").option("--fallback-model <name>", "If the main model is overloaded or unreachable, retry the turn once on this model (needs --output-format)").option("--settings <file|json>", "Settings (permissions, hooks\u2026) for this run only: a JSON file or an inline JSON object; merged over the user/project settings").option("--debug-file <path>", "Write the --debug diagnostics log to this file (implies --debug)").argument("[prompt...]", "One-shot prompt \u2014 if omitted, starts interactive mode").action(async (promptParts, options) => {
186229
186624
  if (!(0, import_code_core26.isAuthenticated)()) {
186230
186625
  console.error("Not logged in. Run: nex auth");
186231
186626
  process.exit(1);