nexrall-code 0.5.89 → 0.5.91

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 +1050 -574
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -982,7 +982,7 @@ var require_command = __commonJS({
982
982
  "../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js"(exports2) {
983
983
  var EventEmitter4 = __require("node:events").EventEmitter;
984
984
  var childProcess = __require("node:child_process");
985
- var path6 = __require("node:path");
985
+ var path7 = __require("node:path");
986
986
  var fs9 = __require("node:fs");
987
987
  var process14 = __require("node:process");
988
988
  var { Argument: Argument2, humanReadableArgName } = require_argument();
@@ -1925,10 +1925,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1925
1925
  let launchWithNode = false;
1926
1926
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1927
1927
  function findFile(baseDir, baseName) {
1928
- const localBin = path6.resolve(baseDir, baseName);
1928
+ const localBin = path7.resolve(baseDir, baseName);
1929
1929
  if (fs9.existsSync(localBin))
1930
1930
  return localBin;
1931
- if (sourceExt.includes(path6.extname(baseName)))
1931
+ if (sourceExt.includes(path7.extname(baseName)))
1932
1932
  return void 0;
1933
1933
  const foundExt = sourceExt.find(
1934
1934
  (ext) => fs9.existsSync(`${localBin}${ext}`)
@@ -1948,17 +1948,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
1948
1948
  } catch (err) {
1949
1949
  resolvedScriptPath = this._scriptPath;
1950
1950
  }
1951
- executableDir = path6.resolve(
1952
- path6.dirname(resolvedScriptPath),
1951
+ executableDir = path7.resolve(
1952
+ path7.dirname(resolvedScriptPath),
1953
1953
  executableDir
1954
1954
  );
1955
1955
  }
1956
1956
  if (executableDir) {
1957
1957
  let localFile = findFile(executableDir, executableFile);
1958
1958
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1959
- const legacyName = path6.basename(
1959
+ const legacyName = path7.basename(
1960
1960
  this._scriptPath,
1961
- path6.extname(this._scriptPath)
1961
+ path7.extname(this._scriptPath)
1962
1962
  );
1963
1963
  if (legacyName !== this._name) {
1964
1964
  localFile = findFile(
@@ -1969,7 +1969,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1969
1969
  }
1970
1970
  executableFile = localFile || executableFile;
1971
1971
  }
1972
- launchWithNode = sourceExt.includes(path6.extname(executableFile));
1972
+ launchWithNode = sourceExt.includes(path7.extname(executableFile));
1973
1973
  let proc;
1974
1974
  if (process14.platform !== "win32") {
1975
1975
  if (launchWithNode) {
@@ -2826,7 +2826,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2826
2826
  * @return {Command}
2827
2827
  */
2828
2828
  nameFromFilename(filename) {
2829
- this._name = path6.basename(filename, path6.extname(filename));
2829
+ this._name = path7.basename(filename, path7.extname(filename));
2830
2830
  return this;
2831
2831
  }
2832
2832
  /**
@@ -2840,10 +2840,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2840
2840
  * @param {string} [path]
2841
2841
  * @return {(string|null|Command)}
2842
2842
  */
2843
- executableDir(path7) {
2844
- if (path7 === void 0)
2843
+ executableDir(path8) {
2844
+ if (path8 === void 0)
2845
2845
  return this._executableDir;
2846
- this._executableDir = path7;
2846
+ this._executableDir = path8;
2847
2847
  return this;
2848
2848
  }
2849
2849
  /**
@@ -3159,10 +3159,10 @@ var require_auth = __commonJS({
3159
3159
  exports2.getRefreshToken = getRefreshToken;
3160
3160
  exports2.updateTokens = updateTokens;
3161
3161
  var fs9 = __importStar(__require("fs"));
3162
- var path6 = __importStar(__require("path"));
3163
- var os5 = __importStar(__require("os"));
3164
- var CONFIG_DIR = path6.join(os5.homedir(), ".nexrall");
3165
- var CONFIG_FILE = path6.join(CONFIG_DIR, "config.json");
3162
+ var path7 = __importStar(__require("path"));
3163
+ var os6 = __importStar(__require("os"));
3164
+ var CONFIG_DIR = path7.join(os6.homedir(), ".nexrall");
3165
+ var CONFIG_FILE = path7.join(CONFIG_DIR, "config.json");
3166
3166
  function ensureConfigDir() {
3167
3167
  if (!fs9.existsSync(CONFIG_DIR)) {
3168
3168
  fs9.mkdirSync(CONFIG_DIR, { recursive: true });
@@ -8180,22 +8180,22 @@ var init_from = __esm({
8180
8180
  init_file();
8181
8181
  init_fetch_blob();
8182
8182
  ({ stat } = fs);
8183
- blobFromSync = (path6, type) => fromBlob(statSync(path6), path6, type);
8184
- blobFrom = (path6, type) => stat(path6).then((stat2) => fromBlob(stat2, path6, type));
8185
- fileFrom = (path6, type) => stat(path6).then((stat2) => fromFile(stat2, path6, type));
8186
- fileFromSync = (path6, type) => fromFile(statSync(path6), path6, type);
8187
- fromBlob = (stat2, path6, type = "") => new fetch_blob_default([new BlobDataItem({
8188
- path: path6,
8183
+ blobFromSync = (path7, type) => fromBlob(statSync(path7), path7, type);
8184
+ blobFrom = (path7, type) => stat(path7).then((stat2) => fromBlob(stat2, path7, type));
8185
+ fileFrom = (path7, type) => stat(path7).then((stat2) => fromFile(stat2, path7, type));
8186
+ fileFromSync = (path7, type) => fromFile(statSync(path7), path7, type);
8187
+ fromBlob = (stat2, path7, type = "") => new fetch_blob_default([new BlobDataItem({
8188
+ path: path7,
8189
8189
  size: stat2.size,
8190
8190
  lastModified: stat2.mtimeMs,
8191
8191
  start: 0
8192
8192
  })], { type });
8193
- fromFile = (stat2, path6, type = "") => new file_default([new BlobDataItem({
8194
- path: path6,
8193
+ fromFile = (stat2, path7, type = "") => new file_default([new BlobDataItem({
8194
+ path: path7,
8195
8195
  size: stat2.size,
8196
8196
  lastModified: stat2.mtimeMs,
8197
8197
  start: 0
8198
- })], basename(path6), { type, lastModified: stat2.mtimeMs });
8198
+ })], basename(path7), { type, lastModified: stat2.mtimeMs });
8199
8199
  BlobDataItem = class _BlobDataItem {
8200
8200
  #path;
8201
8201
  #start;
@@ -9875,8 +9875,10 @@ var require_client = __commonJS({
9875
9875
  exports2.revokeRefreshToken = revokeRefreshToken2;
9876
9876
  exports2.describeAttachment = describeAttachment2;
9877
9877
  exports2.getBalance = getBalance3;
9878
+ exports2.getUsageDaily = getUsageDaily;
9878
9879
  exports2.exchangeVscodeCode = exchangeVscodeCode;
9879
9880
  exports2.login = login2;
9881
+ exports2.getUserProfile = getUserProfile;
9880
9882
  var eventsource_parser_1 = require_dist();
9881
9883
  var node_fetch_1 = __importDefault((init_src(), __toCommonJS(src_exports)));
9882
9884
  var crypto_1 = __require("crypto");
@@ -10646,6 +10648,27 @@ var require_client = __commonJS({
10646
10648
  const data = await response.json();
10647
10649
  return typeof data.balance === "number" ? data.balance : 0;
10648
10650
  }
10651
+ async function getUsageDaily(days = 30) {
10652
+ const fetchOnce = () => (0, node_fetch_1.default)(`${exports2.API_BASE}/api/user/usage-daily?days=${days}`, { method: "GET", headers: authHeaders() });
10653
+ let response = await fetchOnce();
10654
+ if (response.status === 401 || response.status === 403) {
10655
+ const body = await response.text().catch(() => "");
10656
+ if (isExpiredTokenResponse(response.status, body) && await refreshAccessToken()) {
10657
+ response = await fetchOnce();
10658
+ } else {
10659
+ throw new Error(`API error ${response.status}: ${body}`);
10660
+ }
10661
+ }
10662
+ if (!response.ok) {
10663
+ const errText = await response.text();
10664
+ throw new Error(`API error ${response.status}: ${errText}`);
10665
+ }
10666
+ const data = await response.json();
10667
+ return {
10668
+ days: Array.isArray(data.days) ? data.days : [],
10669
+ totalSpent: typeof data.totalSpent === "number" ? data.totalSpent : 0
10670
+ };
10671
+ }
10649
10672
  async function exchangeVscodeCode(code) {
10650
10673
  const response = await (0, node_fetch_1.default)(`${exports2.API_BASE}/api/auth/vscode-exchange`, {
10651
10674
  method: "POST",
@@ -10685,6 +10708,23 @@ var require_client = __commonJS({
10685
10708
  email: data.email ?? email
10686
10709
  };
10687
10710
  }
10711
+ async function getUserProfile() {
10712
+ const fetchOnce = () => (0, node_fetch_1.default)(`${exports2.API_BASE}/api/user/profile`, { method: "GET", headers: authHeaders() });
10713
+ let response = await fetchOnce();
10714
+ if (response.status === 401 || response.status === 403) {
10715
+ const body = await response.text().catch(() => "");
10716
+ if (isExpiredTokenResponse(response.status, body) && await refreshAccessToken()) {
10717
+ response = await fetchOnce();
10718
+ } else {
10719
+ throw new Error(`API error ${response.status}: ${body}`);
10720
+ }
10721
+ }
10722
+ if (!response.ok) {
10723
+ const errText = await response.text();
10724
+ throw new Error(`API error ${response.status}: ${errText}`);
10725
+ }
10726
+ return await response.json();
10727
+ }
10688
10728
  }
10689
10729
  });
10690
10730
 
@@ -10740,7 +10780,7 @@ var require_sandbox = __commonJS({
10740
10780
  exports2.parseSandboxConfig = parseSandboxConfig;
10741
10781
  exports2.wrapCommandForSandbox = wrapCommandForSandbox;
10742
10782
  var child_process_1 = __require("child_process");
10743
- var os5 = __importStar(__require("os"));
10783
+ var os6 = __importStar(__require("os"));
10744
10784
  function parseSandboxConfig(raw) {
10745
10785
  if (raw === void 0 || raw === null || raw === false || raw === "off")
10746
10786
  return null;
@@ -10785,9 +10825,9 @@ var require_sandbox = __commonJS({
10785
10825
  return lines.join("\n");
10786
10826
  }
10787
10827
  function wrapCommandForSandbox(command, workDir, cfg) {
10788
- const platform3 = os5.platform();
10828
+ const platform3 = os6.platform();
10789
10829
  if (platform3 === "darwin") {
10790
- const writePaths = Array.from(/* @__PURE__ */ new Set([workDir, "/tmp", "/private/tmp", "/private/var/folders", os5.tmpdir(), ...cfg.writePaths]));
10830
+ const writePaths = Array.from(/* @__PURE__ */ new Set([workDir, "/tmp", "/private/tmp", "/private/var/folders", os6.tmpdir(), ...cfg.writePaths]));
10791
10831
  const profile = buildSeatbeltProfile(writePaths, cfg.network);
10792
10832
  return {
10793
10833
  command: `sandbox-exec -p ${shQuote(profile)} /bin/sh -c ${shQuote(command)}`,
@@ -11123,16 +11163,16 @@ var require_memory = __commonJS({
11123
11163
  exports2.agentMemoryPreamble = agentMemoryPreamble;
11124
11164
  exports2.compactMemoryIfNeeded = compactMemoryIfNeeded2;
11125
11165
  var fs9 = __importStar(__require("fs"));
11126
- var os5 = __importStar(__require("os"));
11127
- var path6 = __importStar(__require("path"));
11166
+ var os6 = __importStar(__require("os"));
11167
+ var path7 = __importStar(__require("path"));
11128
11168
  var crypto5 = __importStar(__require("crypto"));
11129
- var MEMORY_ROOT = process.env.NEXRALL_MEMORY_DIR || path6.join(os5.homedir(), ".nexrall", "memory");
11130
- var GLOBAL_FILE = path6.join(MEMORY_ROOT, "global.md");
11169
+ var MEMORY_ROOT = process.env.NEXRALL_MEMORY_DIR || path7.join(os6.homedir(), ".nexrall", "memory");
11170
+ var GLOBAL_FILE = path7.join(MEMORY_ROOT, "global.md");
11131
11171
  function memoryFilePath(scope, workDir) {
11132
11172
  if (scope === "global" || !workDir)
11133
11173
  return GLOBAL_FILE;
11134
- const key = crypto5.createHash("sha1").update(path6.resolve(workDir)).digest("hex").slice(0, 16);
11135
- return path6.join(MEMORY_ROOT, `project-${key}.md`);
11174
+ const key = crypto5.createHash("sha1").update(path7.resolve(workDir)).digest("hex").slice(0, 16);
11175
+ return path7.join(MEMORY_ROOT, `project-${key}.md`);
11136
11176
  }
11137
11177
  exports2.MEMORY_ENTRY_MAX_CHARS = 400;
11138
11178
  exports2.MEMORY_MAX_BYTES = 12e3;
@@ -11142,16 +11182,16 @@ var require_memory = __commonJS({
11142
11182
  var _locks = /* @__PURE__ */ new Map();
11143
11183
  async function withLock(key, fn) {
11144
11184
  const prev = _locks.get(key) ?? Promise.resolve();
11145
- let release2;
11185
+ let release3;
11146
11186
  const next = new Promise((res) => {
11147
- release2 = res;
11187
+ release3 = res;
11148
11188
  });
11149
11189
  _locks.set(key, prev.then(() => next));
11150
11190
  try {
11151
11191
  await prev;
11152
11192
  return await fn();
11153
11193
  } finally {
11154
- release2();
11194
+ release3();
11155
11195
  if (_locks.get(key) === next)
11156
11196
  _locks.delete(key);
11157
11197
  }
@@ -11164,7 +11204,7 @@ var require_memory = __commonJS({
11164
11204
  }
11165
11205
  }
11166
11206
  function writeMemoryFile(file, content) {
11167
- fs9.mkdirSync(path6.dirname(file), { recursive: true });
11207
+ fs9.mkdirSync(path7.dirname(file), { recursive: true });
11168
11208
  fs9.writeFileSync(file, content, "utf-8");
11169
11209
  }
11170
11210
  function evictOldest(content, maxBytes) {
@@ -11211,7 +11251,7 @@ ${globalMem}`);
11211
11251
  if (workDir) {
11212
11252
  const projMem = readMemory2("project", workDir);
11213
11253
  if (projMem)
11214
- parts.push(`[Project memories \u2014 ${path6.basename(path6.resolve(workDir))}]
11254
+ parts.push(`[Project memories \u2014 ${path7.basename(path7.resolve(workDir))}]
11215
11255
  ${projMem}`);
11216
11256
  }
11217
11257
  return parts.join("\n\n");
@@ -11240,15 +11280,15 @@ ${projMem}`);
11240
11280
  const file = `${agentName}.md`;
11241
11281
  let dir;
11242
11282
  if (scope === "user") {
11243
- dir = path6.join(MEMORY_ROOT, "agent-memory");
11283
+ dir = path7.join(MEMORY_ROOT, "agent-memory");
11244
11284
  } else {
11245
11285
  if (!workDir)
11246
11286
  return null;
11247
- dir = path6.join(path6.resolve(workDir), ".nexrall", scope === "local" ? "agent-memory-local" : "agent-memory");
11287
+ dir = path7.join(path7.resolve(workDir), ".nexrall", scope === "local" ? "agent-memory-local" : "agent-memory");
11248
11288
  }
11249
- const full = path6.join(dir, file);
11250
- const rel = path6.relative(dir, full);
11251
- if (rel.startsWith("..") || path6.isAbsolute(rel))
11289
+ const full = path7.join(dir, file);
11290
+ const rel = path7.relative(dir, full);
11291
+ if (rel.startsWith("..") || path7.isAbsolute(rel))
11252
11292
  return null;
11253
11293
  return full;
11254
11294
  }
@@ -11384,18 +11424,18 @@ var require_plugins = __commonJS({
11384
11424
  exports2.pluginHooks = pluginHooks;
11385
11425
  exports2.pluginMcpServers = pluginMcpServers;
11386
11426
  var fs9 = __importStar(__require("fs"));
11387
- var path6 = __importStar(__require("path"));
11388
- var os5 = __importStar(__require("os"));
11427
+ var path7 = __importStar(__require("path"));
11428
+ var os6 = __importStar(__require("os"));
11389
11429
  var DISABLED_MARKER = ".disabled";
11390
11430
  function isPluginDisabled(dir) {
11391
11431
  try {
11392
- return fs9.statSync(path6.join(dir, DISABLED_MARKER)).isFile();
11432
+ return fs9.statSync(path7.join(dir, DISABLED_MARKER)).isFile();
11393
11433
  } catch {
11394
11434
  return false;
11395
11435
  }
11396
11436
  }
11397
11437
  function setPluginDisabled(dir, disabled) {
11398
- const marker = path6.join(dir, DISABLED_MARKER);
11438
+ const marker = path7.join(dir, DISABLED_MARKER);
11399
11439
  if (disabled) {
11400
11440
  fs9.writeFileSync(marker, "");
11401
11441
  } else {
@@ -11406,13 +11446,13 @@ var require_plugins = __commonJS({
11406
11446
  }
11407
11447
  }
11408
11448
  exports2.FILE_CANDIDATES = {
11409
- manifest: ["plugin.json", path6.join(".claude-plugin", "plugin.json")],
11410
- hooks: ["hooks.json", path6.join("hooks", "hooks.json")],
11449
+ manifest: ["plugin.json", path7.join(".claude-plugin", "plugin.json")],
11450
+ hooks: ["hooks.json", path7.join("hooks", "hooks.json")],
11411
11451
  mcp: ["mcp.json", ".mcp.json"]
11412
11452
  };
11413
11453
  function resolvePluginFile(dir, kind) {
11414
11454
  for (const rel of exports2.FILE_CANDIDATES[kind]) {
11415
- const full = path6.join(dir, rel);
11455
+ const full = path7.join(dir, rel);
11416
11456
  try {
11417
11457
  if (fs9.statSync(full).isFile())
11418
11458
  return full;
@@ -11447,7 +11487,7 @@ var require_plugins = __commonJS({
11447
11487
  for (const entry of entries) {
11448
11488
  if (!entry.isDirectory() && !entry.isSymbolicLink())
11449
11489
  continue;
11450
- const dir = path6.join(root, entry.name);
11490
+ const dir = path7.join(root, entry.name);
11451
11491
  try {
11452
11492
  if (!fs9.statSync(dir).isDirectory())
11453
11493
  continue;
@@ -11463,18 +11503,18 @@ var require_plugins = __commonJS({
11463
11503
  }
11464
11504
  function loadPlugins3(workDir) {
11465
11505
  const out = /* @__PURE__ */ new Map();
11466
- scanRoot(path6.join(workDir, ".nexrall", "plugins"), "project", out);
11467
- scanRoot(path6.join(os5.homedir(), ".nexrall", "plugins"), "global", out);
11506
+ scanRoot(path7.join(workDir, ".nexrall", "plugins"), "project", out);
11507
+ scanRoot(path7.join(os6.homedir(), ".nexrall", "plugins"), "global", out);
11468
11508
  return [...out.values()];
11469
11509
  }
11470
11510
  function findPlugin(workDir, name, scope) {
11471
11511
  const out = /* @__PURE__ */ new Map();
11472
- const root = scope === "project" ? path6.join(workDir, ".nexrall", "plugins") : path6.join(os5.homedir(), ".nexrall", "plugins");
11512
+ const root = scope === "project" ? path7.join(workDir, ".nexrall", "plugins") : path7.join(os6.homedir(), ".nexrall", "plugins");
11473
11513
  scanRoot(root, scope, out);
11474
11514
  return out.get(name);
11475
11515
  }
11476
11516
  function pluginAssetDirs(workDir, kind) {
11477
- return loadPlugins3(workDir).filter((p) => !p.disabled).map((p) => path6.join(p.dir, kind)).filter((d) => {
11517
+ return loadPlugins3(workDir).filter((p) => !p.disabled).map((p) => path7.join(p.dir, kind)).filter((d) => {
11478
11518
  try {
11479
11519
  return fs9.statSync(d).isDirectory();
11480
11520
  } catch {
@@ -11603,8 +11643,8 @@ var require_loader = __commonJS({
11603
11643
  exports2.expandBody = expandBody;
11604
11644
  exports2.expandCommand = expandCommand;
11605
11645
  var fs9 = __importStar(__require("fs"));
11606
- var path6 = __importStar(__require("path"));
11607
- var os5 = __importStar(__require("os"));
11646
+ var path7 = __importStar(__require("path"));
11647
+ var os6 = __importStar(__require("os"));
11608
11648
  var child_process_1 = __require("child_process");
11609
11649
  var index_1 = require_plugins();
11610
11650
  var frontmatter_1 = require_frontmatter();
@@ -11651,9 +11691,9 @@ var require_loader = __commonJS({
11651
11691
  }
11652
11692
  for (const file of files) {
11653
11693
  try {
11654
- const raw = fs9.readFileSync(path6.join(dir, file), "utf-8");
11694
+ const raw = fs9.readFileSync(path7.join(dir, file), "utf-8");
11655
11695
  const { meta, body } = (0, frontmatter_1.parseFrontmatter)(raw);
11656
- const name = (meta.name || path6.basename(file, ".md")).trim().toLowerCase();
11696
+ const name = (meta.name || path7.basename(file, ".md")).trim().toLowerCase();
11657
11697
  if (!name)
11658
11698
  continue;
11659
11699
  if (source2 !== "project" && into.has(name))
@@ -11673,8 +11713,8 @@ var require_loader = __commonJS({
11673
11713
  }
11674
11714
  function loadSlashCommands(workDir) {
11675
11715
  const out = /* @__PURE__ */ new Map();
11676
- loadDir(path6.join(workDir, ".nexrall", "commands"), "project", out);
11677
- loadDir(path6.join(os5.homedir(), ".nexrall", "commands"), "global", out);
11716
+ loadDir(path7.join(workDir, ".nexrall", "commands"), "project", out);
11717
+ loadDir(path7.join(os6.homedir(), ".nexrall", "commands"), "global", out);
11678
11718
  for (const dir of (0, index_1.pluginAssetDirs)(workDir, "commands"))
11679
11719
  loadDir(dir, "plugin", out);
11680
11720
  for (const cmd of BUILTIN_COMMANDS) {
@@ -11700,7 +11740,7 @@ var require_loader = __commonJS({
11700
11740
  }
11701
11741
  });
11702
11742
  out = out.replace(/(^|\s)@([^\s]+)/g, (_m, lead, rel) => {
11703
- const abs = path6.isAbsolute(rel) ? rel : path6.join(workDir, rel);
11743
+ const abs = path7.isAbsolute(rel) ? rel : path7.join(workDir, rel);
11704
11744
  try {
11705
11745
  const content = fs9.readFileSync(abs, "utf-8").slice(0, 12e3);
11706
11746
  return `${lead}
@@ -11785,8 +11825,8 @@ var require_skills = __commonJS({
11785
11825
  exports2.summariseSkills = summariseSkills;
11786
11826
  exports2.expandSkill = expandSkill2;
11787
11827
  var fs9 = __importStar(__require("fs"));
11788
- var path6 = __importStar(__require("path"));
11789
- var os5 = __importStar(__require("os"));
11828
+ var path7 = __importStar(__require("path"));
11829
+ var os6 = __importStar(__require("os"));
11790
11830
  var index_1 = require_plugins();
11791
11831
  var loader_1 = require_loader();
11792
11832
  var frontmatter_1 = require_frontmatter();
@@ -11823,9 +11863,9 @@ var require_skills = __commonJS({
11823
11863
  }
11824
11864
  for (const file of files) {
11825
11865
  try {
11826
- const raw = fs9.readFileSync(path6.join(dir, file), "utf-8");
11866
+ const raw = fs9.readFileSync(path7.join(dir, file), "utf-8");
11827
11867
  const { meta, body } = (0, frontmatter_1.parseFrontmatter)(raw);
11828
- const name = (meta.name || path6.basename(file, ".md")).trim().toLowerCase();
11868
+ const name = (meta.name || path7.basename(file, ".md")).trim().toLowerCase();
11829
11869
  if (!name)
11830
11870
  continue;
11831
11871
  if (source2 !== "project" && into.has(name))
@@ -11845,8 +11885,8 @@ var require_skills = __commonJS({
11845
11885
  for (const entry of entries) {
11846
11886
  if (!entry.isDirectory() && !entry.isSymbolicLink())
11847
11887
  continue;
11848
- const skillDir = path6.join(root, entry.name);
11849
- const skillFile = path6.join(skillDir, "SKILL.md");
11888
+ const skillDir = path7.join(root, entry.name);
11889
+ const skillFile = path7.join(skillDir, "SKILL.md");
11850
11890
  try {
11851
11891
  if (!fs9.statSync(skillFile).isFile())
11852
11892
  continue;
@@ -11904,10 +11944,10 @@ var require_skills = __commonJS({
11904
11944
  ];
11905
11945
  function loadSkills2(workDir) {
11906
11946
  const out = /* @__PURE__ */ new Map();
11907
- loadFlatCommandDir(path6.join(workDir, ".nexrall", "commands"), "project", out);
11908
- loadSkillDir(path6.join(workDir, ".nexrall", "skills"), "project", out);
11909
- loadFlatCommandDir(path6.join(os5.homedir(), ".nexrall", "commands"), "global", out);
11910
- loadSkillDir(path6.join(os5.homedir(), ".nexrall", "skills"), "global", out);
11947
+ loadFlatCommandDir(path7.join(workDir, ".nexrall", "commands"), "project", out);
11948
+ loadSkillDir(path7.join(workDir, ".nexrall", "skills"), "project", out);
11949
+ loadFlatCommandDir(path7.join(os6.homedir(), ".nexrall", "commands"), "global", out);
11950
+ loadSkillDir(path7.join(os6.homedir(), ".nexrall", "skills"), "global", out);
11911
11951
  for (const dir of (0, index_1.pluginAssetDirs)(workDir, "commands"))
11912
11952
  loadFlatCommandDir(dir, "plugin", out);
11913
11953
  for (const dir of (0, index_1.pluginAssetDirs)(workDir, "skills"))
@@ -11964,10 +12004,10 @@ var require_testIntegrity = __commonJS({
11964
12004
  exports2.decodeTestIntegrityMarker = decodeTestIntegrityMarker;
11965
12005
  exports2.stripTestIntegrityMarker = stripTestIntegrityMarker;
11966
12006
  var TEST_PATH_RE = /(?:^|[\/\\])(?:tests?|spec|__tests__|testing)[\/\\]|(?:\.|_|-)(?:test|spec|tests)\.[a-z]+$|(?:^|[\/\\])test_[^\/\\]+\.py$|(?:^|[\/\\])[^\/\\]+_test\.(?:go|py|rb)$|Test[^\/\\]*\.(?:java|kt|cs)$|(?:^|[\/\\])[^\/\\]*Tests?\.(?:java|kt|cs)$/i;
11967
- function isTestFile(path6) {
11968
- if (!path6 || typeof path6 !== "string")
12007
+ function isTestFile(path7) {
12008
+ if (!path7 || typeof path7 !== "string")
11969
12009
  return false;
11970
- return TEST_PATH_RE.test(path6);
12010
+ return TEST_PATH_RE.test(path7);
11971
12011
  }
11972
12012
  var ASSERTION_RES = [
11973
12013
  /\bexpect\s*\(/g,
@@ -12057,8 +12097,8 @@ var require_testIntegrity = __commonJS({
12057
12097
  }
12058
12098
  return n;
12059
12099
  }
12060
- function analyzeTestEdit(path6, oldText, newText) {
12061
- if (!isTestFile(path6)) {
12100
+ function analyzeTestEdit(path7, oldText, newText) {
12101
+ if (!isTestFile(path7)) {
12062
12102
  return { isTestFile: false, suspicious: false, findings: [] };
12063
12103
  }
12064
12104
  const findings = [];
@@ -12106,23 +12146,23 @@ var require_testIntegrity = __commonJS({
12106
12146
  function analyzeWriteToolForTestIntegrity(toolName, input) {
12107
12147
  if (!input)
12108
12148
  return null;
12109
- const path6 = typeof input.path === "string" ? input.path : typeof input.file_path === "string" ? input.file_path : "";
12110
- if (!isTestFile(path6))
12149
+ const path7 = typeof input.path === "string" ? input.path : typeof input.file_path === "string" ? input.file_path : "";
12150
+ if (!isTestFile(path7))
12111
12151
  return null;
12112
12152
  if (toolName === "edit_file") {
12113
12153
  const oldText = typeof input.old_string === "string" ? input.old_string : "";
12114
12154
  const newText = typeof input.new_string === "string" ? input.new_string : "";
12115
- return analyzeTestEdit(path6, oldText, newText);
12155
+ return analyzeTestEdit(path7, oldText, newText);
12116
12156
  }
12117
12157
  if (toolName === "multi_edit" && Array.isArray(input.edits)) {
12118
12158
  const edits = input.edits;
12119
12159
  const oldText = edits.map((e2) => typeof e2.old_string === "string" ? e2.old_string : "").join("\n");
12120
12160
  const newText = edits.map((e2) => typeof e2.new_string === "string" ? e2.new_string : "").join("\n");
12121
- return analyzeTestEdit(path6, oldText, newText);
12161
+ return analyzeTestEdit(path7, oldText, newText);
12122
12162
  }
12123
12163
  if (toolName === "write_file") {
12124
12164
  const content = typeof input.content === "string" ? input.content : "";
12125
- return analyzeTestEdit(path6, "", content);
12165
+ return analyzeTestEdit(path7, "", content);
12126
12166
  }
12127
12167
  return null;
12128
12168
  }
@@ -12182,19 +12222,19 @@ var require_crossFile = __commonJS({
12182
12222
  { kind: "def", re: /^def\s+([A-Za-z_][\w]*)/gm },
12183
12223
  { kind: "class", re: /^class\s+([A-Za-z_][\w]*)/gm }
12184
12224
  ];
12185
- function isJsLike(path6) {
12186
- return /\.(?:m?[jt]sx?|cjs|cts|mts)$/.test(path6);
12225
+ function isJsLike(path7) {
12226
+ return /\.(?:m?[jt]sx?|cjs|cts|mts)$/.test(path7);
12187
12227
  }
12188
- function isPy(path6) {
12189
- return /\.py$/.test(path6);
12228
+ function isPy(path7) {
12229
+ return /\.py$/.test(path7);
12190
12230
  }
12191
- function extractExportedSymbols(path6, content) {
12231
+ function extractExportedSymbols(path7, content) {
12192
12232
  const out = /* @__PURE__ */ new Map();
12193
12233
  const add = (name, kind) => {
12194
12234
  if (name && !out.has(name))
12195
12235
  out.set(name, kind);
12196
12236
  };
12197
- if (isJsLike(path6)) {
12237
+ if (isJsLike(path7)) {
12198
12238
  for (const { kind, re } of JS_EXPORT_RES) {
12199
12239
  re.lastIndex = 0;
12200
12240
  let m2;
@@ -12214,7 +12254,7 @@ var require_crossFile = __commonJS({
12214
12254
  add(name, "export");
12215
12255
  }
12216
12256
  }
12217
- } else if (isPy(path6)) {
12257
+ } else if (isPy(path7)) {
12218
12258
  for (const { kind, re } of PY_DEF_RES) {
12219
12259
  re.lastIndex = 0;
12220
12260
  let m2;
@@ -12224,11 +12264,11 @@ var require_crossFile = __commonJS({
12224
12264
  }
12225
12265
  return [...out.entries()].map(([name, kind]) => ({ name, kind }));
12226
12266
  }
12227
- function findRemovedExports(path6, oldContent, newContent) {
12228
- const before = extractExportedSymbols(path6, oldContent);
12267
+ function findRemovedExports(path7, oldContent, newContent) {
12268
+ const before = extractExportedSymbols(path7, oldContent);
12229
12269
  if (before.length === 0)
12230
12270
  return [];
12231
- const afterNames = new Set(extractExportedSymbols(path6, newContent).map((s2) => s2.name));
12271
+ const afterNames = new Set(extractExportedSymbols(path7, newContent).map((s2) => s2.name));
12232
12272
  return before.filter((s2) => !afterNames.has(s2.name));
12233
12273
  }
12234
12274
  var NOISY_NAMES = /* @__PURE__ */ new Set(["default", "index", "main", "test", "get", "set", "run", "app", "data", "item", "value"]);
@@ -12296,7 +12336,7 @@ var require_symbols = __commonJS({
12296
12336
  exports2.getSymbols = getSymbols;
12297
12337
  exports2.getWorkspaceSymbols = getWorkspaceSymbols;
12298
12338
  var fs9 = __importStar(__require("fs"));
12299
- var path6 = __importStar(__require("path"));
12339
+ var path7 = __importStar(__require("path"));
12300
12340
  var LANGS = [
12301
12341
  {
12302
12342
  exts: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
@@ -12396,7 +12436,7 @@ var require_symbols = __commonJS({
12396
12436
  }
12397
12437
  var MAX_FILE_BYTES = 1024 * 1024;
12398
12438
  function extractSymbols(filePath, source2) {
12399
- const lang = EXT_TO_LANG.get(path6.extname(filePath).toLowerCase());
12439
+ const lang = EXT_TO_LANG.get(path7.extname(filePath).toLowerCase());
12400
12440
  if (!lang)
12401
12441
  return [];
12402
12442
  const hits = [];
@@ -12430,7 +12470,7 @@ var require_symbols = __commonJS({
12430
12470
  }
12431
12471
  function resolveIn(workDir, p) {
12432
12472
  const base = workDir ?? process.cwd();
12433
- return path6.isAbsolute(p) ? p : path6.resolve(base, p);
12473
+ return path7.isAbsolute(p) ? p : path7.resolve(base, p);
12434
12474
  }
12435
12475
  async function getSymbols(input, workDir) {
12436
12476
  const rel = typeof input.path === "string" ? input.path : "";
@@ -12448,8 +12488,8 @@ var require_symbols = __commonJS({
12448
12488
  } catch (err) {
12449
12489
  return { error: `Cannot read ${rel}: ${err.message}` };
12450
12490
  }
12451
- if (!EXT_TO_LANG.has(path6.extname(abs).toLowerCase())) {
12452
- return { output: `No symbol support for ${path6.extname(abs) || "this file type"} (regex-based scanner). Use search_files instead.` };
12491
+ if (!EXT_TO_LANG.has(path7.extname(abs).toLowerCase())) {
12492
+ return { output: `No symbol support for ${path7.extname(abs) || "this file type"} (regex-based scanner). Use search_files instead.` };
12453
12493
  }
12454
12494
  const hits = extractSymbols(abs, source2);
12455
12495
  if (!hits.length)
@@ -12482,12 +12522,12 @@ ${lines.join("\n")}` };
12482
12522
  for (const entry of entries) {
12483
12523
  if (results.length >= MAX_RESULTS || scanned >= MAX_FILES_SCANNED)
12484
12524
  return;
12485
- const full = path6.join(dir, entry.name);
12525
+ const full = path7.join(dir, entry.name);
12486
12526
  if (entry.isDirectory()) {
12487
12527
  if (SKIP_DIRS.has(entry.name) || entry.name.startsWith("."))
12488
12528
  continue;
12489
12529
  walk(full);
12490
- } else if (entry.isFile() && exts.has(path6.extname(entry.name).toLowerCase())) {
12530
+ } else if (entry.isFile() && exts.has(path7.extname(entry.name).toLowerCase())) {
12491
12531
  scanned++;
12492
12532
  try {
12493
12533
  const st = fs9.statSync(full);
@@ -12498,7 +12538,7 @@ ${lines.join("\n")}` };
12498
12538
  continue;
12499
12539
  for (const h2 of extractSymbols(full, source2)) {
12500
12540
  if (h2.name.toLowerCase().includes(q)) {
12501
- results.push({ ...h2, file: path6.relative(root, full) });
12541
+ results.push({ ...h2, file: path7.relative(root, full) });
12502
12542
  if (results.length >= MAX_RESULTS)
12503
12543
  break;
12504
12544
  }
@@ -12580,12 +12620,12 @@ var require_tsLangService = __commonJS({
12580
12620
  exports2.tsGetHover = tsGetHover;
12581
12621
  exports2.tsServiceAvailable = tsServiceAvailable;
12582
12622
  exports2._resetTsServiceCache = _resetTsServiceCache;
12583
- var path6 = __importStar(__require("path"));
12623
+ var path7 = __importStar(__require("path"));
12584
12624
  var fs9 = __importStar(__require("fs"));
12585
12625
  var module_1 = __require("module");
12586
12626
  var TS_EXTS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"]);
12587
12627
  function isTsLike(filePath) {
12588
- return TS_EXTS.has(path6.extname(filePath).toLowerCase());
12628
+ return TS_EXTS.has(path7.extname(filePath).toLowerCase());
12589
12629
  }
12590
12630
  var _tsResolveTried = false;
12591
12631
  var _ts = null;
@@ -12595,7 +12635,7 @@ var require_tsLangService = __commonJS({
12595
12635
  _tsResolveTried = true;
12596
12636
  const candidates = [];
12597
12637
  try {
12598
- const req = (0, module_1.createRequire)(path6.join(workDir, "package.json"));
12638
+ const req = (0, module_1.createRequire)(path7.join(workDir, "package.json"));
12599
12639
  candidates.push(req.resolve("typescript"));
12600
12640
  } catch {
12601
12641
  }
@@ -12641,7 +12681,7 @@ var require_tsLangService = __commonJS({
12641
12681
  const cfgPath = ts.findConfigFile(workDir, ts.sys.fileExists, "tsconfig.json");
12642
12682
  if (cfgPath) {
12643
12683
  const parsed = ts.readConfigFile(cfgPath, ts.sys.readFile);
12644
- const conf = ts.parseJsonConfigFileContent(parsed.config ?? {}, ts.sys, path6.dirname(cfgPath));
12684
+ const conf = ts.parseJsonConfigFileContent(parsed.config ?? {}, ts.sys, path7.dirname(cfgPath));
12645
12685
  if (conf.options)
12646
12686
  options = { ...conf.options, allowJs: true };
12647
12687
  }
@@ -12702,7 +12742,7 @@ var require_tsLangService = __commonJS({
12702
12742
  return { line, character: offset - last + 1 };
12703
12743
  }
12704
12744
  function relOf(root, abs) {
12705
- const r2 = path6.relative(root, abs);
12745
+ const r2 = path7.relative(root, abs);
12706
12746
  return r2.startsWith("..") ? abs : r2;
12707
12747
  }
12708
12748
  function tsGoToDefinition(deps) {
@@ -16989,7 +17029,7 @@ var require_dist2 = __commonJS({
16989
17029
  },
16990
17030
  {
16991
17031
  key: "join",
16992
- value: function join4(s2) {
17032
+ value: function join5(s2) {
16993
17033
  if (this.length === 0)
16994
17034
  return "";
16995
17035
  var p = this.head;
@@ -35076,16 +35116,16 @@ var require_dist2 = __commonJS({
35076
35116
  didFindOccurrence: true
35077
35117
  };
35078
35118
  };
35079
- var goToElementFromPath = (json, path6) => {
35119
+ var goToElementFromPath = (json, path7) => {
35080
35120
  let element = json;
35081
- for (let i2 = 1; i2 < path6.length; i2++) {
35082
- const index = path6[i2];
35121
+ for (let i2 = 1; i2 < path7.length; i2++) {
35122
+ const index = path7[i2];
35083
35123
  element = element.elements[index];
35084
35124
  }
35085
35125
  return element;
35086
35126
  };
35087
- var goToParentElementFromPath = (json, path6) => goToElementFromPath(json, path6.slice(0, path6.length - 1));
35088
- var getLastElementIndexFromPath = (path6) => path6[path6.length - 1];
35127
+ var goToParentElementFromPath = (json, path7) => goToElementFromPath(json, path7.slice(0, path7.length - 1));
35128
+ var getLastElementIndexFromPath = (path7) => path7[path7.length - 1];
35089
35129
  var PatchType = {
35090
35130
  /** Replace entire file-level elements (e.g., whole paragraphs) */
35091
35131
  DOCUMENT: "file",
@@ -39922,7 +39962,7 @@ var require_BufferList = __commonJS({
39922
39962
  this.head = this.tail = null;
39923
39963
  this.length = 0;
39924
39964
  };
39925
- BufferList.prototype.join = function join4(s2) {
39965
+ BufferList.prototype.join = function join5(s2) {
39926
39966
  if (this.length === 0)
39927
39967
  return "";
39928
39968
  var p = this.head;
@@ -42647,8 +42687,8 @@ var require_utils = __commonJS({
42647
42687
  var result = transform[inputType][outputType](input);
42648
42688
  return result;
42649
42689
  };
42650
- exports2.resolve = function(path6) {
42651
- var parts = path6.split("/");
42690
+ exports2.resolve = function(path7) {
42691
+ var parts = path7.split("/");
42652
42692
  var result = [];
42653
42693
  for (var index = 0; index < parts.length; index++) {
42654
42694
  var part = parts[index];
@@ -48480,18 +48520,18 @@ var require_object = __commonJS({
48480
48520
  var object = new ZipObject(name, zipObjectContent, o);
48481
48521
  this.files[name] = object;
48482
48522
  };
48483
- var parentFolder = function(path6) {
48484
- if (path6.slice(-1) === "/") {
48485
- path6 = path6.substring(0, path6.length - 1);
48523
+ var parentFolder = function(path7) {
48524
+ if (path7.slice(-1) === "/") {
48525
+ path7 = path7.substring(0, path7.length - 1);
48486
48526
  }
48487
- var lastSlash = path6.lastIndexOf("/");
48488
- return lastSlash > 0 ? path6.substring(0, lastSlash) : "";
48527
+ var lastSlash = path7.lastIndexOf("/");
48528
+ return lastSlash > 0 ? path7.substring(0, lastSlash) : "";
48489
48529
  };
48490
- var forceTrailingSlash = function(path6) {
48491
- if (path6.slice(-1) !== "/") {
48492
- path6 += "/";
48530
+ var forceTrailingSlash = function(path7) {
48531
+ if (path7.slice(-1) !== "/") {
48532
+ path7 += "/";
48493
48533
  }
48494
- return path6;
48534
+ return path7;
48495
48535
  };
48496
48536
  var folderAdd = function(name, createFolders) {
48497
48537
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
@@ -49415,14 +49455,14 @@ var require_load = __commonJS({
49415
49455
  zipEntries.load(data2);
49416
49456
  return zipEntries;
49417
49457
  }).then(function checkCRC32(zipEntries) {
49418
- var promises = [external.Promise.resolve(zipEntries)];
49458
+ var promises2 = [external.Promise.resolve(zipEntries)];
49419
49459
  var files = zipEntries.files;
49420
49460
  if (options.checkCRC32) {
49421
49461
  for (var i2 = 0; i2 < files.length; i2++) {
49422
- promises.push(checkEntryCRC32(files[i2]));
49462
+ promises2.push(checkEntryCRC32(files[i2]));
49423
49463
  }
49424
49464
  }
49425
- return external.Promise.all(promises);
49465
+ return external.Promise.all(promises2);
49426
49466
  }).then(function addFiles(results) {
49427
49467
  var zipEntries = results.shift();
49428
49468
  var files = zipEntries.files;
@@ -49632,7 +49672,7 @@ var require_buffer_list = __commonJS({
49632
49672
  }
49633
49673
  }, {
49634
49674
  key: "join",
49635
- value: function join4(s2) {
49675
+ value: function join5(s2) {
49636
49676
  if (this.length === 0)
49637
49677
  return "";
49638
49678
  var p = this.head;
@@ -52412,8 +52452,8 @@ var require_utils2 = __commonJS({
52412
52452
  };
52413
52453
  },
52414
52454
  getRelsPath(filepath) {
52415
- const path6 = utils.parsePath(filepath);
52416
- return `${path6.path}/_rels/${path6.name}.rels`;
52455
+ const path7 = utils.parsePath(filepath);
52456
+ return `${path7.path}/_rels/${path7.name}.rels`;
52417
52457
  },
52418
52458
  xmlEncode(text) {
52419
52459
  const regexResult = xmlDecodeRegex.exec(text);
@@ -52494,9 +52534,9 @@ var require_utils2 = __commonJS({
52494
52534
  return result;
52495
52535
  },
52496
52536
  fs: {
52497
- exists(path6) {
52537
+ exists(path7) {
52498
52538
  return new Promise((resolve3) => {
52499
- fs9.access(path6, fs9.constants.F_OK, (err) => {
52539
+ fs9.access(path7, fs9.constants.F_OK, (err) => {
52500
52540
  resolve3(!err);
52501
52541
  });
52502
52542
  });
@@ -64707,11 +64747,11 @@ var require_xlsx = __commonJS({
64707
64747
  delete model.drawingRels;
64708
64748
  delete model.vmlDrawings;
64709
64749
  }
64710
- async _processWorksheetEntry(stream, model, sheetNo, options, path6) {
64750
+ async _processWorksheetEntry(stream, model, sheetNo, options, path7) {
64711
64751
  const xform = new WorksheetXform(options);
64712
64752
  const worksheet = await xform.parseStream(stream);
64713
64753
  worksheet.sheetNo = sheetNo;
64714
- model.worksheetHash[path6] = worksheet;
64754
+ model.worksheetHash[path7] = worksheet;
64715
64755
  model.worksheets.push(worksheet);
64716
64756
  }
64717
64757
  async _processCommentEntry(stream, model, name) {
@@ -65007,8 +65047,8 @@ var require_xlsx = __commonJS({
65007
65047
  const themes = model.themes || { theme1: theme1Xml };
65008
65048
  Object.keys(themes).forEach((name) => {
65009
65049
  const xml = themes[name];
65010
- const path6 = `xl/theme/${name}.xml`;
65011
- zip.append(xml, { name: path6 });
65050
+ const path7 = `xl/theme/${name}.xml`;
65051
+ zip.append(xml, { name: path7 });
65012
65052
  });
65013
65053
  }
65014
65054
  async addOfficeRels(zip) {
@@ -66438,8 +66478,8 @@ var require_src = __commonJS({
66438
66478
  });
66439
66479
  };
66440
66480
  exports2.writeToString = (rows, options) => exports2.writeToBuffer(rows, options).then((buffer) => buffer.toString());
66441
- exports2.writeToPath = (path6, rows, options) => {
66442
- const stream = fs9.createWriteStream(path6, { encoding: "utf8" });
66481
+ exports2.writeToPath = (path7, rows, options) => {
66482
+ const stream = fs9.createWriteStream(path7, { encoding: "utf8" });
66443
66483
  return exports2.write(rows, options).pipe(stream);
66444
66484
  };
66445
66485
  }
@@ -67297,11 +67337,11 @@ var require_lodash8 = __commonJS({
67297
67337
  function baseForOwn(object, iteratee) {
67298
67338
  return object && baseFor(object, iteratee, keys);
67299
67339
  }
67300
- function baseGet(object, path6) {
67301
- path6 = isKey(path6, object) ? [path6] : castPath(path6);
67302
- var index = 0, length = path6.length;
67340
+ function baseGet(object, path7) {
67341
+ path7 = isKey(path7, object) ? [path7] : castPath(path7);
67342
+ var index = 0, length = path7.length;
67303
67343
  while (object != null && index < length) {
67304
- object = object[toKey(path6[index++])];
67344
+ object = object[toKey(path7[index++])];
67305
67345
  }
67306
67346
  return index && index == length ? object : void 0;
67307
67347
  }
@@ -67423,18 +67463,18 @@ var require_lodash8 = __commonJS({
67423
67463
  return object === source2 || baseIsMatch(object, source2, matchData);
67424
67464
  };
67425
67465
  }
67426
- function baseMatchesProperty(path6, srcValue) {
67427
- if (isKey(path6) && isStrictComparable(srcValue)) {
67428
- return matchesStrictComparable(toKey(path6), srcValue);
67466
+ function baseMatchesProperty(path7, srcValue) {
67467
+ if (isKey(path7) && isStrictComparable(srcValue)) {
67468
+ return matchesStrictComparable(toKey(path7), srcValue);
67429
67469
  }
67430
67470
  return function(object) {
67431
- var objValue = get3(object, path6);
67432
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path6) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
67471
+ var objValue = get3(object, path7);
67472
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path7) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
67433
67473
  };
67434
67474
  }
67435
- function basePropertyDeep(path6) {
67475
+ function basePropertyDeep(path7) {
67436
67476
  return function(object) {
67437
- return baseGet(object, path6);
67477
+ return baseGet(object, path7);
67438
67478
  };
67439
67479
  }
67440
67480
  function baseToString(value) {
@@ -67652,11 +67692,11 @@ var require_lodash8 = __commonJS({
67652
67692
  return result;
67653
67693
  };
67654
67694
  }
67655
- function hasPath(object, path6, hasFunc) {
67656
- path6 = isKey(path6, object) ? [path6] : castPath(path6);
67657
- var result, index = -1, length = path6.length;
67695
+ function hasPath(object, path7, hasFunc) {
67696
+ path7 = isKey(path7, object) ? [path7] : castPath(path7);
67697
+ var result, index = -1, length = path7.length;
67658
67698
  while (++index < length) {
67659
- var key = toKey(path6[index]);
67699
+ var key = toKey(path7[index]);
67660
67700
  if (!(result = object != null && hasFunc(object, key))) {
67661
67701
  break;
67662
67702
  }
@@ -67793,12 +67833,12 @@ var require_lodash8 = __commonJS({
67793
67833
  function toString(value) {
67794
67834
  return value == null ? "" : baseToString(value);
67795
67835
  }
67796
- function get3(object, path6, defaultValue2) {
67797
- var result = object == null ? void 0 : baseGet(object, path6);
67836
+ function get3(object, path7, defaultValue2) {
67837
+ var result = object == null ? void 0 : baseGet(object, path7);
67798
67838
  return result === void 0 ? defaultValue2 : result;
67799
67839
  }
67800
- function hasIn(object, path6) {
67801
- return object != null && hasPath(object, path6, baseHasIn);
67840
+ function hasIn(object, path7) {
67841
+ return object != null && hasPath(object, path7, baseHasIn);
67802
67842
  }
67803
67843
  function keys(object) {
67804
67844
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
@@ -67806,8 +67846,8 @@ var require_lodash8 = __commonJS({
67806
67846
  function identity(value) {
67807
67847
  return value;
67808
67848
  }
67809
- function property(path6) {
67810
- return isKey(path6) ? baseProperty(toKey(path6)) : basePropertyDeep(path6);
67849
+ function property(path7) {
67850
+ return isKey(path7) ? baseProperty(toKey(path7)) : basePropertyDeep(path7);
67811
67851
  }
67812
67852
  module2.exports = groupBy;
67813
67853
  }
@@ -69962,8 +70002,8 @@ var require_minimatch = __commonJS({
69962
70002
  return new Minimatch(pattern, options).match(p);
69963
70003
  };
69964
70004
  module2.exports = minimatch;
69965
- var path6 = require_path();
69966
- minimatch.sep = path6.sep;
70005
+ var path7 = require_path();
70006
+ minimatch.sep = path7.sep;
69967
70007
  var GLOBSTAR = Symbol("globstar **");
69968
70008
  minimatch.GLOBSTAR = GLOBSTAR;
69969
70009
  var expand = require_brace_expansion();
@@ -70581,8 +70621,8 @@ var require_minimatch = __commonJS({
70581
70621
  if (f3 === "/" && partial)
70582
70622
  return true;
70583
70623
  const options = this.options;
70584
- if (path6.sep !== "/") {
70585
- f3 = f3.split(path6.sep).join("/");
70624
+ if (path7.sep !== "/") {
70625
+ f3 = f3.split(path7.sep).join("/");
70586
70626
  }
70587
70627
  f3 = f3.split(slashSplit);
70588
70628
  this.debug(this.pattern, "split", f3);
@@ -70679,8 +70719,8 @@ var require_readdir_glob = __commonJS({
70679
70719
  });
70680
70720
  });
70681
70721
  }
70682
- async function* exploreWalkAsync(dir, path6, followSymlinks, useStat, shouldSkip, strict) {
70683
- let files = await readdir(path6 + dir, strict);
70722
+ async function* exploreWalkAsync(dir, path7, followSymlinks, useStat, shouldSkip, strict) {
70723
+ let files = await readdir(path7 + dir, strict);
70684
70724
  for (const file of files) {
70685
70725
  let name = file.name;
70686
70726
  if (name === void 0) {
@@ -70689,7 +70729,7 @@ var require_readdir_glob = __commonJS({
70689
70729
  }
70690
70730
  const filename = dir + "/" + name;
70691
70731
  const relative2 = filename.slice(1);
70692
- const absolute = path6 + "/" + relative2;
70732
+ const absolute = path7 + "/" + relative2;
70693
70733
  let stats = null;
70694
70734
  if (useStat || followSymlinks) {
70695
70735
  stats = await stat2(absolute, followSymlinks);
@@ -70703,15 +70743,15 @@ var require_readdir_glob = __commonJS({
70703
70743
  if (stats.isDirectory()) {
70704
70744
  if (!shouldSkip(relative2)) {
70705
70745
  yield { relative: relative2, absolute, stats };
70706
- yield* exploreWalkAsync(filename, path6, followSymlinks, useStat, shouldSkip, false);
70746
+ yield* exploreWalkAsync(filename, path7, followSymlinks, useStat, shouldSkip, false);
70707
70747
  }
70708
70748
  } else {
70709
70749
  yield { relative: relative2, absolute, stats };
70710
70750
  }
70711
70751
  }
70712
70752
  }
70713
- async function* explore(path6, followSymlinks, useStat, shouldSkip) {
70714
- yield* exploreWalkAsync("", path6, followSymlinks, useStat, shouldSkip, true);
70753
+ async function* explore(path7, followSymlinks, useStat, shouldSkip) {
70754
+ yield* exploreWalkAsync("", path7, followSymlinks, useStat, shouldSkip, true);
70715
70755
  }
70716
70756
  function readOptions(options) {
70717
70757
  return {
@@ -72825,7 +72865,7 @@ var require_polyfills = __commonJS({
72825
72865
  fs9.fstatSync = statFixSync(fs9.fstatSync);
72826
72866
  fs9.lstatSync = statFixSync(fs9.lstatSync);
72827
72867
  if (fs9.chmod && !fs9.lchmod) {
72828
- fs9.lchmod = function(path6, mode, cb) {
72868
+ fs9.lchmod = function(path7, mode, cb) {
72829
72869
  if (cb)
72830
72870
  process.nextTick(cb);
72831
72871
  };
@@ -72833,7 +72873,7 @@ var require_polyfills = __commonJS({
72833
72873
  };
72834
72874
  }
72835
72875
  if (fs9.chown && !fs9.lchown) {
72836
- fs9.lchown = function(path6, uid, gid, cb) {
72876
+ fs9.lchown = function(path7, uid, gid, cb) {
72837
72877
  if (cb)
72838
72878
  process.nextTick(cb);
72839
72879
  };
@@ -72904,9 +72944,9 @@ var require_polyfills = __commonJS({
72904
72944
  };
72905
72945
  }(fs9.readSync);
72906
72946
  function patchLchmod(fs10) {
72907
- fs10.lchmod = function(path6, mode, callback) {
72947
+ fs10.lchmod = function(path7, mode, callback) {
72908
72948
  fs10.open(
72909
- path6,
72949
+ path7,
72910
72950
  constants2.O_WRONLY | constants2.O_SYMLINK,
72911
72951
  mode,
72912
72952
  function(err, fd) {
@@ -72924,8 +72964,8 @@ var require_polyfills = __commonJS({
72924
72964
  }
72925
72965
  );
72926
72966
  };
72927
- fs10.lchmodSync = function(path6, mode) {
72928
- var fd = fs10.openSync(path6, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
72967
+ fs10.lchmodSync = function(path7, mode) {
72968
+ var fd = fs10.openSync(path7, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
72929
72969
  var threw = true;
72930
72970
  var ret2;
72931
72971
  try {
@@ -72946,8 +72986,8 @@ var require_polyfills = __commonJS({
72946
72986
  }
72947
72987
  function patchLutimes(fs10) {
72948
72988
  if (constants2.hasOwnProperty("O_SYMLINK") && fs10.futimes) {
72949
- fs10.lutimes = function(path6, at, mt, cb) {
72950
- fs10.open(path6, constants2.O_SYMLINK, function(er, fd) {
72989
+ fs10.lutimes = function(path7, at, mt, cb) {
72990
+ fs10.open(path7, constants2.O_SYMLINK, function(er, fd) {
72951
72991
  if (er) {
72952
72992
  if (cb)
72953
72993
  cb(er);
@@ -72961,8 +73001,8 @@ var require_polyfills = __commonJS({
72961
73001
  });
72962
73002
  });
72963
73003
  };
72964
- fs10.lutimesSync = function(path6, at, mt) {
72965
- var fd = fs10.openSync(path6, constants2.O_SYMLINK);
73004
+ fs10.lutimesSync = function(path7, at, mt) {
73005
+ var fd = fs10.openSync(path7, constants2.O_SYMLINK);
72966
73006
  var ret2;
72967
73007
  var threw = true;
72968
73008
  try {
@@ -73098,12 +73138,12 @@ var require_legacy_streams = __commonJS({
73098
73138
  ReadStream,
73099
73139
  WriteStream
73100
73140
  };
73101
- function ReadStream(path6, options) {
73141
+ function ReadStream(path7, options) {
73102
73142
  if (!(this instanceof ReadStream))
73103
- return new ReadStream(path6, options);
73143
+ return new ReadStream(path7, options);
73104
73144
  Stream4.call(this);
73105
73145
  var self2 = this;
73106
- this.path = path6;
73146
+ this.path = path7;
73107
73147
  this.fd = null;
73108
73148
  this.readable = true;
73109
73149
  this.paused = false;
@@ -73149,11 +73189,11 @@ var require_legacy_streams = __commonJS({
73149
73189
  self2._read();
73150
73190
  });
73151
73191
  }
73152
- function WriteStream(path6, options) {
73192
+ function WriteStream(path7, options) {
73153
73193
  if (!(this instanceof WriteStream))
73154
- return new WriteStream(path6, options);
73194
+ return new WriteStream(path7, options);
73155
73195
  Stream4.call(this);
73156
- this.path = path6;
73196
+ this.path = path7;
73157
73197
  this.fd = null;
73158
73198
  this.writable = true;
73159
73199
  this.flags = "w";
@@ -73296,14 +73336,14 @@ var require_graceful_fs = __commonJS({
73296
73336
  fs10.createWriteStream = createWriteStream;
73297
73337
  var fs$readFile = fs10.readFile;
73298
73338
  fs10.readFile = readFile;
73299
- function readFile(path6, options, cb) {
73339
+ function readFile(path7, options, cb) {
73300
73340
  if (typeof options === "function")
73301
73341
  cb = options, options = null;
73302
- return go$readFile(path6, options, cb);
73303
- function go$readFile(path7, options2, cb2, startTime) {
73304
- return fs$readFile(path7, options2, function(err) {
73342
+ return go$readFile(path7, options, cb);
73343
+ function go$readFile(path8, options2, cb2, startTime) {
73344
+ return fs$readFile(path8, options2, function(err) {
73305
73345
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
73306
- enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]);
73346
+ enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]);
73307
73347
  else {
73308
73348
  if (typeof cb2 === "function")
73309
73349
  cb2.apply(this, arguments);
@@ -73313,14 +73353,14 @@ var require_graceful_fs = __commonJS({
73313
73353
  }
73314
73354
  var fs$writeFile = fs10.writeFile;
73315
73355
  fs10.writeFile = writeFile;
73316
- function writeFile(path6, data, options, cb) {
73356
+ function writeFile(path7, data, options, cb) {
73317
73357
  if (typeof options === "function")
73318
73358
  cb = options, options = null;
73319
- return go$writeFile(path6, data, options, cb);
73320
- function go$writeFile(path7, data2, options2, cb2, startTime) {
73321
- return fs$writeFile(path7, data2, options2, function(err) {
73359
+ return go$writeFile(path7, data, options, cb);
73360
+ function go$writeFile(path8, data2, options2, cb2, startTime) {
73361
+ return fs$writeFile(path8, data2, options2, function(err) {
73322
73362
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
73323
- enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
73363
+ enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
73324
73364
  else {
73325
73365
  if (typeof cb2 === "function")
73326
73366
  cb2.apply(this, arguments);
@@ -73331,14 +73371,14 @@ var require_graceful_fs = __commonJS({
73331
73371
  var fs$appendFile = fs10.appendFile;
73332
73372
  if (fs$appendFile)
73333
73373
  fs10.appendFile = appendFile;
73334
- function appendFile(path6, data, options, cb) {
73374
+ function appendFile(path7, data, options, cb) {
73335
73375
  if (typeof options === "function")
73336
73376
  cb = options, options = null;
73337
- return go$appendFile(path6, data, options, cb);
73338
- function go$appendFile(path7, data2, options2, cb2, startTime) {
73339
- return fs$appendFile(path7, data2, options2, function(err) {
73377
+ return go$appendFile(path7, data, options, cb);
73378
+ function go$appendFile(path8, data2, options2, cb2, startTime) {
73379
+ return fs$appendFile(path8, data2, options2, function(err) {
73340
73380
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
73341
- enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
73381
+ enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
73342
73382
  else {
73343
73383
  if (typeof cb2 === "function")
73344
73384
  cb2.apply(this, arguments);
@@ -73369,31 +73409,31 @@ var require_graceful_fs = __commonJS({
73369
73409
  var fs$readdir = fs10.readdir;
73370
73410
  fs10.readdir = readdir;
73371
73411
  var noReaddirOptionVersions = /^v[0-5]\./;
73372
- function readdir(path6, options, cb) {
73412
+ function readdir(path7, options, cb) {
73373
73413
  if (typeof options === "function")
73374
73414
  cb = options, options = null;
73375
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
73376
- return fs$readdir(path7, fs$readdirCallback(
73377
- path7,
73415
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) {
73416
+ return fs$readdir(path8, fs$readdirCallback(
73417
+ path8,
73378
73418
  options2,
73379
73419
  cb2,
73380
73420
  startTime
73381
73421
  ));
73382
- } : function go$readdir2(path7, options2, cb2, startTime) {
73383
- return fs$readdir(path7, options2, fs$readdirCallback(
73384
- path7,
73422
+ } : function go$readdir2(path8, options2, cb2, startTime) {
73423
+ return fs$readdir(path8, options2, fs$readdirCallback(
73424
+ path8,
73385
73425
  options2,
73386
73426
  cb2,
73387
73427
  startTime
73388
73428
  ));
73389
73429
  };
73390
- return go$readdir(path6, options, cb);
73391
- function fs$readdirCallback(path7, options2, cb2, startTime) {
73430
+ return go$readdir(path7, options, cb);
73431
+ function fs$readdirCallback(path8, options2, cb2, startTime) {
73392
73432
  return function(err, files) {
73393
73433
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
73394
73434
  enqueue([
73395
73435
  go$readdir,
73396
- [path7, options2, cb2],
73436
+ [path8, options2, cb2],
73397
73437
  err,
73398
73438
  startTime || Date.now(),
73399
73439
  Date.now()
@@ -73464,7 +73504,7 @@ var require_graceful_fs = __commonJS({
73464
73504
  enumerable: true,
73465
73505
  configurable: true
73466
73506
  });
73467
- function ReadStream(path6, options) {
73507
+ function ReadStream(path7, options) {
73468
73508
  if (this instanceof ReadStream)
73469
73509
  return fs$ReadStream.apply(this, arguments), this;
73470
73510
  else
@@ -73484,7 +73524,7 @@ var require_graceful_fs = __commonJS({
73484
73524
  }
73485
73525
  });
73486
73526
  }
73487
- function WriteStream(path6, options) {
73527
+ function WriteStream(path7, options) {
73488
73528
  if (this instanceof WriteStream)
73489
73529
  return fs$WriteStream.apply(this, arguments), this;
73490
73530
  else
@@ -73502,22 +73542,22 @@ var require_graceful_fs = __commonJS({
73502
73542
  }
73503
73543
  });
73504
73544
  }
73505
- function createReadStream2(path6, options) {
73506
- return new fs10.ReadStream(path6, options);
73545
+ function createReadStream2(path7, options) {
73546
+ return new fs10.ReadStream(path7, options);
73507
73547
  }
73508
- function createWriteStream(path6, options) {
73509
- return new fs10.WriteStream(path6, options);
73548
+ function createWriteStream(path7, options) {
73549
+ return new fs10.WriteStream(path7, options);
73510
73550
  }
73511
73551
  var fs$open = fs10.open;
73512
73552
  fs10.open = open;
73513
- function open(path6, flags, mode, cb) {
73553
+ function open(path7, flags, mode, cb) {
73514
73554
  if (typeof mode === "function")
73515
73555
  cb = mode, mode = null;
73516
- return go$open(path6, flags, mode, cb);
73517
- function go$open(path7, flags2, mode2, cb2, startTime) {
73518
- return fs$open(path7, flags2, mode2, function(err, fd) {
73556
+ return go$open(path7, flags, mode, cb);
73557
+ function go$open(path8, flags2, mode2, cb2, startTime) {
73558
+ return fs$open(path8, flags2, mode2, function(err, fd) {
73519
73559
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
73520
- enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
73560
+ enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
73521
73561
  else {
73522
73562
  if (typeof cb2 === "function")
73523
73563
  cb2.apply(this, arguments);
@@ -73635,24 +73675,24 @@ var require_lazystream = __commonJS({
73635
73675
  // ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js
73636
73676
  var require_normalize_path = __commonJS({
73637
73677
  "../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js"(exports2, module2) {
73638
- module2.exports = function(path6, stripTrailing) {
73639
- if (typeof path6 !== "string") {
73678
+ module2.exports = function(path7, stripTrailing) {
73679
+ if (typeof path7 !== "string") {
73640
73680
  throw new TypeError("expected path to be a string");
73641
73681
  }
73642
- if (path6 === "\\" || path6 === "/")
73682
+ if (path7 === "\\" || path7 === "/")
73643
73683
  return "/";
73644
- var len = path6.length;
73684
+ var len = path7.length;
73645
73685
  if (len <= 1)
73646
- return path6;
73686
+ return path7;
73647
73687
  var prefix = "";
73648
- if (len > 4 && path6[3] === "\\") {
73649
- var ch = path6[2];
73650
- if ((ch === "?" || ch === ".") && path6.slice(0, 2) === "\\\\") {
73651
- path6 = path6.slice(2);
73688
+ if (len > 4 && path7[3] === "\\") {
73689
+ var ch = path7[2];
73690
+ if ((ch === "?" || ch === ".") && path7.slice(0, 2) === "\\\\") {
73691
+ path7 = path7.slice(2);
73652
73692
  prefix = "//";
73653
73693
  }
73654
73694
  }
73655
- var segs = path6.split(/[/\\]+/);
73695
+ var segs = path7.split(/[/\\]+/);
73656
73696
  if (stripTrailing !== false && segs[segs.length - 1] === "") {
73657
73697
  segs.pop();
73658
73698
  }
@@ -75209,7 +75249,7 @@ var require_minimatch2 = __commonJS({
75209
75249
  "../../node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js"(exports2, module2) {
75210
75250
  module2.exports = minimatch;
75211
75251
  minimatch.Minimatch = Minimatch;
75212
- var path6 = function() {
75252
+ var path7 = function() {
75213
75253
  try {
75214
75254
  return __require("path");
75215
75255
  } catch (e2) {
@@ -75217,7 +75257,7 @@ var require_minimatch2 = __commonJS({
75217
75257
  }() || {
75218
75258
  sep: "/"
75219
75259
  };
75220
- minimatch.sep = path6.sep;
75260
+ minimatch.sep = path7.sep;
75221
75261
  var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
75222
75262
  var expand = require_brace_expansion2();
75223
75263
  var plTypes = {
@@ -75308,8 +75348,8 @@ var require_minimatch2 = __commonJS({
75308
75348
  if (!options)
75309
75349
  options = {};
75310
75350
  pattern = pattern.trim();
75311
- if (!options.allowWindowsEscape && path6.sep !== "/") {
75312
- pattern = pattern.split(path6.sep).join("/");
75351
+ if (!options.allowWindowsEscape && path7.sep !== "/") {
75352
+ pattern = pattern.split(path7.sep).join("/");
75313
75353
  }
75314
75354
  this.options = options;
75315
75355
  this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200;
@@ -75689,8 +75729,8 @@ var require_minimatch2 = __commonJS({
75689
75729
  if (f3 === "/" && partial)
75690
75730
  return true;
75691
75731
  var options = this.options;
75692
- if (path6.sep !== "/") {
75693
- f3 = f3.split(path6.sep).join("/");
75732
+ if (path7.sep !== "/") {
75733
+ f3 = f3.split(path7.sep).join("/");
75694
75734
  }
75695
75735
  f3 = f3.split(slashSplit);
75696
75736
  this.debug(this.pattern, "split", f3);
@@ -75897,12 +75937,12 @@ var require_minimatch2 = __commonJS({
75897
75937
  var require_path_is_absolute = __commonJS({
75898
75938
  "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) {
75899
75939
  "use strict";
75900
- function posix(path6) {
75901
- return path6.charAt(0) === "/";
75940
+ function posix(path7) {
75941
+ return path7.charAt(0) === "/";
75902
75942
  }
75903
- function win32(path6) {
75943
+ function win32(path7) {
75904
75944
  var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
75905
- var result = splitDeviceRe.exec(path6);
75945
+ var result = splitDeviceRe.exec(path7);
75906
75946
  var device = result[1] || "";
75907
75947
  var isUnc = Boolean(device && device.charAt(1) !== ":");
75908
75948
  return Boolean(result[2] || isUnc);
@@ -75927,7 +75967,7 @@ var require_common2 = __commonJS({
75927
75967
  return Object.prototype.hasOwnProperty.call(obj2, field);
75928
75968
  }
75929
75969
  var fs9 = __require("fs");
75930
- var path6 = __require("path");
75970
+ var path7 = __require("path");
75931
75971
  var minimatch = require_minimatch2();
75932
75972
  var isAbsolute2 = require_path_is_absolute();
75933
75973
  var Minimatch = minimatch.Minimatch;
@@ -75992,11 +76032,11 @@ var require_common2 = __commonJS({
75992
76032
  if (!ownProp(options, "cwd"))
75993
76033
  self2.cwd = cwd2;
75994
76034
  else {
75995
- self2.cwd = path6.resolve(options.cwd);
76035
+ self2.cwd = path7.resolve(options.cwd);
75996
76036
  self2.changedCwd = self2.cwd !== cwd2;
75997
76037
  }
75998
- self2.root = options.root || path6.resolve(self2.cwd, "/");
75999
- self2.root = path6.resolve(self2.root);
76038
+ self2.root = options.root || path7.resolve(self2.cwd, "/");
76039
+ self2.root = path7.resolve(self2.root);
76000
76040
  if (process.platform === "win32")
76001
76041
  self2.root = self2.root.replace(/\\/g, "/");
76002
76042
  self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
@@ -76078,30 +76118,30 @@ var require_common2 = __commonJS({
76078
76118
  function makeAbs(self2, f3) {
76079
76119
  var abs = f3;
76080
76120
  if (f3.charAt(0) === "/") {
76081
- abs = path6.join(self2.root, f3);
76121
+ abs = path7.join(self2.root, f3);
76082
76122
  } else if (isAbsolute2(f3) || f3 === "") {
76083
76123
  abs = f3;
76084
76124
  } else if (self2.changedCwd) {
76085
- abs = path6.resolve(self2.cwd, f3);
76125
+ abs = path7.resolve(self2.cwd, f3);
76086
76126
  } else {
76087
- abs = path6.resolve(f3);
76127
+ abs = path7.resolve(f3);
76088
76128
  }
76089
76129
  if (process.platform === "win32")
76090
76130
  abs = abs.replace(/\\/g, "/");
76091
76131
  return abs;
76092
76132
  }
76093
- function isIgnored(self2, path7) {
76133
+ function isIgnored(self2, path8) {
76094
76134
  if (!self2.ignore.length)
76095
76135
  return false;
76096
76136
  return self2.ignore.some(function(item) {
76097
- return item.matcher.match(path7) || !!(item.gmatcher && item.gmatcher.match(path7));
76137
+ return item.matcher.match(path8) || !!(item.gmatcher && item.gmatcher.match(path8));
76098
76138
  });
76099
76139
  }
76100
- function childrenIgnored(self2, path7) {
76140
+ function childrenIgnored(self2, path8) {
76101
76141
  if (!self2.ignore.length)
76102
76142
  return false;
76103
76143
  return self2.ignore.some(function(item) {
76104
- return !!(item.gmatcher && item.gmatcher.match(path7));
76144
+ return !!(item.gmatcher && item.gmatcher.match(path8));
76105
76145
  });
76106
76146
  }
76107
76147
  }
@@ -76117,7 +76157,7 @@ var require_sync = __commonJS({
76117
76157
  var Minimatch = minimatch.Minimatch;
76118
76158
  var Glob = require_glob().Glob;
76119
76159
  var util = __require("util");
76120
- var path6 = __require("path");
76160
+ var path7 = __require("path");
76121
76161
  var assert = __require("assert");
76122
76162
  var isAbsolute2 = require_path_is_absolute();
76123
76163
  var common = require_common2();
@@ -76245,7 +76285,7 @@ var require_sync = __commonJS({
76245
76285
  e2 = prefix + e2;
76246
76286
  }
76247
76287
  if (e2.charAt(0) === "/" && !this.nomount) {
76248
- e2 = path6.join(this.root, e2);
76288
+ e2 = path7.join(this.root, e2);
76249
76289
  }
76250
76290
  this._emitMatch(index, e2);
76251
76291
  }
@@ -76394,9 +76434,9 @@ var require_sync = __commonJS({
76394
76434
  if (prefix && isAbsolute2(prefix) && !this.nomount) {
76395
76435
  var trail = /[\/\\]$/.test(prefix);
76396
76436
  if (prefix.charAt(0) === "/") {
76397
- prefix = path6.join(this.root, prefix);
76437
+ prefix = path7.join(this.root, prefix);
76398
76438
  } else {
76399
- prefix = path6.resolve(this.root, prefix);
76439
+ prefix = path7.resolve(this.root, prefix);
76400
76440
  if (trail)
76401
76441
  prefix += "/";
76402
76442
  }
@@ -76591,7 +76631,7 @@ var require_glob = __commonJS({
76591
76631
  var Minimatch = minimatch.Minimatch;
76592
76632
  var inherits2 = require_inherits();
76593
76633
  var EE = __require("events").EventEmitter;
76594
- var path6 = __require("path");
76634
+ var path7 = __require("path");
76595
76635
  var assert = __require("assert");
76596
76636
  var isAbsolute2 = require_path_is_absolute();
76597
76637
  var globSync = require_sync();
@@ -76874,7 +76914,7 @@ var require_glob = __commonJS({
76874
76914
  e2 = prefix + e2;
76875
76915
  }
76876
76916
  if (e2.charAt(0) === "/" && !this.nomount) {
76877
- e2 = path6.join(this.root, e2);
76917
+ e2 = path7.join(this.root, e2);
76878
76918
  }
76879
76919
  this._emitMatch(index, e2);
76880
76920
  }
@@ -77061,9 +77101,9 @@ var require_glob = __commonJS({
77061
77101
  if (prefix && isAbsolute2(prefix) && !this.nomount) {
77062
77102
  var trail = /[\/\\]$/.test(prefix);
77063
77103
  if (prefix.charAt(0) === "/") {
77064
- prefix = path6.join(this.root, prefix);
77104
+ prefix = path7.join(this.root, prefix);
77065
77105
  } else {
77066
- prefix = path6.resolve(this.root, prefix);
77106
+ prefix = path7.resolve(this.root, prefix);
77067
77107
  if (trail)
77068
77108
  prefix += "/";
77069
77109
  }
@@ -77141,7 +77181,7 @@ var require_glob = __commonJS({
77141
77181
  var require_file = __commonJS({
77142
77182
  "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js"(exports2, module2) {
77143
77183
  var fs9 = require_graceful_fs();
77144
- var path6 = __require("path");
77184
+ var path7 = __require("path");
77145
77185
  var flatten = require_lodash10();
77146
77186
  var difference = require_lodash11();
77147
77187
  var union = require_lodash12();
@@ -77166,7 +77206,7 @@ var require_file = __commonJS({
77166
77206
  return result;
77167
77207
  };
77168
77208
  file.exists = function() {
77169
- var filepath = path6.join.apply(path6, arguments);
77209
+ var filepath = path7.join.apply(path7, arguments);
77170
77210
  return fs9.existsSync(filepath);
77171
77211
  };
77172
77212
  file.expand = function(...args) {
@@ -77180,7 +77220,7 @@ var require_file = __commonJS({
77180
77220
  });
77181
77221
  if (options.filter) {
77182
77222
  matches = matches.filter(function(filepath) {
77183
- filepath = path6.join(options.cwd || "", filepath);
77223
+ filepath = path7.join(options.cwd || "", filepath);
77184
77224
  try {
77185
77225
  if (typeof options.filter === "function") {
77186
77226
  return options.filter(filepath);
@@ -77197,7 +77237,7 @@ var require_file = __commonJS({
77197
77237
  file.expandMapping = function(patterns, destBase, options) {
77198
77238
  options = Object.assign({
77199
77239
  rename: function(destBase2, destPath) {
77200
- return path6.join(destBase2 || "", destPath);
77240
+ return path7.join(destBase2 || "", destPath);
77201
77241
  }
77202
77242
  }, options);
77203
77243
  var files = [];
@@ -77205,14 +77245,14 @@ var require_file = __commonJS({
77205
77245
  file.expand(options, patterns).forEach(function(src) {
77206
77246
  var destPath = src;
77207
77247
  if (options.flatten) {
77208
- destPath = path6.basename(destPath);
77248
+ destPath = path7.basename(destPath);
77209
77249
  }
77210
77250
  if (options.ext) {
77211
77251
  destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
77212
77252
  }
77213
77253
  var dest = options.rename(destBase, destPath, options);
77214
77254
  if (options.cwd) {
77215
- src = path6.join(options.cwd, src);
77255
+ src = path7.join(options.cwd, src);
77216
77256
  }
77217
77257
  dest = dest.replace(pathSeparatorRe, "/");
77218
77258
  src = src.replace(pathSeparatorRe, "/");
@@ -77294,7 +77334,7 @@ var require_file = __commonJS({
77294
77334
  var require_archiver_utils = __commonJS({
77295
77335
  "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js"(exports2, module2) {
77296
77336
  var fs9 = require_graceful_fs();
77297
- var path6 = __require("path");
77337
+ var path7 = __require("path");
77298
77338
  var nutil = __require("util");
77299
77339
  var lazystream = require_lazystream();
77300
77340
  var normalizePath = require_normalize_path();
@@ -77384,11 +77424,11 @@ var require_archiver_utils = __commonJS({
77384
77424
  if (!file) {
77385
77425
  return callback(null, results);
77386
77426
  }
77387
- filepath = path6.join(dirpath, file);
77427
+ filepath = path7.join(dirpath, file);
77388
77428
  fs9.stat(filepath, function(err2, stats) {
77389
77429
  results.push({
77390
77430
  path: filepath,
77391
- relative: path6.relative(base, filepath).replace(/\\/g, "/"),
77431
+ relative: path7.relative(base, filepath).replace(/\\/g, "/"),
77392
77432
  stats
77393
77433
  });
77394
77434
  if (stats && stats.isDirectory()) {
@@ -77447,7 +77487,7 @@ var require_core = __commonJS({
77447
77487
  var fs9 = __require("fs");
77448
77488
  var glob = require_readdir_glob();
77449
77489
  var async = require_async();
77450
- var path6 = __require("path");
77490
+ var path7 = __require("path");
77451
77491
  var util = require_archiver_utils();
77452
77492
  var inherits2 = __require("util").inherits;
77453
77493
  var ArchiverError = require_error2();
@@ -77723,9 +77763,9 @@ var require_core = __commonJS({
77723
77763
  task.source = Buffer.concat([]);
77724
77764
  } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
77725
77765
  var linkPath = fs9.readlinkSync(task.filepath);
77726
- var dirName = path6.dirname(task.filepath);
77766
+ var dirName = path7.dirname(task.filepath);
77727
77767
  task.data.type = "symlink";
77728
- task.data.linkname = path6.relative(dirName, path6.resolve(dirName, linkPath));
77768
+ task.data.linkname = path7.relative(dirName, path7.resolve(dirName, linkPath));
77729
77769
  task.data.sourceType = "buffer";
77730
77770
  task.source = Buffer.concat([]);
77731
77771
  } else {
@@ -79349,7 +79389,7 @@ var require_compress_commons = __commonJS({
79349
79389
  var require_file2 = __commonJS({
79350
79390
  "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js"(exports2, module2) {
79351
79391
  var fs9 = require_graceful_fs();
79352
- var path6 = __require("path");
79392
+ var path7 = __require("path");
79353
79393
  var flatten = require_lodash10();
79354
79394
  var difference = require_lodash11();
79355
79395
  var union = require_lodash12();
@@ -79374,7 +79414,7 @@ var require_file2 = __commonJS({
79374
79414
  return result;
79375
79415
  };
79376
79416
  file.exists = function() {
79377
- var filepath = path6.join.apply(path6, arguments);
79417
+ var filepath = path7.join.apply(path7, arguments);
79378
79418
  return fs9.existsSync(filepath);
79379
79419
  };
79380
79420
  file.expand = function(...args) {
@@ -79388,7 +79428,7 @@ var require_file2 = __commonJS({
79388
79428
  });
79389
79429
  if (options.filter) {
79390
79430
  matches = matches.filter(function(filepath) {
79391
- filepath = path6.join(options.cwd || "", filepath);
79431
+ filepath = path7.join(options.cwd || "", filepath);
79392
79432
  try {
79393
79433
  if (typeof options.filter === "function") {
79394
79434
  return options.filter(filepath);
@@ -79405,7 +79445,7 @@ var require_file2 = __commonJS({
79405
79445
  file.expandMapping = function(patterns, destBase, options) {
79406
79446
  options = Object.assign({
79407
79447
  rename: function(destBase2, destPath) {
79408
- return path6.join(destBase2 || "", destPath);
79448
+ return path7.join(destBase2 || "", destPath);
79409
79449
  }
79410
79450
  }, options);
79411
79451
  var files = [];
@@ -79413,14 +79453,14 @@ var require_file2 = __commonJS({
79413
79453
  file.expand(options, patterns).forEach(function(src) {
79414
79454
  var destPath = src;
79415
79455
  if (options.flatten) {
79416
- destPath = path6.basename(destPath);
79456
+ destPath = path7.basename(destPath);
79417
79457
  }
79418
79458
  if (options.ext) {
79419
79459
  destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
79420
79460
  }
79421
79461
  var dest = options.rename(destBase, destPath, options);
79422
79462
  if (options.cwd) {
79423
- src = path6.join(options.cwd, src);
79463
+ src = path7.join(options.cwd, src);
79424
79464
  }
79425
79465
  dest = dest.replace(pathSeparatorRe, "/");
79426
79466
  src = src.replace(pathSeparatorRe, "/");
@@ -79502,7 +79542,7 @@ var require_file2 = __commonJS({
79502
79542
  var require_archiver_utils2 = __commonJS({
79503
79543
  "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js"(exports2, module2) {
79504
79544
  var fs9 = require_graceful_fs();
79505
- var path6 = __require("path");
79545
+ var path7 = __require("path");
79506
79546
  var lazystream = require_lazystream();
79507
79547
  var normalizePath = require_normalize_path();
79508
79548
  var defaults = require_lodash9();
@@ -79589,11 +79629,11 @@ var require_archiver_utils2 = __commonJS({
79589
79629
  if (!file) {
79590
79630
  return callback(null, results);
79591
79631
  }
79592
- filepath = path6.join(dirpath, file);
79632
+ filepath = path7.join(dirpath, file);
79593
79633
  fs9.stat(filepath, function(err2, stats) {
79594
79634
  results.push({
79595
79635
  path: filepath,
79596
- relative: path6.relative(base, filepath).replace(/\\/g, "/"),
79636
+ relative: path7.relative(base, filepath).replace(/\\/g, "/"),
79597
79637
  stats
79598
79638
  });
79599
79639
  if (stats && stats.isDirectory()) {
@@ -81981,9 +82021,9 @@ var require_workbook_writer = __commonJS({
81981
82021
  get definedNames() {
81982
82022
  return this._definedNames;
81983
82023
  }
81984
- _openStream(path6) {
82024
+ _openStream(path7) {
81985
82025
  const stream = new StreamBuf({ bufSize: 65536, batch: true });
81986
- this.zip.append(stream, { name: path6 });
82026
+ this.zip.append(stream, { name: path7 });
81987
82027
  stream.on("finish", () => {
81988
82028
  stream.emit("zipped");
81989
82029
  });
@@ -82001,9 +82041,9 @@ var require_workbook_writer = __commonJS({
82001
82041
  }
82002
82042
  return Promise.resolve();
82003
82043
  };
82004
- const promises = this._worksheets.map(commitWorksheet);
82005
- if (promises.length) {
82006
- return Promise.all(promises);
82044
+ const promises2 = this._worksheets.map(commitWorksheet);
82045
+ if (promises2.length) {
82046
+ return Promise.all(promises2);
82007
82047
  }
82008
82048
  return Promise.resolve();
82009
82049
  }
@@ -82475,7 +82515,7 @@ var require_traverse = __commonJS({
82475
82515
  }(this.value);
82476
82516
  };
82477
82517
  function walk(root, cb, immutable) {
82478
- var path6 = [];
82518
+ var path7 = [];
82479
82519
  var parents = [];
82480
82520
  var alive = true;
82481
82521
  return function walker(node_) {
@@ -82484,11 +82524,11 @@ var require_traverse = __commonJS({
82484
82524
  var state = {
82485
82525
  node,
82486
82526
  node_,
82487
- path: [].concat(path6),
82527
+ path: [].concat(path7),
82488
82528
  parent: parents.slice(-1)[0],
82489
- key: path6.slice(-1)[0],
82490
- isRoot: path6.length === 0,
82491
- level: path6.length,
82529
+ key: path7.slice(-1)[0],
82530
+ isRoot: path7.length === 0,
82531
+ level: path7.length,
82492
82532
  circular: null,
82493
82533
  update: function(x2) {
82494
82534
  if (!state.isRoot) {
@@ -82546,7 +82586,7 @@ var require_traverse = __commonJS({
82546
82586
  parents.push(state);
82547
82587
  var keys = Object.keys(state.node);
82548
82588
  keys.forEach(function(key, i3) {
82549
- path6.push(key);
82589
+ path7.push(key);
82550
82590
  if (modifiers.pre)
82551
82591
  modifiers.pre.call(state, state.node[key], key);
82552
82592
  var child = walker(state.node[key]);
@@ -82557,7 +82597,7 @@ var require_traverse = __commonJS({
82557
82597
  child.isFirst = i3 == 0;
82558
82598
  if (modifiers.post)
82559
82599
  modifiers.post.call(state, child);
82560
- path6.pop();
82600
+ path7.pop();
82561
82601
  });
82562
82602
  parents.pop();
82563
82603
  }
@@ -86084,8 +86124,8 @@ var require_map = __commonJS({
86084
86124
  var tryCatch2 = util.tryCatch;
86085
86125
  var errorObj2 = util.errorObj;
86086
86126
  var async = Promise2._async;
86087
- function MappingPromiseArray(promises, fn, limit, _filter) {
86088
- this.constructor$(promises);
86127
+ function MappingPromiseArray(promises2, fn, limit, _filter) {
86128
+ this.constructor$(promises2);
86089
86129
  this._promise._captureStackTrace();
86090
86130
  var domain = getDomain();
86091
86131
  this._callback = domain === null ? fn : util.domainBind(domain, fn);
@@ -86198,7 +86238,7 @@ var require_map = __commonJS({
86198
86238
  MappingPromiseArray.prototype.preservedValues = function() {
86199
86239
  return this._preservedValues;
86200
86240
  };
86201
- function map(promises, fn, options, _filter) {
86241
+ function map(promises2, fn, options, _filter) {
86202
86242
  if (typeof fn !== "function") {
86203
86243
  return apiRejection("expecting a function but got " + util.classString(fn));
86204
86244
  }
@@ -86218,13 +86258,13 @@ var require_map = __commonJS({
86218
86258
  }
86219
86259
  }
86220
86260
  limit = typeof limit === "number" && isFinite(limit) && limit >= 1 ? limit : 0;
86221
- return new MappingPromiseArray(promises, fn, limit, _filter).promise();
86261
+ return new MappingPromiseArray(promises2, fn, limit, _filter).promise();
86222
86262
  }
86223
86263
  Promise2.prototype.map = function(fn, options) {
86224
86264
  return map(this, fn, options, null);
86225
86265
  };
86226
- Promise2.map = function(promises, fn, options, _filter) {
86227
- return map(promises, fn, options, _filter);
86266
+ Promise2.map = function(promises2, fn, options, _filter) {
86267
+ return map(promises2, fn, options, _filter);
86228
86268
  };
86229
86269
  };
86230
86270
  }
@@ -87296,9 +87336,9 @@ var require_props = __commonJS({
87296
87336
  PropertiesPromiseArray.prototype.getActualLength = function(len) {
87297
87337
  return len >> 1;
87298
87338
  };
87299
- function props(promises) {
87339
+ function props(promises2) {
87300
87340
  var ret2;
87301
- var castValue = tryConvertToPromise(promises);
87341
+ var castValue = tryConvertToPromise(promises2);
87302
87342
  if (!isObject2(castValue)) {
87303
87343
  return apiRejection("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n");
87304
87344
  } else if (castValue instanceof Promise2) {
@@ -87320,8 +87360,8 @@ var require_props = __commonJS({
87320
87360
  Promise2.prototype.props = function() {
87321
87361
  return props(this);
87322
87362
  };
87323
- Promise2.props = function(promises) {
87324
- return props(promises);
87363
+ Promise2.props = function(promises2) {
87364
+ return props(promises2);
87325
87365
  };
87326
87366
  };
87327
87367
  }
@@ -87338,14 +87378,14 @@ var require_race = __commonJS({
87338
87378
  return race(array, promise);
87339
87379
  });
87340
87380
  };
87341
- function race(promises, parent) {
87342
- var maybePromise = tryConvertToPromise(promises);
87381
+ function race(promises2, parent) {
87382
+ var maybePromise = tryConvertToPromise(promises2);
87343
87383
  if (maybePromise instanceof Promise2) {
87344
87384
  return raceLater(maybePromise);
87345
87385
  } else {
87346
- promises = util.asArray(promises);
87347
- if (promises === null)
87348
- return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
87386
+ promises2 = util.asArray(promises2);
87387
+ if (promises2 === null)
87388
+ return apiRejection("expecting an array or an iterable object but got " + util.classString(promises2));
87349
87389
  }
87350
87390
  var ret2 = new Promise2(INTERNAL);
87351
87391
  if (parent !== void 0) {
@@ -87353,17 +87393,17 @@ var require_race = __commonJS({
87353
87393
  }
87354
87394
  var fulfill = ret2._fulfill;
87355
87395
  var reject = ret2._reject;
87356
- for (var i2 = 0, len = promises.length; i2 < len; ++i2) {
87357
- var val = promises[i2];
87358
- if (val === void 0 && !(i2 in promises)) {
87396
+ for (var i2 = 0, len = promises2.length; i2 < len; ++i2) {
87397
+ var val = promises2[i2];
87398
+ if (val === void 0 && !(i2 in promises2)) {
87359
87399
  continue;
87360
87400
  }
87361
87401
  Promise2.cast(val)._then(fulfill, reject, void 0, ret2, null);
87362
87402
  }
87363
87403
  return ret2;
87364
87404
  }
87365
- Promise2.race = function(promises) {
87366
- return race(promises, void 0);
87405
+ Promise2.race = function(promises2) {
87406
+ return race(promises2, void 0);
87367
87407
  };
87368
87408
  Promise2.prototype.race = function() {
87369
87409
  return race(this, void 0);
@@ -87380,8 +87420,8 @@ var require_reduce = __commonJS({
87380
87420
  var getDomain = Promise2._getDomain;
87381
87421
  var util = require_util4();
87382
87422
  var tryCatch2 = util.tryCatch;
87383
- function ReductionPromiseArray(promises, fn, initialValue, _each) {
87384
- this.constructor$(promises);
87423
+ function ReductionPromiseArray(promises2, fn, initialValue, _each) {
87424
+ this.constructor$(promises2);
87385
87425
  var domain = getDomain();
87386
87426
  this._fn = domain === null ? fn : util.domainBind(domain, fn);
87387
87427
  if (initialValue !== void 0) {
@@ -87470,8 +87510,8 @@ var require_reduce = __commonJS({
87470
87510
  Promise2.prototype.reduce = function(fn, initialValue) {
87471
87511
  return reduce(this, fn, initialValue, null);
87472
87512
  };
87473
- Promise2.reduce = function(promises, fn, initialValue, _each) {
87474
- return reduce(promises, fn, initialValue, _each);
87513
+ Promise2.reduce = function(promises2, fn, initialValue, _each) {
87514
+ return reduce(promises2, fn, initialValue, _each);
87475
87515
  };
87476
87516
  function completed(valueOrReason, array) {
87477
87517
  if (this.isFulfilled()) {
@@ -87480,11 +87520,11 @@ var require_reduce = __commonJS({
87480
87520
  array._reject(valueOrReason);
87481
87521
  }
87482
87522
  }
87483
- function reduce(promises, fn, initialValue, _each) {
87523
+ function reduce(promises2, fn, initialValue, _each) {
87484
87524
  if (typeof fn !== "function") {
87485
87525
  return apiRejection("expecting a function but got " + util.classString(fn));
87486
87526
  }
87487
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
87527
+ var array = new ReductionPromiseArray(promises2, fn, initialValue, _each);
87488
87528
  return array.promise();
87489
87529
  }
87490
87530
  function gotAccum(accum) {
@@ -87563,9 +87603,9 @@ var require_settle = __commonJS({
87563
87603
  ret2._settledValueField = reason;
87564
87604
  return this._promiseResolved(index, ret2);
87565
87605
  };
87566
- Promise2.settle = function(promises) {
87606
+ Promise2.settle = function(promises2) {
87567
87607
  debug.deprecated(".settle()", ".reflect()");
87568
- return new SettledPromiseArray(promises).promise();
87608
+ return new SettledPromiseArray(promises2).promise();
87569
87609
  };
87570
87610
  Promise2.prototype.settle = function() {
87571
87611
  return Promise2.settle(this);
@@ -87681,18 +87721,18 @@ var require_some = __commonJS({
87681
87721
  SomePromiseArray.prototype._resolveEmptyArray = function() {
87682
87722
  this._reject(this._getRangeError(0));
87683
87723
  };
87684
- function some(promises, howMany) {
87724
+ function some(promises2, howMany) {
87685
87725
  if ((howMany | 0) !== howMany || howMany < 0) {
87686
87726
  return apiRejection("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");
87687
87727
  }
87688
- var ret2 = new SomePromiseArray(promises);
87728
+ var ret2 = new SomePromiseArray(promises2);
87689
87729
  var promise = ret2.promise();
87690
87730
  ret2.setHowMany(howMany);
87691
87731
  ret2.init();
87692
87732
  return promise;
87693
87733
  }
87694
- Promise2.some = function(promises, howMany) {
87695
- return some(promises, howMany);
87734
+ Promise2.some = function(promises2, howMany) {
87735
+ return some(promises2, howMany);
87696
87736
  };
87697
87737
  Promise2.prototype.some = function(howMany) {
87698
87738
  return some(this, howMany);
@@ -87711,8 +87751,8 @@ var require_filter = __commonJS({
87711
87751
  Promise2.prototype.filter = function(fn, options) {
87712
87752
  return PromiseMap(this, fn, options, INTERNAL);
87713
87753
  };
87714
- Promise2.filter = function(promises, fn, options) {
87715
- return PromiseMap(promises, fn, options, INTERNAL);
87754
+ Promise2.filter = function(promises2, fn, options) {
87755
+ return PromiseMap(promises2, fn, options, INTERNAL);
87716
87756
  };
87717
87757
  };
87718
87758
  }
@@ -87728,8 +87768,8 @@ var require_each = __commonJS({
87728
87768
  function promiseAllThis() {
87729
87769
  return PromiseAll(this);
87730
87770
  }
87731
- function PromiseMapSeries(promises, fn) {
87732
- return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
87771
+ function PromiseMapSeries(promises2, fn) {
87772
+ return PromiseReduce(promises2, fn, INTERNAL, INTERNAL);
87733
87773
  }
87734
87774
  Promise2.prototype.each = function(fn) {
87735
87775
  return PromiseReduce(this, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, this, void 0);
@@ -87737,8 +87777,8 @@ var require_each = __commonJS({
87737
87777
  Promise2.prototype.mapSeries = function(fn) {
87738
87778
  return PromiseReduce(this, fn, INTERNAL, INTERNAL);
87739
87779
  };
87740
- Promise2.each = function(promises, fn) {
87741
- return PromiseReduce(promises, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, promises, void 0);
87780
+ Promise2.each = function(promises2, fn) {
87781
+ return PromiseReduce(promises2, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, promises2, void 0);
87742
87782
  };
87743
87783
  Promise2.mapSeries = PromiseMapSeries;
87744
87784
  };
@@ -87751,16 +87791,16 @@ var require_any = __commonJS({
87751
87791
  "use strict";
87752
87792
  module2.exports = function(Promise2) {
87753
87793
  var SomePromiseArray = Promise2._SomePromiseArray;
87754
- function any(promises) {
87755
- var ret2 = new SomePromiseArray(promises);
87794
+ function any(promises2) {
87795
+ var ret2 = new SomePromiseArray(promises2);
87756
87796
  var promise = ret2.promise();
87757
87797
  ret2.setHowMany(1);
87758
87798
  ret2.setUnwrap();
87759
87799
  ret2.init();
87760
87800
  return promise;
87761
87801
  }
87762
- Promise2.any = function(promises) {
87763
- return any(promises);
87802
+ Promise2.any = function(promises2) {
87803
+ return any(promises2);
87764
87804
  };
87765
87805
  Promise2.prototype.any = function() {
87766
87806
  return any(this);
@@ -87946,8 +87986,8 @@ var require_promise = __commonJS({
87946
87986
  ret2._setAsyncGuaranteed();
87947
87987
  return ret2;
87948
87988
  };
87949
- Promise2.all = function(promises) {
87950
- return new PromiseArray(promises).promise();
87989
+ Promise2.all = function(promises2) {
87990
+ return new PromiseArray(promises2).promise();
87951
87991
  };
87952
87992
  Promise2.cast = function(obj2) {
87953
87993
  var ret2 = tryConvertToPromise(obj2);
@@ -89186,7 +89226,7 @@ var require_dir_reader = __commonJS({
89186
89226
  module2.exports = DirReader;
89187
89227
  var fs9 = require_graceful_fs();
89188
89228
  var inherits2 = require_inherits();
89189
- var path6 = __require("path");
89229
+ var path7 = __require("path");
89190
89230
  var Reader = require_reader();
89191
89231
  var assert = __require("assert").ok;
89192
89232
  inherits2(DirReader, Reader);
@@ -89246,7 +89286,7 @@ var require_dir_reader = __commonJS({
89246
89286
  }
89247
89287
  return;
89248
89288
  }
89249
- var p = path6.resolve(self2._path, self2.entries[self2._index]);
89289
+ var p = path7.resolve(self2._path, self2.entries[self2._index]);
89250
89290
  assert(p !== self2._path);
89251
89291
  assert(self2.entries[self2._index]);
89252
89292
  self2._currentEntry = p;
@@ -89255,12 +89295,12 @@ var require_dir_reader = __commonJS({
89255
89295
  return self2.error(er);
89256
89296
  var who = self2._proxy || self2;
89257
89297
  stat2.path = p;
89258
- stat2.basename = path6.basename(p);
89259
- stat2.dirname = path6.dirname(p);
89298
+ stat2.basename = path7.basename(p);
89299
+ stat2.dirname = path7.dirname(p);
89260
89300
  var childProps = self2.getChildProps.call(who, stat2);
89261
89301
  childProps.path = p;
89262
- childProps.basename = path6.basename(p);
89263
- childProps.dirname = path6.dirname(p);
89302
+ childProps.basename = path7.basename(p);
89303
+ childProps.dirname = path7.dirname(p);
89264
89304
  var entry = Reader(childProps, stat2);
89265
89305
  self2._currentEntry = entry;
89266
89306
  entry.on("pause", function(who2) {
@@ -89610,7 +89650,7 @@ var require_reader = __commonJS({
89610
89650
  var fs9 = require_graceful_fs();
89611
89651
  var Stream4 = __require("stream").Stream;
89612
89652
  var inherits2 = require_inherits();
89613
- var path6 = __require("path");
89653
+ var path7 = __require("path");
89614
89654
  var getType = require_get_type();
89615
89655
  var hardLinks = Reader.hardLinks = {};
89616
89656
  var Abstract = require_abstract();
@@ -89669,7 +89709,7 @@ var require_reader = __commonJS({
89669
89709
  self2.depth = props.depth = props.depth || 0;
89670
89710
  self2.parent = props.parent || null;
89671
89711
  self2.root = props.root || props.parent && props.parent.root || self2;
89672
- self2._path = self2.path = path6.resolve(props.path);
89712
+ self2._path = self2.path = path7.resolve(props.path);
89673
89713
  if (process.platform === "win32") {
89674
89714
  self2.path = self2._path = self2.path.replace(/\?/g, "_");
89675
89715
  if (self2._path.length >= 260) {
@@ -89677,8 +89717,8 @@ var require_reader = __commonJS({
89677
89717
  self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\");
89678
89718
  }
89679
89719
  }
89680
- self2.basename = props.basename = path6.basename(self2.path);
89681
- self2.dirname = props.dirname = path6.dirname(self2.path);
89720
+ self2.basename = props.basename = path7.basename(self2.path);
89721
+ self2.dirname = props.dirname = path7.dirname(self2.path);
89682
89722
  props.parent = props.root = null;
89683
89723
  self2.size = props.size;
89684
89724
  self2.filter = typeof props.filter === "function" ? props.filter : null;
@@ -89794,7 +89834,7 @@ var require_rimraf = __commonJS({
89794
89834
  module2.exports = rimraf;
89795
89835
  rimraf.sync = rimrafSync;
89796
89836
  var assert = __require("assert");
89797
- var path6 = __require("path");
89837
+ var path7 = __require("path");
89798
89838
  var fs9 = __require("fs");
89799
89839
  var glob = void 0;
89800
89840
  try {
@@ -89986,7 +90026,7 @@ var require_rimraf = __commonJS({
89986
90026
  return options.rmdir(p, cb);
89987
90027
  var errState;
89988
90028
  files.forEach(function(f3) {
89989
- rimraf(path6.join(p, f3), options, function(er2) {
90029
+ rimraf(path7.join(p, f3), options, function(er2) {
89990
90030
  if (errState)
89991
90031
  return;
89992
90032
  if (er2)
@@ -90063,7 +90103,7 @@ var require_rimraf = __commonJS({
90063
90103
  assert(p);
90064
90104
  assert(options);
90065
90105
  options.readdirSync(p).forEach(function(f3) {
90066
- rimrafSync(path6.join(p, f3), options);
90106
+ rimrafSync(path7.join(p, f3), options);
90067
90107
  });
90068
90108
  var retries = isWindows3 ? 100 : 1;
90069
90109
  var i2 = 0;
@@ -90085,7 +90125,7 @@ var require_rimraf = __commonJS({
90085
90125
  // ../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js
90086
90126
  var require_mkdirp = __commonJS({
90087
90127
  "../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js"(exports2, module2) {
90088
- var path6 = __require("path");
90128
+ var path7 = __require("path");
90089
90129
  var fs9 = __require("fs");
90090
90130
  var _0777 = parseInt("0777", 8);
90091
90131
  module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
@@ -90106,7 +90146,7 @@ var require_mkdirp = __commonJS({
90106
90146
  var cb = f3 || /* istanbul ignore next */
90107
90147
  function() {
90108
90148
  };
90109
- p = path6.resolve(p);
90149
+ p = path7.resolve(p);
90110
90150
  xfs.mkdir(p, mode, function(er) {
90111
90151
  if (!er) {
90112
90152
  made = made || p;
@@ -90114,9 +90154,9 @@ var require_mkdirp = __commonJS({
90114
90154
  }
90115
90155
  switch (er.code) {
90116
90156
  case "ENOENT":
90117
- if (path6.dirname(p) === p)
90157
+ if (path7.dirname(p) === p)
90118
90158
  return cb(er);
90119
- mkdirP(path6.dirname(p), opts, function(er2, made2) {
90159
+ mkdirP(path7.dirname(p), opts, function(er2, made2) {
90120
90160
  if (er2)
90121
90161
  cb(er2, made2);
90122
90162
  else
@@ -90145,14 +90185,14 @@ var require_mkdirp = __commonJS({
90145
90185
  }
90146
90186
  if (!made)
90147
90187
  made = null;
90148
- p = path6.resolve(p);
90188
+ p = path7.resolve(p);
90149
90189
  try {
90150
90190
  xfs.mkdirSync(p, mode);
90151
90191
  made = made || p;
90152
90192
  } catch (err0) {
90153
90193
  switch (err0.code) {
90154
90194
  case "ENOENT":
90155
- made = sync(path6.dirname(p), opts, made);
90195
+ made = sync(path7.dirname(p), opts, made);
90156
90196
  sync(p, opts, made);
90157
90197
  break;
90158
90198
  default:
@@ -90245,7 +90285,7 @@ var require_dir_writer = __commonJS({
90245
90285
  var Writer = require_writer();
90246
90286
  var inherits2 = require_inherits();
90247
90287
  var mkdir = require_mkdirp();
90248
- var path6 = __require("path");
90288
+ var path7 = __require("path");
90249
90289
  var collect = require_collect();
90250
90290
  inherits2(DirWriter, Writer);
90251
90291
  function DirWriter(props) {
@@ -90324,7 +90364,7 @@ var require_dir_writer = __commonJS({
90324
90364
  if (entry.parent) {
90325
90365
  pp = pp.substr(entry.parent._path.length + 1);
90326
90366
  }
90327
- props.path = path6.join(self2.path, path6.join("/", pp));
90367
+ props.path = path7.join(self2.path, path7.join("/", pp));
90328
90368
  props.filter = self2.filter;
90329
90369
  Object.keys(entry.props).forEach(function(k) {
90330
90370
  if (!props.hasOwnProperty(k)) {
@@ -90366,7 +90406,7 @@ var require_link_writer = __commonJS({
90366
90406
  var fs9 = require_graceful_fs();
90367
90407
  var Writer = require_writer();
90368
90408
  var inherits2 = require_inherits();
90369
- var path6 = __require("path");
90409
+ var path7 = __require("path");
90370
90410
  var rimraf = require_rimraf();
90371
90411
  inherits2(LinkWriter, Writer);
90372
90412
  function LinkWriter(props) {
@@ -90388,7 +90428,7 @@ var require_link_writer = __commonJS({
90388
90428
  var self2 = this;
90389
90429
  var hard = self2.type === "Link" || process.platform === "win32";
90390
90430
  var link2 = hard ? "link" : "symlink";
90391
- var lp = hard ? path6.resolve(self2.dirname, self2.linkpath) : self2.linkpath;
90431
+ var lp = hard ? path7.resolve(self2.dirname, self2.linkpath) : self2.linkpath;
90392
90432
  if (hard)
90393
90433
  return clobber(self2, lp, link2);
90394
90434
  fs9.readlink(self2._path, function(er, p) {
@@ -90624,7 +90664,7 @@ var require_writer = __commonJS({
90624
90664
  var inherits2 = require_inherits();
90625
90665
  var rimraf = require_rimraf();
90626
90666
  var mkdir = require_mkdirp();
90627
- var path6 = __require("path");
90667
+ var path7 = __require("path");
90628
90668
  var umask = process.platform === "win32" ? 0 : process.umask();
90629
90669
  var getType = require_get_type();
90630
90670
  var Abstract = require_abstract();
@@ -90669,7 +90709,7 @@ var require_writer = __commonJS({
90669
90709
  self2.clobber = props.clobber === false ? props.clobber : true;
90670
90710
  self2.parent = props.parent || null;
90671
90711
  self2.root = props.root || props.parent && props.parent.root || self2;
90672
- self2._path = self2.path = path6.resolve(props.path);
90712
+ self2._path = self2.path = path7.resolve(props.path);
90673
90713
  if (process.platform === "win32") {
90674
90714
  self2.path = self2._path = self2.path.replace(/\?/g, "_");
90675
90715
  if (self2._path.length >= 260) {
@@ -90677,8 +90717,8 @@ var require_writer = __commonJS({
90677
90717
  self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\");
90678
90718
  }
90679
90719
  }
90680
- self2.basename = path6.basename(props.path);
90681
- self2.dirname = path6.dirname(props.path);
90720
+ self2.basename = path7.basename(props.path);
90721
+ self2.dirname = path7.dirname(props.path);
90682
90722
  self2.linkpath = props.linkpath || null;
90683
90723
  props.parent = props.root = null;
90684
90724
  self2.size = props.size;
@@ -90734,14 +90774,14 @@ var require_writer = __commonJS({
90734
90774
  }
90735
90775
  };
90736
90776
  function create3(self2) {
90737
- mkdir(path6.dirname(self2._path), Writer.dirmode, function(er, made) {
90777
+ mkdir(path7.dirname(self2._path), Writer.dirmode, function(er, made) {
90738
90778
  if (er)
90739
90779
  return self2.error(er);
90740
90780
  self2._madeDir = made;
90741
90781
  return self2._create();
90742
90782
  });
90743
90783
  }
90744
- function endChmod(self2, want, current, path7, cb) {
90784
+ function endChmod(self2, want, current, path8, cb) {
90745
90785
  var wantMode = want.mode;
90746
90786
  var chmod = want.follow || self2.type !== "SymbolicLink" ? "chmod" : "lchmod";
90747
90787
  if (!fs9[chmod])
@@ -90752,9 +90792,9 @@ var require_writer = __commonJS({
90752
90792
  wantMode = wantMode & parseInt("0777", 8);
90753
90793
  if (wantMode === curMode)
90754
90794
  return cb();
90755
- fs9[chmod](path7, wantMode, cb);
90795
+ fs9[chmod](path8, wantMode, cb);
90756
90796
  }
90757
- function endChown(self2, want, current, path7, cb) {
90797
+ function endChown(self2, want, current, path8, cb) {
90758
90798
  if (process.platform === "win32")
90759
90799
  return cb();
90760
90800
  if (!process.getuid || process.getuid() !== 0)
@@ -90770,9 +90810,9 @@ var require_writer = __commonJS({
90770
90810
  want.uid = current.uid;
90771
90811
  if (typeof want.gid !== "number")
90772
90812
  want.gid = current.gid;
90773
- fs9[chown](path7, want.uid, want.gid, cb);
90813
+ fs9[chown](path8, want.uid, want.gid, cb);
90774
90814
  }
90775
- function endUtimes(self2, want, current, path7, cb) {
90815
+ function endUtimes(self2, want, current, path8, cb) {
90776
90816
  if (!fs9.utimes || process.platform === "win32")
90777
90817
  return cb();
90778
90818
  var utimes = want.follow || self2.type !== "SymbolicLink" ? "utimes" : "lutimes";
@@ -90795,7 +90835,7 @@ var require_writer = __commonJS({
90795
90835
  meA = new Date(meM);
90796
90836
  if (meA.getTime() === curA.getTime() && meM.getTime() === curM.getTime())
90797
90837
  return cb();
90798
- fs9[utimes](path7, meA, meM, cb);
90838
+ fs9[utimes](path8, meA, meM, cb);
90799
90839
  }
90800
90840
  Writer.prototype._finish = function() {
90801
90841
  var self2 = this;
@@ -90864,7 +90904,7 @@ var require_writer = __commonJS({
90864
90904
  };
90865
90905
  function endMadeDir(self2, p, cb) {
90866
90906
  var made = self2._madeDir;
90867
- var d = path6.dirname(p);
90907
+ var d = path7.dirname(p);
90868
90908
  endMadeDir_(self2, d, function(er) {
90869
90909
  if (er)
90870
90910
  return cb(er);
@@ -90958,18 +90998,18 @@ var require_extract2 = __commonJS({
90958
90998
  module2.exports = Extract;
90959
90999
  var Parse = require_parse();
90960
91000
  var Writer = require_fstream().Writer;
90961
- var path6 = __require("path");
91001
+ var path7 = __require("path");
90962
91002
  var stream = __require("stream");
90963
91003
  var duplexer2 = require_duplexer2();
90964
91004
  var Promise2 = require_bluebird();
90965
91005
  function Extract(opts) {
90966
- opts.path = path6.resolve(path6.normalize(opts.path));
91006
+ opts.path = path7.resolve(path7.normalize(opts.path));
90967
91007
  var parser = new Parse(opts);
90968
91008
  var outStream = new stream.Writable({ objectMode: true });
90969
91009
  outStream._write = function(entry, encoding, cb) {
90970
91010
  if (entry.type == "Directory")
90971
91011
  return cb();
90972
- var extractPath = path6.join(opts.path, entry.path);
91012
+ var extractPath = path7.join(opts.path, entry.path);
90973
91013
  if (extractPath.indexOf(opts.path) != 0) {
90974
91014
  return cb();
90975
91015
  }
@@ -92507,7 +92547,7 @@ var require_directory = __commonJS({
92507
92547
  var BufferStream = require_BufferStream();
92508
92548
  var parseExtraField = require_parseExtraField();
92509
92549
  var Buffer4 = require_Buffer();
92510
- var path6 = __require("path");
92550
+ var path7 = __require("path");
92511
92551
  var Writer = require_fstream().Writer;
92512
92552
  var parseDateTime = require_parseDateTime();
92513
92553
  var signature = Buffer4.alloc(4);
@@ -92586,12 +92626,12 @@ var require_directory = __commonJS({
92586
92626
  vars.extract = function(opts) {
92587
92627
  if (!opts || !opts.path)
92588
92628
  throw new Error("PATH_MISSING");
92589
- opts.path = path6.resolve(path6.normalize(opts.path));
92629
+ opts.path = path7.resolve(path7.normalize(opts.path));
92590
92630
  return vars.files.then(function(files) {
92591
92631
  return Promise2.map(files, function(entry) {
92592
92632
  if (entry.type == "Directory")
92593
92633
  return;
92594
- var extractPath = path6.join(opts.path, entry.path);
92634
+ var extractPath = path7.join(opts.path, entry.path);
92595
92635
  if (extractPath.indexOf(opts.path) != 0) {
92596
92636
  return;
92597
92637
  }
@@ -92750,15 +92790,15 @@ var require_unzip2 = __commonJS({
92750
92790
  var require_tmp = __commonJS({
92751
92791
  "../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js"(exports2, module2) {
92752
92792
  var fs9 = __require("fs");
92753
- var os5 = __require("os");
92754
- var path6 = __require("path");
92793
+ var os6 = __require("os");
92794
+ var path7 = __require("path");
92755
92795
  var crypto5 = __require("crypto");
92756
- var _c = { fs: fs9.constants, os: os5.constants };
92796
+ var _c = { fs: fs9.constants, os: os6.constants };
92757
92797
  var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
92758
92798
  var TEMPLATE_PATTERN = /XXXXXX/;
92759
92799
  var DEFAULT_TRIES = 3;
92760
92800
  var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR);
92761
- var IS_WIN32 = os5.platform() === "win32";
92801
+ var IS_WIN32 = os6.platform() === "win32";
92762
92802
  var EBADF = _c.EBADF || _c.os.errno.EBADF;
92763
92803
  var ENOENT = _c.ENOENT || _c.os.errno.ENOENT;
92764
92804
  var DIR_MODE = 448;
@@ -92972,13 +93012,13 @@ var require_tmp = __commonJS({
92972
93012
  return [actualOptions, callback];
92973
93013
  }
92974
93014
  function _resolvePath(name, tmpDir, cb) {
92975
- const pathToResolve = path6.isAbsolute(name) ? name : path6.join(tmpDir, name);
93015
+ const pathToResolve = path7.isAbsolute(name) ? name : path7.join(tmpDir, name);
92976
93016
  fs9.stat(pathToResolve, function(err) {
92977
93017
  if (err) {
92978
- fs9.realpath(path6.dirname(pathToResolve), function(err2, parentDir) {
93018
+ fs9.realpath(path7.dirname(pathToResolve), function(err2, parentDir) {
92979
93019
  if (err2)
92980
93020
  return cb(err2);
92981
- cb(null, path6.join(parentDir, path6.basename(pathToResolve)));
93021
+ cb(null, path7.join(parentDir, path7.basename(pathToResolve)));
92982
93022
  });
92983
93023
  } else {
92984
93024
  fs9.realpath(pathToResolve, cb);
@@ -92986,22 +93026,22 @@ var require_tmp = __commonJS({
92986
93026
  });
92987
93027
  }
92988
93028
  function _resolvePathSync(name, tmpDir) {
92989
- const pathToResolve = path6.isAbsolute(name) ? name : path6.join(tmpDir, name);
93029
+ const pathToResolve = path7.isAbsolute(name) ? name : path7.join(tmpDir, name);
92990
93030
  try {
92991
93031
  fs9.statSync(pathToResolve);
92992
93032
  return fs9.realpathSync(pathToResolve);
92993
93033
  } catch (_err) {
92994
- const parentDir = fs9.realpathSync(path6.dirname(pathToResolve));
92995
- return path6.join(parentDir, path6.basename(pathToResolve));
93034
+ const parentDir = fs9.realpathSync(path7.dirname(pathToResolve));
93035
+ return path7.join(parentDir, path7.basename(pathToResolve));
92996
93036
  }
92997
93037
  }
92998
93038
  function _generateTmpName(opts) {
92999
93039
  const tmpDir = opts.tmpdir;
93000
93040
  if (!_isUndefined(opts.name)) {
93001
- return path6.join(tmpDir, opts.dir, opts.name);
93041
+ return path7.join(tmpDir, opts.dir, opts.name);
93002
93042
  }
93003
93043
  if (!_isUndefined(opts.template)) {
93004
- return path6.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
93044
+ return path7.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
93005
93045
  }
93006
93046
  const name = [
93007
93047
  opts.prefix ? opts.prefix : "tmp",
@@ -93011,7 +93051,7 @@ var require_tmp = __commonJS({
93011
93051
  _randomChars(12),
93012
93052
  opts.postfix ? "-" + opts.postfix : ""
93013
93053
  ].join("");
93014
- return path6.join(tmpDir, opts.dir, name);
93054
+ return path7.join(tmpDir, opts.dir, name);
93015
93055
  }
93016
93056
  function _assertPath(option, value) {
93017
93057
  if (typeof value !== "string") {
@@ -93025,9 +93065,9 @@ var require_tmp = __commonJS({
93025
93065
  function _assertOptionsBase(options) {
93026
93066
  if (!_isUndefined(options.name)) {
93027
93067
  const name = options.name;
93028
- if (path6.isAbsolute(name))
93068
+ if (path7.isAbsolute(name))
93029
93069
  throw new Error(`name option must not contain an absolute path, found "${name}".`);
93030
- const basename2 = path6.basename(name);
93070
+ const basename2 = path7.basename(name);
93031
93071
  if (basename2 === ".." || basename2 === "." || basename2 !== name) {
93032
93072
  throw new Error(`name option must not contain a path, found "${name}".`);
93033
93073
  }
@@ -93058,8 +93098,8 @@ var require_tmp = __commonJS({
93058
93098
  _resolvePath(name, tmpDir, function(err, resolvedPath) {
93059
93099
  if (err)
93060
93100
  return cb(err);
93061
- const relativePath = path6.relative(tmpDir, resolvedPath);
93062
- if (relativePath.startsWith("..") || path6.isAbsolute(relativePath)) {
93101
+ const relativePath = path7.relative(tmpDir, resolvedPath);
93102
+ if (relativePath.startsWith("..") || path7.isAbsolute(relativePath)) {
93063
93103
  return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
93064
93104
  }
93065
93105
  cb(null, relativePath);
@@ -93069,8 +93109,8 @@ var require_tmp = __commonJS({
93069
93109
  if (_isUndefined(name))
93070
93110
  return;
93071
93111
  const resolvedPath = _resolvePathSync(name, tmpDir);
93072
- const relativePath = path6.relative(tmpDir, resolvedPath);
93073
- if (relativePath.startsWith("..") || path6.isAbsolute(relativePath)) {
93112
+ const relativePath = path7.relative(tmpDir, resolvedPath);
93113
+ if (relativePath.startsWith("..") || path7.isAbsolute(relativePath)) {
93074
93114
  throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
93075
93115
  }
93076
93116
  return relativePath;
@@ -93119,10 +93159,10 @@ var require_tmp = __commonJS({
93119
93159
  _gracefulCleanup = true;
93120
93160
  }
93121
93161
  function _getTmpDir(options, cb) {
93122
- return fs9.realpath(options && options.tmpdir || os5.tmpdir(), cb);
93162
+ return fs9.realpath(options && options.tmpdir || os6.tmpdir(), cb);
93123
93163
  }
93124
93164
  function _getTmpDirSync(options) {
93125
- return fs9.realpathSync(options && options.tmpdir || os5.tmpdir());
93165
+ return fs9.realpathSync(options && options.tmpdir || os6.tmpdir());
93126
93166
  }
93127
93167
  process.addListener(EXIT, _garbageCollector);
93128
93168
  Object.defineProperty(module2.exports, "tmpdir", {
@@ -93707,12 +93747,12 @@ var require_workbook_reader = __commonJS({
93707
93747
  yield* this._parseWorksheet(iterateStream(entry), sheetNo);
93708
93748
  } else {
93709
93749
  await new Promise((resolve3, reject) => {
93710
- tmp.file((err, path6, fd, tempFileCleanupCallback) => {
93750
+ tmp.file((err, path7, fd, tempFileCleanupCallback) => {
93711
93751
  if (err) {
93712
93752
  return reject(err);
93713
93753
  }
93714
- waitingWorkSheets.push({ sheetNo, path: path6, tempFileCleanupCallback });
93715
- const tempStream = fs9.createWriteStream(path6);
93754
+ waitingWorkSheets.push({ sheetNo, path: path7, tempFileCleanupCallback });
93755
+ const tempStream = fs9.createWriteStream(path7);
93716
93756
  tempStream.on("error", reject);
93717
93757
  entry.pipe(tempStream);
93718
93758
  return tempStream.on("finish", () => {
@@ -93730,8 +93770,8 @@ var require_workbook_reader = __commonJS({
93730
93770
  }
93731
93771
  entry.autodrain();
93732
93772
  }
93733
- for (const { sheetNo, path: path6, tempFileCleanupCallback } of waitingWorkSheets) {
93734
- let fileStream = fs9.createReadStream(path6);
93773
+ for (const { sheetNo, path: path7, tempFileCleanupCallback } of waitingWorkSheets) {
93774
+ let fileStream = fs9.createReadStream(path7);
93735
93775
  if (!fileStream[Symbol.asyncIterator]) {
93736
93776
  fileStream = fileStream.pipe(new PassThrough4());
93737
93777
  }
@@ -99320,8 +99360,8 @@ var require_executor = __commonJS({
99320
99360
  Object.defineProperty(exports2, "__esModule", { value: true });
99321
99361
  exports2.executeTool = executeTool;
99322
99362
  var fs9 = __importStar(__require("fs"));
99323
- var path6 = __importStar(__require("path"));
99324
- var os5 = __importStar(__require("os"));
99363
+ var path7 = __importStar(__require("path"));
99364
+ var os6 = __importStar(__require("os"));
99325
99365
  var https3 = __importStar(__require("https"));
99326
99366
  var http3 = __importStar(__require("http"));
99327
99367
  var dns = __importStar(__require("dns"));
@@ -99347,7 +99387,7 @@ var require_executor = __commonJS({
99347
99387
  var READ_CHARS_PER_TOKEN = 4;
99348
99388
  var MAX_READ_CHARS = MAX_READ_TOKENS * READ_CHARS_PER_TOKEN;
99349
99389
  var MAX_SPILL_BYTES = 20 * 1024 * 1024;
99350
- var SPILL_DIR = path6.join(os5.tmpdir(), "nexrall-code", "bash-output");
99390
+ var SPILL_DIR = path7.join(os6.tmpdir(), "nexrall-code", "bash-output");
99351
99391
  var BLOCKED_REGEXES = [
99352
99392
  // Filesystem destruction — match rm/chmod with any whitespace between flags.
99353
99393
  // Only root itself and BARE top-level system dirs are blocked; ordinary
@@ -99407,9 +99447,9 @@ var require_executor = __commonJS({
99407
99447
  }
99408
99448
  function resolvePath(inputPath, workDir) {
99409
99449
  const base = workDir ?? process.cwd();
99410
- const resolved = path6.isAbsolute(inputPath) ? inputPath : path6.resolve(base, inputPath);
99411
- if (!path6.isAbsolute(inputPath)) {
99412
- const rel = path6.relative(base, resolved);
99450
+ const resolved = path7.isAbsolute(inputPath) ? inputPath : path7.resolve(base, inputPath);
99451
+ if (!path7.isAbsolute(inputPath)) {
99452
+ const rel = path7.relative(base, resolved);
99413
99453
  if (rel.startsWith("..")) {
99414
99454
  throw new Error(`Path traversal denied: "${inputPath}" escapes the workspace root.`);
99415
99455
  }
@@ -99535,7 +99575,7 @@ ${numbered}` });
99535
99575
  const resolved = resolvePath(filePath, workDir);
99536
99576
  fs9.statSync(resolved);
99537
99577
  if (isBinaryFile(resolved)) {
99538
- const ext = path6.extname(resolved).toLowerCase();
99578
+ const ext = path7.extname(resolved).toLowerCase();
99539
99579
  return { error: `Cannot read binary file: ${resolved} (${ext || "no extension"}). Use a text-based tool or convert it first.` };
99540
99580
  }
99541
99581
  return await readFileWindowed(resolved, offset, limit);
@@ -99552,7 +99592,7 @@ ${numbered}` });
99552
99592
  return { error: "Missing required parameter: content (must be a string)" };
99553
99593
  try {
99554
99594
  const resolved = resolvePath(filePath, workDir);
99555
- const dir = path6.dirname(resolved);
99595
+ const dir = path7.dirname(resolved);
99556
99596
  fs9.mkdirSync(dir, { recursive: true });
99557
99597
  const isNew = !fs9.existsSync(resolved);
99558
99598
  if (!isNew && content === "") {
@@ -99601,9 +99641,9 @@ Resolve the conflict (remove <<<<<<< / ======= / >>>>>>> markers and keep the in
99601
99641
  }
99602
99642
  }
99603
99643
  function atomicWriteBuffer(resolved, data) {
99604
- const dir = path6.dirname(resolved);
99644
+ const dir = path7.dirname(resolved);
99605
99645
  fs9.mkdirSync(dir, { recursive: true });
99606
- const tmp = path6.join(dir, `.${path6.basename(resolved)}.nexrall-tmp-${process.pid}-${Date.now()}`);
99646
+ const tmp = path7.join(dir, `.${path7.basename(resolved)}.nexrall-tmp-${process.pid}-${Date.now()}`);
99607
99647
  fs9.writeFileSync(tmp, data);
99608
99648
  fs9.renameSync(tmp, resolved);
99609
99649
  }
@@ -99730,7 +99770,7 @@ Resolve the conflict (remove <<<<<<< / ======= / >>>>>>> markers and keep the in
99730
99770
  }
99731
99771
  const resolved = resolvePath(filePath, workDir);
99732
99772
  const isNew = !fs9.existsSync(resolved);
99733
- fs9.mkdirSync(path6.dirname(resolved), { recursive: true });
99773
+ fs9.mkdirSync(path7.dirname(resolved), { recursive: true });
99734
99774
  const buffer = await pres.write({ outputType: "nodebuffer" });
99735
99775
  atomicWriteBuffer(resolved, buffer);
99736
99776
  return { output: `${isNew ? "Created" : "Overwrote"} ${resolved} (${slidesRaw.length} slide(s), ${buffer.length} bytes)` };
@@ -99760,7 +99800,7 @@ Resolve the conflict (remove <<<<<<< / ======= / >>>>>>> markers and keep the in
99760
99800
  }
99761
99801
  for (const f3 of files) {
99762
99802
  try {
99763
- const stat3 = fs9.statSync(path6.join(resolved, f3.name));
99803
+ const stat3 = fs9.statSync(path7.join(resolved, f3.name));
99764
99804
  const size = formatBytes(stat3.size);
99765
99805
  lines.push(`\u{1F4C4} ${f3.name} (${size})`);
99766
99806
  } catch {
@@ -99808,7 +99848,7 @@ Resolve the conflict (remove <<<<<<< / ======= / >>>>>>> markers and keep the in
99808
99848
  if (!shell.spillPath && !shell.spillFull) {
99809
99849
  try {
99810
99850
  fs9.mkdirSync(SPILL_DIR, { recursive: true });
99811
- shell.spillPath = path6.join(SPILL_DIR, `${id}-${Date.now()}.log`);
99851
+ shell.spillPath = path7.join(SPILL_DIR, `${id}-${Date.now()}.log`);
99812
99852
  shell.spillFd = fs9.openSync(shell.spillPath, "w");
99813
99853
  fs9.writeSync(shell.spillFd, shell.output);
99814
99854
  } catch {
@@ -99980,7 +100020,7 @@ ${r2.output}`;
99980
100020
  return;
99981
100021
  try {
99982
100022
  fs9.mkdirSync(SPILL_DIR, { recursive: true });
99983
- spillPath = path6.join(SPILL_DIR, `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
100023
+ spillPath = path7.join(SPILL_DIR, `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
99984
100024
  spillFd = fs9.openSync(spillPath, "w");
99985
100025
  } catch {
99986
100026
  spillPath = null;
@@ -100202,7 +100242,7 @@ Update these call-sites (or restore the symbol), then run a build/typecheck to c
100202
100242
  }
100203
100243
  const rel = [];
100204
100244
  for (const f3 of files) {
100205
- const abs = path6.isAbsolute(f3) ? f3 : path6.join(workDir, f3);
100245
+ const abs = path7.isAbsolute(f3) ? f3 : path7.join(workDir, f3);
100206
100246
  let real = abs;
100207
100247
  try {
100208
100248
  real = fs9.realpathSync(abs);
@@ -100210,7 +100250,7 @@ Update these call-sites (or restore the symbol), then run a build/typecheck to c
100210
100250
  }
100211
100251
  if (real === excludeRealPath)
100212
100252
  continue;
100213
- rel.push(path6.relative(workDir, abs) || f3);
100253
+ rel.push(path7.relative(workDir, abs) || f3);
100214
100254
  }
100215
100255
  return rel;
100216
100256
  }
@@ -100229,9 +100269,9 @@ Update these call-sites (or restore the symbol), then run a build/typecheck to c
100229
100269
  const matches = [];
100230
100270
  const patternLower = pattern.toLowerCase();
100231
100271
  walkDir(resolved, (filePath) => {
100232
- const name = path6.basename(filePath);
100272
+ const name = path7.basename(filePath);
100233
100273
  const nameLower = name.toLowerCase();
100234
- const rel = path6.relative(resolved, filePath).replace(/\\/g, "/");
100274
+ const rel = path7.relative(resolved, filePath).replace(/\\/g, "/");
100235
100275
  const relLower = rel.toLowerCase();
100236
100276
  if (nameLower.includes(patternLower) || matchesGlob(name, pattern) || matchesPattern(name, pattern) || relLower.includes(patternLower) || matchesGlob(rel, pattern) || matchesPattern(rel, pattern)) {
100237
100277
  matches.push(filePath);
@@ -100343,7 +100383,7 @@ ${globalCapMatches(output)}` : "";
100343
100383
  _visited.add(real);
100344
100384
  const entries = fs9.readdirSync(dirPath, { withFileTypes: true });
100345
100385
  for (const entry of entries) {
100346
- const fullPath = path6.join(dirPath, entry.name);
100386
+ const fullPath = path7.join(dirPath, entry.name);
100347
100387
  const isDir = entry.isDirectory() || entry.isSymbolicLink() && (() => {
100348
100388
  try {
100349
100389
  return fs9.statSync(fullPath).isDirectory();
@@ -100385,7 +100425,7 @@ ${globalCapMatches(output)}` : "";
100385
100425
  try {
100386
100426
  const resolvedSource = resolvePath(source2, workDir);
100387
100427
  const resolvedDest = resolvePath(dest, workDir);
100388
- fs9.mkdirSync(path6.dirname(resolvedDest), { recursive: true });
100428
+ fs9.mkdirSync(path7.dirname(resolvedDest), { recursive: true });
100389
100429
  try {
100390
100430
  fs9.renameSync(resolvedSource, resolvedDest);
100391
100431
  } catch (e2) {
@@ -100540,7 +100580,7 @@ ${diff3}${xfile}${sec}` };
100540
100580
  if (fs9.existsSync(resolvedDest) && fs9.statSync(resolvedDest).isDirectory()) {
100541
100581
  return { error: `Destination is a directory: ${resolvedDest}. Provide a full file path including the filename.` };
100542
100582
  }
100543
- fs9.mkdirSync(path6.dirname(resolvedDest), { recursive: true });
100583
+ fs9.mkdirSync(path7.dirname(resolvedDest), { recursive: true });
100544
100584
  fs9.copyFileSync(resolvedSrc, resolvedDest);
100545
100585
  return { output: `Copied: ${resolvedSrc} \u2192 ${resolvedDest}` };
100546
100586
  } catch (err) {
@@ -100865,9 +100905,9 @@ ${d}`).join("\n") + xfile + sec
100865
100905
  };
100866
100906
  const regex2 = toRegex(pattern);
100867
100907
  walkDir(resolved, (filePath) => {
100868
- const rel = path6.relative(resolved, filePath).replace(/\\/g, "/");
100908
+ const rel = path7.relative(resolved, filePath).replace(/\\/g, "/");
100869
100909
  const useBasename = !pattern.includes("/") && !pattern.includes("**");
100870
- if (regex2.test(rel) || useBasename && regex2.test(path6.basename(filePath))) {
100910
+ if (regex2.test(rel) || useBasename && regex2.test(path7.basename(filePath))) {
100871
100911
  matches.push(filePath);
100872
100912
  }
100873
100913
  });
@@ -101176,7 +101216,7 @@ ${lines.join("\n")}`;
101176
101216
  }
101177
101217
  const destPath = resolvePath(relPath, workDir);
101178
101218
  try {
101179
- fs9.mkdirSync(path6.dirname(destPath), { recursive: true });
101219
+ fs9.mkdirSync(path7.dirname(destPath), { recursive: true });
101180
101220
  } catch (_2) {
101181
101221
  }
101182
101222
  try {
@@ -101232,7 +101272,7 @@ ${lines.join("\n")}`;
101232
101272
  return { error: "No usable photo URL returned from Unsplash." };
101233
101273
  const destPath = resolvePath(relPath, workDir);
101234
101274
  try {
101235
- fs9.mkdirSync(path6.dirname(destPath), { recursive: true });
101275
+ fs9.mkdirSync(path7.dirname(destPath), { recursive: true });
101236
101276
  } catch (_2) {
101237
101277
  }
101238
101278
  try {
@@ -101336,7 +101376,7 @@ ${expanded}` };
101336
101376
  return { ok: false, err: { error: e2.message } };
101337
101377
  }
101338
101378
  if (!(0, tsLangService_1.isTsLike)(resolved)) {
101339
- return { ok: false, err: { error: `Semantic navigation currently supports TypeScript/JavaScript only. For ${path6.extname(resolved) || "this file type"} use get_symbols / get_workspace_symbols (regex-based).` } };
101379
+ return { ok: false, err: { error: `Semantic navigation currently supports TypeScript/JavaScript only. For ${path7.extname(resolved) || "this file type"} use get_symbols / get_workspace_symbols (regex-based).` } };
101340
101380
  }
101341
101381
  return { ok: true, args: { workDir: workDir ?? process.cwd(), filePath: resolved, line, character } };
101342
101382
  }
@@ -101510,8 +101550,8 @@ var require_agentTypes = __commonJS({
101510
101550
  exports2.summariseAgents = summariseAgents;
101511
101551
  exports2.findAgentType = findAgentType;
101512
101552
  var fs9 = __importStar(__require("fs"));
101513
- var path6 = __importStar(__require("path"));
101514
- var os5 = __importStar(__require("os"));
101553
+ var path7 = __importStar(__require("path"));
101554
+ var os6 = __importStar(__require("os"));
101515
101555
  var index_1 = require_plugins();
101516
101556
  var VALID_MEMORY_SCOPES = ["project", "user", "local"];
101517
101557
  function parseMemoryScope(v) {
@@ -101904,7 +101944,7 @@ var require_agentTypes = __commonJS({
101904
101944
  return;
101905
101945
  }
101906
101946
  for (const entry of entries) {
101907
- const full = path6.join(dir, entry.name);
101947
+ const full = path7.join(dir, entry.name);
101908
101948
  if (entry.isDirectory()) {
101909
101949
  loadDir(full, source2, into, warnings);
101910
101950
  continue;
@@ -101915,11 +101955,11 @@ var require_agentTypes = __commonJS({
101915
101955
  try {
101916
101956
  raw = fs9.readFileSync(full, "utf-8");
101917
101957
  } catch (err) {
101918
- warnings.push({ file: full, agent: path6.basename(entry.name, ".md"), message: `could not be read (${err.message}) \u2014 this agent was skipped` });
101958
+ warnings.push({ file: full, agent: path7.basename(entry.name, ".md"), message: `could not be read (${err.message}) \u2014 this agent was skipped` });
101919
101959
  continue;
101920
101960
  }
101921
101961
  const { meta, body, ok } = parseFrontmatter(raw);
101922
- const name = (meta.name || path6.basename(entry.name, ".md")).trim();
101962
+ const name = (meta.name || path7.basename(entry.name, ".md")).trim();
101923
101963
  if (!name)
101924
101964
  continue;
101925
101965
  if (source2 !== "project" && into.has(name))
@@ -102014,8 +102054,8 @@ var require_agentTypes = __commonJS({
102014
102054
  function loadAgentTypesWithWarnings2(workDir) {
102015
102055
  const out = /* @__PURE__ */ new Map();
102016
102056
  const warnings = [];
102017
- loadDir(path6.join(workDir, ".nexrall", "agents"), "project", out, warnings);
102018
- loadDir(path6.join(os5.homedir(), ".nexrall", "agents"), "global", out, warnings);
102057
+ loadDir(path7.join(workDir, ".nexrall", "agents"), "project", out, warnings);
102058
+ loadDir(path7.join(os6.homedir(), ".nexrall", "agents"), "global", out, warnings);
102019
102059
  for (const dir of (0, index_1.pluginAssetDirs)(workDir, "agents"))
102020
102060
  loadDir(dir, "plugin", out, warnings);
102021
102061
  for (const agent of BUILTIN_AGENTS) {
@@ -102125,13 +102165,13 @@ var require_rules = __commonJS({
102125
102165
  exports2.loadSettings = loadSettings2;
102126
102166
  exports2.evaluatePermission = evaluatePermission2;
102127
102167
  var fs9 = __importStar(__require("fs"));
102128
- var path6 = __importStar(__require("path"));
102129
- var os5 = __importStar(__require("os"));
102168
+ var path7 = __importStar(__require("path"));
102169
+ var os6 = __importStar(__require("os"));
102130
102170
  function managedSettingsPath() {
102131
102171
  if (process.platform === "darwin")
102132
102172
  return "/Library/Application Support/Nexrall/managed-settings.json";
102133
102173
  if (process.platform === "win32")
102134
- return path6.join(process.env.PROGRAMDATA ?? "C:\\ProgramData", "Nexrall", "managed-settings.json");
102174
+ return path7.join(process.env.PROGRAMDATA ?? "C:\\ProgramData", "Nexrall", "managed-settings.json");
102135
102175
  return "/etc/nexrall/managed-settings.json";
102136
102176
  }
102137
102177
  function readJson(file) {
@@ -102149,9 +102189,9 @@ var require_rules = __commonJS({
102149
102189
  function loadSettings2(workDir) {
102150
102190
  const tiers = [
102151
102191
  managedSettingsPath(),
102152
- path6.join(os5.homedir(), ".nexrall", "settings.json"),
102153
- path6.join(workDir, ".nexrall", "settings.json"),
102154
- path6.join(workDir, ".nexrall", "settings.local.json")
102192
+ path7.join(os6.homedir(), ".nexrall", "settings.json"),
102193
+ path7.join(workDir, ".nexrall", "settings.json"),
102194
+ path7.join(workDir, ".nexrall", "settings.local.json")
102155
102195
  ];
102156
102196
  const merged = { allow: [], ask: [], deny: [] };
102157
102197
  const raw = {};
@@ -102219,10 +102259,10 @@ var require_rules = __commonJS({
102219
102259
  if (!p)
102220
102260
  return;
102221
102261
  vals.push(p);
102222
- if (path6.isAbsolute(p))
102223
- vals.push(path6.relative(workDir, p));
102262
+ if (path7.isAbsolute(p))
102263
+ vals.push(path7.relative(workDir, p));
102224
102264
  else
102225
- vals.push(path6.resolve(workDir, p));
102265
+ vals.push(path7.resolve(workDir, p));
102226
102266
  };
102227
102267
  switch (tool) {
102228
102268
  case "bash":
@@ -102930,12 +102970,12 @@ var require_loop = __commonJS({
102930
102970
  var memory_1 = require_memory();
102931
102971
  var safeSlice_1 = require_safeSlice();
102932
102972
  var fs9 = __importStar(__require("fs"));
102933
- var path6 = __importStar(__require("path"));
102973
+ var path7 = __importStar(__require("path"));
102934
102974
  var child_process_1 = __require("child_process");
102935
102975
  function loadHooks(workDir) {
102936
102976
  let fromSettings = {};
102937
102977
  try {
102938
- const p = path6.join(workDir, ".nexrall", "settings.json");
102978
+ const p = path7.join(workDir, ".nexrall", "settings.json");
102939
102979
  if (fs9.existsSync(p))
102940
102980
  fromSettings = JSON.parse(fs9.readFileSync(p, "utf-8")).hooks ?? {};
102941
102981
  } catch {
@@ -103165,7 +103205,7 @@ ${ctx.repeatError}
103165
103205
  if (!WRITE_TOOLS.has(name))
103166
103206
  return [];
103167
103207
  const raw = [input.path, input.source, input.destination, input.dest].filter((p) => typeof p === "string" && p.length > 0);
103168
- const abs = raw.map((p) => workDir ? path6.resolve(workDir, p) : p);
103208
+ const abs = raw.map((p) => workDir ? path7.resolve(workDir, p) : p);
103169
103209
  return abs.length ? abs : [name];
103170
103210
  }
103171
103211
  var DEFAULT_MAX_CONCURRENT_SUBTASKS = 4;
@@ -103193,7 +103233,7 @@ ${ctx.repeatError}
103193
103233
  function createLimiter(max) {
103194
103234
  let active = 0;
103195
103235
  const queue = [];
103196
- const release2 = () => {
103236
+ const release3 = () => {
103197
103237
  active--;
103198
103238
  queue.shift()?.();
103199
103239
  };
@@ -103204,7 +103244,7 @@ ${ctx.repeatError}
103204
103244
  try {
103205
103245
  return await fn();
103206
103246
  } finally {
103207
- release2();
103247
+ release3();
103208
103248
  }
103209
103249
  };
103210
103250
  }
@@ -105187,8 +105227,8 @@ var require_manager = __commonJS({
105187
105227
  Object.defineProperty(exports2, "__esModule", { value: true });
105188
105228
  exports2.McpManager = void 0;
105189
105229
  var fs9 = __importStar(__require("fs"));
105190
- var path6 = __importStar(__require("path"));
105191
- var os5 = __importStar(__require("os"));
105230
+ var path7 = __importStar(__require("path"));
105231
+ var os6 = __importStar(__require("os"));
105192
105232
  var client_1 = require_client2();
105193
105233
  var httpClient_1 = require_httpClient();
105194
105234
  var sseClient_1 = require_sseClient();
@@ -105216,8 +105256,8 @@ var require_manager = __commonJS({
105216
105256
  } catch {
105217
105257
  }
105218
105258
  const locations = [
105219
- path6.join(os5.homedir(), ".nexrall", "mcp.json"),
105220
- path6.join(workDir, ".nexrall", "mcp.json")
105259
+ path7.join(os6.homedir(), ".nexrall", "mcp.json"),
105260
+ path7.join(workDir, ".nexrall", "mcp.json")
105221
105261
  ];
105222
105262
  for (const loc of locations) {
105223
105263
  try {
@@ -105351,7 +105391,7 @@ var require_manager = __commonJS({
105351
105391
  // ─── Config file persistence (for the management UI) ──────────────────────────
105352
105392
  /** Path to an mcp.json for the given scope. */
105353
105393
  static configPath(workDir, scope) {
105354
- return scope === "user" ? path6.join(os5.homedir(), ".nexrall", "mcp.json") : path6.join(workDir, ".nexrall", "mcp.json");
105394
+ return scope === "user" ? path7.join(os6.homedir(), ".nexrall", "mcp.json") : path7.join(workDir, ".nexrall", "mcp.json");
105355
105395
  }
105356
105396
  static readConfigFile(p) {
105357
105397
  try {
@@ -105362,7 +105402,7 @@ var require_manager = __commonJS({
105362
105402
  }
105363
105403
  }
105364
105404
  static writeConfigFile(p, cfg) {
105365
- fs9.mkdirSync(path6.dirname(p), { recursive: true });
105405
+ fs9.mkdirSync(path7.dirname(p), { recursive: true });
105366
105406
  fs9.writeFileSync(p, JSON.stringify(cfg, null, 2) + "\n", "utf-8");
105367
105407
  }
105368
105408
  /** Add (or overwrite) a server in the given scope's mcp.json. */
@@ -105453,8 +105493,8 @@ var require_manager2 = __commonJS({
105453
105493
  exports2.isMutatingTool = isMutatingTool;
105454
105494
  exports2.isPotentiallyMutatingBash = isPotentiallyMutatingBash;
105455
105495
  var fs9 = __importStar(__require("fs"));
105456
- var os5 = __importStar(__require("os"));
105457
- var path6 = __importStar(__require("path"));
105496
+ var os6 = __importStar(__require("os"));
105497
+ var path7 = __importStar(__require("path"));
105458
105498
  var crypto5 = __importStar(__require("crypto"));
105459
105499
  var child_process_1 = __require("child_process");
105460
105500
  var MAX_SNAPSHOT_BYTES = 2 * 1024 * 1024;
@@ -105517,13 +105557,13 @@ var require_manager2 = __commonJS({
105517
105557
  this.turns = [];
105518
105558
  this.current = null;
105519
105559
  this.nextId = 1;
105520
- const key = crypto5.createHash("sha1").update(path6.resolve(workDir) + "\0" + (scope ?? "")).digest("hex").slice(0, 16);
105521
- const base = process.env.NEXRALL_CHECKPOINT_DIR || path6.join(os5.homedir(), ".nexrall", "checkpoints");
105522
- this.storeDir = path6.join(base, key);
105560
+ const key = crypto5.createHash("sha1").update(path7.resolve(workDir) + "\0" + (scope ?? "")).digest("hex").slice(0, 16);
105561
+ const base = process.env.NEXRALL_CHECKPOINT_DIR || path7.join(os6.homedir(), ".nexrall", "checkpoints");
105562
+ this.storeDir = path7.join(base, key);
105523
105563
  this.loadFromDisk();
105524
105564
  }
105525
105565
  resolve(p) {
105526
- return path6.isAbsolute(p) ? p : path6.resolve(this.workDir, p);
105566
+ return path7.isAbsolute(p) ? p : path7.resolve(this.workDir, p);
105527
105567
  }
105528
105568
  /**
105529
105569
  * Open a new turn. `label` is a short description (usually the user prompt),
@@ -105679,7 +105719,7 @@ var require_manager2 = __commonJS({
105679
105719
  }
105680
105720
  }
105681
105721
  } else if (snap.content !== null) {
105682
- fs9.mkdirSync(path6.dirname(snap.absPath), { recursive: true });
105722
+ fs9.mkdirSync(path7.dirname(snap.absPath), { recursive: true });
105683
105723
  fs9.writeFileSync(snap.absPath, snap.content);
105684
105724
  }
105685
105725
  } catch {
@@ -105687,7 +105727,7 @@ var require_manager2 = __commonJS({
105687
105727
  }
105688
105728
  // ─── Disk persistence (best-effort — checkpointing must never crash the agent) ──
105689
105729
  turnFile(id) {
105690
- return path6.join(this.storeDir, `turn-${id}.json`);
105730
+ return path7.join(this.storeDir, `turn-${id}.json`);
105691
105731
  }
105692
105732
  persistTurn(turn) {
105693
105733
  try {
@@ -105717,13 +105757,13 @@ var require_manager2 = __commonJS({
105717
105757
  fs9.mkdirSync(this.storeDir, { recursive: true });
105718
105758
  const index = {
105719
105759
  version: 1,
105720
- workDir: path6.resolve(this.workDir),
105760
+ workDir: path7.resolve(this.workDir),
105721
105761
  nextId: this.nextId,
105722
105762
  turnIds: this.turns.map((t2) => t2.id)
105723
105763
  };
105724
- const tmp = path6.join(this.storeDir, "index.json.tmp");
105764
+ const tmp = path7.join(this.storeDir, "index.json.tmp");
105725
105765
  fs9.writeFileSync(tmp, JSON.stringify(index));
105726
- fs9.renameSync(tmp, path6.join(this.storeDir, "index.json"));
105766
+ fs9.renameSync(tmp, path7.join(this.storeDir, "index.json"));
105727
105767
  } catch {
105728
105768
  }
105729
105769
  }
@@ -105741,7 +105781,7 @@ var require_manager2 = __commonJS({
105741
105781
  }
105742
105782
  loadFromDisk() {
105743
105783
  try {
105744
- const raw = fs9.readFileSync(path6.join(this.storeDir, "index.json"), "utf-8");
105784
+ const raw = fs9.readFileSync(path7.join(this.storeDir, "index.json"), "utf-8");
105745
105785
  const index = JSON.parse(raw);
105746
105786
  if (index.version !== 1 || !Array.isArray(index.turnIds))
105747
105787
  return;
@@ -106126,13 +106166,13 @@ var require_sources = __commonJS({
106126
106166
  exports2.removeDeclaredSource = removeDeclaredSource2;
106127
106167
  exports2.sourcesFileFor = sourcesFileFor2;
106128
106168
  var fs9 = __importStar(__require("fs"));
106129
- var path6 = __importStar(__require("path"));
106130
- var os5 = __importStar(__require("os"));
106169
+ var path7 = __importStar(__require("path"));
106170
+ var os6 = __importStar(__require("os"));
106131
106171
  function managedSettingsPath() {
106132
106172
  if (process.platform === "darwin")
106133
106173
  return "/Library/Application Support/Nexrall/managed-settings.json";
106134
106174
  if (process.platform === "win32")
106135
- return path6.join(process.env.PROGRAMDATA ?? "C:\\ProgramData", "Nexrall", "managed-settings.json");
106175
+ return path7.join(process.env.PROGRAMDATA ?? "C:\\ProgramData", "Nexrall", "managed-settings.json");
106136
106176
  return "/etc/nexrall/managed-settings.json";
106137
106177
  }
106138
106178
  function readJson(file) {
@@ -106178,10 +106218,10 @@ var require_sources = __commonJS({
106178
106218
  function loadDeclaredSources2(workDir, opts = {}) {
106179
106219
  const out = /* @__PURE__ */ new Map();
106180
106220
  collect(managedSettingsPath(), "managed", out);
106181
- collect(path6.join(os5.homedir(), ".nexrall", "settings.json"), "user", out);
106221
+ collect(path7.join(os6.homedir(), ".nexrall", "settings.json"), "user", out);
106182
106222
  if (opts.includeProject) {
106183
- collect(path6.join(workDir, ".nexrall", "settings.json"), "project", out);
106184
- collect(path6.join(workDir, ".nexrall", "settings.local.json"), "project", out);
106223
+ collect(path7.join(workDir, ".nexrall", "settings.json"), "project", out);
106224
+ collect(path7.join(workDir, ".nexrall", "settings.local.json"), "project", out);
106185
106225
  }
106186
106226
  return [...out.values()];
106187
106227
  }
@@ -106218,7 +106258,7 @@ var require_sources = __commonJS({
106218
106258
  const obj2 = readJson(file) ?? {};
106219
106259
  const existing = obj2.pluginSources && typeof obj2.pluginSources === "object" && !Array.isArray(obj2.pluginSources) ? obj2.pluginSources : {};
106220
106260
  obj2.pluginSources = { ...existing, [name]: spec };
106221
- fs9.mkdirSync(path6.dirname(file), { recursive: true });
106261
+ fs9.mkdirSync(path7.dirname(file), { recursive: true });
106222
106262
  fs9.writeFileSync(file, JSON.stringify(obj2, null, 2) + "\n", "utf-8");
106223
106263
  }
106224
106264
  function removeDeclaredSource2(file, name) {
@@ -106233,7 +106273,7 @@ var require_sources = __commonJS({
106233
106273
  return true;
106234
106274
  }
106235
106275
  function sourcesFileFor2(scope, workDir) {
106236
- return scope === "user" ? path6.join(os5.homedir(), ".nexrall", "settings.json") : path6.join(workDir, ".nexrall", "settings.json");
106276
+ return scope === "user" ? path7.join(os6.homedir(), ".nexrall", "settings.json") : path7.join(workDir, ".nexrall", "settings.json");
106237
106277
  }
106238
106278
  }
106239
106279
  });
@@ -106299,8 +106339,8 @@ var require_installer = __commonJS({
106299
106339
  exports2.removePlugin = removePlugin2;
106300
106340
  exports2.updatePlugin = updatePlugin2;
106301
106341
  var fs9 = __importStar(__require("fs"));
106302
- var path6 = __importStar(__require("path"));
106303
- var os5 = __importStar(__require("os"));
106342
+ var path7 = __importStar(__require("path"));
106343
+ var os6 = __importStar(__require("os"));
106304
106344
  var child_process_1 = __require("child_process");
106305
106345
  var client_1 = require_client();
106306
106346
  var index_1 = require_plugins();
@@ -106340,7 +106380,7 @@ var require_installer = __commonJS({
106340
106380
  if (!raw)
106341
106381
  throw new Error("Empty plugin source.");
106342
106382
  if (raw.startsWith("./") || raw.startsWith("../") || raw.startsWith("/") || raw.startsWith("~/")) {
106343
- const abs = path6.resolve(raw.replace(/^~(?=\/)/, os5.homedir()));
106383
+ const abs = path7.resolve(raw.replace(/^~(?=\/)/, os6.homedir()));
106344
106384
  return { kind: "local", repo: abs, raw };
106345
106385
  }
106346
106386
  let rest = raw;
@@ -106397,8 +106437,8 @@ var require_installer = __commonJS({
106397
106437
  }
106398
106438
  }
106399
106439
  return {
106400
- commands: listMd(path6.join(dir, "commands")),
106401
- agents: listMd(path6.join(dir, "agents")),
106440
+ commands: listMd(path7.join(dir, "commands")),
106441
+ agents: listMd(path7.join(dir, "agents")),
106402
106442
  hasHooks: (0, index_1.resolvePluginFile)(dir, "hooks") !== null,
106403
106443
  hasMcp: (0, index_1.resolvePluginFile)(dir, "mcp") !== null,
106404
106444
  meta
@@ -106415,7 +106455,7 @@ var require_installer = __commonJS({
106415
106455
  for (const file of files) {
106416
106456
  const name = file.replace(/\.md$/, "");
106417
106457
  try {
106418
- const raw = fs9.readFileSync(path6.join(dir, file), "utf-8");
106458
+ const raw = fs9.readFileSync(path7.join(dir, file), "utf-8");
106419
106459
  const { meta } = (0, frontmatter_1.parseFrontmatter)(raw);
106420
106460
  out.push({ name, description: meta.description || "" });
106421
106461
  } catch {
@@ -106435,7 +106475,7 @@ var require_installer = __commonJS({
106435
106475
  for (const entry of entries) {
106436
106476
  if (!entry.isDirectory() && !entry.isSymbolicLink())
106437
106477
  continue;
106438
- const skillFile = path6.join(dir, entry.name, "SKILL.md");
106478
+ const skillFile = path7.join(dir, entry.name, "SKILL.md");
106439
106479
  try {
106440
106480
  if (!fs9.statSync(skillFile).isFile())
106441
106481
  continue;
@@ -106478,9 +106518,9 @@ var require_installer = __commonJS({
106478
106518
  }
106479
106519
  }
106480
106520
  return {
106481
- commands: listMdWithDescription(path6.join(dir, "commands")),
106482
- skills: listSkillsWithDescription(path6.join(dir, "skills")),
106483
- agents: listMdWithDescription(path6.join(dir, "agents")),
106521
+ commands: listMdWithDescription(path7.join(dir, "commands")),
106522
+ skills: listSkillsWithDescription(path7.join(dir, "skills")),
106523
+ agents: listMdWithDescription(path7.join(dir, "agents")),
106484
106524
  mcpServers,
106485
106525
  hasHooks: (0, index_1.resolvePluginFile)(dir, "hooks") !== null
106486
106526
  };
@@ -106495,7 +106535,7 @@ var require_installer = __commonJS({
106495
106535
  for (const file of files) {
106496
106536
  if (file.replace(/\.md$/, "") !== name)
106497
106537
  continue;
106498
- const filePath = path6.join(dir, file);
106538
+ const filePath = path7.join(dir, file);
106499
106539
  try {
106500
106540
  const raw = fs9.readFileSync(filePath, "utf-8");
106501
106541
  const { meta, body } = (0, frontmatter_1.parseFrontmatter)(raw);
@@ -106516,7 +106556,7 @@ var require_installer = __commonJS({
106516
106556
  for (const entry of entries) {
106517
106557
  if (!entry.isDirectory() && !entry.isSymbolicLink())
106518
106558
  continue;
106519
- const skillFile = path6.join(skillsDir, entry.name, "SKILL.md");
106559
+ const skillFile = path7.join(skillsDir, entry.name, "SKILL.md");
106520
106560
  try {
106521
106561
  if (!fs9.statSync(skillFile).isFile())
106522
106562
  continue;
@@ -106533,8 +106573,8 @@ var require_installer = __commonJS({
106533
106573
  }
106534
106574
  function pluginItemDetail(dir, kind, name) {
106535
106575
  if (kind === "skills")
106536
- return readPluginSkill(path6.join(dir, "skills"), name);
106537
- return readPluginItemFromFlatDir(path6.join(dir, kind), name);
106576
+ return readPluginSkill(path7.join(dir, "skills"), name);
106577
+ return readPluginItemFromFlatDir(path7.join(dir, kind), name);
106538
106578
  }
106539
106579
  function looksLikePlugin(dir) {
106540
106580
  const i2 = inspectPluginDir2(dir);
@@ -106573,14 +106613,14 @@ var require_installer = __commonJS({
106573
106613
  (0, child_process_1.execFileSync)("tar", ["-xzf", tarFile, "-C", destDir], { stdio: "pipe" });
106574
106614
  const entries = fs9.readdirSync(destDir).filter((e2) => {
106575
106615
  try {
106576
- return fs9.statSync(path6.join(destDir, e2)).isDirectory();
106616
+ return fs9.statSync(path7.join(destDir, e2)).isDirectory();
106577
106617
  } catch {
106578
106618
  return false;
106579
106619
  }
106580
106620
  });
106581
106621
  if (entries.length !== 1)
106582
106622
  throw new Error("Unexpected tarball layout.");
106583
- return path6.join(destDir, entries[0]);
106623
+ return path7.join(destDir, entries[0]);
106584
106624
  }
106585
106625
  function copyPluginDir(src, dest) {
106586
106626
  const SKIP = /* @__PURE__ */ new Set([".git", "node_modules", ".github", ".DS_Store", RECEIPT_FILE]);
@@ -106588,8 +106628,8 @@ var require_installer = __commonJS({
106588
106628
  for (const entry of fs9.readdirSync(src, { withFileTypes: true })) {
106589
106629
  if (SKIP.has(entry.name))
106590
106630
  continue;
106591
- const s2 = path6.join(src, entry.name);
106592
- const d = path6.join(dest, entry.name);
106631
+ const s2 = path7.join(src, entry.name);
106632
+ const d = path7.join(dest, entry.name);
106593
106633
  if (entry.isSymbolicLink())
106594
106634
  continue;
106595
106635
  if (entry.isDirectory()) {
@@ -106600,7 +106640,7 @@ var require_installer = __commonJS({
106600
106640
  }
106601
106641
  }
106602
106642
  function pluginsRoot(scope, workDir) {
106603
- return scope === "project" ? path6.join(workDir || process.cwd(), ".nexrall", "plugins") : path6.join(os5.homedir(), ".nexrall", "plugins");
106643
+ return scope === "project" ? path7.join(workDir || process.cwd(), ".nexrall", "plugins") : path7.join(os6.homedir(), ".nexrall", "plugins");
106604
106644
  }
106605
106645
  async function installPlugin2(spec, opts = {}) {
106606
106646
  const source2 = parsePluginSource2(spec);
@@ -106609,7 +106649,7 @@ var require_installer = __commonJS({
106609
106649
  if (patterns && source2.kind === "github" && !(0, sources_1.isSourceAllowed)(source2.raw, patterns)) {
106610
106650
  throw new Error(`Blocked by your organisation's policy: plugins may only be installed from ${patterns.join(", ")}.`);
106611
106651
  }
106612
- const tmpBase = fs9.mkdtempSync(path6.join(os5.tmpdir(), "nexrall-plugin-"));
106652
+ const tmpBase = fs9.mkdtempSync(path7.join(os6.tmpdir(), "nexrall-plugin-"));
106613
106653
  try {
106614
106654
  let repoRoot;
106615
106655
  if (source2.kind === "local") {
@@ -106618,21 +106658,21 @@ var require_installer = __commonJS({
106618
106658
  }
106619
106659
  repoRoot = source2.repo;
106620
106660
  } else {
106621
- const tarFile = path6.join(tmpBase, "plugin.tar.gz");
106661
+ const tarFile = path7.join(tmpBase, "plugin.tar.gz");
106622
106662
  await downloadTarball(source2.repo, source2.ref, tarFile);
106623
- repoRoot = extractTarball(tarFile, path6.join(tmpBase, "x"));
106663
+ repoRoot = extractTarball(tarFile, path7.join(tmpBase, "x"));
106624
106664
  }
106625
106665
  const sha = source2.kind === "github" ? await resolveCommitSha(source2.repo, source2.ref) : null;
106626
- let pluginRoot = source2.subdir ? path6.join(repoRoot, source2.subdir) : repoRoot;
106627
- pluginRoot = path6.resolve(pluginRoot);
106628
- if (!path6.resolve(pluginRoot).startsWith(path6.resolve(repoRoot))) {
106666
+ let pluginRoot = source2.subdir ? path7.join(repoRoot, source2.subdir) : repoRoot;
106667
+ pluginRoot = path7.resolve(pluginRoot);
106668
+ if (!path7.resolve(pluginRoot).startsWith(path7.resolve(repoRoot))) {
106629
106669
  throw new Error("Plugin subdirectory escapes the repository \u2014 refusing.");
106630
106670
  }
106631
106671
  if (!fs9.existsSync(pluginRoot) || !fs9.statSync(pluginRoot).isDirectory()) {
106632
106672
  throw new Error(`Subdirectory not found in repo: ${source2.subdir}`);
106633
106673
  }
106634
106674
  if (!looksLikePlugin(pluginRoot)) {
106635
- const candidates = ["plugin", ".nexrall-plugin"].map((c) => path6.join(pluginRoot, c));
106675
+ const candidates = ["plugin", ".nexrall-plugin"].map((c) => path7.join(pluginRoot, c));
106636
106676
  const found = candidates.find((c) => fs9.existsSync(c) && looksLikePlugin(c));
106637
106677
  if (found) {
106638
106678
  pluginRoot = found;
@@ -106641,7 +106681,7 @@ var require_installer = __commonJS({
106641
106681
  }
106642
106682
  }
106643
106683
  const inspection = inspectPluginDir2(pluginRoot);
106644
- const name = opts.name || inspection.meta.name || (source2.subdir ? path6.basename(source2.subdir) : void 0) || (source2.kind === "github" ? source2.repo.split("/")[1] : path6.basename(source2.repo));
106684
+ const name = opts.name || inspection.meta.name || (source2.subdir ? path7.basename(source2.subdir) : void 0) || (source2.kind === "github" ? source2.repo.split("/")[1] : path7.basename(source2.repo));
106645
106685
  if (!/^[\w.-]+$/.test(name))
106646
106686
  throw new Error(`Invalid plugin name "${name}".`);
106647
106687
  if (opts.confirm) {
@@ -106654,7 +106694,7 @@ var require_installer = __commonJS({
106654
106694
  throw new Error("Installation cancelled.");
106655
106695
  }
106656
106696
  const root = pluginsRoot(scope, opts.workDir);
106657
- const dest = path6.join(root, name);
106697
+ const dest = path7.join(root, name);
106658
106698
  if (fs9.existsSync(dest)) {
106659
106699
  if (!opts.force)
106660
106700
  throw new Error(`Plugin "${name}" is already installed. Use --force to overwrite or 'nex plugin update ${name}'.`);
@@ -106669,7 +106709,7 @@ var require_installer = __commonJS({
106669
106709
  installedAt: (/* @__PURE__ */ new Date()).toISOString(),
106670
106710
  ...sha ? { sha } : {}
106671
106711
  };
106672
- fs9.writeFileSync(path6.join(dest, RECEIPT_FILE), JSON.stringify(receipt, null, 2));
106712
+ fs9.writeFileSync(path7.join(dest, RECEIPT_FILE), JSON.stringify(receipt, null, 2));
106673
106713
  return { name, dir: dest, scope, inspection, sha: sha ?? void 0, previousSha: opts._previousSha };
106674
106714
  } finally {
106675
106715
  fs9.rmSync(tmpBase, { recursive: true, force: true });
@@ -106677,7 +106717,7 @@ var require_installer = __commonJS({
106677
106717
  }
106678
106718
  function readReceipt2(pluginDir) {
106679
106719
  try {
106680
- const j = JSON.parse(fs9.readFileSync(path6.join(pluginDir, RECEIPT_FILE), "utf-8"));
106720
+ const j = JSON.parse(fs9.readFileSync(path7.join(pluginDir, RECEIPT_FILE), "utf-8"));
106681
106721
  return typeof j.source === "string" ? j : null;
106682
106722
  } catch {
106683
106723
  return null;
@@ -106688,7 +106728,7 @@ var require_installer = __commonJS({
106688
106728
  throw new Error(`Invalid plugin name "${name}".`);
106689
106729
  const scopes = opts.scope ? [opts.scope] : ["project", "global"];
106690
106730
  for (const s2 of scopes) {
106691
- const dir = path6.join(pluginsRoot(s2, opts.workDir), name);
106731
+ const dir = path7.join(pluginsRoot(s2, opts.workDir), name);
106692
106732
  if (fs9.existsSync(dir)) {
106693
106733
  fs9.rmSync(dir, { recursive: true, force: true });
106694
106734
  return dir;
@@ -106699,7 +106739,7 @@ var require_installer = __commonJS({
106699
106739
  async function updatePlugin2(name, opts = {}) {
106700
106740
  const scopes = opts.scope ? [opts.scope] : ["project", "global"];
106701
106741
  for (const s2 of scopes) {
106702
- const dir = path6.join(pluginsRoot(s2, opts.workDir), name);
106742
+ const dir = path7.join(pluginsRoot(s2, opts.workDir), name);
106703
106743
  if (!fs9.existsSync(dir))
106704
106744
  continue;
106705
106745
  const receipt = readReceipt2(dir);
@@ -106774,10 +106814,10 @@ var require_trust = __commonJS({
106774
106814
  Object.defineProperty(exports2, "__esModule", { value: true });
106775
106815
  exports2.detectTrustSignals = detectTrustSignals2;
106776
106816
  var fs9 = __importStar(__require("fs"));
106777
- var path6 = __importStar(__require("path"));
106817
+ var path7 = __importStar(__require("path"));
106778
106818
  function declaresPluginSources2(dir) {
106779
106819
  try {
106780
- const raw = fs9.readFileSync(path6.join(dir, ".nexrall", "settings.json"), "utf-8");
106820
+ const raw = fs9.readFileSync(path7.join(dir, ".nexrall", "settings.json"), "utf-8");
106781
106821
  const obj2 = JSON.parse(raw);
106782
106822
  const s2 = obj2.pluginSources;
106783
106823
  return Boolean(s2 && typeof s2 === "object" && !Array.isArray(s2) && Object.keys(s2).length > 0);
@@ -106789,7 +106829,7 @@ var require_trust = __commonJS({
106789
106829
  const signals = [];
106790
106830
  const exists = (...p) => {
106791
106831
  try {
106792
- return fs9.existsSync(path6.join(dir, ...p));
106832
+ return fs9.existsSync(path7.join(dir, ...p));
106793
106833
  } catch {
106794
106834
  return false;
106795
106835
  }
@@ -106806,7 +106846,7 @@ var require_trust = __commonJS({
106806
106846
  if (exists(".nexrall", "settings.json")) {
106807
106847
  let hasHooks = false;
106808
106848
  try {
106809
- const raw = fs9.readFileSync(path6.join(dir, ".nexrall", "settings.json"), "utf-8");
106849
+ const raw = fs9.readFileSync(path7.join(dir, ".nexrall", "settings.json"), "utf-8");
106810
106850
  const obj2 = JSON.parse(raw);
106811
106851
  hasHooks = Boolean(obj2.hooks && typeof obj2.hooks === "object" && Object.keys(obj2.hooks).length > 0);
106812
106852
  } catch {
@@ -117492,11 +117532,11 @@ var require_react_reconciler_development = __commonJS({
117492
117532
  fiber = fiber.next, id--;
117493
117533
  return fiber;
117494
117534
  }
117495
- function copyWithSetImpl(obj2, path6, index, value) {
117496
- if (index >= path6.length)
117535
+ function copyWithSetImpl(obj2, path7, index, value) {
117536
+ if (index >= path7.length)
117497
117537
  return value;
117498
- var key = path6[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
117499
- updated[key] = copyWithSetImpl(obj2[key], path6, index + 1, value);
117538
+ var key = path7[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
117539
+ updated[key] = copyWithSetImpl(obj2[key], path7, index + 1, value);
117500
117540
  return updated;
117501
117541
  }
117502
117542
  function copyWithRename(obj2, oldPath, newPath) {
@@ -117523,11 +117563,11 @@ var require_react_reconciler_development = __commonJS({
117523
117563
  );
117524
117564
  return updated;
117525
117565
  }
117526
- function copyWithDeleteImpl(obj2, path6, index) {
117527
- var key = path6[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
117528
- if (index + 1 === path6.length)
117566
+ function copyWithDeleteImpl(obj2, path7, index) {
117567
+ var key = path7[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
117568
+ if (index + 1 === path7.length)
117529
117569
  return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
117530
- updated[key] = copyWithDeleteImpl(obj2[key], path6, index + 1);
117570
+ updated[key] = copyWithDeleteImpl(obj2[key], path7, index + 1);
117531
117571
  return updated;
117532
117572
  }
117533
117573
  function shouldSuspendImpl() {
@@ -130953,29 +130993,29 @@ var require_react_reconciler_development = __commonJS({
130953
130993
  var didWarnAboutNestedUpdates = false;
130954
130994
  var didWarnAboutFindNodeInStrictMode = {};
130955
130995
  var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
130956
- overrideHookState = function(fiber, id, path6, value) {
130996
+ overrideHookState = function(fiber, id, path7, value) {
130957
130997
  id = findHook(fiber, id);
130958
- null !== id && (path6 = copyWithSetImpl(id.memoizedState, path6, 0, value), id.memoizedState = path6, id.baseState = path6, fiber.memoizedProps = assign({}, fiber.memoizedProps), path6 = enqueueConcurrentRenderForLane(fiber, 2), null !== path6 && scheduleUpdateOnFiber(path6, fiber, 2));
130998
+ null !== id && (path7 = copyWithSetImpl(id.memoizedState, path7, 0, value), id.memoizedState = path7, id.baseState = path7, fiber.memoizedProps = assign({}, fiber.memoizedProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), null !== path7 && scheduleUpdateOnFiber(path7, fiber, 2));
130959
130999
  };
130960
- overrideHookStateDeletePath = function(fiber, id, path6) {
131000
+ overrideHookStateDeletePath = function(fiber, id, path7) {
130961
131001
  id = findHook(fiber, id);
130962
- null !== id && (path6 = copyWithDeleteImpl(id.memoizedState, path6, 0), id.memoizedState = path6, id.baseState = path6, fiber.memoizedProps = assign({}, fiber.memoizedProps), path6 = enqueueConcurrentRenderForLane(fiber, 2), null !== path6 && scheduleUpdateOnFiber(path6, fiber, 2));
131002
+ null !== id && (path7 = copyWithDeleteImpl(id.memoizedState, path7, 0), id.memoizedState = path7, id.baseState = path7, fiber.memoizedProps = assign({}, fiber.memoizedProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), null !== path7 && scheduleUpdateOnFiber(path7, fiber, 2));
130963
131003
  };
130964
131004
  overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
130965
131005
  id = findHook(fiber, id);
130966
131006
  null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
130967
131007
  };
130968
- overrideProps = function(fiber, path6, value) {
130969
- fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path6, 0, value);
131008
+ overrideProps = function(fiber, path7, value) {
131009
+ fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path7, 0, value);
130970
131010
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
130971
- path6 = enqueueConcurrentRenderForLane(fiber, 2);
130972
- null !== path6 && scheduleUpdateOnFiber(path6, fiber, 2);
131011
+ path7 = enqueueConcurrentRenderForLane(fiber, 2);
131012
+ null !== path7 && scheduleUpdateOnFiber(path7, fiber, 2);
130973
131013
  };
130974
- overridePropsDeletePath = function(fiber, path6) {
130975
- fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path6, 0);
131014
+ overridePropsDeletePath = function(fiber, path7) {
131015
+ fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path7, 0);
130976
131016
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
130977
- path6 = enqueueConcurrentRenderForLane(fiber, 2);
130978
- null !== path6 && scheduleUpdateOnFiber(path6, fiber, 2);
131017
+ path7 = enqueueConcurrentRenderForLane(fiber, 2);
131018
+ null !== path7 && scheduleUpdateOnFiber(path7, fiber, 2);
130979
131019
  };
130980
131020
  overridePropsRenamePath = function(fiber, oldPath, newPath) {
130981
131021
  fiber.pendingProps = copyWithRename(
@@ -140712,7 +140752,7 @@ var {
140712
140752
  } = import_index.default;
140713
140753
 
140714
140754
  // src/index.ts
140715
- import * as path5 from "path";
140755
+ import * as path6 from "path";
140716
140756
  import { createRequire as createRequire2 } from "module";
140717
140757
 
140718
140758
  // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -141337,13 +141377,13 @@ function stopSpinner(handle2) {
141337
141377
 
141338
141378
  // src/commands/chat.ts
141339
141379
  import * as readline3 from "readline";
141340
- import * as path4 from "path";
141380
+ import * as path5 from "path";
141341
141381
  import * as fs8 from "fs";
141342
- import * as os4 from "os";
141382
+ import * as os5 from "os";
141343
141383
  import * as crypto4 from "crypto";
141344
141384
  import { createRequire } from "module";
141345
141385
  import { fileURLToPath as fileURLToPath2 } from "url";
141346
- import { execSync } from "child_process";
141386
+ import { execSync, execFileSync as execFileSync2 } from "child_process";
141347
141387
  var import_code_core3 = __toESM(require_dist3(), 1);
141348
141388
 
141349
141389
  // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
@@ -141876,11 +141916,11 @@ Diff.prototype = {
141876
141916
  }
141877
141917
  }
141878
141918
  },
141879
- addToPath: function addToPath(path6, added, removed, oldPosInc) {
141880
- var last = path6.lastComponent;
141919
+ addToPath: function addToPath(path7, added, removed, oldPosInc) {
141920
+ var last = path7.lastComponent;
141881
141921
  if (last && last.added === added && last.removed === removed) {
141882
141922
  return {
141883
- oldPos: path6.oldPos + oldPosInc,
141923
+ oldPos: path7.oldPos + oldPosInc,
141884
141924
  lastComponent: {
141885
141925
  count: last.count + 1,
141886
141926
  added,
@@ -141890,7 +141930,7 @@ Diff.prototype = {
141890
141930
  };
141891
141931
  } else {
141892
141932
  return {
141893
- oldPos: path6.oldPos + oldPosInc,
141933
+ oldPos: path7.oldPos + oldPosInc,
141894
141934
  lastComponent: {
141895
141935
  count: 1,
141896
141936
  added,
@@ -142597,12 +142637,243 @@ function lastSession() {
142597
142637
  return all.length ? all[0] : null;
142598
142638
  }
142599
142639
 
142640
+ // src/terminal/terminalSetup.ts
142641
+ import * as os3 from "os";
142642
+ import * as path2 from "path";
142643
+ var SHIFT_ENTER_SEQUENCE = "\x1B\r";
142644
+ var NATIVE_SHIFT_ENTER = {
142645
+ ghostty: "Ghostty",
142646
+ "iTerm.app": "iTerm2",
142647
+ WezTerm: "WezTerm",
142648
+ WarpTerminal: "Warp"
142649
+ // Kitty sets TERM=xterm-kitty rather than TERM_PROGRAM; handled below.
142650
+ };
142651
+ var EDITOR_TERM_PROGRAMS = {
142652
+ vscode: "VS Code",
142653
+ cursor: "Cursor",
142654
+ windsurf: "Windsurf",
142655
+ vscodium: "VSCodium"
142656
+ };
142657
+ var MACOS_NATIVE_SHIFT_RETURN_MAJOR = 27;
142658
+ function decideTerminalSetup(input) {
142659
+ const termProgram = input.env.TERM_PROGRAM ?? null;
142660
+ const term = input.env.TERM ?? null;
142661
+ if (term && term.includes("kitty"))
142662
+ return { kind: "already-native", terminal: "Kitty" };
142663
+ if (input.env.WT_SESSION)
142664
+ return { kind: "already-native", terminal: "Windows Terminal" };
142665
+ if (termProgram) {
142666
+ const native = NATIVE_SHIFT_ENTER[termProgram];
142667
+ if (native)
142668
+ return { kind: "already-native", terminal: native };
142669
+ const editor = EDITOR_TERM_PROGRAMS[termProgram];
142670
+ if (editor)
142671
+ return { kind: "editor", editor };
142672
+ if (termProgram === "Apple_Terminal") {
142673
+ if (input.macOSMajor !== null && input.macOSMajor >= MACOS_NATIVE_SHIFT_RETURN_MAJOR) {
142674
+ return { kind: "already-native", terminal: "Apple Terminal" };
142675
+ }
142676
+ return { kind: "apple-terminal", macOSMajor: input.macOSMajor };
142677
+ }
142678
+ }
142679
+ if (input.env.VSCODE_PID || input.env.VSCODE_IPC_HOOK || input.env.VSCODE_CWD) {
142680
+ return { kind: "editor", editor: editorFromBundleId(input.env.__CFBundleIdentifier) };
142681
+ }
142682
+ return { kind: "unsupported", terminal: termProgram };
142683
+ }
142684
+ function editorFromBundleId(bundleId) {
142685
+ switch (bundleId) {
142686
+ case "com.todesktop.230313mzl4w4u92":
142687
+ case "com.cursor.Cursor":
142688
+ return "Cursor";
142689
+ case "com.exafunction.windsurf":
142690
+ return "Windsurf";
142691
+ case "com.vscodium":
142692
+ case "com.visualstudio.code.oss":
142693
+ return "VSCodium";
142694
+ default:
142695
+ return "VS Code";
142696
+ }
142697
+ }
142698
+ function detectMacOSMajor(platform3 = process.platform, release3 = os3.release()) {
142699
+ if (platform3 !== "darwin")
142700
+ return null;
142701
+ const darwinMajor = Number.parseInt(release3.split(".")[0] ?? "", 10);
142702
+ if (!Number.isFinite(darwinMajor))
142703
+ return null;
142704
+ return darwinMajor + 1;
142705
+ }
142706
+ var EDITOR_CONFIG_DIR = {
142707
+ "VS Code": "Code",
142708
+ Cursor: "Cursor",
142709
+ Windsurf: "Windsurf",
142710
+ VSCodium: "VSCodium"
142711
+ };
142712
+ function keybindingsPath(editor, platform3 = process.platform, home = os3.homedir()) {
142713
+ const dir = EDITOR_CONFIG_DIR[editor];
142714
+ const userDir = platform3 === "win32" ? path2.join(home, "AppData", "Roaming", dir, "User") : platform3 === "darwin" ? path2.join(home, "Library", "Application Support", dir, "User") : path2.join(home, ".config", dir, "User");
142715
+ return path2.join(userDir, "keybindings.json");
142716
+ }
142717
+ var SHIFT_ENTER_KEYBINDING = {
142718
+ key: "shift+enter",
142719
+ command: "workbench.action.terminal.sendSequence",
142720
+ args: { text: SHIFT_ENTER_SEQUENCE },
142721
+ when: "terminalFocus"
142722
+ };
142723
+ function mergeKeybinding(parsed, binding = SHIFT_ENTER_KEYBINDING) {
142724
+ if (parsed === void 0 || parsed === null)
142725
+ return { kind: "insert", next: [binding] };
142726
+ if (!Array.isArray(parsed))
142727
+ return { kind: "not-an-array" };
142728
+ const existing = parsed.find(
142729
+ (entry) => typeof entry === "object" && entry !== null && entry.key === binding.key && entry.command === binding.command && entry.when === binding.when
142730
+ );
142731
+ if (existing) {
142732
+ if (existing.args?.text === binding.args?.text)
142733
+ return { kind: "already-configured" };
142734
+ return { kind: "conflict", existingText: existing.args?.text };
142735
+ }
142736
+ return { kind: "insert", next: [...parsed, binding] };
142737
+ }
142738
+ function parseKeybindingsFile(body) {
142739
+ const withoutComments = stripJsonComments(body).trim();
142740
+ if (withoutComments === "")
142741
+ return void 0;
142742
+ return JSON.parse(withoutComments);
142743
+ }
142744
+ function stripJsonComments(input) {
142745
+ let out = "";
142746
+ let inString = false;
142747
+ let inLineComment = false;
142748
+ let inBlockComment = false;
142749
+ for (let i2 = 0; i2 < input.length; i2++) {
142750
+ const ch = input[i2];
142751
+ const next = input[i2 + 1];
142752
+ if (inLineComment) {
142753
+ if (ch === "\n") {
142754
+ inLineComment = false;
142755
+ out += ch;
142756
+ }
142757
+ continue;
142758
+ }
142759
+ if (inBlockComment) {
142760
+ if (ch === "*" && next === "/") {
142761
+ inBlockComment = false;
142762
+ i2++;
142763
+ }
142764
+ continue;
142765
+ }
142766
+ if (inString) {
142767
+ out += ch;
142768
+ if (ch === "\\" && next !== void 0) {
142769
+ out += next;
142770
+ i2++;
142771
+ } else if (ch === '"') {
142772
+ inString = false;
142773
+ }
142774
+ continue;
142775
+ }
142776
+ if (ch === '"') {
142777
+ inString = true;
142778
+ out += ch;
142779
+ continue;
142780
+ }
142781
+ if (ch === "/" && next === "/") {
142782
+ inLineComment = true;
142783
+ i2++;
142784
+ continue;
142785
+ }
142786
+ if (ch === "/" && next === "*") {
142787
+ inBlockComment = true;
142788
+ i2++;
142789
+ continue;
142790
+ }
142791
+ out += ch;
142792
+ }
142793
+ return out;
142794
+ }
142795
+ async function installEditorKeybinding(editor, deps) {
142796
+ const filePath = keybindingsPath(editor, deps.platform ?? process.platform, deps.home ?? os3.homedir());
142797
+ let body;
142798
+ try {
142799
+ body = await deps.readFile(filePath);
142800
+ } catch (err) {
142801
+ if (err.code !== "ENOENT") {
142802
+ return { kind: "failed", filePath, reason: describeErr(err) };
142803
+ }
142804
+ }
142805
+ let parsed;
142806
+ try {
142807
+ parsed = body === void 0 ? void 0 : parseKeybindingsFile(body);
142808
+ } catch (err) {
142809
+ return {
142810
+ kind: "failed",
142811
+ filePath,
142812
+ reason: `it isn't valid JSON (${describeErr(err)}) \u2014 fix or move it, then retry`
142813
+ };
142814
+ }
142815
+ const merge = mergeKeybinding(parsed);
142816
+ if (merge.kind === "already-configured")
142817
+ return { kind: "already-configured", filePath };
142818
+ if (merge.kind === "conflict")
142819
+ return { kind: "conflict", filePath, existingText: merge.existingText };
142820
+ if (merge.kind === "not-an-array") {
142821
+ return { kind: "failed", filePath, reason: "it isn't a JSON array \u2014 fix or move it, then retry" };
142822
+ }
142823
+ if (body !== void 0) {
142824
+ try {
142825
+ await deps.copyFile(filePath, `${filePath}.${deps.randomSuffix()}.bak`);
142826
+ } catch (err) {
142827
+ return { kind: "failed", filePath, reason: `couldn't back it up first (${describeErr(err)})` };
142828
+ }
142829
+ }
142830
+ try {
142831
+ await deps.mkdir(path2.dirname(filePath));
142832
+ await deps.writeFile(filePath, `${JSON.stringify(merge.next, null, 2)}
142833
+ `);
142834
+ } catch (err) {
142835
+ return { kind: "failed", filePath, reason: describeErr(err) };
142836
+ }
142837
+ return { kind: "installed", filePath };
142838
+ }
142839
+ function describeErr(err) {
142840
+ return err instanceof Error ? err.message : String(err);
142841
+ }
142842
+ async function enableAppleTerminalOptionAsMeta(deps) {
142843
+ const profiles = [];
142844
+ for (const which of ["Default Window Settings", "Startup Window Settings"]) {
142845
+ const res = await deps.run("defaults", ["read", "com.apple.Terminal", which]);
142846
+ const name = res.stdout.trim();
142847
+ if (res.code === 0 && name && !profiles.includes(name))
142848
+ profiles.push(name);
142849
+ }
142850
+ if (profiles.length === 0) {
142851
+ return { ok: false, profiles: [], reason: "couldn't read Terminal.app's active profile" };
142852
+ }
142853
+ let changed = false;
142854
+ for (const profile of profiles) {
142855
+ const key = `:'Window Settings':'${profile}':useOptionAsMetaKey`;
142856
+ const add = await deps.run("/usr/libexec/PlistBuddy", ["-c", `Add ${key} bool true`, deps.plistPath]);
142857
+ if (add.code === 0) {
142858
+ changed = true;
142859
+ continue;
142860
+ }
142861
+ const set = await deps.run("/usr/libexec/PlistBuddy", ["-c", `Set ${key} true`, deps.plistPath]);
142862
+ if (set.code === 0)
142863
+ changed = true;
142864
+ }
142865
+ if (!changed)
142866
+ return { ok: false, profiles, reason: "PlistBuddy rejected every profile" };
142867
+ await deps.run("killall", ["cfprefsd"]);
142868
+ return { ok: true, profiles };
142869
+ }
142870
+
142600
142871
  // src/commands/update.ts
142601
142872
  import * as fs4 from "fs";
142602
142873
  import * as https2 from "https";
142603
- import * as path2 from "path";
142874
+ import * as path3 from "path";
142604
142875
  import { fileURLToPath } from "url";
142605
- var __dirname = path2.dirname(fileURLToPath(import.meta.url));
142876
+ var __dirname = path3.dirname(fileURLToPath(import.meta.url));
142606
142877
  var NPM_REGISTRY_LATEST = "https://registry.npmjs.org/nexrall-code/latest";
142607
142878
  function get2(url) {
142608
142879
  return new Promise((resolve3, reject) => {
@@ -142622,7 +142893,7 @@ function get2(url) {
142622
142893
  }
142623
142894
  function getCurrentVersion() {
142624
142895
  try {
142625
- const pkg = path2.resolve(__dirname, "../package.json");
142896
+ const pkg = path3.resolve(__dirname, "../package.json");
142626
142897
  return JSON.parse(fs4.readFileSync(pkg, "utf-8")).version ?? "0.0.0";
142627
142898
  } catch {
142628
142899
  return "0.0.0";
@@ -142932,7 +143203,7 @@ function wrapText(text, width) {
142932
143203
 
142933
143204
  // src/trust.ts
142934
143205
  import fs5 from "fs";
142935
- import path3 from "path";
143206
+ import path4 from "path";
142936
143207
  var TRUST_ENV_VAR = "NEXRALL_TRUST_WORKSPACE";
142937
143208
  function trustGrantedByEnv() {
142938
143209
  const v = process.env[TRUST_ENV_VAR];
@@ -142940,7 +143211,7 @@ function trustGrantedByEnv() {
142940
143211
  }
142941
143212
  function declaresPluginSources(dir) {
142942
143213
  try {
142943
- const raw = fs5.readFileSync(path3.join(dir, ".nexrall", "settings.json"), "utf-8");
143214
+ const raw = fs5.readFileSync(path4.join(dir, ".nexrall", "settings.json"), "utf-8");
142944
143215
  const obj2 = JSON.parse(raw);
142945
143216
  const s2 = obj2.pluginSources;
142946
143217
  return Boolean(s2 && typeof s2 === "object" && !Array.isArray(s2) && Object.keys(s2).length > 0);
@@ -142952,7 +143223,7 @@ function detectTrustSignals(dir) {
142952
143223
  const signals = [];
142953
143224
  const exists = (...p) => {
142954
143225
  try {
142955
- return fs5.existsSync(path3.join(dir, ...p));
143226
+ return fs5.existsSync(path4.join(dir, ...p));
142956
143227
  } catch {
142957
143228
  return false;
142958
143229
  }
@@ -143147,7 +143418,7 @@ __export(base_exports, {
143147
143418
  synchronizedOutput: () => synchronizedOutput
143148
143419
  });
143149
143420
  import process3 from "node:process";
143150
- import os3 from "node:os";
143421
+ import os4 from "node:os";
143151
143422
 
143152
143423
  // ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js
143153
143424
  var isBrowser = globalThis.window?.document !== void 0;
@@ -143246,7 +143517,7 @@ var isOldWindows = () => {
143246
143517
  if (isBrowser || !isWindows2) {
143247
143518
  return false;
143248
143519
  }
143249
- const parts = os3.release().split(".");
143520
+ const parts = os4.release().split(".");
143250
143521
  const major = Number(parts[0]);
143251
143522
  const build = Number(parts[2] ?? 0);
143252
143523
  if (major < 10) {
@@ -147336,6 +147607,17 @@ var setTextNodeValue = (node, text) => {
147336
147607
  node.nodeValue = text;
147337
147608
  markNodeAsDirty(node);
147338
147609
  };
147610
+ var addLayoutListener = (rootNode, listener) => {
147611
+ if (rootNode.nodeName !== "ink-root") {
147612
+ return () => {
147613
+ };
147614
+ }
147615
+ rootNode.internal_layoutListeners ??= /* @__PURE__ */ new Set();
147616
+ rootNode.internal_layoutListeners.add(listener);
147617
+ return () => {
147618
+ rootNode.internal_layoutListeners?.delete(listener);
147619
+ };
147620
+ };
147339
147621
  var emitLayoutListeners = (rootNode) => {
147340
147622
  if (rootNode.nodeName !== "ink-root" || !rootNode.internal_layoutListeners) {
147341
147623
  return;
@@ -149579,8 +149861,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
149579
149861
  }
149580
149862
 
149581
149863
  // ../../node_modules/.pnpm/ink@7.1.1_@types+react@19.2.18_react@19.2.8/node_modules/ink/build/components/ErrorOverview.js
149582
- var cleanupPath = (path6) => {
149583
- return path6?.replace(`file://${cwd()}/`, "");
149864
+ var cleanupPath = (path7) => {
149865
+ return path7?.replace(`file://${cwd()}/`, "");
149584
149866
  };
149585
149867
  var stackUtils = new import_stack_utils.default({
149586
149868
  cwd: cwd(),
@@ -151674,6 +151956,21 @@ var import_react29 = __toESM(require_react(), 1);
151674
151956
 
151675
151957
  // ../../node_modules/.pnpm/ink@7.1.1_@types+react@19.2.18_react@19.2.8/node_modules/ink/build/hooks/use-cursor.js
151676
151958
  var import_react30 = __toESM(require_react(), 1);
151959
+ var useCursor = () => {
151960
+ const context = (0, import_react30.useContext)(CursorContext_default);
151961
+ const positionRef = (0, import_react30.useRef)(void 0);
151962
+ const setCursorPosition = (0, import_react30.useCallback)((position) => {
151963
+ positionRef.current = position;
151964
+ }, []);
151965
+ (0, import_react30.useInsertionEffect)(() => {
151966
+ context.setCursorPosition(positionRef.current);
151967
+ return () => {
151968
+ context.setCursorPosition(void 0);
151969
+ };
151970
+ });
151971
+ return { setCursorPosition };
151972
+ };
151973
+ var use_cursor_default = useCursor;
151677
151974
 
151678
151975
  // ../../node_modules/.pnpm/ink@7.1.1_@types+react@19.2.18_react@19.2.8/node_modules/ink/build/hooks/use-animation.js
151679
151976
  var import_react31 = __toESM(require_react(), 1);
@@ -151683,6 +151980,46 @@ var import_react32 = __toESM(require_react(), 1);
151683
151980
 
151684
151981
  // ../../node_modules/.pnpm/ink@7.1.1_@types+react@19.2.18_react@19.2.8/node_modules/ink/build/hooks/use-box-metrics.js
151685
151982
  var import_react33 = __toESM(require_react(), 1);
151983
+ var emptyMetrics = {
151984
+ width: 0,
151985
+ height: 0,
151986
+ left: 0,
151987
+ top: 0
151988
+ };
151989
+ var findRootNode = (node) => {
151990
+ if (!node) {
151991
+ return void 0;
151992
+ }
151993
+ if (!node.parentNode) {
151994
+ return node.nodeName === "ink-root" ? node : void 0;
151995
+ }
151996
+ return findRootNode(node.parentNode);
151997
+ };
151998
+ var useBoxMetrics = (ref) => {
151999
+ const [metrics, setMetrics] = (0, import_react33.useState)(emptyMetrics);
152000
+ const [hasMeasured, setHasMeasured] = (0, import_react33.useState)(false);
152001
+ const updateMetrics = (0, import_react33.useCallback)(() => {
152002
+ const layout = ref.current?.yogaNode?.getComputedLayout() ?? emptyMetrics;
152003
+ setMetrics((previousMetrics) => {
152004
+ const hasChanged = previousMetrics.width !== layout.width || previousMetrics.height !== layout.height || previousMetrics.left !== layout.left || previousMetrics.top !== layout.top;
152005
+ return hasChanged ? layout : previousMetrics;
152006
+ });
152007
+ setHasMeasured(Boolean(ref.current));
152008
+ }, [ref]);
152009
+ (0, import_react33.useEffect)(updateMetrics);
152010
+ (0, import_react33.useEffect)(() => {
152011
+ const rootNode = findRootNode(ref.current);
152012
+ if (!rootNode) {
152013
+ return;
152014
+ }
152015
+ return addLayoutListener(rootNode, updateMetrics);
152016
+ });
152017
+ return (0, import_react33.useMemo)(() => ({
152018
+ ...metrics,
152019
+ hasMeasured
152020
+ }), [metrics, hasMeasured]);
152021
+ };
152022
+ var use_box_metrics_default = useBoxMetrics;
151686
152023
 
151687
152024
  // src/ui/trustPrompt.tsx
151688
152025
  var CHOICES = ["Yes, I trust this folder", "No, exit"];
@@ -151847,6 +152184,35 @@ function renderInputSlices(line, cursorPos) {
151847
152184
  after: line.slice(end)
151848
152185
  };
151849
152186
  }
152187
+ function caretPosition(opts) {
152188
+ const columns = Math.max(1, opts.columns);
152189
+ const logicalLines = opts.line.split("\n");
152190
+ const beforeLines = opts.line.slice(0, opts.cursorPos).split("\n");
152191
+ const caretLineIndex = beforeLines.length - 1;
152192
+ const widthBeforeCaret = (caretLineIndex === 0 ? opts.promptWidth : 0) + visibleLen(beforeLines[caretLineIndex] ?? "");
152193
+ let rowsAboveCaretLine = 0;
152194
+ for (let i2 = 0; i2 < caretLineIndex; i2++) {
152195
+ const width = (i2 === 0 ? opts.promptWidth : 0) + visibleLen(logicalLines[i2] ?? "");
152196
+ rowsAboveCaretLine += Math.max(1, Math.ceil(width / columns));
152197
+ }
152198
+ return {
152199
+ x: widthBeforeCaret % columns,
152200
+ // Where the input box begins (measured), plus however far down its own
152201
+ // wrapped/multi-line content the caret has reached.
152202
+ y: opts.inputRowTop + rowsAboveCaretLine + Math.floor(widthBeforeCaret / columns)
152203
+ };
152204
+ }
152205
+ function decideEnterKey(char, key) {
152206
+ if (char === "\n" && !key.meta && !key.return)
152207
+ return { kind: "newline" };
152208
+ if ((key.return || char === "\r" || char === "\n") && (key.meta || key.shift)) {
152209
+ return { kind: "newline" };
152210
+ }
152211
+ const newlineIdx = char.search(/[\r\n]/);
152212
+ if (key.return || newlineIdx !== -1)
152213
+ return { kind: "submit", splitAt: newlineIdx };
152214
+ return { kind: "text" };
152215
+ }
151850
152216
  var CTRL_C_QUIT_WINDOW_MS = 3e3;
151851
152217
  var CTRL_C_HINT = "Press Ctrl+C again to exit";
151852
152218
  function decideCtrlC(state) {
@@ -151872,7 +152238,6 @@ function repaintAfterResizeSettle() {
151872
152238
  void instance.waitUntilRenderFlush().then(() => {
151873
152239
  if (inkInstance !== instance)
151874
152240
  return;
151875
- process.stdout.write("\x1B[0J");
151876
152241
  forceFullRedrawRef?.();
151877
152242
  });
151878
152243
  }
@@ -152021,15 +152386,15 @@ var App2 = ({ onReady }) => {
152021
152386
  if (key.upArrow || key.downArrow || key.tab) {
152022
152387
  return;
152023
152388
  }
152024
- const newlineIdx = char.search(/[\r\n]/);
152025
- const hasNewline = key.return || newlineIdx !== -1;
152026
- if (hasNewline && key.shift) {
152389
+ const enterAction = decideEnterKey(char, key);
152390
+ if (enterAction.kind === "newline") {
152027
152391
  const pos = cursorRef.current;
152028
152392
  setLine((s2) => s2.slice(0, pos) + "\n" + s2.slice(pos));
152029
152393
  setCursorPos(pos + 1);
152030
152394
  return;
152031
152395
  }
152032
- if (hasNewline) {
152396
+ if (enterAction.kind === "submit") {
152397
+ const newlineIdx = enterAction.splitAt;
152033
152398
  const before = newlineIdx === -1 ? char : char.slice(0, newlineIdx);
152034
152399
  const after = newlineIdx === -1 ? "" : char.slice(newlineIdx + 1).replace(/^[\r\n]/, "");
152035
152400
  const pos = cursorRef.current;
@@ -152124,6 +152489,18 @@ var App2 = ({ onReady }) => {
152124
152489
  });
152125
152490
  }, []);
152126
152491
  const slices = renderInputSlices(line, cursorPos);
152492
+ const inputRowRef = (0, import_react35.useRef)(null);
152493
+ const inputMetrics = use_box_metrics_default(inputRowRef);
152494
+ const { setCursorPosition } = use_cursor_default();
152495
+ setCursorPosition(
152496
+ inputMetrics.hasMeasured ? caretPosition({
152497
+ promptWidth: visibleLen(prompt2),
152498
+ line,
152499
+ cursorPos,
152500
+ columns: process.stdout.columns || 80,
152501
+ inputRowTop: inputMetrics.top
152502
+ }) : void 0
152503
+ );
152127
152504
  return /* @__PURE__ */ import_react35.default.createElement(Box_default, { flexDirection: "column" }, /* @__PURE__ */ import_react35.default.createElement(Static, { items, key: staticKey }, (item) => /* @__PURE__ */ import_react35.default.createElement(Text, { key: item.id }, item.content)), live ? /* @__PURE__ */ import_react35.default.createElement(Text, null, live) : null, /* @__PURE__ */ import_react35.default.createElement(
152128
152505
  Box_default,
152129
152506
  {
@@ -152134,7 +152511,7 @@ var App2 = ({ onReady }) => {
152134
152511
  borderRight: false,
152135
152512
  borderDimColor: true
152136
152513
  }
152137
- ), /* @__PURE__ */ import_react35.default.createElement(Box_default, null, /* @__PURE__ */ import_react35.default.createElement(Text, { wrap: "hard" }, /* @__PURE__ */ import_react35.default.createElement(Text, null, prompt2), /* @__PURE__ */ import_react35.default.createElement(Text, null, slices.before), /* @__PURE__ */ import_react35.default.createElement(Text, { inverse: true }, slices.atCursor), /* @__PURE__ */ import_react35.default.createElement(Text, null, slices.after))), /* @__PURE__ */ import_react35.default.createElement(
152514
+ ), /* @__PURE__ */ import_react35.default.createElement(Box_default, { ref: inputRowRef }, /* @__PURE__ */ import_react35.default.createElement(Text, { wrap: "hard" }, /* @__PURE__ */ import_react35.default.createElement(Text, null, prompt2), /* @__PURE__ */ import_react35.default.createElement(Text, null, slices.before), /* @__PURE__ */ import_react35.default.createElement(Text, { inverse: true }, slices.atCursor), /* @__PURE__ */ import_react35.default.createElement(Text, null, slices.after))), /* @__PURE__ */ import_react35.default.createElement(
152138
152515
  Box_default,
152139
152516
  {
152140
152517
  borderStyle: "single",
@@ -152287,9 +152664,9 @@ var InkReadlineAdapter = class extends EventEmitter3 {
152287
152664
  // src/commands/chat.ts
152288
152665
  var require2 = createRequire(import.meta.url);
152289
152666
  var CLI_VERSION = (() => {
152290
- let dir = path4.dirname(fileURLToPath2(import.meta.url));
152667
+ let dir = path5.dirname(fileURLToPath2(import.meta.url));
152291
152668
  for (let i2 = 0; i2 < 6; i2++) {
152292
- const candidate = path4.join(dir, "package.json");
152669
+ const candidate = path5.join(dir, "package.json");
152293
152670
  if (fs8.existsSync(candidate)) {
152294
152671
  try {
152295
152672
  const v = require2(candidate).version;
@@ -152298,7 +152675,7 @@ var CLI_VERSION = (() => {
152298
152675
  } catch {
152299
152676
  }
152300
152677
  }
152301
- const parent = path4.dirname(dir);
152678
+ const parent = path5.dirname(dir);
152302
152679
  if (parent === dir)
152303
152680
  break;
152304
152681
  dir = parent;
@@ -152395,7 +152772,7 @@ function printBalanceNotice(balance, zero) {
152395
152772
  }
152396
152773
  function currentUserLabel() {
152397
152774
  try {
152398
- const u = os4.userInfo().username;
152775
+ const u = os5.userInfo().username;
152399
152776
  return u ? u.charAt(0).toUpperCase() + u.slice(1) : "there";
152400
152777
  } catch {
152401
152778
  return "there";
@@ -152404,7 +152781,7 @@ function currentUserLabel() {
152404
152781
  function collectEnv(workDir) {
152405
152782
  return {
152406
152783
  cwd: workDir,
152407
- platform: `${os4.platform()} ${os4.release()}`,
152784
+ platform: `${os5.platform()} ${os5.release()}`,
152408
152785
  shell: process.env.SHELL ?? process.env.ComSpec ?? "unknown",
152409
152786
  date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
152410
152787
  gitBranch: tryExec("git branch --show-current", workDir),
@@ -152431,12 +152808,12 @@ function readNexrallMd(workDir) {
152431
152808
  const memContent = (0, import_code_core3.readAllMemory)(workDir);
152432
152809
  if (memContent)
152433
152810
  parts.push(memContent);
152434
- const globalContent = tryRead(path4.join(os4.homedir(), ".nexrall", "nexrall.md"));
152811
+ const globalContent = tryRead(path5.join(os5.homedir(), ".nexrall", "nexrall.md"));
152435
152812
  if (globalContent)
152436
152813
  parts.push(`[Global instructions]
152437
152814
  ${globalContent}`);
152438
152815
  for (const candidate of NEXRALL_MD_CANDIDATES) {
152439
- const content = tryRead(path4.join(workDir, candidate));
152816
+ const content = tryRead(path5.join(workDir, candidate));
152440
152817
  if (content) {
152441
152818
  parts.push(`[Project instructions \u2014 ${candidate}]
152442
152819
  ${content}`);
@@ -152908,12 +153285,27 @@ function printHelp() {
152908
153285
  ["/mcp", "Show MCP server connection status"],
152909
153286
  ["/agents", "List available sub-agent types (for the task tool)"],
152910
153287
  ["/context", "Show context window usage for this conversation"],
153288
+ ["/terminal-setup", "Configure this terminal so Shift+Enter inserts a newline"],
152911
153289
  ["/update", "Update nex to the latest version"]
152912
153290
  ];
152913
153291
  for (const [cmd, desc] of cmds) {
152914
153292
  console.log(" " + source_default.cyan(cmd.padEnd(35)) + source_default.dim(desc));
152915
153293
  }
152916
153294
  console.log();
153295
+ console.log(source_default.bold(" Keys:"));
153296
+ const keys = [
153297
+ ["Enter", "Send the message"],
153298
+ ["Ctrl+J", "Insert a newline \u2014 works in every terminal, no setup"],
153299
+ ["\\ then Enter", "Continue on the next line"],
153300
+ ["Shift+Enter", "Insert a newline (run /terminal-setup once if it sends instead)"],
153301
+ ["Option+Enter", "Insert a newline (macOS; /terminal-setup enables it)"],
153302
+ ["Ctrl+C", "Stop the current turn, or press twice to exit"],
153303
+ ["\u2190/\u2192", "Move the cursor within the line"]
153304
+ ];
153305
+ for (const [key, desc] of keys) {
153306
+ console.log(" " + source_default.cyan(key.padEnd(35)) + source_default.dim(desc));
153307
+ }
153308
+ console.log();
152917
153309
  }
152918
153310
  function printSessions() {
152919
153311
  const sessions = listSessions().slice(0, 20);
@@ -153305,7 +153697,7 @@ ${text}` : "");
153305
153697
  messages = messages.slice(0, res.messageIndex);
153306
153698
  console.log(source_default.green(` Rewound to #${id}: restored ${res.restored.length} file(s), ${messages.length} messages kept.`));
153307
153699
  for (const p of res.restored)
153308
- console.log(source_default.dim(" \u21A9 " + path4.relative(workDir, p)));
153700
+ console.log(source_default.dim(" \u21A9 " + path5.relative(workDir, p)));
153309
153701
  if (res.bashCount > 0) {
153310
153702
  console.log(source_default.yellow(` \u26A0 ${res.bashCount} shell command(s) ran in the rewound turns \u2014 their side effects were NOT undone.`));
153311
153703
  for (const h2 of res.gitStashHashes) {
@@ -153366,7 +153758,7 @@ ${summaryText}` }] },
153366
153758
  return;
153367
153759
  }
153368
153760
  case "/init": {
153369
- const nexrallMdPath = path4.join(workDir, "nexrall.md");
153761
+ const nexrallMdPath = path5.join(workDir, "nexrall.md");
153370
153762
  if (fs8.existsSync(nexrallMdPath)) {
153371
153763
  const answer = await new Promise((resolve3) => rl.question(source_default.yellow(" nexrall.md already exists. Overwrite? [y/n] "), (a) => resolve3(a.trim())));
153372
153764
  if (answer !== "y" && answer !== "yes") {
@@ -153375,8 +153767,8 @@ ${summaryText}` }] },
153375
153767
  return;
153376
153768
  }
153377
153769
  }
153378
- const readme = tryRead(path4.join(workDir, "README.md"))?.slice(0, 2e3) ?? "";
153379
- const pkgJson = tryRead(path4.join(workDir, "package.json"))?.slice(0, 1e3) ?? "";
153770
+ const readme = tryRead(path5.join(workDir, "README.md"))?.slice(0, 2e3) ?? "";
153771
+ const pkgJson = tryRead(path5.join(workDir, "package.json"))?.slice(0, 1e3) ?? "";
153380
153772
  const dirList = tryExec("ls -la", workDir)?.slice(0, 500) ?? "";
153381
153773
  const initPrompt = `Analyze this project and write a concise nexrall.md (project-specific instructions for an AI coding assistant).
153382
153774
  Include: project overview, tech stack, coding conventions, important files/folders, what to avoid.
@@ -153533,10 +153925,10 @@ ${dirList}`;
153533
153925
  rl.prompt();
153534
153926
  return;
153535
153927
  }
153536
- const filePath = path4.isAbsolute(arg) ? arg : path4.join(workDir, arg);
153928
+ const filePath = path5.isAbsolute(arg) ? arg : path5.join(workDir, arg);
153537
153929
  try {
153538
153930
  const content = fs8.readFileSync(filePath, "utf-8");
153539
- const rel = path4.relative(workDir, filePath);
153931
+ const rel = path5.relative(workDir, filePath);
153540
153932
  messages.push(
153541
153933
  { role: "user", content: [{ type: "text", text: `Content of \`${rel}\`:
153542
153934
  \`\`\`
@@ -153564,8 +153956,8 @@ ${content}
153564
153956
  }
153565
153957
  const [rawPath, ...captionParts] = arg.split(/\s+/);
153566
153958
  const caption = captionParts.join(" ").trim();
153567
- const filePath = path4.isAbsolute(rawPath) ? rawPath : path4.join(workDir, rawPath);
153568
- const ext = path4.extname(filePath).toLowerCase();
153959
+ const filePath = path5.isAbsolute(rawPath) ? rawPath : path5.join(workDir, rawPath);
153960
+ const ext = path5.extname(filePath).toLowerCase();
153569
153961
  const IMAGE_MIME = {
153570
153962
  ".png": "image/png",
153571
153963
  ".jpg": "image/jpeg",
@@ -153595,7 +153987,7 @@ ${content}
153595
153987
  rl.prompt();
153596
153988
  return;
153597
153989
  }
153598
- const rel = path4.relative(workDir, filePath);
153990
+ const rel = path5.relative(workDir, filePath);
153599
153991
  const data = buf.toString("base64");
153600
153992
  const label = caption ? `[Attached: ${rel}]
153601
153993
  ${caption}` : `[Attached: ${rel}]`;
@@ -153695,6 +154087,90 @@ ${text}
153695
154087
  rl.prompt();
153696
154088
  return;
153697
154089
  }
154090
+ case "/terminal-setup": {
154091
+ console.log();
154092
+ console.log(source_default.bold(" Terminal setup \u2014 Shift+Enter for a newline:"));
154093
+ console.log();
154094
+ const target = decideTerminalSetup({
154095
+ env: process.env,
154096
+ platform: process.platform,
154097
+ macOSMajor: detectMacOSMajor()
154098
+ });
154099
+ if (target.kind === "already-native") {
154100
+ console.log(source_default.green(` \u2713 ${target.terminal} already sends Shift+Enter as a newline.`));
154101
+ console.log(source_default.dim(" Nothing to install."));
154102
+ } else if (target.kind === "editor") {
154103
+ const outcome = await installEditorKeybinding(target.editor, {
154104
+ readFile: (p) => fs8.promises.readFile(p, "utf-8"),
154105
+ writeFile: (p, body) => fs8.promises.writeFile(p, body, "utf-8"),
154106
+ copyFile: (from, to) => fs8.promises.copyFile(from, to),
154107
+ mkdir: async (p) => {
154108
+ await fs8.promises.mkdir(p, { recursive: true });
154109
+ },
154110
+ randomSuffix: () => crypto4.randomBytes(4).toString("hex")
154111
+ });
154112
+ switch (outcome.kind) {
154113
+ case "installed":
154114
+ console.log(source_default.green(` \u2713 Installed the ${target.editor} Shift+Enter keybinding.`));
154115
+ console.log(source_default.dim(` ${outcome.filePath}`));
154116
+ console.log(source_default.dim(" Takes effect immediately \u2014 no reload needed."));
154117
+ break;
154118
+ case "already-configured":
154119
+ console.log(source_default.green(` \u2713 ${target.editor} already has this keybinding.`));
154120
+ console.log(source_default.dim(` ${outcome.filePath}`));
154121
+ break;
154122
+ case "conflict":
154123
+ console.log(source_default.yellow(` ! ${target.editor} already binds shift+enter to a different sequence.`));
154124
+ console.log(source_default.dim(` Existing: ${JSON.stringify(outcome.existingText)}`));
154125
+ console.log(source_default.dim(` Left as-is. Change it to ${JSON.stringify(SHIFT_ENTER_SEQUENCE)} to use it here.`));
154126
+ console.log(source_default.dim(` ${outcome.filePath}`));
154127
+ break;
154128
+ case "failed":
154129
+ console.log(source_default.red(` \u2717 Couldn't update ${target.editor}'s keybindings: ${outcome.reason}`));
154130
+ console.log(source_default.dim(` ${outcome.filePath}`));
154131
+ break;
154132
+ }
154133
+ } else if (target.kind === "apple-terminal") {
154134
+ const res = await enableAppleTerminalOptionAsMeta({
154135
+ run: async (cmd2, args) => {
154136
+ try {
154137
+ const stdout = execFileSync2(cmd2, args, { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
154138
+ return { code: 0, stdout };
154139
+ } catch (err) {
154140
+ const e2 = err;
154141
+ return { code: e2.status ?? 1, stdout: e2.stdout ?? "" };
154142
+ }
154143
+ },
154144
+ plistPath: path5.join(os5.homedir(), "Library", "Preferences", "com.apple.Terminal.plist")
154145
+ });
154146
+ if (res.ok) {
154147
+ console.log(source_default.green(' \u2713 Enabled "Use Option as Meta Key" in Apple Terminal.'));
154148
+ console.log(source_default.dim(` Profiles: ${res.profiles.join(", ")}`));
154149
+ console.log(source_default.dim(" Option+Enter now inserts a newline. Restart Terminal to apply."));
154150
+ console.log(
154151
+ source_default.dim(
154152
+ ` Apple Terminal only gained Shift+Return in macOS ${MACOS_NATIVE_SHIFT_RETURN_MAJOR}; until then Option+Enter is the equivalent.`
154153
+ )
154154
+ );
154155
+ } else {
154156
+ console.log(source_default.red(` \u2717 Couldn't configure Apple Terminal: ${res.reason}`));
154157
+ }
154158
+ } else {
154159
+ console.log(
154160
+ source_default.yellow(
154161
+ ` ! Not sure how to configure this terminal${target.terminal ? ` (${target.terminal})` : ""}.`
154162
+ )
154163
+ );
154164
+ console.log(source_default.dim(" Bind Shift+Enter to send ESC then CR, if your terminal supports it."));
154165
+ }
154166
+ console.log();
154167
+ console.log(source_default.dim(" Works in every terminal, no setup required:"));
154168
+ console.log(source_default.dim(" \u2022 Ctrl+J \u2014 insert a newline"));
154169
+ console.log(source_default.dim(" \u2022 \\ then Enter \u2014 continue on the next line"));
154170
+ console.log();
154171
+ rl.prompt();
154172
+ return;
154173
+ }
153698
154174
  case "/agents": {
153699
154175
  console.log();
153700
154176
  console.log(source_default.bold(" Sub-agent types (used by the `task` tool):"));
@@ -154188,7 +154664,7 @@ program2.option("-p, --pro", "Use Claude Opus 5 (most capable)").option("-t, --t
154188
154664
  process.exit(1);
154189
154665
  }
154190
154666
  const model = options.model ? options.model : options.ultra ? "claude-fable-5" : options.pro ? "claude-opus-5" : options.turbo ? "claude-sonnet-5" : "claude-sonnet-5";
154191
- const workDir = options.dir ? path5.resolve(options.dir) : process.cwd();
154667
+ const workDir = options.dir ? path6.resolve(options.dir) : process.cwd();
154192
154668
  if (options.yolo)
154193
154669
  setAutoApprove("all");
154194
154670
  const resume = options.resume === true ? "last" : typeof options.resume === "string" ? options.resume : void 0;