atlarix 15.12.3 → 15.12.5

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.
@@ -921,8 +921,8 @@ var require_renderer = __commonJS({
921
921
  var require_packageJson = __commonJS({
922
922
  "node_modules/electron-log/src/node/packageJson.js"(exports2, module2) {
923
923
  "use strict";
924
- var fs77 = __require("fs");
925
- var path94 = __require("path");
924
+ var fs78 = __require("fs");
925
+ var path95 = __require("path");
926
926
  module2.exports = {
927
927
  findAndReadPackageJson,
928
928
  tryReadJsonAt
@@ -935,12 +935,12 @@ var require_packageJson = __commonJS({
935
935
  return void 0;
936
936
  }
937
937
  try {
938
- const searchPath = path94.join(...searchPaths);
938
+ const searchPath = path95.join(...searchPaths);
939
939
  const fileName = findUp("package.json", searchPath);
940
940
  if (!fileName) {
941
941
  return void 0;
942
942
  }
943
- const json3 = JSON.parse(fs77.readFileSync(fileName, "utf8"));
943
+ const json3 = JSON.parse(fs78.readFileSync(fileName, "utf8"));
944
944
  const name30 = json3?.productName || json3?.name;
945
945
  if (!name30 || name30.toLowerCase() === "electron") {
946
946
  return void 0;
@@ -956,11 +956,11 @@ var require_packageJson = __commonJS({
956
956
  function findUp(fileName, cwd) {
957
957
  let currentPath = cwd;
958
958
  while (true) {
959
- const parsedPath = path94.parse(currentPath);
959
+ const parsedPath = path95.parse(currentPath);
960
960
  const root2 = parsedPath.root;
961
961
  const dir = parsedPath.dir;
962
- if (fs77.existsSync(path94.join(currentPath, fileName))) {
963
- return path94.resolve(path94.join(currentPath, fileName));
962
+ if (fs78.existsSync(path95.join(currentPath, fileName))) {
963
+ return path95.resolve(path95.join(currentPath, fileName));
964
964
  }
965
965
  if (currentPath === root2) {
966
966
  return null;
@@ -994,7 +994,7 @@ var require_NodeExternalApi = __commonJS({
994
994
  "use strict";
995
995
  var childProcess = __require("child_process");
996
996
  var os29 = __require("os");
997
- var path94 = __require("path");
997
+ var path95 = __require("path");
998
998
  var packageJson = require_packageJson();
999
999
  var NodeExternalApi = class {
1000
1000
  appName = void 0;
@@ -1002,9 +1002,9 @@ var require_NodeExternalApi = __commonJS({
1002
1002
  platform = process.platform;
1003
1003
  getAppLogPath(appName = this.getAppName()) {
1004
1004
  if (this.platform === "darwin") {
1005
- return path94.join(this.getSystemPathHome(), "Library/Logs", appName);
1005
+ return path95.join(this.getSystemPathHome(), "Library/Logs", appName);
1006
1006
  }
1007
- return path94.join(this.getAppUserDataPath(appName), "logs");
1007
+ return path95.join(this.getAppUserDataPath(appName), "logs");
1008
1008
  }
1009
1009
  getAppName() {
1010
1010
  const appName = this.appName || this.getAppPackageJson()?.name;
@@ -1026,7 +1026,7 @@ var require_NodeExternalApi = __commonJS({
1026
1026
  return this.appPackageJson;
1027
1027
  }
1028
1028
  getAppUserDataPath(appName = this.getAppName()) {
1029
- return appName ? path94.join(this.getSystemPathAppData(), appName) : void 0;
1029
+ return appName ? path95.join(this.getSystemPathAppData(), appName) : void 0;
1030
1030
  }
1031
1031
  getAppVersion() {
1032
1032
  return this.getAppPackageJson()?.version;
@@ -1079,13 +1079,13 @@ var require_NodeExternalApi = __commonJS({
1079
1079
  const home = this.getSystemPathHome();
1080
1080
  switch (this.platform) {
1081
1081
  case "darwin": {
1082
- return path94.join(home, "Library/Application Support");
1082
+ return path95.join(home, "Library/Application Support");
1083
1083
  }
1084
1084
  case "win32": {
1085
- return process.env.APPDATA || path94.join(home, "AppData/Roaming");
1085
+ return process.env.APPDATA || path95.join(home, "AppData/Roaming");
1086
1086
  }
1087
1087
  default: {
1088
- return process.env.XDG_CONFIG_HOME || path94.join(home, ".config");
1088
+ return process.env.XDG_CONFIG_HOME || path95.join(home, ".config");
1089
1089
  }
1090
1090
  }
1091
1091
  }
@@ -1170,7 +1170,7 @@ var require_NodeExternalApi = __commonJS({
1170
1170
  var require_ElectronExternalApi = __commonJS({
1171
1171
  "node_modules/electron-log/src/main/ElectronExternalApi.js"(exports2, module2) {
1172
1172
  "use strict";
1173
- var path94 = __require("path");
1173
+ var path95 = __require("path");
1174
1174
  var NodeExternalApi = require_NodeExternalApi();
1175
1175
  var ElectronExternalApi = class extends NodeExternalApi {
1176
1176
  /**
@@ -1234,7 +1234,7 @@ var require_ElectronExternalApi = __commonJS({
1234
1234
  return !this.electron.app.isPackaged;
1235
1235
  }
1236
1236
  if (typeof process.execPath === "string") {
1237
- const execFileName = path94.basename(process.execPath).toLowerCase();
1237
+ const execFileName = path95.basename(process.execPath).toLowerCase();
1238
1238
  return execFileName.startsWith("electron");
1239
1239
  }
1240
1240
  return super.isDev();
@@ -1336,9 +1336,9 @@ var require_ElectronExternalApi = __commonJS({
1336
1336
  var require_initialize = __commonJS({
1337
1337
  "node_modules/electron-log/src/main/initialize.js"(exports2, module2) {
1338
1338
  "use strict";
1339
- var fs77 = __require("fs");
1339
+ var fs78 = __require("fs");
1340
1340
  var os29 = __require("os");
1341
- var path94 = __require("path");
1341
+ var path95 = __require("path");
1342
1342
  var preloadInitializeFn = require_electron_log_preload();
1343
1343
  var preloadInitialized = false;
1344
1344
  var spyConsoleInitialized = false;
@@ -1385,14 +1385,14 @@ var require_initialize = __commonJS({
1385
1385
  }
1386
1386
  preloadInitialized = true;
1387
1387
  try {
1388
- preloadPath = path94.resolve(
1388
+ preloadPath = path95.resolve(
1389
1389
  __dirname,
1390
1390
  "../renderer/electron-log-preload.js"
1391
1391
  );
1392
1392
  } catch {
1393
1393
  }
1394
- if (!preloadPath || !fs77.existsSync(preloadPath)) {
1395
- preloadPath = path94.join(
1394
+ if (!preloadPath || !fs78.existsSync(preloadPath)) {
1395
+ preloadPath = path95.join(
1396
1396
  externalApi.getAppUserDataPath() || os29.tmpdir(),
1397
1397
  "electron-log-preload.js"
1398
1398
  );
@@ -1403,7 +1403,7 @@ var require_initialize = __commonJS({
1403
1403
  console.error(e);
1404
1404
  }
1405
1405
  `;
1406
- fs77.writeFileSync(preloadPath, preloadCode, "utf8");
1406
+ fs78.writeFileSync(preloadPath, preloadCode, "utf8");
1407
1407
  }
1408
1408
  externalApi.setPreloadFileForSessions({
1409
1409
  filePath: preloadPath,
@@ -2159,7 +2159,7 @@ var require_File = __commonJS({
2159
2159
  "node_modules/electron-log/src/node/transports/file/File.js"(exports2, module2) {
2160
2160
  "use strict";
2161
2161
  var EventEmitter6 = __require("events");
2162
- var fs77 = __require("fs");
2162
+ var fs78 = __require("fs");
2163
2163
  var os29 = __require("os");
2164
2164
  var File4 = class extends EventEmitter6 {
2165
2165
  asyncWriteQueue = [];
@@ -2170,12 +2170,12 @@ var require_File = __commonJS({
2170
2170
  writeOptions = null;
2171
2171
  writeAsync = false;
2172
2172
  constructor({
2173
- path: path94,
2173
+ path: path95,
2174
2174
  writeOptions = { encoding: "utf8", flag: "a", mode: 438 },
2175
2175
  writeAsync = false
2176
2176
  }) {
2177
2177
  super();
2178
- this.path = path94;
2178
+ this.path = path95;
2179
2179
  this.writeOptions = writeOptions;
2180
2180
  this.writeAsync = writeAsync;
2181
2181
  }
@@ -2184,7 +2184,7 @@ var require_File = __commonJS({
2184
2184
  }
2185
2185
  clear() {
2186
2186
  try {
2187
- fs77.writeFileSync(this.path, "", {
2187
+ fs78.writeFileSync(this.path, "", {
2188
2188
  mode: this.writeOptions.mode,
2189
2189
  flag: "w"
2190
2190
  });
@@ -2214,7 +2214,7 @@ var require_File = __commonJS({
2214
2214
  getSize() {
2215
2215
  if (this.initialSize === void 0) {
2216
2216
  try {
2217
- const stats = fs77.statSync(this.path);
2217
+ const stats = fs78.statSync(this.path);
2218
2218
  this.initialSize = stats.size;
2219
2219
  } catch (e3) {
2220
2220
  this.initialSize = 0;
@@ -2236,7 +2236,7 @@ var require_File = __commonJS({
2236
2236
  const text5 = this.asyncWriteQueue.join("");
2237
2237
  this.asyncWriteQueue = [];
2238
2238
  this.hasActiveAsyncWriting = true;
2239
- fs77.writeFile(this.path, text5, this.writeOptions, (e3) => {
2239
+ fs78.writeFile(this.path, text5, this.writeOptions, (e3) => {
2240
2240
  file2.hasActiveAsyncWriting = false;
2241
2241
  if (e3) {
2242
2242
  file2.emit(
@@ -2265,7 +2265,7 @@ var require_File = __commonJS({
2265
2265
  return;
2266
2266
  }
2267
2267
  try {
2268
- fs77.writeFileSync(this.path, text5, this.writeOptions);
2268
+ fs78.writeFileSync(this.path, text5, this.writeOptions);
2269
2269
  this.increaseBytesWrittenCounter(text5);
2270
2270
  } catch (e3) {
2271
2271
  this.emit(
@@ -2279,12 +2279,12 @@ var require_File = __commonJS({
2279
2279
  module2.exports = File4;
2280
2280
  function readFileSyncFromEnd(filePath, bytesCount) {
2281
2281
  const buffer = Buffer.alloc(bytesCount);
2282
- const stats = fs77.statSync(filePath);
2282
+ const stats = fs78.statSync(filePath);
2283
2283
  const readLength = Math.min(stats.size, bytesCount);
2284
2284
  const offset = Math.max(0, stats.size - bytesCount);
2285
- const fd2 = fs77.openSync(filePath, "r");
2286
- const totalBytes = fs77.readSync(fd2, buffer, 0, readLength, offset);
2287
- fs77.closeSync(fd2);
2285
+ const fd2 = fs78.openSync(filePath, "r");
2286
+ const totalBytes = fs78.readSync(fd2, buffer, 0, readLength, offset);
2287
+ fs78.closeSync(fd2);
2288
2288
  return buffer.toString("utf8", 0, totalBytes);
2289
2289
  }
2290
2290
  }
@@ -2318,8 +2318,8 @@ var require_FileRegistry = __commonJS({
2318
2318
  "node_modules/electron-log/src/node/transports/file/FileRegistry.js"(exports2, module2) {
2319
2319
  "use strict";
2320
2320
  var EventEmitter6 = __require("events");
2321
- var fs77 = __require("fs");
2322
- var path94 = __require("path");
2321
+ var fs78 = __require("fs");
2322
+ var path95 = __require("path");
2323
2323
  var File4 = require_File();
2324
2324
  var NullFile = require_NullFile();
2325
2325
  var FileRegistry = class extends EventEmitter6 {
@@ -2338,7 +2338,7 @@ var require_FileRegistry = __commonJS({
2338
2338
  provide({ filePath, writeOptions = {}, writeAsync = false }) {
2339
2339
  let file2;
2340
2340
  try {
2341
- filePath = path94.resolve(filePath);
2341
+ filePath = path95.resolve(filePath);
2342
2342
  if (this.store[filePath]) {
2343
2343
  return this.store[filePath];
2344
2344
  }
@@ -2376,8 +2376,8 @@ var require_FileRegistry = __commonJS({
2376
2376
  * @private
2377
2377
  */
2378
2378
  testFileWriting({ filePath, writeOptions }) {
2379
- fs77.mkdirSync(path94.dirname(filePath), { recursive: true });
2380
- fs77.writeFileSync(filePath, "", { flag: "a", mode: writeOptions.mode });
2379
+ fs78.mkdirSync(path95.dirname(filePath), { recursive: true });
2380
+ fs78.writeFileSync(filePath, "", { flag: "a", mode: writeOptions.mode });
2381
2381
  }
2382
2382
  };
2383
2383
  module2.exports = FileRegistry;
@@ -2388,9 +2388,9 @@ var require_FileRegistry = __commonJS({
2388
2388
  var require_file = __commonJS({
2389
2389
  "node_modules/electron-log/src/node/transports/file/index.js"(exports2, module2) {
2390
2390
  "use strict";
2391
- var fs77 = __require("fs");
2391
+ var fs78 = __require("fs");
2392
2392
  var os29 = __require("os");
2393
- var path94 = __require("path");
2393
+ var path95 = __require("path");
2394
2394
  var FileRegistry = require_FileRegistry();
2395
2395
  var { transform: transform2 } = require_transform();
2396
2396
  var { removeStyles } = require_style();
@@ -2421,9 +2421,9 @@ var require_file = __commonJS({
2421
2421
  writeOptions: { flag: "a", mode: 438, encoding: "utf8" },
2422
2422
  archiveLogFn(file2) {
2423
2423
  const oldPath = file2.toString();
2424
- const inf = path94.parse(oldPath);
2424
+ const inf = path95.parse(oldPath);
2425
2425
  try {
2426
- fs77.renameSync(oldPath, path94.join(inf.dir, `${inf.name}.old${inf.ext}`));
2426
+ fs78.renameSync(oldPath, path95.join(inf.dir, `${inf.name}.old${inf.ext}`));
2427
2427
  } catch (e3) {
2428
2428
  logConsole("Could not rotate log", e3);
2429
2429
  const quarterOfMaxSize = Math.round(transport.maxSize / 4);
@@ -2431,7 +2431,7 @@ var require_file = __commonJS({
2431
2431
  }
2432
2432
  },
2433
2433
  resolvePathFn(vars) {
2434
- return path94.join(vars.libraryDefaultDir, vars.fileName);
2434
+ return path95.join(vars.libraryDefaultDir, vars.fileName);
2435
2435
  },
2436
2436
  setAppName(name30) {
2437
2437
  logger126.dependencies.externalApi.setAppName(name30);
@@ -2492,15 +2492,15 @@ var require_file = __commonJS({
2492
2492
  }
2493
2493
  function readAllLogs({ fileFilter = (f5) => f5.endsWith(".log") } = {}) {
2494
2494
  initializeOnFirstAccess();
2495
- const logsPath = path94.dirname(transport.resolvePathFn(pathVariables));
2496
- if (!fs77.existsSync(logsPath)) {
2495
+ const logsPath = path95.dirname(transport.resolvePathFn(pathVariables));
2496
+ if (!fs78.existsSync(logsPath)) {
2497
2497
  return [];
2498
2498
  }
2499
- return fs77.readdirSync(logsPath).map((fileName) => path94.join(logsPath, fileName)).filter(fileFilter).map((logPath) => {
2499
+ return fs78.readdirSync(logsPath).map((fileName) => path95.join(logsPath, fileName)).filter(fileFilter).map((logPath) => {
2500
2500
  try {
2501
2501
  return {
2502
2502
  path: logPath,
2503
- lines: fs77.readFileSync(logPath, "utf8").split(os29.EOL)
2503
+ lines: fs78.readFileSync(logPath, "utf8").split(os29.EOL)
2504
2504
  };
2505
2505
  } catch {
2506
2506
  return null;
@@ -4174,7 +4174,7 @@ var init_sql = __esm({
4174
4174
  function mapResultRow(columns, row, joinsNotNullableMap) {
4175
4175
  const nullifyMap = {};
4176
4176
  const result2 = columns.reduce(
4177
- (result22, { path: path94, field }, columnIndex) => {
4177
+ (result22, { path: path95, field }, columnIndex) => {
4178
4178
  let decoder;
4179
4179
  if (is(field, Column)) {
4180
4180
  decoder = field;
@@ -4186,8 +4186,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
4186
4186
  decoder = field.sql.decoder;
4187
4187
  }
4188
4188
  let node2 = result22;
4189
- for (const [pathChunkIndex, pathChunk] of path94.entries()) {
4190
- if (pathChunkIndex < path94.length - 1) {
4189
+ for (const [pathChunkIndex, pathChunk] of path95.entries()) {
4190
+ if (pathChunkIndex < path95.length - 1) {
4191
4191
  if (!(pathChunk in node2)) {
4192
4192
  node2[pathChunk] = {};
4193
4193
  }
@@ -4195,8 +4195,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
4195
4195
  } else {
4196
4196
  const rawValue = row[columnIndex];
4197
4197
  const value = node2[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
4198
- if (joinsNotNullableMap && is(field, Column) && path94.length === 2) {
4199
- const objectName = path94[0];
4198
+ if (joinsNotNullableMap && is(field, Column) && path95.length === 2) {
4199
+ const objectName = path95[0];
4200
4200
  if (!(objectName in nullifyMap)) {
4201
4201
  nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
4202
4202
  } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
@@ -13135,10 +13135,10 @@ function mergeDefs(...defs) {
13135
13135
  function cloneDef(schema) {
13136
13136
  return mergeDefs(schema._zod.def);
13137
13137
  }
13138
- function getElementAtPath(obj2, path94) {
13139
- if (!path94)
13138
+ function getElementAtPath(obj2, path95) {
13139
+ if (!path95)
13140
13140
  return obj2;
13141
- return path94.reduce((acc, key) => acc?.[key], obj2);
13141
+ return path95.reduce((acc, key) => acc?.[key], obj2);
13142
13142
  }
13143
13143
  function promiseAllObject(promisesObj) {
13144
13144
  const keys2 = Object.keys(promisesObj);
@@ -13466,11 +13466,11 @@ function explicitlyAborted(x4, startIndex = 0) {
13466
13466
  }
13467
13467
  return false;
13468
13468
  }
13469
- function prefixIssues(path94, issues) {
13469
+ function prefixIssues(path95, issues) {
13470
13470
  return issues.map((iss) => {
13471
13471
  var _a30;
13472
13472
  (_a30 = iss).path ?? (_a30.path = []);
13473
- iss.path.unshift(path94);
13473
+ iss.path.unshift(path95);
13474
13474
  return iss;
13475
13475
  });
13476
13476
  }
@@ -13687,16 +13687,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
13687
13687
  }
13688
13688
  function formatError(error51, mapper = (issue2) => issue2.message) {
13689
13689
  const fieldErrors = { _errors: [] };
13690
- const processError = (error52, path94 = []) => {
13690
+ const processError = (error52, path95 = []) => {
13691
13691
  for (const issue2 of error52.issues) {
13692
13692
  if (issue2.code === "invalid_union" && issue2.errors.length) {
13693
- issue2.errors.map((issues) => processError({ issues }, [...path94, ...issue2.path]));
13693
+ issue2.errors.map((issues) => processError({ issues }, [...path95, ...issue2.path]));
13694
13694
  } else if (issue2.code === "invalid_key") {
13695
- processError({ issues: issue2.issues }, [...path94, ...issue2.path]);
13695
+ processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
13696
13696
  } else if (issue2.code === "invalid_element") {
13697
- processError({ issues: issue2.issues }, [...path94, ...issue2.path]);
13697
+ processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
13698
13698
  } else {
13699
- const fullpath = [...path94, ...issue2.path];
13699
+ const fullpath = [...path95, ...issue2.path];
13700
13700
  if (fullpath.length === 0) {
13701
13701
  fieldErrors._errors.push(mapper(issue2));
13702
13702
  } else {
@@ -13723,17 +13723,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
13723
13723
  }
13724
13724
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
13725
13725
  const result2 = { errors: [] };
13726
- const processError = (error52, path94 = []) => {
13726
+ const processError = (error52, path95 = []) => {
13727
13727
  var _a30, _b21;
13728
13728
  for (const issue2 of error52.issues) {
13729
13729
  if (issue2.code === "invalid_union" && issue2.errors.length) {
13730
- issue2.errors.map((issues) => processError({ issues }, [...path94, ...issue2.path]));
13730
+ issue2.errors.map((issues) => processError({ issues }, [...path95, ...issue2.path]));
13731
13731
  } else if (issue2.code === "invalid_key") {
13732
- processError({ issues: issue2.issues }, [...path94, ...issue2.path]);
13732
+ processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
13733
13733
  } else if (issue2.code === "invalid_element") {
13734
- processError({ issues: issue2.issues }, [...path94, ...issue2.path]);
13734
+ processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
13735
13735
  } else {
13736
- const fullpath = [...path94, ...issue2.path];
13736
+ const fullpath = [...path95, ...issue2.path];
13737
13737
  if (fullpath.length === 0) {
13738
13738
  result2.errors.push(mapper(issue2));
13739
13739
  continue;
@@ -13765,8 +13765,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
13765
13765
  }
13766
13766
  function toDotPath(_path) {
13767
13767
  const segs = [];
13768
- const path94 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
13769
- for (const seg of path94) {
13768
+ const path95 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
13769
+ for (const seg of path95) {
13770
13770
  if (typeof seg === "number")
13771
13771
  segs.push(`[${seg}]`);
13772
13772
  else if (typeof seg === "symbol")
@@ -27196,13 +27196,13 @@ function resolveRef(ref, ctx) {
27196
27196
  if (!ref.startsWith("#")) {
27197
27197
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
27198
27198
  }
27199
- const path94 = ref.slice(1).split("/").filter(Boolean);
27200
- if (path94.length === 0) {
27199
+ const path95 = ref.slice(1).split("/").filter(Boolean);
27200
+ if (path95.length === 0) {
27201
27201
  return ctx.rootSchema;
27202
27202
  }
27203
27203
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
27204
- if (path94[0] === defsKey) {
27205
- const key = path94[1];
27204
+ if (path95[0] === defsKey) {
27205
+ const key = path95[1];
27206
27206
  if (!key || !ctx.defs[key]) {
27207
27207
  throw new Error(`Reference not found: ${ref}`);
27208
27208
  }
@@ -41609,45 +41609,45 @@ function createOpenAI(options2 = {}) {
41609
41609
  );
41610
41610
  const createChatModel = (modelId) => new OpenAIChatLanguageModel(modelId, {
41611
41611
  provider: `${providerName}.chat`,
41612
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41612
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41613
41613
  headers: getHeaders,
41614
41614
  fetch: options2.fetch
41615
41615
  });
41616
41616
  const createCompletionModel = (modelId) => new OpenAICompletionLanguageModel(modelId, {
41617
41617
  provider: `${providerName}.completion`,
41618
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41618
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41619
41619
  headers: getHeaders,
41620
41620
  fetch: options2.fetch
41621
41621
  });
41622
41622
  const createEmbeddingModel = (modelId) => new OpenAIEmbeddingModel(modelId, {
41623
41623
  provider: `${providerName}.embedding`,
41624
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41624
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41625
41625
  headers: getHeaders,
41626
41626
  fetch: options2.fetch
41627
41627
  });
41628
41628
  const createImageModel = (modelId) => new OpenAIImageModel(modelId, {
41629
41629
  provider: `${providerName}.image`,
41630
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41630
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41631
41631
  headers: getHeaders,
41632
41632
  fetch: options2.fetch
41633
41633
  });
41634
41634
  const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {
41635
41635
  provider: `${providerName}.transcription`,
41636
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41636
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41637
41637
  headers: getHeaders,
41638
41638
  fetch: options2.fetch,
41639
41639
  webSocket: options2.webSocket
41640
41640
  });
41641
41641
  const createSpeechTranslationModel = (modelId) => new OpenAISpeechTranslationModel(modelId, {
41642
41642
  provider: `${providerName}.speech-translation`,
41643
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41643
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41644
41644
  headers: getHeaders,
41645
41645
  fetch: options2.fetch,
41646
41646
  webSocket: options2.webSocket
41647
41647
  });
41648
41648
  const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {
41649
41649
  provider: `${providerName}.speech`,
41650
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41650
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41651
41651
  headers: getHeaders,
41652
41652
  fetch: options2.fetch
41653
41653
  });
@@ -41659,7 +41659,7 @@ function createOpenAI(options2 = {}) {
41659
41659
  });
41660
41660
  const createSkills = () => new OpenAISkills({
41661
41661
  provider: `${providerName}.skills`,
41662
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41662
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41663
41663
  headers: getHeaders,
41664
41664
  fetch: options2.fetch
41665
41665
  });
@@ -41674,7 +41674,7 @@ function createOpenAI(options2 = {}) {
41674
41674
  const createResponsesModel = (modelId) => {
41675
41675
  return new OpenAIResponsesBatchLanguageModel(modelId, {
41676
41676
  provider: `${providerName}.responses`,
41677
- url: ({ path: path94 }) => `${baseURL}${path94}`,
41677
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
41678
41678
  headers: getHeaders,
41679
41679
  fetch: options2.fetch,
41680
41680
  // Soft-deprecated. TODO: remove in v8
@@ -47528,10 +47528,10 @@ var init_dist5 = __esm({
47528
47528
  result: conversion.result
47529
47529
  };
47530
47530
  }
47531
- getUrl(path94) {
47531
+ getUrl(path95) {
47532
47532
  return this.options.config.url({
47533
47533
  modelId: this.options.modelId,
47534
- path: path94
47534
+ path: path95
47535
47535
  });
47536
47536
  }
47537
47537
  };
@@ -54557,8 +54557,8 @@ var init_dist6 = __esm({
54557
54557
  yield await convertAnthropicBatchResult(line);
54558
54558
  }
54559
54559
  }
54560
- getBatchUrl(path94) {
54561
- return `${this.config.baseURL}/messages/batches${path94}`;
54560
+ getBatchUrl(path95) {
54561
+ return `${this.config.baseURL}/messages/batches${path95}`;
54562
54562
  }
54563
54563
  async getStartBatchHeaders({
54564
54564
  betas,
@@ -68396,8 +68396,8 @@ function createOpenAICompatible(options2) {
68396
68396
  const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION6}`);
68397
68397
  const getCommonModelConfig = (modelType) => ({
68398
68398
  provider: `${providerName}.${modelType}`,
68399
- url: ({ path: path94 }) => {
68400
- const url2 = new URL(`${baseURL}${path94}`);
68399
+ url: ({ path: path95 }) => {
68400
+ const url2 = new URL(`${baseURL}${path95}`);
68401
68401
  if (options2.queryParams) {
68402
68402
  url2.search = new URLSearchParams(options2.queryParams).toString();
68403
68403
  }
@@ -71303,8 +71303,8 @@ var require_windows = __commonJS({
71303
71303
  "node_modules/isexe/windows.js"(exports2, module2) {
71304
71304
  module2.exports = isexe;
71305
71305
  isexe.sync = sync;
71306
- var fs77 = __require("fs");
71307
- function checkPathExt(path94, options2) {
71306
+ var fs78 = __require("fs");
71307
+ function checkPathExt(path95, options2) {
71308
71308
  var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
71309
71309
  if (!pathext) {
71310
71310
  return true;
@@ -71315,25 +71315,25 @@ var require_windows = __commonJS({
71315
71315
  }
71316
71316
  for (var i4 = 0; i4 < pathext.length; i4++) {
71317
71317
  var p2 = pathext[i4].toLowerCase();
71318
- if (p2 && path94.substr(-p2.length).toLowerCase() === p2) {
71318
+ if (p2 && path95.substr(-p2.length).toLowerCase() === p2) {
71319
71319
  return true;
71320
71320
  }
71321
71321
  }
71322
71322
  return false;
71323
71323
  }
71324
- function checkStat(stat9, path94, options2) {
71324
+ function checkStat(stat9, path95, options2) {
71325
71325
  if (!stat9.isSymbolicLink() && !stat9.isFile()) {
71326
71326
  return false;
71327
71327
  }
71328
- return checkPathExt(path94, options2);
71328
+ return checkPathExt(path95, options2);
71329
71329
  }
71330
- function isexe(path94, options2, cb2) {
71331
- fs77.stat(path94, function(er2, stat9) {
71332
- cb2(er2, er2 ? false : checkStat(stat9, path94, options2));
71330
+ function isexe(path95, options2, cb2) {
71331
+ fs78.stat(path95, function(er2, stat9) {
71332
+ cb2(er2, er2 ? false : checkStat(stat9, path95, options2));
71333
71333
  });
71334
71334
  }
71335
- function sync(path94, options2) {
71336
- return checkStat(fs77.statSync(path94), path94, options2);
71335
+ function sync(path95, options2) {
71336
+ return checkStat(fs78.statSync(path95), path95, options2);
71337
71337
  }
71338
71338
  }
71339
71339
  });
@@ -71343,14 +71343,14 @@ var require_mode = __commonJS({
71343
71343
  "node_modules/isexe/mode.js"(exports2, module2) {
71344
71344
  module2.exports = isexe;
71345
71345
  isexe.sync = sync;
71346
- var fs77 = __require("fs");
71347
- function isexe(path94, options2, cb2) {
71348
- fs77.stat(path94, function(er2, stat9) {
71346
+ var fs78 = __require("fs");
71347
+ function isexe(path95, options2, cb2) {
71348
+ fs78.stat(path95, function(er2, stat9) {
71349
71349
  cb2(er2, er2 ? false : checkStat(stat9, options2));
71350
71350
  });
71351
71351
  }
71352
- function sync(path94, options2) {
71353
- return checkStat(fs77.statSync(path94), options2);
71352
+ function sync(path95, options2) {
71353
+ return checkStat(fs78.statSync(path95), options2);
71354
71354
  }
71355
71355
  function checkStat(stat9, options2) {
71356
71356
  return stat9.isFile() && checkMode(stat9, options2);
@@ -71374,7 +71374,7 @@ var require_mode = __commonJS({
71374
71374
  // node_modules/isexe/index.js
71375
71375
  var require_isexe = __commonJS({
71376
71376
  "node_modules/isexe/index.js"(exports2, module2) {
71377
- var fs77 = __require("fs");
71377
+ var fs78 = __require("fs");
71378
71378
  var core;
71379
71379
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
71380
71380
  core = require_windows();
@@ -71383,7 +71383,7 @@ var require_isexe = __commonJS({
71383
71383
  }
71384
71384
  module2.exports = isexe;
71385
71385
  isexe.sync = sync;
71386
- function isexe(path94, options2, cb2) {
71386
+ function isexe(path95, options2, cb2) {
71387
71387
  if (typeof options2 === "function") {
71388
71388
  cb2 = options2;
71389
71389
  options2 = {};
@@ -71393,7 +71393,7 @@ var require_isexe = __commonJS({
71393
71393
  throw new TypeError("callback not provided");
71394
71394
  }
71395
71395
  return new Promise(function(resolve16, reject2) {
71396
- isexe(path94, options2 || {}, function(er2, is3) {
71396
+ isexe(path95, options2 || {}, function(er2, is3) {
71397
71397
  if (er2) {
71398
71398
  reject2(er2);
71399
71399
  } else {
@@ -71402,7 +71402,7 @@ var require_isexe = __commonJS({
71402
71402
  });
71403
71403
  });
71404
71404
  }
71405
- core(path94, options2 || {}, function(er2, is3) {
71405
+ core(path95, options2 || {}, function(er2, is3) {
71406
71406
  if (er2) {
71407
71407
  if (er2.code === "EACCES" || options2 && options2.ignoreErrors) {
71408
71408
  er2 = null;
@@ -71412,9 +71412,9 @@ var require_isexe = __commonJS({
71412
71412
  cb2(er2, is3);
71413
71413
  });
71414
71414
  }
71415
- function sync(path94, options2) {
71415
+ function sync(path95, options2) {
71416
71416
  try {
71417
- return core.sync(path94, options2 || {});
71417
+ return core.sync(path95, options2 || {});
71418
71418
  } catch (er2) {
71419
71419
  if (options2 && options2.ignoreErrors || er2.code === "EACCES") {
71420
71420
  return false;
@@ -71430,7 +71430,7 @@ var require_isexe = __commonJS({
71430
71430
  var require_which = __commonJS({
71431
71431
  "node_modules/which/which.js"(exports2, module2) {
71432
71432
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
71433
- var path94 = __require("path");
71433
+ var path95 = __require("path");
71434
71434
  var COLON2 = isWindows ? ";" : ":";
71435
71435
  var isexe = require_isexe();
71436
71436
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -71468,7 +71468,7 @@ var require_which = __commonJS({
71468
71468
  return opt.all && found.length ? resolve16(found) : reject2(getNotFoundError(cmd));
71469
71469
  const ppRaw = pathEnv[i4];
71470
71470
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
71471
- const pCmd = path94.join(pathPart, cmd);
71471
+ const pCmd = path95.join(pathPart, cmd);
71472
71472
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
71473
71473
  resolve16(subStep(p2, i4, 0));
71474
71474
  });
@@ -71495,7 +71495,7 @@ var require_which = __commonJS({
71495
71495
  for (let i4 = 0; i4 < pathEnv.length; i4++) {
71496
71496
  const ppRaw = pathEnv[i4];
71497
71497
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
71498
- const pCmd = path94.join(pathPart, cmd);
71498
+ const pCmd = path95.join(pathPart, cmd);
71499
71499
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
71500
71500
  for (let j2 = 0; j2 < pathExt.length; j2++) {
71501
71501
  const cur = p2 + pathExt[j2];
@@ -71543,7 +71543,7 @@ var require_path_key = __commonJS({
71543
71543
  var require_resolveCommand = __commonJS({
71544
71544
  "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
71545
71545
  "use strict";
71546
- var path94 = __require("path");
71546
+ var path95 = __require("path");
71547
71547
  var which = require_which();
71548
71548
  var getPathKey = require_path_key();
71549
71549
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -71561,7 +71561,7 @@ var require_resolveCommand = __commonJS({
71561
71561
  try {
71562
71562
  resolved2 = which.sync(parsed.command, {
71563
71563
  path: env3[getPathKey({ env: env3 })],
71564
- pathExt: withoutPathExt ? path94.delimiter : void 0
71564
+ pathExt: withoutPathExt ? path95.delimiter : void 0
71565
71565
  });
71566
71566
  } catch (e3) {
71567
71567
  } finally {
@@ -71570,7 +71570,7 @@ var require_resolveCommand = __commonJS({
71570
71570
  }
71571
71571
  }
71572
71572
  if (resolved2) {
71573
- resolved2 = path94.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved2);
71573
+ resolved2 = path95.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved2);
71574
71574
  }
71575
71575
  return resolved2;
71576
71576
  }
@@ -71624,8 +71624,8 @@ var require_shebang_command = __commonJS({
71624
71624
  if (!match) {
71625
71625
  return null;
71626
71626
  }
71627
- const [path94, argument] = match[0].replace(/#! ?/, "").split(" ");
71628
- const binary = path94.split("/").pop();
71627
+ const [path95, argument] = match[0].replace(/#! ?/, "").split(" ");
71628
+ const binary = path95.split("/").pop();
71629
71629
  if (binary === "env") {
71630
71630
  return argument;
71631
71631
  }
@@ -71638,16 +71638,16 @@ var require_shebang_command = __commonJS({
71638
71638
  var require_readShebang = __commonJS({
71639
71639
  "node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
71640
71640
  "use strict";
71641
- var fs77 = __require("fs");
71641
+ var fs78 = __require("fs");
71642
71642
  var shebangCommand = require_shebang_command();
71643
71643
  function readShebang(command) {
71644
71644
  const size2 = 150;
71645
71645
  const buffer = Buffer.alloc(size2);
71646
71646
  let fd2;
71647
71647
  try {
71648
- fd2 = fs77.openSync(command, "r");
71649
- fs77.readSync(fd2, buffer, 0, size2, 0);
71650
- fs77.closeSync(fd2);
71648
+ fd2 = fs78.openSync(command, "r");
71649
+ fs78.readSync(fd2, buffer, 0, size2, 0);
71650
+ fs78.closeSync(fd2);
71651
71651
  } catch (e3) {
71652
71652
  }
71653
71653
  return shebangCommand(buffer.toString());
@@ -71660,7 +71660,7 @@ var require_readShebang = __commonJS({
71660
71660
  var require_parse = __commonJS({
71661
71661
  "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
71662
71662
  "use strict";
71663
- var path94 = __require("path");
71663
+ var path95 = __require("path");
71664
71664
  var resolveCommand = require_resolveCommand();
71665
71665
  var escape2 = require_escape();
71666
71666
  var readShebang = require_readShebang();
@@ -71685,7 +71685,7 @@ var require_parse = __commonJS({
71685
71685
  const needsShell = !isExecutableRegExp.test(commandFile);
71686
71686
  if (parsed.options.forceShell || needsShell) {
71687
71687
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
71688
- parsed.command = path94.normalize(parsed.command);
71688
+ parsed.command = path95.normalize(parsed.command);
71689
71689
  parsed.command = escape2.command(parsed.command);
71690
71690
  parsed.args = parsed.args.map((arg2) => escape2.argument(arg2, needsDoubleEscapeMetaChars));
71691
71691
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -71817,7 +71817,7 @@ var require_strip_final_newline = __commonJS({
71817
71817
  var require_npm_run_path = __commonJS({
71818
71818
  "node_modules/shell-env/node_modules/npm-run-path/index.js"(exports2, module2) {
71819
71819
  "use strict";
71820
- var path94 = __require("path");
71820
+ var path95 = __require("path");
71821
71821
  var pathKey2 = require_path_key();
71822
71822
  var npmRunPath = (options2) => {
71823
71823
  options2 = {
@@ -71827,16 +71827,16 @@ var require_npm_run_path = __commonJS({
71827
71827
  ...options2
71828
71828
  };
71829
71829
  let previous2;
71830
- let cwdPath = path94.resolve(options2.cwd);
71830
+ let cwdPath = path95.resolve(options2.cwd);
71831
71831
  const result2 = [];
71832
71832
  while (previous2 !== cwdPath) {
71833
- result2.push(path94.join(cwdPath, "node_modules/.bin"));
71833
+ result2.push(path95.join(cwdPath, "node_modules/.bin"));
71834
71834
  previous2 = cwdPath;
71835
- cwdPath = path94.resolve(cwdPath, "..");
71835
+ cwdPath = path95.resolve(cwdPath, "..");
71836
71836
  }
71837
- const execPathDir = path94.resolve(options2.cwd, options2.execPath, "..");
71837
+ const execPathDir = path95.resolve(options2.cwd, options2.execPath, "..");
71838
71838
  result2.push(execPathDir);
71839
- return result2.concat(options2.path).join(path94.delimiter);
71839
+ return result2.concat(options2.path).join(path95.delimiter);
71840
71840
  };
71841
71841
  module2.exports = npmRunPath;
71842
71842
  module2.exports.default = npmRunPath;
@@ -71846,9 +71846,9 @@ var require_npm_run_path = __commonJS({
71846
71846
  ...options2
71847
71847
  };
71848
71848
  const env3 = { ...options2.env };
71849
- const path95 = pathKey2({ env: env3 });
71850
- options2.path = env3[path95];
71851
- env3[path95] = module2.exports(options2);
71849
+ const path96 = pathKey2({ env: env3 });
71850
+ options2.path = env3[path96];
71851
+ env3[path96] = module2.exports(options2);
71852
71852
  return env3;
71853
71853
  };
71854
71854
  }
@@ -73030,7 +73030,7 @@ var require_command = __commonJS({
73030
73030
  var require_execa = __commonJS({
73031
73031
  "node_modules/shell-env/node_modules/execa/index.js"(exports2, module2) {
73032
73032
  "use strict";
73033
- var path94 = __require("path");
73033
+ var path95 = __require("path");
73034
73034
  var childProcess = __require("child_process");
73035
73035
  var crossSpawn = require_cross_spawn();
73036
73036
  var stripFinalNewline = require_strip_final_newline();
@@ -73072,7 +73072,7 @@ var require_execa = __commonJS({
73072
73072
  };
73073
73073
  options2.env = getEnv(options2);
73074
73074
  options2.stdio = normalizeStdio(options2);
73075
- if (process.platform === "win32" && path94.basename(file2, ".exe") === "cmd") {
73075
+ if (process.platform === "win32" && path95.basename(file2, ".exe") === "cmd") {
73076
73076
  args2.unshift("/q");
73077
73077
  }
73078
73078
  return { file: file2, args: args2, options: options2, parsed };
@@ -75476,13 +75476,13 @@ var require_tiktoken = __commonJS({
75476
75476
  var wasm = require_tiktoken_bg();
75477
75477
  var imports = {};
75478
75478
  imports["./tiktoken_bg.js"] = wasm;
75479
- var path94 = __require("path");
75480
- var fs77 = __require("fs");
75481
- var candidates = __dirname.split(path94.sep).reduce((memo, _4, index2, array3) => {
75482
- const prefix = array3.slice(0, index2 + 1).join(path94.sep) + path94.sep;
75483
- if (!prefix.includes("node_modules" + path94.sep)) {
75479
+ var path95 = __require("path");
75480
+ var fs78 = __require("fs");
75481
+ var candidates = __dirname.split(path95.sep).reduce((memo, _4, index2, array3) => {
75482
+ const prefix = array3.slice(0, index2 + 1).join(path95.sep) + path95.sep;
75483
+ if (!prefix.includes("node_modules" + path95.sep)) {
75484
75484
  memo.unshift(
75485
- path94.join(
75485
+ path95.join(
75486
75486
  prefix,
75487
75487
  "node_modules",
75488
75488
  "tiktoken",
@@ -75493,11 +75493,11 @@ var require_tiktoken = __commonJS({
75493
75493
  }
75494
75494
  return memo;
75495
75495
  }, []);
75496
- candidates.unshift(path94.join(__dirname, "./tiktoken_bg.wasm"));
75496
+ candidates.unshift(path95.join(__dirname, "./tiktoken_bg.wasm"));
75497
75497
  var bytes = null;
75498
75498
  for (const candidate of candidates) {
75499
75499
  try {
75500
- bytes = fs77.readFileSync(candidate);
75500
+ bytes = fs78.readFileSync(candidate);
75501
75501
  break;
75502
75502
  } catch {
75503
75503
  }
@@ -76046,13 +76046,13 @@ function __disposeResources(env3) {
76046
76046
  }
76047
76047
  return next();
76048
76048
  }
76049
- function __rewriteRelativeImportExtension(path94, preserveJsx) {
76050
- if (typeof path94 === "string" && /^\.\.?\//.test(path94)) {
76051
- return path94.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d2, ext, cm) {
76049
+ function __rewriteRelativeImportExtension(path95, preserveJsx) {
76050
+ if (typeof path95 === "string" && /^\.\.?\//.test(path95)) {
76051
+ return path95.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d2, ext, cm) {
76052
76052
  return tsx ? preserveJsx ? ".jsx" : ".js" : d2 && (!ext || !cm) ? m3 : d2 + ext + "." + cm.toLowerCase() + "js";
76053
76053
  });
76054
76054
  }
76055
- return path94;
76055
+ return path95;
76056
76056
  }
76057
76057
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
76058
76058
  var init_tslib_es6 = __esm({
@@ -84655,8 +84655,8 @@ var require_main4 = __commonJS({
84655
84655
  });
84656
84656
 
84657
84657
  // node_modules/iceberg-js/dist/index.mjs
84658
- function buildUrl(baseUrl, path94, query) {
84659
- const url2 = new URL(path94, baseUrl);
84658
+ function buildUrl(baseUrl, path95, query) {
84659
+ const url2 = new URL(path95, baseUrl);
84660
84660
  if (query) {
84661
84661
  for (const [key, value] of Object.entries(query)) {
84662
84662
  if (value !== void 0) {
@@ -84686,12 +84686,12 @@ function createFetchClient(options2) {
84686
84686
  return {
84687
84687
  async request({
84688
84688
  method,
84689
- path: path94,
84689
+ path: path95,
84690
84690
  query,
84691
84691
  body,
84692
84692
  headers
84693
84693
  }) {
84694
- const url2 = buildUrl(options2.baseUrl, path94, query);
84694
+ const url2 = buildUrl(options2.baseUrl, path95, query);
84695
84695
  const authHeaders = await buildAuthHeaders(options2.auth);
84696
84696
  const res = await fetchFn(url2, {
84697
84697
  method,
@@ -85359,7 +85359,7 @@ var init_dist12 = __esm({
85359
85359
  if (bucketName.includes("/") || bucketName.includes("\\")) return false;
85360
85360
  return /^[\w!.\*'() &$@=;:+,?-]+$/.test(bucketName);
85361
85361
  };
85362
- encodeStoragePath = (path94) => path94.split("/").map(encodeURIComponent).join("/");
85362
+ encodeStoragePath = (path95) => path95.split("/").map(encodeURIComponent).join("/");
85363
85363
  _getErrorMessage = (err2) => {
85364
85364
  if (typeof err2 === "object" && err2 !== null) {
85365
85365
  const e3 = err2;
@@ -85591,7 +85591,7 @@ var init_dist12 = __esm({
85591
85591
  * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
85592
85592
  * @param fileBody The body of the file to be stored in the bucket.
85593
85593
  */
85594
- async uploadOrUpdate(method, path94, fileBody, fileOptions) {
85594
+ async uploadOrUpdate(method, path95, fileBody, fileOptions) {
85595
85595
  var _this = this;
85596
85596
  return _this.handleOperation(async () => {
85597
85597
  let body;
@@ -85615,7 +85615,7 @@ var init_dist12 = __esm({
85615
85615
  if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options2.duplex) options2.duplex = "half";
85616
85616
  }
85617
85617
  if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
85618
- const cleanPath = _this._removeEmptyFolders(path94);
85618
+ const cleanPath = _this._removeEmptyFolders(path95);
85619
85619
  const _path = _this._getFinalPath(cleanPath);
85620
85620
  const data = await (method == "PUT" ? put : post)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread22({ headers }, (options2 === null || options2 === void 0 ? void 0 : options2.duplex) ? { duplex: options2.duplex } : {}));
85621
85621
  return {
@@ -85692,8 +85692,8 @@ var init_dist12 = __esm({
85692
85692
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
85693
85693
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
85694
85694
  */
85695
- async upload(path94, fileBody, fileOptions) {
85696
- return this.uploadOrUpdate("POST", path94, fileBody, fileOptions);
85695
+ async upload(path95, fileBody, fileOptions) {
85696
+ return this.uploadOrUpdate("POST", path95, fileBody, fileOptions);
85697
85697
  }
85698
85698
  /**
85699
85699
  * Upload a file with a token generated from `createSignedUploadUrl`.
@@ -85733,9 +85733,9 @@ var init_dist12 = __esm({
85733
85733
  * - `objects` table permissions: none
85734
85734
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
85735
85735
  */
85736
- async uploadToSignedUrl(path94, token2, fileBody, fileOptions) {
85736
+ async uploadToSignedUrl(path95, token2, fileBody, fileOptions) {
85737
85737
  var _this3 = this;
85738
- const cleanPath = _this3._removeEmptyFolders(path94);
85738
+ const cleanPath = _this3._removeEmptyFolders(path95);
85739
85739
  const _path = _this3._getFinalPath(cleanPath);
85740
85740
  const url2 = new URL(_this3.url + `/object/upload/sign/${_path}`);
85741
85741
  url2.searchParams.set("token", token2);
@@ -85804,10 +85804,10 @@ var init_dist12 = __esm({
85804
85804
  * - `objects` table permissions: `insert`
85805
85805
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
85806
85806
  */
85807
- async createSignedUploadUrl(path94, options2) {
85807
+ async createSignedUploadUrl(path95, options2) {
85808
85808
  var _this4 = this;
85809
85809
  return _this4.handleOperation(async () => {
85810
- let _path = _this4._getFinalPath(path94);
85810
+ let _path = _this4._getFinalPath(path95);
85811
85811
  const headers = _objectSpread22({}, _this4.headers);
85812
85812
  if (options2 === null || options2 === void 0 ? void 0 : options2.upsert) headers["x-upsert"] = "true";
85813
85813
  const data = await post(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
@@ -85816,7 +85816,7 @@ var init_dist12 = __esm({
85816
85816
  if (!token2) throw new StorageError("No token returned by API");
85817
85817
  return {
85818
85818
  signedUrl: url2.toString(),
85819
- path: path94,
85819
+ path: path95,
85820
85820
  token: token2
85821
85821
  };
85822
85822
  });
@@ -85876,8 +85876,8 @@ var init_dist12 = __esm({
85876
85876
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
85877
85877
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
85878
85878
  */
85879
- async update(path94, fileBody, fileOptions) {
85880
- return this.uploadOrUpdate("PUT", path94, fileBody, fileOptions);
85879
+ async update(path95, fileBody, fileOptions) {
85880
+ return this.uploadOrUpdate("PUT", path95, fileBody, fileOptions);
85881
85881
  }
85882
85882
  /**
85883
85883
  * Moves an existing file to a new path in the same bucket.
@@ -86028,10 +86028,10 @@ var init_dist12 = __esm({
86028
86028
  * - `objects` table permissions: `select`
86029
86029
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
86030
86030
  */
86031
- async createSignedUrl(path94, expiresIn, options2) {
86031
+ async createSignedUrl(path95, expiresIn, options2) {
86032
86032
  var _this8 = this;
86033
86033
  return _this8.handleOperation(async () => {
86034
- let _path = _this8._getFinalPath(path94);
86034
+ let _path = _this8._getFinalPath(path95);
86035
86035
  const hasTransform = typeof (options2 === null || options2 === void 0 ? void 0 : options2.transform) === "object" && options2.transform !== null && Object.keys(options2.transform).length > 0;
86036
86036
  let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread22({ expiresIn }, hasTransform ? { transform: options2.transform } : {}), { headers: _this8.headers });
86037
86037
  const query = new URLSearchParams();
@@ -86166,13 +86166,13 @@ var init_dist12 = __esm({
86166
86166
  * - `objects` table permissions: `select`
86167
86167
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
86168
86168
  */
86169
- download(path94, options2, parameters) {
86169
+ download(path95, options2, parameters) {
86170
86170
  const renderPath = typeof (options2 === null || options2 === void 0 ? void 0 : options2.transform) === "object" && options2.transform !== null && Object.keys(options2.transform).length > 0 ? "render/image/authenticated" : "object";
86171
86171
  const query = new URLSearchParams();
86172
86172
  if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
86173
86173
  if ((options2 === null || options2 === void 0 ? void 0 : options2.cacheNonce) != null) query.set("cacheNonce", String(options2.cacheNonce));
86174
86174
  const queryString = query.toString();
86175
- const _path = this._getFinalPath(path94);
86175
+ const _path = this._getFinalPath(path95);
86176
86176
  const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
86177
86177
  headers: this.headers,
86178
86178
  noResolveJson: true
@@ -86203,9 +86203,9 @@ var init_dist12 = __esm({
86203
86203
  * }
86204
86204
  * ```
86205
86205
  */
86206
- async info(path94) {
86206
+ async info(path95) {
86207
86207
  var _this10 = this;
86208
- const _path = _this10._getFinalPath(path94);
86208
+ const _path = _this10._getFinalPath(path95);
86209
86209
  return _this10.handleOperation(async () => {
86210
86210
  return recursiveToCamel(await get(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
86211
86211
  });
@@ -86226,9 +86226,9 @@ var init_dist12 = __esm({
86226
86226
  * .exists('folder/avatar1.png')
86227
86227
  * ```
86228
86228
  */
86229
- async exists(path94) {
86229
+ async exists(path95) {
86230
86230
  var _this11 = this;
86231
- const _path = _this11._getFinalPath(path94);
86231
+ const _path = _this11._getFinalPath(path95);
86232
86232
  try {
86233
86233
  await head(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
86234
86234
  return {
@@ -86307,8 +86307,8 @@ var init_dist12 = __esm({
86307
86307
  * - `objects` table permissions: none
86308
86308
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
86309
86309
  */
86310
- getPublicUrl(path94, options2) {
86311
- const _path = this._getFinalPath(path94);
86310
+ getPublicUrl(path95, options2) {
86311
+ const _path = this._getFinalPath(path95);
86312
86312
  const query = new URLSearchParams();
86313
86313
  if (options2 === null || options2 === void 0 ? void 0 : options2.download) query.set("download", options2.download === true ? "" : options2.download);
86314
86314
  if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
@@ -86397,10 +86397,10 @@ var init_dist12 = __esm({
86397
86397
  * .purgeCache('folder/avatar1.png', { transformations: true })
86398
86398
  * ```
86399
86399
  */
86400
- async purgeCache(path94, options2, parameters) {
86400
+ async purgeCache(path95, options2, parameters) {
86401
86401
  var _this13 = this;
86402
86402
  return _this13.handleOperation(async () => {
86403
- const _path = encodeStoragePath(_this13._getFinalPath(path94));
86403
+ const _path = encodeStoragePath(_this13._getFinalPath(path95));
86404
86404
  const query = new URLSearchParams();
86405
86405
  if (options2 === null || options2 === void 0 ? void 0 : options2.transformations) query.set("transformations", "true");
86406
86406
  const queryString = query.toString();
@@ -86498,13 +86498,13 @@ var init_dist12 = __esm({
86498
86498
  * - `objects` table permissions: `select`
86499
86499
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
86500
86500
  */
86501
- async list(path94, options2, parameters) {
86501
+ async list(path95, options2, parameters) {
86502
86502
  var _this14 = this;
86503
86503
  return _this14.handleOperation(async () => {
86504
86504
  const sortBy2 = (options2 === null || options2 === void 0 ? void 0 : options2.sortBy) ? _objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS.sortBy), options2.sortBy) : DEFAULT_SEARCH_OPTIONS.sortBy;
86505
86505
  const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options2), {}, {
86506
86506
  sortBy: sortBy2,
86507
- prefix: path94 || ""
86507
+ prefix: path95 || ""
86508
86508
  });
86509
86509
  return await post(_this14.fetch, `${_this14.url}/object/list/${_this14.bucketId}`, body, { headers: _this14.headers }, parameters);
86510
86510
  });
@@ -86570,11 +86570,11 @@ var init_dist12 = __esm({
86570
86570
  if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
86571
86571
  return btoa(data);
86572
86572
  }
86573
- _getFinalPath(path94) {
86574
- return `${this.bucketId}/${path94.replace(/^\/+/, "")}`;
86573
+ _getFinalPath(path95) {
86574
+ return `${this.bucketId}/${path95.replace(/^\/+/, "")}`;
86575
86575
  }
86576
- _removeEmptyFolders(path94) {
86577
- return path94.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
86576
+ _removeEmptyFolders(path95) {
86577
+ return path95.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
86578
86578
  }
86579
86579
  /** Modifies the `query`, appending values the from `transform` */
86580
86580
  applyTransformOptsToQuery(query, transform2) {
@@ -88676,9 +88676,9 @@ var require_helpers = __commonJS({
88676
88676
  const fragment = hashIndex === -1 ? "" : redirectTo.slice(hashIndex);
88677
88677
  const queryIndex = base.indexOf("?");
88678
88678
  if (queryIndex !== -1) {
88679
- const path94 = base.slice(0, queryIndex);
88679
+ const path95 = base.slice(0, queryIndex);
88680
88680
  const remaining = base.slice(queryIndex + 1).split("&").filter((pair) => pair !== "" && pair !== constants_1.PKCE_FLOW_ID_PARAM && !pair.startsWith(`${constants_1.PKCE_FLOW_ID_PARAM}=`));
88681
- base = remaining.length > 0 ? `${path94}?${remaining.join("&")}` : path94;
88681
+ base = remaining.length > 0 ? `${path95}?${remaining.join("&")}` : path95;
88682
88682
  }
88683
88683
  const separator = base.includes("?") ? "&" : "?";
88684
88684
  return `${base}${separator}${constants_1.PKCE_FLOW_ID_PARAM}=${encodeURIComponent(flowId)}${fragment}`;
@@ -140719,14 +140719,14 @@ __export(account_connectors_exports, {
140719
140719
  updateConnector: () => updateConnector,
140720
140720
  waitForConnectorCredential: () => waitForConnectorCredential
140721
140721
  });
140722
- async function proxyPost(path94, payload) {
140722
+ async function proxyPost(path95, payload) {
140723
140723
  const base = getCoreProxyBaseUrl();
140724
140724
  if (!base) return null;
140725
140725
  const session2 = await getSession();
140726
140726
  const token2 = session2?.access_token;
140727
140727
  if (!token2 || token2 === "atlarix-headless") return null;
140728
140728
  try {
140729
- const res = await coreProxyFetch(`${base}${path94}`, {
140729
+ const res = await coreProxyFetch(`${base}${path95}`, {
140730
140730
  method: "POST",
140731
140731
  headers: {
140732
140732
  "Content-Type": "application/json",
@@ -140737,12 +140737,12 @@ async function proxyPost(path94, payload) {
140737
140737
  });
140738
140738
  const body = await res.json().catch(() => ({}));
140739
140739
  if (!res.ok) {
140740
- logger21.warn(`[account-connectors] ${path94} \u2192 ${res.status}: ${body?.error ?? ""}`);
140740
+ logger21.warn(`[account-connectors] ${path95} \u2192 ${res.status}: ${body?.error ?? ""}`);
140741
140741
  return null;
140742
140742
  }
140743
140743
  return body;
140744
140744
  } catch (err2) {
140745
- logger21.warn(`[account-connectors] ${path94} threw:`, err2);
140745
+ logger21.warn(`[account-connectors] ${path95} threw:`, err2);
140746
140746
  return null;
140747
140747
  }
140748
140748
  }
@@ -140812,7 +140812,7 @@ async function rpc(fn2, input) {
140812
140812
  clearAccountConnectorsCache();
140813
140813
  }
140814
140814
  }
140815
- async function proxyWrite(path94, payload) {
140815
+ async function proxyWrite(path95, payload) {
140816
140816
  const base = getCoreProxyBaseUrl();
140817
140817
  const session2 = await getSession();
140818
140818
  const token2 = session2?.access_token;
@@ -140820,7 +140820,7 @@ async function proxyWrite(path94, payload) {
140820
140820
  return { ok: false, error: WRITE_MESSAGES.not_authenticated };
140821
140821
  }
140822
140822
  try {
140823
- const res = await coreProxyFetch(`${base}${path94}`, {
140823
+ const res = await coreProxyFetch(`${base}${path95}`, {
140824
140824
  method: "POST",
140825
140825
  headers: {
140826
140826
  "Content-Type": "application/json",
@@ -140836,7 +140836,7 @@ async function proxyWrite(path94, payload) {
140836
140836
  }
140837
140837
  return { ok: true, value: body };
140838
140838
  } catch (err2) {
140839
- logger21.warn(`[account-connectors] ${path94} threw:`, err2);
140839
+ logger21.warn(`[account-connectors] ${path95} threw:`, err2);
140840
140840
  return { ok: false, error: "Could not reach Atlarix. Check your connection and try again." };
140841
140841
  } finally {
140842
140842
  clearAccountConnectorsCache();
@@ -149838,11 +149838,11 @@ var require_mime_types = __commonJS({
149838
149838
  }
149839
149839
  return exts[0];
149840
149840
  }
149841
- function lookup2(path94) {
149842
- if (!path94 || typeof path94 !== "string") {
149841
+ function lookup2(path95) {
149842
+ if (!path95 || typeof path95 !== "string") {
149843
149843
  return false;
149844
149844
  }
149845
- var extension2 = extname3("x." + path94).toLowerCase().substr(1);
149845
+ var extension2 = extname3("x." + path95).toLowerCase().substr(1);
149846
149846
  if (!extension2) {
149847
149847
  return false;
149848
149848
  }
@@ -150947,11 +150947,11 @@ var require_form_data = __commonJS({
150947
150947
  "use strict";
150948
150948
  var CombinedStream = require_combined_stream();
150949
150949
  var util2 = __require("util");
150950
- var path94 = __require("path");
150950
+ var path95 = __require("path");
150951
150951
  var http5 = __require("http");
150952
150952
  var https2 = __require("https");
150953
150953
  var parseUrl2 = __require("url").parse;
150954
- var fs77 = __require("fs");
150954
+ var fs78 = __require("fs");
150955
150955
  var Stream5 = __require("stream").Stream;
150956
150956
  var crypto8 = __require("crypto");
150957
150957
  var mime = require_mime_types();
@@ -151021,7 +151021,7 @@ var require_form_data = __commonJS({
151021
151021
  if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
151022
151022
  callback(null, value.end + 1 - (value.start ? value.start : 0));
151023
151023
  } else {
151024
- fs77.stat(value.path, function(err2, stat9) {
151024
+ fs78.stat(value.path, function(err2, stat9) {
151025
151025
  if (err2) {
151026
151026
  callback(err2);
151027
151027
  return;
@@ -151078,11 +151078,11 @@ var require_form_data = __commonJS({
151078
151078
  FormData4.prototype._getContentDisposition = function(value, options2) {
151079
151079
  var filename;
151080
151080
  if (typeof options2.filepath === "string") {
151081
- filename = path94.normalize(options2.filepath).replace(/\\/g, "/");
151081
+ filename = path95.normalize(options2.filepath).replace(/\\/g, "/");
151082
151082
  } else if (options2.filename || value && (value.name || value.path)) {
151083
- filename = path94.basename(options2.filename || value && (value.name || value.path));
151083
+ filename = path95.basename(options2.filename || value && (value.name || value.path));
151084
151084
  } else if (value && value.readable && hasOwn3(value, "httpVersion")) {
151085
- filename = path94.basename(value.client._httpMessage.path || "");
151085
+ filename = path95.basename(value.client._httpMessage.path || "");
151086
151086
  }
151087
151087
  if (filename) {
151088
151088
  return 'filename="' + escapeHeaderParam(filename) + '"';
@@ -153019,7 +153019,7 @@ var require_axios = __commonJS({
153019
153019
  var https2 = __require("https");
153020
153020
  var http22 = __require("http2");
153021
153021
  var util2 = __require("util");
153022
- var path94 = __require("path");
153022
+ var path95 = __require("path");
153023
153023
  var followRedirects = require_follow_redirects();
153024
153024
  var zlib4 = __require("zlib");
153025
153025
  var stream2 = __require("stream");
@@ -154087,9 +154087,9 @@ var require_axios = __commonJS({
154087
154087
  function removeBrackets(key) {
154088
154088
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
154089
154089
  }
154090
- function renderKey(path95, key, dots) {
154091
- if (!path95) return key;
154092
- return path95.concat(key).map(function each2(token2, i4) {
154090
+ function renderKey(path96, key, dots) {
154091
+ if (!path96) return key;
154092
+ return path96.concat(key).map(function each2(token2, i4) {
154093
154093
  token2 = removeBrackets(token2);
154094
154094
  return !dots && i4 ? "[" + token2 + "]" : token2;
154095
154095
  }).join(dots ? "." : "");
@@ -154167,13 +154167,13 @@ var require_axios = __commonJS({
154167
154167
  return currentValue;
154168
154168
  });
154169
154169
  }
154170
- function defaultVisitor(value, key, path95) {
154170
+ function defaultVisitor(value, key, path96) {
154171
154171
  let arr = value;
154172
154172
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
154173
- formData.append(renderKey(path95, key, dots), convertValue(value));
154173
+ formData.append(renderKey(path96, key, dots), convertValue(value));
154174
154174
  return false;
154175
154175
  }
154176
- if (value && !path95 && typeof value === "object") {
154176
+ if (value && !path96 && typeof value === "object") {
154177
154177
  if (utils$1.endsWith(key, "{}")) {
154178
154178
  key = metaTokens ? key : key.slice(0, -2);
154179
154179
  value = stringifyWithDepthLimit(value, 1);
@@ -154192,7 +154192,7 @@ var require_axios = __commonJS({
154192
154192
  if (isVisitable(value)) {
154193
154193
  return true;
154194
154194
  }
154195
- formData.append(renderKey(path95, key, dots), convertValue(value));
154195
+ formData.append(renderKey(path96, key, dots), convertValue(value));
154196
154196
  return false;
154197
154197
  }
154198
154198
  const exposedHelpers = Object.assign(predicates, {
@@ -154200,17 +154200,17 @@ var require_axios = __commonJS({
154200
154200
  convertValue,
154201
154201
  isVisitable
154202
154202
  });
154203
- function build(value, path95, depth = 0) {
154203
+ function build(value, path96, depth = 0) {
154204
154204
  if (utils$1.isUndefined(value)) return;
154205
154205
  throwIfMaxDepthExceeded(depth);
154206
154206
  if (stack.indexOf(value) !== -1) {
154207
- throw new Error("Circular reference detected in " + path95.join("."));
154207
+ throw new Error("Circular reference detected in " + path96.join("."));
154208
154208
  }
154209
154209
  stack.push(value);
154210
154210
  utils$1.forEach(value, function each2(el, key) {
154211
- const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path95, exposedHelpers);
154211
+ const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path96, exposedHelpers);
154212
154212
  if (result2 === true) {
154213
- build(el, path95 ? path95.concat(key) : [key], depth + 1);
154213
+ build(el, path96 ? path96.concat(key) : [key], depth + 1);
154214
154214
  }
154215
154215
  });
154216
154216
  stack.pop();
@@ -154399,7 +154399,7 @@ var require_axios = __commonJS({
154399
154399
  };
154400
154400
  function toURLEncodedForm(data, options2) {
154401
154401
  return toFormData2(data, new platform.classes.URLSearchParams(), {
154402
- visitor: function(value, key, path95, helpers) {
154402
+ visitor: function(value, key, path96, helpers) {
154403
154403
  if (platform.isNode && utils$1.isBuffer(value)) {
154404
154404
  this.append(key, value.toString("base64"));
154405
154405
  return false;
@@ -154416,14 +154416,14 @@ var require_axios = __commonJS({
154416
154416
  }
154417
154417
  }
154418
154418
  function parsePropPath(name30) {
154419
- const path95 = [];
154419
+ const path96 = [];
154420
154420
  const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
154421
154421
  let match;
154422
154422
  while ((match = pattern.exec(name30)) !== null) {
154423
- throwIfDepthExceeded(path95.length);
154424
- path95.push(match[0] === "[]" ? "" : match[1] || match[0]);
154423
+ throwIfDepthExceeded(path96.length);
154424
+ path96.push(match[0] === "[]" ? "" : match[1] || match[0]);
154425
154425
  }
154426
- return path95;
154426
+ return path96;
154427
154427
  }
154428
154428
  function arrayToObject(arr) {
154429
154429
  const obj2 = {};
@@ -154438,12 +154438,12 @@ var require_axios = __commonJS({
154438
154438
  return obj2;
154439
154439
  }
154440
154440
  function formDataToJSON(formData) {
154441
- function buildPath(path95, value, target, index2) {
154441
+ function buildPath(path96, value, target, index2) {
154442
154442
  throwIfDepthExceeded(index2);
154443
- let name30 = path95[index2++];
154443
+ let name30 = path96[index2++];
154444
154444
  if (name30 === "__proto__") return true;
154445
154445
  const isNumericKey = Number.isFinite(+name30);
154446
- const isLast = index2 >= path95.length;
154446
+ const isLast = index2 >= path96.length;
154447
154447
  name30 = !name30 && utils$1.isArray(target) ? target.length : name30;
154448
154448
  if (isLast) {
154449
154449
  if (utils$1.hasOwnProp(target, name30)) {
@@ -154456,7 +154456,7 @@ var require_axios = __commonJS({
154456
154456
  if (!utils$1.hasOwnProp(target, name30) || !utils$1.isObject(target[name30])) {
154457
154457
  target[name30] = [];
154458
154458
  }
154459
- const result2 = buildPath(path95, value, target[name30], index2);
154459
+ const result2 = buildPath(path96, value, target[name30], index2);
154460
154460
  if (result2 && utils$1.isArray(target[name30])) {
154461
154461
  target[name30] = arrayToObject(target[name30]);
154462
154462
  }
@@ -156067,8 +156067,8 @@ var require_axios = __commonJS({
156067
156067
  const allowedSocketPaths = own2("allowedSocketPaths");
156068
156068
  if (allowedSocketPaths != null) {
156069
156069
  const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
156070
- const resolvedSocket = path94.resolve(socketPath);
156071
- const isAllowed = allowed.some((entry) => typeof entry === "string" && path94.resolve(entry) === resolvedSocket);
156070
+ const resolvedSocket = path95.resolve(socketPath);
156071
+ const isAllowed = allowed.some((entry) => typeof entry === "string" && path95.resolve(entry) === resolvedSocket);
156072
156072
  if (!isAllowed) {
156073
156073
  return reject2(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config2));
156074
156074
  }
@@ -156367,14 +156367,14 @@ var require_axios = __commonJS({
156367
156367
  var cookies = platform.hasStandardBrowserEnv ? (
156368
156368
  // Standard browser envs support document.cookie
156369
156369
  {
156370
- write(name30, value, expires, path95, domain2, secure, sameSite) {
156370
+ write(name30, value, expires, path96, domain2, secure, sameSite) {
156371
156371
  if (typeof document === "undefined") return;
156372
156372
  const cookie = [`${name30}=${encodeURIComponent(value)}`];
156373
156373
  if (utils$1.isNumber(expires)) {
156374
156374
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
156375
156375
  }
156376
- if (utils$1.isString(path95)) {
156377
- cookie.push(`path=${path95}`);
156376
+ if (utils$1.isString(path96)) {
156377
+ cookie.push(`path=${path96}`);
156378
156378
  }
156379
156379
  if (utils$1.isString(domain2)) {
156380
156380
  cookie.push(`domain=${domain2}`);
@@ -158164,8 +158164,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname3(proce
158164
158164
  return decodedFile;
158165
158165
  };
158166
158166
  }
158167
- function normalizeWindowsPath(path94) {
158168
- return path94.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
158167
+ function normalizeWindowsPath(path95) {
158168
+ return path95.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
158169
158169
  }
158170
158170
  async function addSourceContext(frames) {
158171
158171
  const filesToLines = {};
@@ -158210,9 +158210,9 @@ async function addSourceContext(frames) {
158210
158210
  LRU_FILE_CONTENTS_CACHE.reduce();
158211
158211
  return frames;
158212
158212
  }
158213
- function getContextLinesFromFile(path94, ranges, output) {
158213
+ function getContextLinesFromFile(path95, ranges, output) {
158214
158214
  return new Promise((resolve16) => {
158215
- const stream2 = createReadStream(path94);
158215
+ const stream2 = createReadStream(path95);
158216
158216
  const lineReaded = createInterface({
158217
158217
  input: stream2
158218
158218
  });
@@ -158230,7 +158230,7 @@ function getContextLinesFromFile(path94, ranges, output) {
158230
158230
  let rangeStart = range3[0];
158231
158231
  let rangeEnd = range3[1];
158232
158232
  function onStreamError() {
158233
- LRU_FILE_CONTENTS_FS_READ_FAILED.set(path94, 1);
158233
+ LRU_FILE_CONTENTS_FS_READ_FAILED.set(path95, 1);
158234
158234
  lineReaded.close();
158235
158235
  lineReaded.removeAllListeners();
158236
158236
  destroyStreamAndResolve();
@@ -158307,8 +158307,8 @@ function clearLineContext(frame) {
158307
158307
  delete frame.context_line;
158308
158308
  delete frame.post_context;
158309
158309
  }
158310
- function shouldSkipContextLinesForFile(path94) {
158311
- return path94.startsWith("node:") || path94.endsWith(".min.js") || path94.endsWith(".min.cjs") || path94.endsWith(".min.mjs") || path94.startsWith("data:");
158310
+ function shouldSkipContextLinesForFile(path95) {
158311
+ return path95.startsWith("node:") || path95.endsWith(".min.js") || path95.endsWith(".min.cjs") || path95.endsWith(".min.mjs") || path95.startsWith("data:");
158312
158312
  }
158313
158313
  function shouldSkipContextLinesForFrame(frame) {
158314
158314
  if (frame.lineno !== void 0 && frame.lineno > MAX_CONTEXTLINES_LINENO) {
@@ -161984,8 +161984,8 @@ var require_auth_config = __commonJS({
161984
161984
  writeAuthConfig: () => writeAuthConfig
161985
161985
  });
161986
161986
  module2.exports = __toCommonJS2(auth_config_exports);
161987
- var fs77 = __toESM2(__require("fs"));
161988
- var path94 = __toESM2(__require("path"));
161987
+ var fs78 = __toESM2(__require("fs"));
161988
+ var path95 = __toESM2(__require("path"));
161989
161989
  var import_token_util = require_token_util();
161990
161990
  function getAuthConfigPath() {
161991
161991
  const dataDir = (0, import_token_util.getVercelDataDir)();
@@ -161994,15 +161994,15 @@ var require_auth_config = __commonJS({
161994
161994
  `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
161995
161995
  );
161996
161996
  }
161997
- return path94.join(dataDir, "auth.json");
161997
+ return path95.join(dataDir, "auth.json");
161998
161998
  }
161999
161999
  function readAuthConfig() {
162000
162000
  try {
162001
162001
  const authPath = getAuthConfigPath();
162002
- if (!fs77.existsSync(authPath)) {
162002
+ if (!fs78.existsSync(authPath)) {
162003
162003
  return null;
162004
162004
  }
162005
- const content = fs77.readFileSync(authPath, "utf8");
162005
+ const content = fs78.readFileSync(authPath, "utf8");
162006
162006
  if (!content) {
162007
162007
  return null;
162008
162008
  }
@@ -162013,11 +162013,11 @@ var require_auth_config = __commonJS({
162013
162013
  }
162014
162014
  function writeAuthConfig(config2) {
162015
162015
  const authPath = getAuthConfigPath();
162016
- const authDir = path94.dirname(authPath);
162017
- if (!fs77.existsSync(authDir)) {
162018
- fs77.mkdirSync(authDir, { mode: 504, recursive: true });
162016
+ const authDir = path95.dirname(authPath);
162017
+ if (!fs78.existsSync(authDir)) {
162018
+ fs78.mkdirSync(authDir, { mode: 504, recursive: true });
162019
162019
  }
162020
- fs77.writeFileSync(authPath, JSON.stringify(config2, null, 2), { mode: 384 });
162020
+ fs78.writeFileSync(authPath, JSON.stringify(config2, null, 2), { mode: 384 });
162021
162021
  }
162022
162022
  function isValidAccessToken(authConfig, expirationBufferMs = 0) {
162023
162023
  if (!authConfig.token)
@@ -162208,8 +162208,8 @@ var require_token_util = __commonJS({
162208
162208
  saveToken: () => saveToken
162209
162209
  });
162210
162210
  module2.exports = __toCommonJS2(token_util_exports);
162211
- var path94 = __toESM2(__require("path"));
162212
- var fs77 = __toESM2(__require("fs"));
162211
+ var path95 = __toESM2(__require("path"));
162212
+ var fs78 = __toESM2(__require("fs"));
162213
162213
  var import_token_error = require_token_error();
162214
162214
  var import_token_io = require_token_io();
162215
162215
  var import_auth_config = require_auth_config();
@@ -162221,7 +162221,7 @@ var require_token_util = __commonJS({
162221
162221
  if (!dataDir) {
162222
162222
  return null;
162223
162223
  }
162224
- return path94.join(dataDir, vercelFolder);
162224
+ return path95.join(dataDir, vercelFolder);
162225
162225
  }
162226
162226
  async function getVercelToken2(options2) {
162227
162227
  const authConfig = (0, import_auth_config.readAuthConfig)();
@@ -162297,13 +162297,13 @@ var require_token_util = __commonJS({
162297
162297
  "Unable to find project root directory. Have you linked your project with `vc link?`"
162298
162298
  );
162299
162299
  }
162300
- const prjPath = path94.join(dir, ".vercel", "project.json");
162301
- if (!fs77.existsSync(prjPath)) {
162300
+ const prjPath = path95.join(dir, ".vercel", "project.json");
162301
+ if (!fs78.existsSync(prjPath)) {
162302
162302
  throw new import_token_error.VercelOidcTokenError(
162303
162303
  "project.json not found, have you linked your project with `vc link?`"
162304
162304
  );
162305
162305
  }
162306
- const prj = JSON.parse(fs77.readFileSync(prjPath, "utf8"));
162306
+ const prj = JSON.parse(fs78.readFileSync(prjPath, "utf8"));
162307
162307
  if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
162308
162308
  throw new TypeError(
162309
162309
  "Expected a string-valued projectId property. Try running `vc link` to re-link your project."
@@ -162318,11 +162318,11 @@ var require_token_util = __commonJS({
162318
162318
  "Unable to find user data directory. Please reach out to Vercel support."
162319
162319
  );
162320
162320
  }
162321
- const tokenPath = path94.join(dir, "com.vercel.token", `${projectId}.json`);
162321
+ const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
162322
162322
  const tokenJson = JSON.stringify(token2);
162323
- fs77.mkdirSync(path94.dirname(tokenPath), { mode: 504, recursive: true });
162324
- fs77.writeFileSync(tokenPath, tokenJson);
162325
- fs77.chmodSync(tokenPath, 432);
162323
+ fs78.mkdirSync(path95.dirname(tokenPath), { mode: 504, recursive: true });
162324
+ fs78.writeFileSync(tokenPath, tokenJson);
162325
+ fs78.chmodSync(tokenPath, 432);
162326
162326
  return;
162327
162327
  }
162328
162328
  function loadToken(projectId) {
@@ -162332,11 +162332,11 @@ var require_token_util = __commonJS({
162332
162332
  "Unable to find user data directory. Please reach out to Vercel support."
162333
162333
  );
162334
162334
  }
162335
- const tokenPath = path94.join(dir, "com.vercel.token", `${projectId}.json`);
162336
- if (!fs77.existsSync(tokenPath)) {
162335
+ const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
162336
+ if (!fs78.existsSync(tokenPath)) {
162337
162337
  return null;
162338
162338
  }
162339
- const token2 = JSON.parse(fs77.readFileSync(tokenPath, "utf8"));
162339
+ const token2 = JSON.parse(fs78.readFileSync(tokenPath, "utf8"));
162340
162340
  assertVercelOidcTokenResponse(token2);
162341
162341
  return token2;
162342
162342
  }
@@ -187768,11 +187768,11 @@ var init_lib = __esm({
187768
187768
  }
187769
187769
  }
187770
187770
  },
187771
- addToPath: function addToPath(path94, added, removed, oldPosInc, options2) {
187772
- var last2 = path94.lastComponent;
187771
+ addToPath: function addToPath(path95, added, removed, oldPosInc, options2) {
187772
+ var last2 = path95.lastComponent;
187773
187773
  if (last2 && !options2.oneChangePerToken && last2.added === added && last2.removed === removed) {
187774
187774
  return {
187775
- oldPos: path94.oldPos + oldPosInc,
187775
+ oldPos: path95.oldPos + oldPosInc,
187776
187776
  lastComponent: {
187777
187777
  count: last2.count + 1,
187778
187778
  added,
@@ -187782,7 +187782,7 @@ var init_lib = __esm({
187782
187782
  };
187783
187783
  } else {
187784
187784
  return {
187785
- oldPos: path94.oldPos + oldPosInc,
187785
+ oldPos: path95.oldPos + oldPosInc,
187786
187786
  lastComponent: {
187787
187787
  count: 1,
187788
187788
  added,
@@ -188702,18 +188702,18 @@ function daemonParsesMarkup() {
188702
188702
  const ask = (cmd, args2) => new Promise(
188703
188703
  (resolve16, reject2) => execFile2(cmd, args2, { timeout: 1500 }, (err2, stdout) => err2 ? reject2(err2) : resolve16(String(stdout)))
188704
188704
  );
188705
- const path94 = ["/org/freedesktop/Notifications", "org.freedesktop.Notifications.GetCapabilities"];
188705
+ const path95 = ["/org/freedesktop/Notifications", "org.freedesktop.Notifications.GetCapabilities"];
188706
188706
  return linuxMarkup ??= ask("gdbus", [
188707
188707
  "call",
188708
188708
  "--session",
188709
188709
  "--dest",
188710
188710
  "org.freedesktop.Notifications",
188711
188711
  "--object-path",
188712
- path94[0],
188712
+ path95[0],
188713
188713
  "--method",
188714
- path94[1]
188714
+ path95[1]
188715
188715
  ]).catch(
188716
- () => ask("dbus-send", ["--session", "--print-reply", "--dest=org.freedesktop.Notifications", path94[0], path94[1]])
188716
+ () => ask("dbus-send", ["--session", "--print-reply", "--dest=org.freedesktop.Notifications", path95[0], path95[1]])
188717
188717
  ).then(capabilitiesListMarkup, () => false);
188718
188718
  }
188719
188719
  async function notificationBody(body, platform = process.platform, parsesMarkup = daemonParsesMarkup) {
@@ -190701,14 +190701,14 @@ function emitRunCommandPermissionActivity(sender, chatId, label2, command) {
190701
190701
  chatId
190702
190702
  });
190703
190703
  }
190704
- function emitFilePermissionActivity(sender, chatId, label2, path94) {
190704
+ function emitFilePermissionActivity(sender, chatId, label2, path95) {
190705
190705
  safeSend(sender, "chat:activity", {
190706
190706
  id: `file-perm-${chatId}-${Date.now()}`,
190707
190707
  type: "tool_use",
190708
190708
  // v13.8: edit_file is the single file-mutation tool (absorbed write_file).
190709
190709
  toolName: "edit_file",
190710
190710
  label: label2,
190711
- detail: path94.slice(0, 200),
190711
+ detail: path95.slice(0, 200),
190712
190712
  status: "done",
190713
190713
  timestamp: Date.now(),
190714
190714
  chatId
@@ -195361,12 +195361,12 @@ function getMCPToolHeaderBindings(inputSchema) {
195361
195361
  const bindings = [];
195362
195362
  const headerNames = /* @__PURE__ */ new Set();
195363
195363
  let error51;
195364
- const visit3 = (value, path94, staticallyReachable) => {
195364
+ const visit3 = (value, path95, staticallyReachable) => {
195365
195365
  if (error51 != null || !isRecord(value)) {
195366
195366
  return;
195367
195367
  }
195368
195368
  if ("x-mcp-header" in value) {
195369
- if (!staticallyReachable || path94.length === 0) {
195369
+ if (!staticallyReachable || path95.length === 0) {
195370
195370
  error51 = "x-mcp-header is not on a statically reachable property";
195371
195371
  return;
195372
195372
  }
@@ -195386,7 +195386,7 @@ function getMCPToolHeaderBindings(inputSchema) {
195386
195386
  return;
195387
195387
  }
195388
195388
  headerNames.add(normalizedHeaderName);
195389
- bindings.push({ headerName, path: path94, valueType });
195389
+ bindings.push({ headerName, path: path95, valueType });
195390
195390
  }
195391
195391
  for (const [key, child2] of Object.entries(value)) {
195392
195392
  if (key === "x-mcp-header") {
@@ -195394,19 +195394,19 @@ function getMCPToolHeaderBindings(inputSchema) {
195394
195394
  }
195395
195395
  if (key === "properties" && isRecord(child2)) {
195396
195396
  for (const [propertyName, propertySchema] of Object.entries(child2)) {
195397
- visit3(propertySchema, [...path94, propertyName], staticallyReachable);
195397
+ visit3(propertySchema, [...path95, propertyName], staticallyReachable);
195398
195398
  }
195399
195399
  } else {
195400
- visit3(child2, path94, false);
195400
+ visit3(child2, path95, false);
195401
195401
  }
195402
195402
  }
195403
195403
  };
195404
195404
  visit3(inputSchema, [], true);
195405
195405
  return error51 == null ? { success: true, bindings } : { success: false, error: error51 };
195406
195406
  }
195407
- function getValueAtPath(value, path94) {
195407
+ function getValueAtPath(value, path95) {
195408
195408
  let current = value;
195409
- for (const segment of path94) {
195409
+ for (const segment of path95) {
195410
195410
  if (!isRecord(current)) {
195411
195411
  return void 0;
195412
195412
  }
@@ -205765,15 +205765,15 @@ async function QuickJSRaw(moduleArg = {}) {
205765
205765
  throw c2;
205766
205766
  }, w2 = import.meta.url, y2 = "", z5, A3;
205767
205767
  if (q3) {
205768
- var fs77 = require4("node:fs");
205768
+ var fs78 = require4("node:fs");
205769
205769
  w2.startsWith("file:") && (y2 = require4("node:path").dirname(require4("node:url").fileURLToPath(w2)) + "/");
205770
205770
  A3 = (a2) => {
205771
205771
  a2 = B2(a2) ? new URL(a2) : a2;
205772
- return fs77.readFileSync(a2);
205772
+ return fs78.readFileSync(a2);
205773
205773
  };
205774
205774
  z5 = async (a2) => {
205775
205775
  a2 = B2(a2) ? new URL(a2) : a2;
205776
- return fs77.readFileSync(a2, void 0);
205776
+ return fs78.readFileSync(a2, void 0);
205777
205777
  };
205778
205778
  1 < process.argv.length && (u2 = process.argv[1].replace(/\\/g, "/"));
205779
205779
  process.argv.slice(2);
@@ -209846,15 +209846,15 @@ var init_services = __esm({
209846
209846
  usage: async (filters) => (await Promise.resolve().then(() => (init_usage_report(), usage_report_exports))).getUsageReport(filters),
209847
209847
  usageCredits: async () => (await Promise.resolve().then(() => (init_usage_credits(), usage_credits_exports))).getUsageCredits(),
209848
209848
  async saveUsageCard(svg) {
209849
- const [{ promises: fs77 }, os29, path94] = await Promise.all([import("node:fs"), import("node:os"), import("node:path")]);
209850
- const dir = path94.join(os29.homedir(), "Downloads");
209851
- await fs77.mkdir(dir, { recursive: true });
209849
+ const [{ promises: fs78 }, os29, path95] = await Promise.all([import("node:fs"), import("node:os"), import("node:path")]);
209850
+ const dir = path95.join(os29.homedir(), "Downloads");
209851
+ await fs78.mkdir(dir, { recursive: true });
209852
209852
  const { localDayKey: localDayKey3 } = await Promise.resolve().then(() => (init_edit_stats2(), edit_stats_exports));
209853
- const stem = path94.join(dir, `atlarix-usage-${localDayKey3()}`);
209853
+ const stem = path95.join(dir, `atlarix-usage-${localDayKey3()}`);
209854
209854
  for (let n2 = 1; ; n2++) {
209855
209855
  const file2 = n2 === 1 ? `${stem}.svg` : `${stem}-${n2}.svg`;
209856
209856
  try {
209857
- await fs77.writeFile(file2, svg, { encoding: "utf8", flag: "wx" });
209857
+ await fs78.writeFile(file2, svg, { encoding: "utf8", flag: "wx" });
209858
209858
  return file2;
209859
209859
  } catch (e3) {
209860
209860
  if (e3.code !== "EEXIST" || n2 >= 100) throw e3;
@@ -219524,22 +219524,22 @@ var init_from = __esm({
219524
219524
  init_file();
219525
219525
  init_fetch_blob();
219526
219526
  ({ stat: stat6 } = fs49);
219527
- blobFromSync = (path94, type2) => fromBlob(statSync3(path94), path94, type2);
219528
- blobFrom = (path94, type2) => stat6(path94).then((stat9) => fromBlob(stat9, path94, type2));
219529
- fileFrom = (path94, type2) => stat6(path94).then((stat9) => fromFile(stat9, path94, type2));
219530
- fileFromSync = (path94, type2) => fromFile(statSync3(path94), path94, type2);
219531
- fromBlob = (stat9, path94, type2 = "") => new fetch_blob_default([new BlobDataItem({
219532
- path: path94,
219527
+ blobFromSync = (path95, type2) => fromBlob(statSync3(path95), path95, type2);
219528
+ blobFrom = (path95, type2) => stat6(path95).then((stat9) => fromBlob(stat9, path95, type2));
219529
+ fileFrom = (path95, type2) => stat6(path95).then((stat9) => fromFile(stat9, path95, type2));
219530
+ fileFromSync = (path95, type2) => fromFile(statSync3(path95), path95, type2);
219531
+ fromBlob = (stat9, path95, type2 = "") => new fetch_blob_default([new BlobDataItem({
219532
+ path: path95,
219533
219533
  size: stat9.size,
219534
219534
  lastModified: stat9.mtimeMs,
219535
219535
  start: 0
219536
219536
  })], { type: type2 });
219537
- fromFile = (stat9, path94, type2 = "") => new file_default([new BlobDataItem({
219538
- path: path94,
219537
+ fromFile = (stat9, path95, type2 = "") => new file_default([new BlobDataItem({
219538
+ path: path95,
219539
219539
  size: stat9.size,
219540
219540
  lastModified: stat9.mtimeMs,
219541
219541
  start: 0
219542
- })], basename2(path94), { type: type2, lastModified: stat9.mtimeMs });
219542
+ })], basename2(path95), { type: type2, lastModified: stat9.mtimeMs });
219543
219543
  BlobDataItem = class _BlobDataItem {
219544
219544
  #path;
219545
219545
  #start;
@@ -224718,9 +224718,9 @@ var require_util2 = __commonJS({
224718
224718
  exports2.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
224719
224719
  exports2.isValidFile = isValidFile;
224720
224720
  exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
224721
- var fs77 = __require("fs");
224721
+ var fs78 = __require("fs");
224722
224722
  var os29 = __require("os");
224723
- var path94 = __require("path");
224723
+ var path95 = __require("path");
224724
224724
  var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
224725
224725
  var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
224726
224726
  function snakeToCamel(str2) {
@@ -224806,15 +224806,15 @@ var require_util2 = __commonJS({
224806
224806
  }
224807
224807
  async function isValidFile(filePath) {
224808
224808
  try {
224809
- const stats = await fs77.promises.lstat(filePath);
224809
+ const stats = await fs78.promises.lstat(filePath);
224810
224810
  return stats.isFile();
224811
224811
  } catch (e3) {
224812
224812
  return false;
224813
224813
  }
224814
224814
  }
224815
224815
  function getWellKnownCertificateConfigFileLocation() {
224816
- const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path94.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path94.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
224817
- return path94.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
224816
+ const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path95.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path95.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
224817
+ return path95.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
224818
224818
  }
224819
224819
  function _isWindows() {
224820
224820
  return os29.platform().startsWith("win");
@@ -226760,11 +226760,11 @@ var require_getCredentials = __commonJS({
226760
226760
  "use strict";
226761
226761
  Object.defineProperty(exports2, "__esModule", { value: true });
226762
226762
  exports2.getCredentials = getCredentials;
226763
- var path94 = __require("path");
226764
- var fs77 = __require("fs");
226763
+ var path95 = __require("path");
226764
+ var fs78 = __require("fs");
226765
226765
  var util_1 = __require("util");
226766
226766
  var errorWithCode_1 = require_errorWithCode();
226767
- var readFile15 = fs77.readFile ? (0, util_1.promisify)(fs77.readFile) : async () => {
226767
+ var readFile15 = fs78.readFile ? (0, util_1.promisify)(fs78.readFile) : async () => {
226768
226768
  throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
226769
226769
  };
226770
226770
  var ExtensionFiles;
@@ -226832,7 +226832,7 @@ var require_getCredentials = __commonJS({
226832
226832
  * @returns An instance of a class that implements ICredentialsProvider.
226833
226833
  */
226834
226834
  static create(keyFilePath) {
226835
- const keyFileExtension = path94.extname(keyFilePath);
226835
+ const keyFileExtension = path95.extname(keyFilePath);
226836
226836
  switch (keyFileExtension) {
226837
226837
  case ExtensionFiles.JSON:
226838
226838
  return new JsonCredentialsProvider(keyFilePath);
@@ -228441,12 +228441,12 @@ var require_filesubjecttokensupplier = __commonJS({
228441
228441
  Object.defineProperty(exports2, "__esModule", { value: true });
228442
228442
  exports2.FileSubjectTokenSupplier = void 0;
228443
228443
  var util_1 = __require("util");
228444
- var fs77 = __require("fs");
228445
- var readFile15 = (0, util_1.promisify)(fs77.readFile ?? (() => {
228444
+ var fs78 = __require("fs");
228445
+ var readFile15 = (0, util_1.promisify)(fs78.readFile ?? (() => {
228446
228446
  }));
228447
- var realpath = (0, util_1.promisify)(fs77.realpath ?? (() => {
228447
+ var realpath = (0, util_1.promisify)(fs78.realpath ?? (() => {
228448
228448
  }));
228449
- var lstat = (0, util_1.promisify)(fs77.lstat ?? (() => {
228449
+ var lstat = (0, util_1.promisify)(fs78.lstat ?? (() => {
228450
228450
  }));
228451
228451
  var FileSubjectTokenSupplier = class {
228452
228452
  filePath;
@@ -228564,7 +228564,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
228564
228564
  Object.defineProperty(exports2, "__esModule", { value: true });
228565
228565
  exports2.CertificateSubjectTokenSupplier = exports2.InvalidConfigurationError = exports2.CertificateSourceUnavailableError = exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
228566
228566
  var util_1 = require_util2();
228567
- var fs77 = __require("fs");
228567
+ var fs78 = __require("fs");
228568
228568
  var crypto_1 = __require("crypto");
228569
228569
  var https2 = __require("https");
228570
228570
  exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
@@ -228658,7 +228658,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
228658
228658
  const configPath = this.certificateConfigPath;
228659
228659
  let fileContents;
228660
228660
  try {
228661
- fileContents = await fs77.promises.readFile(configPath, "utf8");
228661
+ fileContents = await fs78.promises.readFile(configPath, "utf8");
228662
228662
  } catch (err2) {
228663
228663
  throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
228664
228664
  }
@@ -228683,14 +228683,14 @@ var require_certificatesubjecttokensupplier = __commonJS({
228683
228683
  async #getKeyAndCert(certPath, keyPath) {
228684
228684
  let cert, key;
228685
228685
  try {
228686
- cert = await fs77.promises.readFile(certPath);
228686
+ cert = await fs78.promises.readFile(certPath);
228687
228687
  new crypto_1.X509Certificate(cert);
228688
228688
  } catch (err2) {
228689
228689
  const message = err2 instanceof Error ? err2.message : String(err2);
228690
228690
  throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${message}`);
228691
228691
  }
228692
228692
  try {
228693
- key = await fs77.promises.readFile(keyPath);
228693
+ key = await fs78.promises.readFile(keyPath);
228694
228694
  (0, crypto_1.createPrivateKey)(key);
228695
228695
  } catch (err2) {
228696
228696
  const message = err2 instanceof Error ? err2.message : String(err2);
@@ -228709,7 +228709,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
228709
228709
  return JSON.stringify([leafCert.raw.toString("base64")]);
228710
228710
  }
228711
228711
  try {
228712
- const chainPems = await fs77.promises.readFile(this.trustChainPath, "utf8");
228712
+ const chainPems = await fs78.promises.readFile(this.trustChainPath, "utf8");
228713
228713
  const pemBlocks = chainPems.match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? [];
228714
228714
  const chainCerts = pemBlocks.map((pem, index2) => {
228715
228715
  try {
@@ -229411,7 +229411,7 @@ var require_pluggable_auth_handler = __commonJS({
229411
229411
  exports2.PluggableAuthHandler = exports2.ExecutableError = void 0;
229412
229412
  var executable_response_1 = require_executable_response();
229413
229413
  var childProcess = __require("child_process");
229414
- var fs77 = __require("fs");
229414
+ var fs78 = __require("fs");
229415
229415
  var ExecutableError = class extends Error {
229416
229416
  /**
229417
229417
  * The exit code returned by the executable.
@@ -229496,14 +229496,14 @@ var require_pluggable_auth_handler = __commonJS({
229496
229496
  }
229497
229497
  let filePath;
229498
229498
  try {
229499
- filePath = await fs77.promises.realpath(this.outputFile);
229499
+ filePath = await fs78.promises.realpath(this.outputFile);
229500
229500
  } catch {
229501
229501
  return void 0;
229502
229502
  }
229503
- if (!(await fs77.promises.lstat(filePath)).isFile()) {
229503
+ if (!(await fs78.promises.lstat(filePath)).isFile()) {
229504
229504
  return void 0;
229505
229505
  }
229506
- const responseString = await fs77.promises.readFile(filePath, {
229506
+ const responseString = await fs78.promises.readFile(filePath, {
229507
229507
  encoding: "utf8"
229508
229508
  });
229509
229509
  if (responseString === "") {
@@ -229914,7 +229914,7 @@ var require_gdchclient = __commonJS({
229914
229914
  Object.defineProperty(exports2, "__esModule", { value: true });
229915
229915
  exports2.GdchClient = exports2.GDCH_SERVICE_ACCOUNT_TYPE = void 0;
229916
229916
  var crypto8 = __require("crypto");
229917
- var fs77 = __require("fs");
229917
+ var fs78 = __require("fs");
229918
229918
  var https2 = __require("https");
229919
229919
  var oauth2client_1 = require_oauth2client();
229920
229920
  var DEFAULT_LIFETIME_IN_SECONDS = 3600;
@@ -230137,7 +230137,7 @@ var require_gdchclient = __commonJS({
230137
230137
  const currentPath = this.caCertPath;
230138
230138
  this.caAgentPromise = (async () => {
230139
230139
  try {
230140
- const ca2 = await fs77.promises.readFile(currentPath);
230140
+ const ca2 = await fs78.promises.readFile(currentPath);
230141
230141
  return new https2.Agent({ ca: ca2 });
230142
230142
  } catch (err2) {
230143
230143
  if (this.cachedCaCertPath === currentPath) {
@@ -230197,11 +230197,11 @@ var require_googleauth = __commonJS({
230197
230197
  Object.defineProperty(exports2, "__esModule", { value: true });
230198
230198
  exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = void 0;
230199
230199
  var child_process_1 = __require("child_process");
230200
- var fs77 = __require("fs");
230200
+ var fs78 = __require("fs");
230201
230201
  var gaxios_1 = require_src4();
230202
230202
  var gcpMetadata = require_src6();
230203
230203
  var os29 = __require("os");
230204
- var path94 = __require("path");
230204
+ var path95 = __require("path");
230205
230205
  var crypto_1 = require_crypto3();
230206
230206
  var computeclient_1 = require_computeclient();
230207
230207
  var idtokenclient_1 = require_idtokenclient();
@@ -230486,20 +230486,20 @@ var require_googleauth = __commonJS({
230486
230486
  if (!configDir) {
230487
230487
  if (this._isWindows()) {
230488
230488
  if (process.env["APPDATA"]) {
230489
- configDir = path94.join(process.env["APPDATA"], "gcloud");
230489
+ configDir = path95.join(process.env["APPDATA"], "gcloud");
230490
230490
  }
230491
230491
  } else {
230492
230492
  const home = process.env["HOME"];
230493
230493
  if (home) {
230494
- configDir = path94.join(home, ".config", "gcloud");
230494
+ configDir = path95.join(home, ".config", "gcloud");
230495
230495
  }
230496
230496
  }
230497
230497
  }
230498
230498
  if (!configDir) {
230499
230499
  return null;
230500
230500
  }
230501
- const location2 = path94.join(configDir, "application_default_credentials.json");
230502
- if (!fs77.existsSync(location2)) {
230501
+ const location2 = path95.join(configDir, "application_default_credentials.json");
230502
+ if (!fs78.existsSync(location2)) {
230503
230503
  return null;
230504
230504
  }
230505
230505
  const client2 = await this._getApplicationCredentialsFromFilePath(location2, options2);
@@ -230516,8 +230516,8 @@ var require_googleauth = __commonJS({
230516
230516
  throw new Error("The file path is invalid.");
230517
230517
  }
230518
230518
  try {
230519
- filePath = fs77.realpathSync(filePath);
230520
- if (!fs77.lstatSync(filePath).isFile()) {
230519
+ filePath = fs78.realpathSync(filePath);
230520
+ if (!fs78.lstatSync(filePath).isFile()) {
230521
230521
  throw new Error();
230522
230522
  }
230523
230523
  } catch (err2) {
@@ -230526,7 +230526,7 @@ var require_googleauth = __commonJS({
230526
230526
  }
230527
230527
  throw err2;
230528
230528
  }
230529
- const readStream = fs77.createReadStream(filePath);
230529
+ const readStream = fs78.createReadStream(filePath);
230530
230530
  return this.fromStream(readStream, options2);
230531
230531
  }
230532
230532
  /**
@@ -230853,8 +230853,8 @@ var require_googleauth = __commonJS({
230853
230853
  if (this.jsonContent) {
230854
230854
  return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
230855
230855
  } else if (this.keyFilename) {
230856
- const filePath = path94.resolve(this.keyFilename);
230857
- const stream2 = fs77.createReadStream(filePath);
230856
+ const filePath = path95.resolve(this.keyFilename);
230857
+ const stream2 = fs78.createReadStream(filePath);
230858
230858
  return await this.fromStreamAsync(stream2, this.clientOptions);
230859
230859
  } else if (this.apiKey) {
230860
230860
  const client2 = await this.fromAPIKey(this.apiKey, this.clientOptions);
@@ -247631,18 +247631,18 @@ function createAzure(options2 = {}) {
247631
247631
  });
247632
247632
  const apiVersion = (_a30 = options2.apiVersion) != null ? _a30 : "v1";
247633
247633
  const useAzureOpenAIEndpoint = isAzureOpenAIBaseURL(options2.baseURL);
247634
- const url2 = ({ path: path94, modelId }) => {
247634
+ const url2 = ({ path: path95, modelId }) => {
247635
247635
  var _a211;
247636
247636
  const baseUrlPrefix = withoutTrailingSlash(
247637
247637
  (_a211 = options2.baseURL) != null ? _a211 : `https://${getResourceName()}.openai.azure.com/openai`
247638
247638
  );
247639
247639
  let fullUrl;
247640
247640
  if (options2.useDeploymentBasedUrls) {
247641
- fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${path94}`);
247641
+ fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${path95}`);
247642
247642
  } else if (!useAzureOpenAIEndpoint) {
247643
- fullUrl = new URL(`${baseUrlPrefix}${path94}`);
247643
+ fullUrl = new URL(`${baseUrlPrefix}${path95}`);
247644
247644
  } else {
247645
- fullUrl = new URL(`${baseUrlPrefix}/v1${path94}`);
247645
+ fullUrl = new URL(`${baseUrlPrefix}/v1${path95}`);
247646
247646
  }
247647
247647
  if (useAzureOpenAIEndpoint || options2.useDeploymentBasedUrls) {
247648
247648
  fullUrl.searchParams.set("api-version", apiVersion);
@@ -248152,8 +248152,8 @@ var init_parseUtil = __esm({
248152
248152
  init_errors5();
248153
248153
  init_en2();
248154
248154
  makeIssue = (params) => {
248155
- const { data, path: path94, errorMaps, issueData } = params;
248156
- const fullPath = [...path94, ...issueData.path || []];
248155
+ const { data, path: path95, errorMaps, issueData } = params;
248156
+ const fullPath = [...path95, ...issueData.path || []];
248157
248157
  const fullIssue = {
248158
248158
  ...issueData,
248159
248159
  path: fullPath
@@ -248433,11 +248433,11 @@ var init_types3 = __esm({
248433
248433
  init_parseUtil();
248434
248434
  init_util2();
248435
248435
  ParseInputLazyPath = class {
248436
- constructor(parent, value, path94, key) {
248436
+ constructor(parent, value, path95, key) {
248437
248437
  this._cachedPath = [];
248438
248438
  this.parent = parent;
248439
248439
  this.data = value;
248440
- this._path = path94;
248440
+ this._path = path95;
248441
248441
  this._key = key;
248442
248442
  }
248443
248443
  get path() {
@@ -253933,7 +253933,7 @@ function createOpenRouter(options2 = {}) {
253933
253933
  );
253934
253934
  const createChatModel = (modelId, settings = {}) => new OpenRouterChatLanguageModel(modelId, settings, {
253935
253935
  provider: "openrouter.chat",
253936
- url: ({ path: path94 }) => `${baseURL}${path94}`,
253936
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
253937
253937
  headers: getHeaders,
253938
253938
  compatibility,
253939
253939
  fetch: options2.fetch,
@@ -253941,7 +253941,7 @@ function createOpenRouter(options2 = {}) {
253941
253941
  });
253942
253942
  const createCompletionModel = (modelId, settings = {}) => new OpenRouterCompletionLanguageModel(modelId, settings, {
253943
253943
  provider: "openrouter.completion",
253944
- url: ({ path: path94 }) => `${baseURL}${path94}`,
253944
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
253945
253945
  headers: getHeaders,
253946
253946
  compatibility,
253947
253947
  fetch: options2.fetch,
@@ -253949,21 +253949,21 @@ function createOpenRouter(options2 = {}) {
253949
253949
  });
253950
253950
  const createEmbeddingModel = (modelId, settings = {}) => new OpenRouterEmbeddingModel(modelId, settings, {
253951
253951
  provider: "openrouter.embedding",
253952
- url: ({ path: path94 }) => `${baseURL}${path94}`,
253952
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
253953
253953
  headers: getHeaders,
253954
253954
  fetch: options2.fetch,
253955
253955
  extraBody: options2.extraBody
253956
253956
  });
253957
253957
  const createImageModel = (modelId, settings = {}) => new OpenRouterImageModel(modelId, settings, {
253958
253958
  provider: "openrouter.image",
253959
- url: ({ path: path94 }) => `${baseURL}${path94}`,
253959
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
253960
253960
  headers: getHeaders,
253961
253961
  fetch: options2.fetch,
253962
253962
  extraBody: options2.extraBody
253963
253963
  });
253964
253964
  const createVideoModel = (modelId, settings = {}) => new OpenRouterVideoModel(modelId, settings, {
253965
253965
  provider: "openrouter.video",
253966
- url: ({ path: path94 }) => `${baseURL}${path94}`,
253966
+ url: ({ path: path95 }) => `${baseURL}${path95}`,
253967
253967
  headers: getHeaders,
253968
253968
  fetch: options2.fetch,
253969
253969
  extraBody: options2.extraBody
@@ -264681,14 +264681,14 @@ var init_readFile = __esm({
264681
264681
  "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js"() {
264682
264682
  filePromises = {};
264683
264683
  fileIntercept = {};
264684
- readFile8 = (path94, options2) => {
264685
- if (fileIntercept[path94] !== void 0) {
264686
- return fileIntercept[path94];
264684
+ readFile8 = (path95, options2) => {
264685
+ if (fileIntercept[path95] !== void 0) {
264686
+ return fileIntercept[path95];
264687
264687
  }
264688
- if (!filePromises[path94] || options2?.ignoreCache) {
264689
- filePromises[path94] = fsReadFile(path94, "utf8");
264688
+ if (!filePromises[path95] || options2?.ignoreCache) {
264689
+ filePromises[path95] = fsReadFile(path95, "utf8");
264690
264690
  }
264691
- return filePromises[path94];
264691
+ return filePromises[path95];
264692
264692
  };
264693
264693
  }
264694
264694
  });
@@ -265111,8 +265111,8 @@ var init_createConfigValueProvider = __esm({
265111
265111
  return endpoint2.url.href;
265112
265112
  }
265113
265113
  if ("hostname" in endpoint2) {
265114
- const { protocol, hostname: hostname4, port, path: path94 } = endpoint2;
265115
- return `${protocol}//${hostname4}${port ? ":" + port : ""}${path94}`;
265114
+ const { protocol, hostname: hostname4, port, path: path95 } = endpoint2;
265115
+ return `${protocol}//${hostname4}${port ? ":" + port : ""}${path95}`;
265116
265116
  }
265117
265117
  }
265118
265118
  return endpoint2;
@@ -273795,8 +273795,8 @@ function formatSearchMatchPreview(payload, plainText) {
273795
273795
  function formatReadFilePreview(content) {
273796
273796
  const pathMatch = content.match(/^File:\s*(.+)$/m);
273797
273797
  if (pathMatch) {
273798
- const path94 = pathMatch[1].trim();
273799
- const short = path94.length > 64 ? `\u2026${path94.slice(-61)}` : path94;
273798
+ const path95 = pathMatch[1].trim();
273799
+ const short = path95.length > 64 ? `\u2026${path95.slice(-61)}` : path95;
273800
273800
  const linesMatch = content.match(/^Lines:\s*(.+)$/m);
273801
273801
  if (linesMatch) {
273802
273802
  return `Read ${short} \u2014 lines ${linesMatch[1].trim()}`;
@@ -273925,8 +273925,8 @@ function formatToolResultPreview(registryName, rawDetail, status) {
273925
273925
  if (!envelope) return void 0;
273926
273926
  if (status === "error" || envelope.error) {
273927
273927
  const msg = envelope.error ?? extractShortField(envelope.payload) ?? "Tool failed";
273928
- const path94 = typeof envelope.payload.path === "string" && envelope.payload.path.trim() ? envelope.payload.path.trim() : void 0;
273929
- return capPreview(path94 ? `${msg} (${path94})` : msg);
273928
+ const path95 = typeof envelope.payload.path === "string" && envelope.payload.path.trim() ? envelope.payload.path.trim() : void 0;
273929
+ return capPreview(path95 ? `${msg} (${path95})` : msg);
273930
273930
  }
273931
273931
  const payload = envelope.payload;
273932
273932
  const plain = envelope.plainText;
@@ -273976,7 +273976,7 @@ function formatToolStartPreview(registryName, toolArgs) {
273976
273976
  if (!toolArgs || typeof toolArgs !== "object") {
273977
273977
  return getToolActivityLabel(registryName);
273978
273978
  }
273979
- const path94 = typeof toolArgs.path === "string" && toolArgs.path.trim() || typeof toolArgs.file_path === "string" && toolArgs.file_path.trim() || typeof toolArgs.focus_path === "string" && toolArgs.focus_path.trim() || void 0;
273979
+ const path95 = typeof toolArgs.path === "string" && toolArgs.path.trim() || typeof toolArgs.file_path === "string" && toolArgs.file_path.trim() || typeof toolArgs.focus_path === "string" && toolArgs.focus_path.trim() || void 0;
273980
273980
  const query = typeof toolArgs.query === "string" ? toolArgs.query.trim() : void 0;
273981
273981
  const pattern = (registryName === "grep" || registryName === "glob") && typeof toolArgs.pattern === "string" ? toolArgs.pattern.trim() : void 0;
273982
273982
  const command = typeof toolArgs.command === "string" ? toolArgs.command.trim() : void 0;
@@ -273985,8 +273985,8 @@ function formatToolStartPreview(registryName, toolArgs) {
273985
273985
  const p2 = pattern.length > 56 ? `${pattern.slice(0, 53)}\u2026` : pattern;
273986
273986
  return `${base}: ${p2}\u2026`;
273987
273987
  }
273988
- if (path94) {
273989
- const short = path94.length > 72 ? `${path94.slice(0, 69)}\u2026` : path94;
273988
+ if (path95) {
273989
+ const short = path95.length > 72 ? `${path95.slice(0, 69)}\u2026` : path95;
273990
273990
  return `${base} (${short})\u2026`;
273991
273991
  }
273992
273992
  if (query) {
@@ -275885,6 +275885,14 @@ ${views.length} proposed file change(s). NOTHING has been written. Review each,
275885
275885
  rec.error = outcome.error ?? "Sub-agent run failed";
275886
275886
  }
275887
275887
  rec.finishedAt = Date.now();
275888
+ } catch (err2) {
275889
+ const rec = taskStore.get(taskId);
275890
+ if (rec && !rec.cancelled && !rec.finishedAt) {
275891
+ rec.state = "error";
275892
+ rec.error = err2 instanceof Error ? err2.message : String(err2);
275893
+ rec.finishedAt = Date.now();
275894
+ }
275895
+ throw err2;
275888
275896
  } finally {
275889
275897
  if (proposalSetId && !keepProposals) deleteProposalSet(proposalSetId);
275890
275898
  }
@@ -277400,24 +277408,24 @@ function errMessage(err2) {
277400
277408
  return err2 instanceof Error ? err2.message : String(err2);
277401
277409
  }
277402
277410
  function readFileStructuredError(err2, displayPath2) {
277403
- const path94 = displayPath2;
277411
+ const path95 = displayPath2;
277404
277412
  const msg = errMessage(err2);
277405
277413
  const code = nodeErrno(err2);
277406
277414
  if (code === "ENOENT") {
277407
- const p2 = path94 ?? "requested path";
277415
+ const p2 = path95 ?? "requested path";
277408
277416
  return {
277409
277417
  success: false,
277410
277418
  error: "file_not_found",
277411
- path: path94,
277419
+ path: path95,
277412
277420
  message: `No file at path "${p2}". Use list_files or explore_folder to find the correct path.`
277413
277421
  };
277414
277422
  }
277415
277423
  if (code === "EISDIR" || msg.includes("is a directory") || msg.toLowerCase().includes("not a file")) {
277416
- const p2 = path94 ?? "requested path";
277424
+ const p2 = path95 ?? "requested path";
277417
277425
  return {
277418
277426
  success: false,
277419
277427
  error: "not_a_file",
277420
- path: path94,
277428
+ path: path95,
277421
277429
  message: `Path "${p2}" is a directory, not a file. Use explore_folder or list_files.`
277422
277430
  };
277423
277431
  }
@@ -277425,7 +277433,7 @@ function readFileStructuredError(err2, displayPath2) {
277425
277433
  return {
277426
277434
  success: false,
277427
277435
  error: "path_not_allowed",
277428
- path: path94,
277436
+ path: path95,
277429
277437
  message: msg
277430
277438
  };
277431
277439
  }
@@ -277433,7 +277441,7 @@ function readFileStructuredError(err2, displayPath2) {
277433
277441
  return {
277434
277442
  success: false,
277435
277443
  error: "path_not_allowed",
277436
- path: path94,
277444
+ path: path95,
277437
277445
  message: msg
277438
277446
  };
277439
277447
  }
@@ -282868,12 +282876,12 @@ var init_hosting_tier = __esm({
282868
282876
  });
282869
282877
 
282870
282878
  // supabase/functions/_shared/relic-files.ts
282871
- function contentTypeFor(path94) {
282872
- const ext = path94.split(".").pop()?.toLowerCase() ?? "";
282879
+ function contentTypeFor(path95) {
282880
+ const ext = path95.split(".").pop()?.toLowerCase() ?? "";
282873
282881
  return TYPES[ext] ?? null;
282874
282882
  }
282875
- function cleanRelicPath(path94) {
282876
- const p2 = path94.trim().replace(/\\/g, "/").replace(/^\.\//, "");
282883
+ function cleanRelicPath(path95) {
282884
+ const p2 = path95.trim().replace(/\\/g, "/").replace(/^\.\//, "");
282877
282885
  if (!p2 || p2.length > 200 || p2.startsWith("/")) return null;
282878
282886
  if (!/^[A-Za-z0-9._\-/]+$/.test(p2)) return null;
282879
282887
  if (p2.split("/").some((seg) => seg === "" || seg === "." || seg === "..")) return null;
@@ -282890,22 +282898,22 @@ function prepareRelicFiles(files) {
282890
282898
  const seen3 = /* @__PURE__ */ new Set();
282891
282899
  let total = 0;
282892
282900
  for (const f5 of files) {
282893
- const path94 = typeof f5?.path === "string" ? cleanRelicPath(f5.path) : null;
282894
- if (!path94) return { error: `Not a usable file path: ${JSON.stringify(f5?.path)}` };
282895
- if (seen3.has(path94)) return { error: `${path94} appears twice.` };
282896
- seen3.add(path94);
282897
- const type2 = contentTypeFor(path94);
282898
- if (!type2) return { error: `${path94}: that kind of file can't go in a relic.` };
282899
- if (typeof f5.content !== "string") return { error: `${path94} has no content.` };
282901
+ const path95 = typeof f5?.path === "string" ? cleanRelicPath(f5.path) : null;
282902
+ if (!path95) return { error: `Not a usable file path: ${JSON.stringify(f5?.path)}` };
282903
+ if (seen3.has(path95)) return { error: `${path95} appears twice.` };
282904
+ seen3.add(path95);
282905
+ const type2 = contentTypeFor(path95);
282906
+ if (!type2) return { error: `${path95}: that kind of file can't go in a relic.` };
282907
+ if (typeof f5.content !== "string") return { error: `${path95} has no content.` };
282900
282908
  let bytes;
282901
282909
  try {
282902
282910
  bytes = f5.encoding === "base64" ? decodeBase64(f5.content) : new TextEncoder().encode(f5.content);
282903
282911
  } catch {
282904
- return { error: `${path94}: the base64 content doesn't decode.` };
282912
+ return { error: `${path95}: the base64 content doesn't decode.` };
282905
282913
  }
282906
282914
  total += bytes.length;
282907
282915
  if (total > RELIC_LIMITS.maxBytes) return { error: `A relic can be at most ${RELIC_LIMITS.maxBytes / 1024 / 1024} MB.` };
282908
- out.push({ path: path94, bytes, contentType: type2 });
282916
+ out.push({ path: path95, bytes, contentType: type2 });
282909
282917
  }
282910
282918
  if (!seen3.has("index.html")) return { error: "A relic needs an index.html." };
282911
282919
  return { files: out, bytes: total };
@@ -290496,32 +290504,32 @@ var require_URL = __commonJS({
290496
290504
  else
290497
290505
  return basepath.substring(0, lastslash + 1) + refpath;
290498
290506
  }
290499
- function remove_dot_segments(path94) {
290500
- if (!path94) return path94;
290507
+ function remove_dot_segments(path95) {
290508
+ if (!path95) return path95;
290501
290509
  var output = "";
290502
- while (path94.length > 0) {
290503
- if (path94 === "." || path94 === "..") {
290504
- path94 = "";
290510
+ while (path95.length > 0) {
290511
+ if (path95 === "." || path95 === "..") {
290512
+ path95 = "";
290505
290513
  break;
290506
290514
  }
290507
- var twochars = path94.substring(0, 2);
290508
- var threechars = path94.substring(0, 3);
290509
- var fourchars = path94.substring(0, 4);
290515
+ var twochars = path95.substring(0, 2);
290516
+ var threechars = path95.substring(0, 3);
290517
+ var fourchars = path95.substring(0, 4);
290510
290518
  if (threechars === "../") {
290511
- path94 = path94.substring(3);
290519
+ path95 = path95.substring(3);
290512
290520
  } else if (twochars === "./") {
290513
- path94 = path94.substring(2);
290521
+ path95 = path95.substring(2);
290514
290522
  } else if (threechars === "/./") {
290515
- path94 = "/" + path94.substring(3);
290516
- } else if (twochars === "/." && path94.length === 2) {
290517
- path94 = "/";
290518
- } else if (fourchars === "/../" || threechars === "/.." && path94.length === 3) {
290519
- path94 = "/" + path94.substring(4);
290523
+ path95 = "/" + path95.substring(3);
290524
+ } else if (twochars === "/." && path95.length === 2) {
290525
+ path95 = "/";
290526
+ } else if (fourchars === "/../" || threechars === "/.." && path95.length === 3) {
290527
+ path95 = "/" + path95.substring(4);
290520
290528
  output = output.replace(/\/?[^\/]*$/, "");
290521
290529
  } else {
290522
- var segment = path94.match(/(\/?([^\/]*))/)[0];
290530
+ var segment = path95.match(/(\/?([^\/]*))/)[0];
290523
290531
  output += segment;
290524
- path94 = path94.substring(segment.length);
290532
+ path95 = path95.substring(segment.length);
290525
290533
  }
290526
290534
  }
290527
290535
  return output;
@@ -302794,7 +302802,7 @@ async function paidCoreForChat(chatId) {
302794
302802
  balanceCents
302795
302803
  });
302796
302804
  }
302797
- async function coreProxyPost(path94, body, opts = {}) {
302805
+ async function coreProxyPost(path95, body, opts = {}) {
302798
302806
  const base = getCoreProxyBaseUrl();
302799
302807
  if (!base) return null;
302800
302808
  let token2 = getPinnedCoreToken();
@@ -302815,7 +302823,7 @@ async function coreProxyPost(path94, body, opts = {}) {
302815
302823
  } else {
302816
302824
  payload = body.form;
302817
302825
  }
302818
- return coreProxyFetch(`${base}${path94}`, {
302826
+ return coreProxyFetch(`${base}${path95}`, {
302819
302827
  method: "POST",
302820
302828
  headers,
302821
302829
  body: payload,
@@ -307459,54 +307467,54 @@ var require_polyfills2 = __commonJS({
307459
307467
  }
307460
307468
  var chdir;
307461
307469
  module2.exports = patch;
307462
- function patch(fs77) {
307470
+ function patch(fs78) {
307463
307471
  if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
307464
- patchLchmod(fs77);
307465
- }
307466
- if (!fs77.lutimes) {
307467
- patchLutimes(fs77);
307468
- }
307469
- fs77.chown = chownFix(fs77.chown);
307470
- fs77.fchown = chownFix(fs77.fchown);
307471
- fs77.lchown = chownFix(fs77.lchown);
307472
- fs77.chmod = chmodFix(fs77.chmod);
307473
- fs77.fchmod = chmodFix(fs77.fchmod);
307474
- fs77.lchmod = chmodFix(fs77.lchmod);
307475
- fs77.chownSync = chownFixSync(fs77.chownSync);
307476
- fs77.fchownSync = chownFixSync(fs77.fchownSync);
307477
- fs77.lchownSync = chownFixSync(fs77.lchownSync);
307478
- fs77.chmodSync = chmodFixSync(fs77.chmodSync);
307479
- fs77.fchmodSync = chmodFixSync(fs77.fchmodSync);
307480
- fs77.lchmodSync = chmodFixSync(fs77.lchmodSync);
307481
- fs77.stat = statFix(fs77.stat);
307482
- fs77.fstat = statFix(fs77.fstat);
307483
- fs77.lstat = statFix(fs77.lstat);
307484
- fs77.statSync = statFixSync(fs77.statSync);
307485
- fs77.fstatSync = statFixSync(fs77.fstatSync);
307486
- fs77.lstatSync = statFixSync(fs77.lstatSync);
307487
- if (fs77.chmod && !fs77.lchmod) {
307488
- fs77.lchmod = function(path94, mode, cb2) {
307472
+ patchLchmod(fs78);
307473
+ }
307474
+ if (!fs78.lutimes) {
307475
+ patchLutimes(fs78);
307476
+ }
307477
+ fs78.chown = chownFix(fs78.chown);
307478
+ fs78.fchown = chownFix(fs78.fchown);
307479
+ fs78.lchown = chownFix(fs78.lchown);
307480
+ fs78.chmod = chmodFix(fs78.chmod);
307481
+ fs78.fchmod = chmodFix(fs78.fchmod);
307482
+ fs78.lchmod = chmodFix(fs78.lchmod);
307483
+ fs78.chownSync = chownFixSync(fs78.chownSync);
307484
+ fs78.fchownSync = chownFixSync(fs78.fchownSync);
307485
+ fs78.lchownSync = chownFixSync(fs78.lchownSync);
307486
+ fs78.chmodSync = chmodFixSync(fs78.chmodSync);
307487
+ fs78.fchmodSync = chmodFixSync(fs78.fchmodSync);
307488
+ fs78.lchmodSync = chmodFixSync(fs78.lchmodSync);
307489
+ fs78.stat = statFix(fs78.stat);
307490
+ fs78.fstat = statFix(fs78.fstat);
307491
+ fs78.lstat = statFix(fs78.lstat);
307492
+ fs78.statSync = statFixSync(fs78.statSync);
307493
+ fs78.fstatSync = statFixSync(fs78.fstatSync);
307494
+ fs78.lstatSync = statFixSync(fs78.lstatSync);
307495
+ if (fs78.chmod && !fs78.lchmod) {
307496
+ fs78.lchmod = function(path95, mode, cb2) {
307489
307497
  if (cb2) process.nextTick(cb2);
307490
307498
  };
307491
- fs77.lchmodSync = function() {
307499
+ fs78.lchmodSync = function() {
307492
307500
  };
307493
307501
  }
307494
- if (fs77.chown && !fs77.lchown) {
307495
- fs77.lchown = function(path94, uid, gid, cb2) {
307502
+ if (fs78.chown && !fs78.lchown) {
307503
+ fs78.lchown = function(path95, uid, gid, cb2) {
307496
307504
  if (cb2) process.nextTick(cb2);
307497
307505
  };
307498
- fs77.lchownSync = function() {
307506
+ fs78.lchownSync = function() {
307499
307507
  };
307500
307508
  }
307501
307509
  if (platform === "win32") {
307502
- fs77.rename = typeof fs77.rename !== "function" ? fs77.rename : (function(fs$rename) {
307510
+ fs78.rename = typeof fs78.rename !== "function" ? fs78.rename : (function(fs$rename) {
307503
307511
  function rename5(from, to2, cb2) {
307504
307512
  var start = Date.now();
307505
307513
  var backoff = 0;
307506
307514
  fs$rename(from, to2, function CB(er2) {
307507
307515
  if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 6e4) {
307508
307516
  setTimeout(function() {
307509
- fs77.stat(to2, function(stater, st2) {
307517
+ fs78.stat(to2, function(stater, st2) {
307510
307518
  if (stater && stater.code === "ENOENT")
307511
307519
  fs$rename(from, to2, CB);
307512
307520
  else
@@ -307522,9 +307530,9 @@ var require_polyfills2 = __commonJS({
307522
307530
  }
307523
307531
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename5, fs$rename);
307524
307532
  return rename5;
307525
- })(fs77.rename);
307533
+ })(fs78.rename);
307526
307534
  }
307527
- fs77.read = typeof fs77.read !== "function" ? fs77.read : (function(fs$read) {
307535
+ fs78.read = typeof fs78.read !== "function" ? fs78.read : (function(fs$read) {
307528
307536
  function read(fd2, buffer, offset, length, position, callback_) {
307529
307537
  var callback;
307530
307538
  if (callback_ && typeof callback_ === "function") {
@@ -307532,22 +307540,22 @@ var require_polyfills2 = __commonJS({
307532
307540
  callback = function(er2, _4, __) {
307533
307541
  if (er2 && er2.code === "EAGAIN" && eagCounter < 10) {
307534
307542
  eagCounter++;
307535
- return fs$read.call(fs77, fd2, buffer, offset, length, position, callback);
307543
+ return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
307536
307544
  }
307537
307545
  callback_.apply(this, arguments);
307538
307546
  };
307539
307547
  }
307540
- return fs$read.call(fs77, fd2, buffer, offset, length, position, callback);
307548
+ return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
307541
307549
  }
307542
307550
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
307543
307551
  return read;
307544
- })(fs77.read);
307545
- fs77.readSync = typeof fs77.readSync !== "function" ? fs77.readSync : /* @__PURE__ */ (function(fs$readSync) {
307552
+ })(fs78.read);
307553
+ fs78.readSync = typeof fs78.readSync !== "function" ? fs78.readSync : /* @__PURE__ */ (function(fs$readSync) {
307546
307554
  return function(fd2, buffer, offset, length, position) {
307547
307555
  var eagCounter = 0;
307548
307556
  while (true) {
307549
307557
  try {
307550
- return fs$readSync.call(fs77, fd2, buffer, offset, length, position);
307558
+ return fs$readSync.call(fs78, fd2, buffer, offset, length, position);
307551
307559
  } catch (er2) {
307552
307560
  if (er2.code === "EAGAIN" && eagCounter < 10) {
307553
307561
  eagCounter++;
@@ -307557,11 +307565,11 @@ var require_polyfills2 = __commonJS({
307557
307565
  }
307558
307566
  }
307559
307567
  };
307560
- })(fs77.readSync);
307561
- function patchLchmod(fs78) {
307562
- fs78.lchmod = function(path94, mode, callback) {
307563
- fs78.open(
307564
- path94,
307568
+ })(fs78.readSync);
307569
+ function patchLchmod(fs79) {
307570
+ fs79.lchmod = function(path95, mode, callback) {
307571
+ fs79.open(
307572
+ path95,
307565
307573
  constants2.O_WRONLY | constants2.O_SYMLINK,
307566
307574
  mode,
307567
307575
  function(err2, fd2) {
@@ -307569,80 +307577,80 @@ var require_polyfills2 = __commonJS({
307569
307577
  if (callback) callback(err2);
307570
307578
  return;
307571
307579
  }
307572
- fs78.fchmod(fd2, mode, function(err3) {
307573
- fs78.close(fd2, function(err22) {
307580
+ fs79.fchmod(fd2, mode, function(err3) {
307581
+ fs79.close(fd2, function(err22) {
307574
307582
  if (callback) callback(err3 || err22);
307575
307583
  });
307576
307584
  });
307577
307585
  }
307578
307586
  );
307579
307587
  };
307580
- fs78.lchmodSync = function(path94, mode) {
307581
- var fd2 = fs78.openSync(path94, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
307588
+ fs79.lchmodSync = function(path95, mode) {
307589
+ var fd2 = fs79.openSync(path95, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
307582
307590
  var threw = true;
307583
307591
  var ret2;
307584
307592
  try {
307585
- ret2 = fs78.fchmodSync(fd2, mode);
307593
+ ret2 = fs79.fchmodSync(fd2, mode);
307586
307594
  threw = false;
307587
307595
  } finally {
307588
307596
  if (threw) {
307589
307597
  try {
307590
- fs78.closeSync(fd2);
307598
+ fs79.closeSync(fd2);
307591
307599
  } catch (er2) {
307592
307600
  }
307593
307601
  } else {
307594
- fs78.closeSync(fd2);
307602
+ fs79.closeSync(fd2);
307595
307603
  }
307596
307604
  }
307597
307605
  return ret2;
307598
307606
  };
307599
307607
  }
307600
- function patchLutimes(fs78) {
307601
- if (constants2.hasOwnProperty("O_SYMLINK") && fs78.futimes) {
307602
- fs78.lutimes = function(path94, at2, mt2, cb2) {
307603
- fs78.open(path94, constants2.O_SYMLINK, function(er2, fd2) {
307608
+ function patchLutimes(fs79) {
307609
+ if (constants2.hasOwnProperty("O_SYMLINK") && fs79.futimes) {
307610
+ fs79.lutimes = function(path95, at2, mt2, cb2) {
307611
+ fs79.open(path95, constants2.O_SYMLINK, function(er2, fd2) {
307604
307612
  if (er2) {
307605
307613
  if (cb2) cb2(er2);
307606
307614
  return;
307607
307615
  }
307608
- fs78.futimes(fd2, at2, mt2, function(er3) {
307609
- fs78.close(fd2, function(er22) {
307616
+ fs79.futimes(fd2, at2, mt2, function(er3) {
307617
+ fs79.close(fd2, function(er22) {
307610
307618
  if (cb2) cb2(er3 || er22);
307611
307619
  });
307612
307620
  });
307613
307621
  });
307614
307622
  };
307615
- fs78.lutimesSync = function(path94, at2, mt2) {
307616
- var fd2 = fs78.openSync(path94, constants2.O_SYMLINK);
307623
+ fs79.lutimesSync = function(path95, at2, mt2) {
307624
+ var fd2 = fs79.openSync(path95, constants2.O_SYMLINK);
307617
307625
  var ret2;
307618
307626
  var threw = true;
307619
307627
  try {
307620
- ret2 = fs78.futimesSync(fd2, at2, mt2);
307628
+ ret2 = fs79.futimesSync(fd2, at2, mt2);
307621
307629
  threw = false;
307622
307630
  } finally {
307623
307631
  if (threw) {
307624
307632
  try {
307625
- fs78.closeSync(fd2);
307633
+ fs79.closeSync(fd2);
307626
307634
  } catch (er2) {
307627
307635
  }
307628
307636
  } else {
307629
- fs78.closeSync(fd2);
307637
+ fs79.closeSync(fd2);
307630
307638
  }
307631
307639
  }
307632
307640
  return ret2;
307633
307641
  };
307634
- } else if (fs78.futimes) {
307635
- fs78.lutimes = function(_a30, _b21, _c, cb2) {
307642
+ } else if (fs79.futimes) {
307643
+ fs79.lutimes = function(_a30, _b21, _c, cb2) {
307636
307644
  if (cb2) process.nextTick(cb2);
307637
307645
  };
307638
- fs78.lutimesSync = function() {
307646
+ fs79.lutimesSync = function() {
307639
307647
  };
307640
307648
  }
307641
307649
  }
307642
307650
  function chmodFix(orig) {
307643
307651
  if (!orig) return orig;
307644
307652
  return function(target, mode, cb2) {
307645
- return orig.call(fs77, target, mode, function(er2) {
307653
+ return orig.call(fs78, target, mode, function(er2) {
307646
307654
  if (chownErOk(er2)) er2 = null;
307647
307655
  if (cb2) cb2.apply(this, arguments);
307648
307656
  });
@@ -307652,7 +307660,7 @@ var require_polyfills2 = __commonJS({
307652
307660
  if (!orig) return orig;
307653
307661
  return function(target, mode) {
307654
307662
  try {
307655
- return orig.call(fs77, target, mode);
307663
+ return orig.call(fs78, target, mode);
307656
307664
  } catch (er2) {
307657
307665
  if (!chownErOk(er2)) throw er2;
307658
307666
  }
@@ -307661,7 +307669,7 @@ var require_polyfills2 = __commonJS({
307661
307669
  function chownFix(orig) {
307662
307670
  if (!orig) return orig;
307663
307671
  return function(target, uid, gid, cb2) {
307664
- return orig.call(fs77, target, uid, gid, function(er2) {
307672
+ return orig.call(fs78, target, uid, gid, function(er2) {
307665
307673
  if (chownErOk(er2)) er2 = null;
307666
307674
  if (cb2) cb2.apply(this, arguments);
307667
307675
  });
@@ -307671,7 +307679,7 @@ var require_polyfills2 = __commonJS({
307671
307679
  if (!orig) return orig;
307672
307680
  return function(target, uid, gid) {
307673
307681
  try {
307674
- return orig.call(fs77, target, uid, gid);
307682
+ return orig.call(fs78, target, uid, gid);
307675
307683
  } catch (er2) {
307676
307684
  if (!chownErOk(er2)) throw er2;
307677
307685
  }
@@ -307691,13 +307699,13 @@ var require_polyfills2 = __commonJS({
307691
307699
  }
307692
307700
  if (cb2) cb2.apply(this, arguments);
307693
307701
  }
307694
- return options2 ? orig.call(fs77, target, options2, callback) : orig.call(fs77, target, callback);
307702
+ return options2 ? orig.call(fs78, target, options2, callback) : orig.call(fs78, target, callback);
307695
307703
  };
307696
307704
  }
307697
307705
  function statFixSync(orig) {
307698
307706
  if (!orig) return orig;
307699
307707
  return function(target, options2) {
307700
- var stats = options2 ? orig.call(fs77, target, options2) : orig.call(fs77, target);
307708
+ var stats = options2 ? orig.call(fs78, target, options2) : orig.call(fs78, target);
307701
307709
  if (stats) {
307702
307710
  if (stats.uid < 0) stats.uid += 4294967296;
307703
307711
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -307726,16 +307734,16 @@ var require_legacy_streams = __commonJS({
307726
307734
  "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
307727
307735
  var Stream5 = __require("stream").Stream;
307728
307736
  module2.exports = legacy2;
307729
- function legacy2(fs77) {
307737
+ function legacy2(fs78) {
307730
307738
  return {
307731
307739
  ReadStream: ReadStream2,
307732
307740
  WriteStream
307733
307741
  };
307734
- function ReadStream2(path94, options2) {
307735
- if (!(this instanceof ReadStream2)) return new ReadStream2(path94, options2);
307742
+ function ReadStream2(path95, options2) {
307743
+ if (!(this instanceof ReadStream2)) return new ReadStream2(path95, options2);
307736
307744
  Stream5.call(this);
307737
307745
  var self2 = this;
307738
- this.path = path94;
307746
+ this.path = path95;
307739
307747
  this.fd = null;
307740
307748
  this.readable = true;
307741
307749
  this.paused = false;
@@ -307769,7 +307777,7 @@ var require_legacy_streams = __commonJS({
307769
307777
  });
307770
307778
  return;
307771
307779
  }
307772
- fs77.open(this.path, this.flags, this.mode, function(err2, fd2) {
307780
+ fs78.open(this.path, this.flags, this.mode, function(err2, fd2) {
307773
307781
  if (err2) {
307774
307782
  self2.emit("error", err2);
307775
307783
  self2.readable = false;
@@ -307780,10 +307788,10 @@ var require_legacy_streams = __commonJS({
307780
307788
  self2._read();
307781
307789
  });
307782
307790
  }
307783
- function WriteStream(path94, options2) {
307784
- if (!(this instanceof WriteStream)) return new WriteStream(path94, options2);
307791
+ function WriteStream(path95, options2) {
307792
+ if (!(this instanceof WriteStream)) return new WriteStream(path95, options2);
307785
307793
  Stream5.call(this);
307786
- this.path = path94;
307794
+ this.path = path95;
307787
307795
  this.fd = null;
307788
307796
  this.writable = true;
307789
307797
  this.flags = "w";
@@ -307808,7 +307816,7 @@ var require_legacy_streams = __commonJS({
307808
307816
  this.busy = false;
307809
307817
  this._queue = [];
307810
307818
  if (this.fd === null) {
307811
- this._open = fs77.open;
307819
+ this._open = fs78.open;
307812
307820
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
307813
307821
  this.flush();
307814
307822
  }
@@ -307843,7 +307851,7 @@ var require_clone = __commonJS({
307843
307851
  // node_modules/graceful-fs/graceful-fs.js
307844
307852
  var require_graceful_fs = __commonJS({
307845
307853
  "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
307846
- var fs77 = __require("fs");
307854
+ var fs78 = __require("fs");
307847
307855
  var polyfills = require_polyfills2();
307848
307856
  var legacy2 = require_legacy_streams();
307849
307857
  var clone4 = require_clone();
@@ -307875,12 +307883,12 @@ var require_graceful_fs = __commonJS({
307875
307883
  m3 = "GFS4: " + m3.split(/\n/).join("\nGFS4: ");
307876
307884
  console.error(m3);
307877
307885
  };
307878
- if (!fs77[gracefulQueue]) {
307886
+ if (!fs78[gracefulQueue]) {
307879
307887
  queue2 = global[gracefulQueue] || [];
307880
- publishQueue(fs77, queue2);
307881
- fs77.close = (function(fs$close) {
307888
+ publishQueue(fs78, queue2);
307889
+ fs78.close = (function(fs$close) {
307882
307890
  function close(fd2, cb2) {
307883
- return fs$close.call(fs77, fd2, function(err2) {
307891
+ return fs$close.call(fs78, fd2, function(err2) {
307884
307892
  if (!err2) {
307885
307893
  resetQueue();
307886
307894
  }
@@ -307892,48 +307900,48 @@ var require_graceful_fs = __commonJS({
307892
307900
  value: fs$close
307893
307901
  });
307894
307902
  return close;
307895
- })(fs77.close);
307896
- fs77.closeSync = (function(fs$closeSync) {
307903
+ })(fs78.close);
307904
+ fs78.closeSync = (function(fs$closeSync) {
307897
307905
  function closeSync(fd2) {
307898
- fs$closeSync.apply(fs77, arguments);
307906
+ fs$closeSync.apply(fs78, arguments);
307899
307907
  resetQueue();
307900
307908
  }
307901
307909
  Object.defineProperty(closeSync, previousSymbol, {
307902
307910
  value: fs$closeSync
307903
307911
  });
307904
307912
  return closeSync;
307905
- })(fs77.closeSync);
307913
+ })(fs78.closeSync);
307906
307914
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
307907
307915
  process.on("exit", function() {
307908
- debug(fs77[gracefulQueue]);
307909
- __require("assert").equal(fs77[gracefulQueue].length, 0);
307916
+ debug(fs78[gracefulQueue]);
307917
+ __require("assert").equal(fs78[gracefulQueue].length, 0);
307910
307918
  });
307911
307919
  }
307912
307920
  }
307913
307921
  var queue2;
307914
307922
  if (!global[gracefulQueue]) {
307915
- publishQueue(global, fs77[gracefulQueue]);
307916
- }
307917
- module2.exports = patch(clone4(fs77));
307918
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs77.__patched) {
307919
- module2.exports = patch(fs77);
307920
- fs77.__patched = true;
307921
- }
307922
- function patch(fs78) {
307923
- polyfills(fs78);
307924
- fs78.gracefulify = patch;
307925
- fs78.createReadStream = createReadStream3;
307926
- fs78.createWriteStream = createWriteStream;
307927
- var fs$readFile = fs78.readFile;
307928
- fs78.readFile = readFile15;
307929
- function readFile15(path94, options2, cb2) {
307923
+ publishQueue(global, fs78[gracefulQueue]);
307924
+ }
307925
+ module2.exports = patch(clone4(fs78));
307926
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs78.__patched) {
307927
+ module2.exports = patch(fs78);
307928
+ fs78.__patched = true;
307929
+ }
307930
+ function patch(fs79) {
307931
+ polyfills(fs79);
307932
+ fs79.gracefulify = patch;
307933
+ fs79.createReadStream = createReadStream3;
307934
+ fs79.createWriteStream = createWriteStream;
307935
+ var fs$readFile = fs79.readFile;
307936
+ fs79.readFile = readFile15;
307937
+ function readFile15(path95, options2, cb2) {
307930
307938
  if (typeof options2 === "function")
307931
307939
  cb2 = options2, options2 = null;
307932
- return go$readFile(path94, options2, cb2);
307933
- function go$readFile(path95, options3, cb3, startTime) {
307934
- return fs$readFile(path95, options3, function(err2) {
307940
+ return go$readFile(path95, options2, cb2);
307941
+ function go$readFile(path96, options3, cb3, startTime) {
307942
+ return fs$readFile(path96, options3, function(err2) {
307935
307943
  if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
307936
- enqueue([go$readFile, [path95, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307944
+ enqueue([go$readFile, [path96, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307937
307945
  else {
307938
307946
  if (typeof cb3 === "function")
307939
307947
  cb3.apply(this, arguments);
@@ -307941,16 +307949,16 @@ var require_graceful_fs = __commonJS({
307941
307949
  });
307942
307950
  }
307943
307951
  }
307944
- var fs$writeFile = fs78.writeFile;
307945
- fs78.writeFile = writeFile11;
307946
- function writeFile11(path94, data, options2, cb2) {
307952
+ var fs$writeFile = fs79.writeFile;
307953
+ fs79.writeFile = writeFile11;
307954
+ function writeFile11(path95, data, options2, cb2) {
307947
307955
  if (typeof options2 === "function")
307948
307956
  cb2 = options2, options2 = null;
307949
- return go$writeFile(path94, data, options2, cb2);
307950
- function go$writeFile(path95, data2, options3, cb3, startTime) {
307951
- return fs$writeFile(path95, data2, options3, function(err2) {
307957
+ return go$writeFile(path95, data, options2, cb2);
307958
+ function go$writeFile(path96, data2, options3, cb3, startTime) {
307959
+ return fs$writeFile(path96, data2, options3, function(err2) {
307952
307960
  if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
307953
- enqueue([go$writeFile, [path95, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307961
+ enqueue([go$writeFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307954
307962
  else {
307955
307963
  if (typeof cb3 === "function")
307956
307964
  cb3.apply(this, arguments);
@@ -307958,17 +307966,17 @@ var require_graceful_fs = __commonJS({
307958
307966
  });
307959
307967
  }
307960
307968
  }
307961
- var fs$appendFile = fs78.appendFile;
307969
+ var fs$appendFile = fs79.appendFile;
307962
307970
  if (fs$appendFile)
307963
- fs78.appendFile = appendFile;
307964
- function appendFile(path94, data, options2, cb2) {
307971
+ fs79.appendFile = appendFile;
307972
+ function appendFile(path95, data, options2, cb2) {
307965
307973
  if (typeof options2 === "function")
307966
307974
  cb2 = options2, options2 = null;
307967
- return go$appendFile(path94, data, options2, cb2);
307968
- function go$appendFile(path95, data2, options3, cb3, startTime) {
307969
- return fs$appendFile(path95, data2, options3, function(err2) {
307975
+ return go$appendFile(path95, data, options2, cb2);
307976
+ function go$appendFile(path96, data2, options3, cb3, startTime) {
307977
+ return fs$appendFile(path96, data2, options3, function(err2) {
307970
307978
  if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
307971
- enqueue([go$appendFile, [path95, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307979
+ enqueue([go$appendFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
307972
307980
  else {
307973
307981
  if (typeof cb3 === "function")
307974
307982
  cb3.apply(this, arguments);
@@ -307976,9 +307984,9 @@ var require_graceful_fs = __commonJS({
307976
307984
  });
307977
307985
  }
307978
307986
  }
307979
- var fs$copyFile = fs78.copyFile;
307987
+ var fs$copyFile = fs79.copyFile;
307980
307988
  if (fs$copyFile)
307981
- fs78.copyFile = copyFile;
307989
+ fs79.copyFile = copyFile;
307982
307990
  function copyFile(src, dest, flags, cb2) {
307983
307991
  if (typeof flags === "function") {
307984
307992
  cb2 = flags;
@@ -307996,34 +308004,34 @@ var require_graceful_fs = __commonJS({
307996
308004
  });
307997
308005
  }
307998
308006
  }
307999
- var fs$readdir = fs78.readdir;
308000
- fs78.readdir = readdir3;
308007
+ var fs$readdir = fs79.readdir;
308008
+ fs79.readdir = readdir3;
308001
308009
  var noReaddirOptionVersions = /^v[0-5]\./;
308002
- function readdir3(path94, options2, cb2) {
308010
+ function readdir3(path95, options2, cb2) {
308003
308011
  if (typeof options2 === "function")
308004
308012
  cb2 = options2, options2 = null;
308005
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path95, options3, cb3, startTime) {
308006
- return fs$readdir(path95, fs$readdirCallback(
308007
- path95,
308013
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path96, options3, cb3, startTime) {
308014
+ return fs$readdir(path96, fs$readdirCallback(
308015
+ path96,
308008
308016
  options3,
308009
308017
  cb3,
308010
308018
  startTime
308011
308019
  ));
308012
- } : function go$readdir2(path95, options3, cb3, startTime) {
308013
- return fs$readdir(path95, options3, fs$readdirCallback(
308014
- path95,
308020
+ } : function go$readdir2(path96, options3, cb3, startTime) {
308021
+ return fs$readdir(path96, options3, fs$readdirCallback(
308022
+ path96,
308015
308023
  options3,
308016
308024
  cb3,
308017
308025
  startTime
308018
308026
  ));
308019
308027
  };
308020
- return go$readdir(path94, options2, cb2);
308021
- function fs$readdirCallback(path95, options3, cb3, startTime) {
308028
+ return go$readdir(path95, options2, cb2);
308029
+ function fs$readdirCallback(path96, options3, cb3, startTime) {
308022
308030
  return function(err2, files) {
308023
308031
  if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
308024
308032
  enqueue([
308025
308033
  go$readdir,
308026
- [path95, options3, cb3],
308034
+ [path96, options3, cb3],
308027
308035
  err2,
308028
308036
  startTime || Date.now(),
308029
308037
  Date.now()
@@ -308038,21 +308046,21 @@ var require_graceful_fs = __commonJS({
308038
308046
  }
308039
308047
  }
308040
308048
  if (process.version.substr(0, 4) === "v0.8") {
308041
- var legStreams = legacy2(fs78);
308049
+ var legStreams = legacy2(fs79);
308042
308050
  ReadStream2 = legStreams.ReadStream;
308043
308051
  WriteStream = legStreams.WriteStream;
308044
308052
  }
308045
- var fs$ReadStream = fs78.ReadStream;
308053
+ var fs$ReadStream = fs79.ReadStream;
308046
308054
  if (fs$ReadStream) {
308047
308055
  ReadStream2.prototype = Object.create(fs$ReadStream.prototype);
308048
308056
  ReadStream2.prototype.open = ReadStream$open;
308049
308057
  }
308050
- var fs$WriteStream = fs78.WriteStream;
308058
+ var fs$WriteStream = fs79.WriteStream;
308051
308059
  if (fs$WriteStream) {
308052
308060
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
308053
308061
  WriteStream.prototype.open = WriteStream$open;
308054
308062
  }
308055
- Object.defineProperty(fs78, "ReadStream", {
308063
+ Object.defineProperty(fs79, "ReadStream", {
308056
308064
  get: function() {
308057
308065
  return ReadStream2;
308058
308066
  },
@@ -308062,7 +308070,7 @@ var require_graceful_fs = __commonJS({
308062
308070
  enumerable: true,
308063
308071
  configurable: true
308064
308072
  });
308065
- Object.defineProperty(fs78, "WriteStream", {
308073
+ Object.defineProperty(fs79, "WriteStream", {
308066
308074
  get: function() {
308067
308075
  return WriteStream;
308068
308076
  },
@@ -308073,7 +308081,7 @@ var require_graceful_fs = __commonJS({
308073
308081
  configurable: true
308074
308082
  });
308075
308083
  var FileReadStream = ReadStream2;
308076
- Object.defineProperty(fs78, "FileReadStream", {
308084
+ Object.defineProperty(fs79, "FileReadStream", {
308077
308085
  get: function() {
308078
308086
  return FileReadStream;
308079
308087
  },
@@ -308084,7 +308092,7 @@ var require_graceful_fs = __commonJS({
308084
308092
  configurable: true
308085
308093
  });
308086
308094
  var FileWriteStream = WriteStream;
308087
- Object.defineProperty(fs78, "FileWriteStream", {
308095
+ Object.defineProperty(fs79, "FileWriteStream", {
308088
308096
  get: function() {
308089
308097
  return FileWriteStream;
308090
308098
  },
@@ -308094,7 +308102,7 @@ var require_graceful_fs = __commonJS({
308094
308102
  enumerable: true,
308095
308103
  configurable: true
308096
308104
  });
308097
- function ReadStream2(path94, options2) {
308105
+ function ReadStream2(path95, options2) {
308098
308106
  if (this instanceof ReadStream2)
308099
308107
  return fs$ReadStream.apply(this, arguments), this;
308100
308108
  else
@@ -308114,7 +308122,7 @@ var require_graceful_fs = __commonJS({
308114
308122
  }
308115
308123
  });
308116
308124
  }
308117
- function WriteStream(path94, options2) {
308125
+ function WriteStream(path95, options2) {
308118
308126
  if (this instanceof WriteStream)
308119
308127
  return fs$WriteStream.apply(this, arguments), this;
308120
308128
  else
@@ -308132,22 +308140,22 @@ var require_graceful_fs = __commonJS({
308132
308140
  }
308133
308141
  });
308134
308142
  }
308135
- function createReadStream3(path94, options2) {
308136
- return new fs78.ReadStream(path94, options2);
308143
+ function createReadStream3(path95, options2) {
308144
+ return new fs79.ReadStream(path95, options2);
308137
308145
  }
308138
- function createWriteStream(path94, options2) {
308139
- return new fs78.WriteStream(path94, options2);
308146
+ function createWriteStream(path95, options2) {
308147
+ return new fs79.WriteStream(path95, options2);
308140
308148
  }
308141
- var fs$open = fs78.open;
308142
- fs78.open = open;
308143
- function open(path94, flags, mode, cb2) {
308149
+ var fs$open = fs79.open;
308150
+ fs79.open = open;
308151
+ function open(path95, flags, mode, cb2) {
308144
308152
  if (typeof mode === "function")
308145
308153
  cb2 = mode, mode = null;
308146
- return go$open(path94, flags, mode, cb2);
308147
- function go$open(path95, flags2, mode2, cb3, startTime) {
308148
- return fs$open(path95, flags2, mode2, function(err2, fd2) {
308154
+ return go$open(path95, flags, mode, cb2);
308155
+ function go$open(path96, flags2, mode2, cb3, startTime) {
308156
+ return fs$open(path96, flags2, mode2, function(err2, fd2) {
308149
308157
  if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
308150
- enqueue([go$open, [path95, flags2, mode2, cb3], err2, startTime || Date.now(), Date.now()]);
308158
+ enqueue([go$open, [path96, flags2, mode2, cb3], err2, startTime || Date.now(), Date.now()]);
308151
308159
  else {
308152
308160
  if (typeof cb3 === "function")
308153
308161
  cb3.apply(this, arguments);
@@ -308155,20 +308163,20 @@ var require_graceful_fs = __commonJS({
308155
308163
  });
308156
308164
  }
308157
308165
  }
308158
- return fs78;
308166
+ return fs79;
308159
308167
  }
308160
308168
  function enqueue(elem) {
308161
308169
  debug("ENQUEUE", elem[0].name, elem[1]);
308162
- fs77[gracefulQueue].push(elem);
308170
+ fs78[gracefulQueue].push(elem);
308163
308171
  retry();
308164
308172
  }
308165
308173
  var retryTimer2;
308166
308174
  function resetQueue() {
308167
308175
  var now2 = Date.now();
308168
- for (var i4 = 0; i4 < fs77[gracefulQueue].length; ++i4) {
308169
- if (fs77[gracefulQueue][i4].length > 2) {
308170
- fs77[gracefulQueue][i4][3] = now2;
308171
- fs77[gracefulQueue][i4][4] = now2;
308176
+ for (var i4 = 0; i4 < fs78[gracefulQueue].length; ++i4) {
308177
+ if (fs78[gracefulQueue][i4].length > 2) {
308178
+ fs78[gracefulQueue][i4][3] = now2;
308179
+ fs78[gracefulQueue][i4][4] = now2;
308172
308180
  }
308173
308181
  }
308174
308182
  retry();
@@ -308176,9 +308184,9 @@ var require_graceful_fs = __commonJS({
308176
308184
  function retry() {
308177
308185
  clearTimeout(retryTimer2);
308178
308186
  retryTimer2 = void 0;
308179
- if (fs77[gracefulQueue].length === 0)
308187
+ if (fs78[gracefulQueue].length === 0)
308180
308188
  return;
308181
- var elem = fs77[gracefulQueue].shift();
308189
+ var elem = fs78[gracefulQueue].shift();
308182
308190
  var fn2 = elem[0];
308183
308191
  var args2 = elem[1];
308184
308192
  var err2 = elem[2];
@@ -308200,7 +308208,7 @@ var require_graceful_fs = __commonJS({
308200
308208
  debug("RETRY", fn2.name, args2);
308201
308209
  fn2.apply(null, args2.concat([startTime]));
308202
308210
  } else {
308203
- fs77[gracefulQueue].push(elem);
308211
+ fs78[gracefulQueue].push(elem);
308204
308212
  }
308205
308213
  }
308206
308214
  if (retryTimer2 === void 0) {
@@ -308951,8 +308959,8 @@ var init_convertInputToNodeStream = __esm({
308951
308959
 
308952
308960
  // node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js
308953
308961
  function filterZipArchiveEntry(_ref) {
308954
- var path94 = _ref.path;
308955
- return path94.endsWith(".xml") || path94.endsWith(".xml.rels");
308962
+ var path95 = _ref.path;
308963
+ return path95.endsWith(".xml") || path95.endsWith(".xml.rels");
308956
308964
  }
308957
308965
  var init_filterZipArchiveEntry = __esm({
308958
308966
  "node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js"() {
@@ -309355,11 +309363,11 @@ function parseFilePaths(content, parseXml2) {
309355
309363
  break;
309356
309364
  }
309357
309365
  }
309358
- function getFilePathFromRelationTarget(path94) {
309359
- if (path94[0] === "/") {
309360
- return path94.slice("/".length);
309366
+ function getFilePathFromRelationTarget(path95) {
309367
+ if (path95[0] === "/") {
309368
+ return path95.slice("/".length);
309361
309369
  }
309362
- return "xl/" + path94;
309370
+ return "xl/" + path95;
309363
309371
  }
309364
309372
  }
309365
309373
  var init_parseFilePaths = __esm({
@@ -311464,18 +311472,18 @@ function parseDataRow(dataRow, schema, columns, options2) {
311464
311472
  object: transformValue(value, isEmptyValue2, void 0, options2)
311465
311473
  };
311466
311474
  }
311467
- function parseObject(row, schema, path94, columns, options2) {
311475
+ function parseObject(row, schema, path95, columns, options2) {
311468
311476
  var object4 = {};
311469
311477
  var isEmptyObject = true;
311470
311478
  var errors = [];
311471
311479
  var children = [];
311472
311480
  for (var _i2 = 0, _Object$keys = Object.keys(schema); _i2 < _Object$keys.length; _i2++) {
311473
311481
  var key = _Object$keys[_i2];
311474
- var child2 = parseProperty(row, schema[key], getPropertyPath(key, path94), columns, options2);
311482
+ var child2 = parseProperty(row, schema[key], getPropertyPath(key, path95), columns, options2);
311475
311483
  if (child2.errors) {
311476
311484
  errors = errors.concat(child2.errors);
311477
311485
  } else {
311478
- object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key, path94), options2);
311486
+ object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key, path95), options2);
311479
311487
  if (isEmptyObject && !child2.isEmptyValue) {
311480
311488
  isEmptyObject = false;
311481
311489
  }
@@ -311500,13 +311508,13 @@ function parseObject(row, schema, path94, columns, options2) {
311500
311508
  children
311501
311509
  };
311502
311510
  }
311503
- function parseProperty(row, schemaEntry, path94, columns, options2) {
311511
+ function parseProperty(row, schemaEntry, path95, columns, options2) {
311504
311512
  var columnIndex = schemaEntry.column ? columns.indexOf(schemaEntry.column) : void 0;
311505
311513
  var isMissingColumn = schemaEntry.column ? columnIndex < 0 : void 0;
311506
311514
  var _ref = schemaEntry.column ? isMissingColumn ? {
311507
311515
  value: options2.propertyValueWhenColumnIsMissing,
311508
311516
  isEmptyValue: true
311509
- } : parseCellValueWithPossibleErrors(row[columnIndex], schemaEntry, columnIndex, options2) : parseObject(row, schemaEntry.schema, path94, columns, options2), value = _ref.value, isEmptyValue2 = _ref.isEmptyValue, errors = _ref.errors, children = _ref.children;
311517
+ } : parseCellValueWithPossibleErrors(row[columnIndex], schemaEntry, columnIndex, options2) : parseObject(row, schemaEntry.schema, path95, columns, options2), value = _ref.value, isEmptyValue2 = _ref.isEmptyValue, errors = _ref.errors, children = _ref.children;
311510
311518
  if (errors) {
311511
311519
  return {
311512
311520
  // Return the errors.
@@ -311725,15 +311733,15 @@ function parseSeparatedSubstrings(string4, separatorCharacter) {
311725
311733
  }
311726
311734
  return elements;
311727
311735
  }
311728
- function transformValue(value, isEmptyValue2, path94, options2) {
311736
+ function transformValue(value, isEmptyValue2, path95, options2) {
311729
311737
  if (isEmptyValue2) {
311730
311738
  if (isObject3(value)) {
311731
311739
  return options2.transformEmptyObject(value, {
311732
- path: path94
311740
+ path: path95
311733
311741
  });
311734
311742
  } else if (Array.isArray(value)) {
311735
311743
  return options2.transformEmptyArray(value, {
311736
- path: path94
311744
+ path: path95
311737
311745
  });
311738
311746
  }
311739
311747
  }
@@ -313200,8 +313208,8 @@ var init_tap = __esm({
313200
313208
  });
313201
313209
 
313202
313210
  // node_modules/underscore/modules/toPath.js
313203
- function toPath(path94) {
313204
- return isArray_default(path94) ? path94 : [path94];
313211
+ function toPath(path95) {
313212
+ return isArray_default(path95) ? path95 : [path95];
313205
313213
  }
313206
313214
  var init_toPath = __esm({
313207
313215
  "node_modules/underscore/modules/toPath.js"() {
@@ -313212,8 +313220,8 @@ var init_toPath = __esm({
313212
313220
  });
313213
313221
 
313214
313222
  // node_modules/underscore/modules/_toPath.js
313215
- function toPath2(path94) {
313216
- return _2.toPath(path94);
313223
+ function toPath2(path95) {
313224
+ return _2.toPath(path95);
313217
313225
  }
313218
313226
  var init_toPath2 = __esm({
313219
313227
  "node_modules/underscore/modules/_toPath.js"() {
@@ -313223,11 +313231,11 @@ var init_toPath2 = __esm({
313223
313231
  });
313224
313232
 
313225
313233
  // node_modules/underscore/modules/_deepGet.js
313226
- function deepGet(obj2, path94) {
313227
- var length = path94.length;
313234
+ function deepGet(obj2, path95) {
313235
+ var length = path95.length;
313228
313236
  for (var i4 = 0; i4 < length; i4++) {
313229
313237
  if (obj2 == null) return void 0;
313230
- obj2 = obj2[path94[i4]];
313238
+ obj2 = obj2[path95[i4]];
313231
313239
  }
313232
313240
  return length ? obj2 : void 0;
313233
313241
  }
@@ -313237,8 +313245,8 @@ var init_deepGet = __esm({
313237
313245
  });
313238
313246
 
313239
313247
  // node_modules/underscore/modules/get.js
313240
- function get2(object4, path94, defaultValue) {
313241
- var value = deepGet(object4, toPath2(path94));
313248
+ function get2(object4, path95, defaultValue) {
313249
+ var value = deepGet(object4, toPath2(path95));
313242
313250
  return isUndefined(value) ? defaultValue : value;
313243
313251
  }
313244
313252
  var init_get = __esm({
@@ -313250,11 +313258,11 @@ var init_get = __esm({
313250
313258
  });
313251
313259
 
313252
313260
  // node_modules/underscore/modules/has.js
313253
- function has2(obj2, path94) {
313254
- path94 = toPath2(path94);
313255
- var length = path94.length;
313261
+ function has2(obj2, path95) {
313262
+ path95 = toPath2(path95);
313263
+ var length = path95.length;
313256
313264
  for (var i4 = 0; i4 < length; i4++) {
313257
- var key = path94[i4];
313265
+ var key = path95[i4];
313258
313266
  if (!has(obj2, key)) return false;
313259
313267
  obj2 = obj2[key];
313260
313268
  }
@@ -313291,10 +313299,10 @@ var init_matcher = __esm({
313291
313299
  });
313292
313300
 
313293
313301
  // node_modules/underscore/modules/property.js
313294
- function property(path94) {
313295
- path94 = toPath2(path94);
313302
+ function property(path95) {
313303
+ path95 = toPath2(path95);
313296
313304
  return function(obj2) {
313297
- return deepGet(obj2, path94);
313305
+ return deepGet(obj2, path95);
313298
313306
  };
313299
313307
  }
313300
313308
  var init_property = __esm({
@@ -313403,8 +313411,8 @@ var init_noop = __esm({
313403
313411
  // node_modules/underscore/modules/propertyOf.js
313404
313412
  function propertyOf(obj2) {
313405
313413
  if (obj2 == null) return noop5;
313406
- return function(path94) {
313407
- return get2(obj2, path94);
313414
+ return function(path95) {
313415
+ return get2(obj2, path95);
313408
313416
  };
313409
313417
  }
313410
313418
  var init_propertyOf = __esm({
@@ -313598,14 +313606,14 @@ var init_template = __esm({
313598
313606
  });
313599
313607
 
313600
313608
  // node_modules/underscore/modules/result.js
313601
- function result(obj2, path94, fallback) {
313602
- path94 = toPath2(path94);
313603
- var length = path94.length;
313609
+ function result(obj2, path95, fallback) {
313610
+ path95 = toPath2(path95);
313611
+ var length = path95.length;
313604
313612
  if (!length) {
313605
313613
  return isFunction_default(fallback) ? fallback.call(obj2) : fallback;
313606
313614
  }
313607
313615
  for (var i4 = 0; i4 < length; i4++) {
313608
- var prop = obj2 == null ? void 0 : obj2[path94[i4]];
313616
+ var prop = obj2 == null ? void 0 : obj2[path95[i4]];
313609
313617
  if (prop === void 0) {
313610
313618
  prop = fallback;
313611
313619
  i4 = length;
@@ -314288,14 +314296,14 @@ var init_invoke = __esm({
314288
314296
  init_map();
314289
314297
  init_deepGet();
314290
314298
  init_toPath2();
314291
- invoke_default = restArguments(function(obj2, path94, args2) {
314299
+ invoke_default = restArguments(function(obj2, path95, args2) {
314292
314300
  var contextPath, func;
314293
- if (isFunction_default(path94)) {
314294
- func = path94;
314301
+ if (isFunction_default(path95)) {
314302
+ func = path95;
314295
314303
  } else {
314296
- path94 = toPath2(path94);
314297
- contextPath = path94.slice(0, -1);
314298
- path94 = path94[path94.length - 1];
314304
+ path95 = toPath2(path95);
314305
+ contextPath = path95.slice(0, -1);
314306
+ path95 = path95[path95.length - 1];
314299
314307
  }
314300
314308
  return map2(obj2, function(context) {
314301
314309
  var method = func;
@@ -314304,7 +314312,7 @@ var init_invoke = __esm({
314304
314312
  context = deepGet(context, contextPath);
314305
314313
  }
314306
314314
  if (context == null) return void 0;
314307
- method = context[path94];
314315
+ method = context[path95];
314308
314316
  }
314309
314317
  return method == null ? method : method.apply(context, args2);
314310
314318
  });
@@ -323669,8 +323677,8 @@ var require_utils2 = __commonJS({
323669
323677
  var result2 = transform2[inputType][outputType](input);
323670
323678
  return result2;
323671
323679
  };
323672
- exports2.resolve = function(path94) {
323673
- var parts = path94.split("/");
323680
+ exports2.resolve = function(path95) {
323681
+ var parts = path95.split("/");
323674
323682
  var result2 = [];
323675
323683
  for (var index2 = 0; index2 < parts.length; index2++) {
323676
323684
  var part = parts[index2];
@@ -329523,18 +329531,18 @@ var require_object2 = __commonJS({
329523
329531
  var object4 = new ZipObject(name30, zipObjectContent, o2);
329524
329532
  this.files[name30] = object4;
329525
329533
  };
329526
- var parentFolder = function(path94) {
329527
- if (path94.slice(-1) === "/") {
329528
- path94 = path94.substring(0, path94.length - 1);
329534
+ var parentFolder = function(path95) {
329535
+ if (path95.slice(-1) === "/") {
329536
+ path95 = path95.substring(0, path95.length - 1);
329529
329537
  }
329530
- var lastSlash = path94.lastIndexOf("/");
329531
- return lastSlash > 0 ? path94.substring(0, lastSlash) : "";
329538
+ var lastSlash = path95.lastIndexOf("/");
329539
+ return lastSlash > 0 ? path95.substring(0, lastSlash) : "";
329532
329540
  };
329533
- var forceTrailingSlash = function(path94) {
329534
- if (path94.slice(-1) !== "/") {
329535
- path94 += "/";
329541
+ var forceTrailingSlash = function(path95) {
329542
+ if (path95.slice(-1) !== "/") {
329543
+ path95 += "/";
329536
329544
  }
329537
- return path94;
329545
+ return path95;
329538
329546
  };
329539
329547
  var folderAdd = function(name30, createFolders) {
329540
329548
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
@@ -330572,27 +330580,27 @@ var require_zipfile = __commonJS({
330572
330580
  };
330573
330581
  });
330574
330582
  }
330575
- function splitPath(path94) {
330576
- var lastIndex = path94.lastIndexOf("/");
330583
+ function splitPath(path95) {
330584
+ var lastIndex = path95.lastIndexOf("/");
330577
330585
  if (lastIndex === -1) {
330578
- return { dirname: "", basename: path94 };
330586
+ return { dirname: "", basename: path95 };
330579
330587
  } else {
330580
330588
  return {
330581
- dirname: path94.substring(0, lastIndex),
330582
- basename: path94.substring(lastIndex + 1)
330589
+ dirname: path95.substring(0, lastIndex),
330590
+ basename: path95.substring(lastIndex + 1)
330583
330591
  };
330584
330592
  }
330585
330593
  }
330586
330594
  function joinPath() {
330587
- var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path94) {
330588
- return path94;
330595
+ var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path95) {
330596
+ return path95;
330589
330597
  });
330590
330598
  var relevantPaths = [];
330591
- nonEmptyPaths.forEach(function(path94) {
330592
- if (/^\//.test(path94)) {
330593
- relevantPaths = [path94];
330599
+ nonEmptyPaths.forEach(function(path95) {
330600
+ if (/^\//.test(path95)) {
330601
+ relevantPaths = [path95];
330594
330602
  } else {
330595
- relevantPaths.push(path94);
330603
+ relevantPaths.push(path95);
330596
330604
  }
330597
330605
  });
330598
330606
  return relevantPaths.join("/");
@@ -337995,9 +338003,9 @@ var require_office_xml_reader = __commonJS({
337995
338003
  return collapseAlternateContent(document2)[0];
337996
338004
  });
337997
338005
  }
337998
- function readXmlFromZipFile(docxFile, path94) {
337999
- if (docxFile.exists(path94)) {
338000
- return docxFile.read(path94, "utf-8").then(stripUtf8Bom).then(read);
338006
+ function readXmlFromZipFile(docxFile, path95) {
338007
+ if (docxFile.exists(path95)) {
338008
+ return docxFile.read(path95, "utf-8").then(stripUtf8Bom).then(read);
338001
338009
  } else {
338002
338010
  return promises6.resolve(null);
338003
338011
  }
@@ -339761,10 +339769,10 @@ var require_body_reader = __commonJS({
339761
339769
  }
339762
339770
  }
339763
339771
  function findEmbeddedImageFile(relationshipId) {
339764
- var path94 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
339772
+ var path95 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
339765
339773
  return {
339766
- path: path94,
339767
- read: docxFile.read.bind(docxFile, path94)
339774
+ path: path95,
339775
+ read: docxFile.read.bind(docxFile, path95)
339768
339776
  };
339769
339777
  }
339770
339778
  function readImage(imageFile, altText) {
@@ -340001,12 +340009,12 @@ var require_content_types_reader = __commonJS({
340001
340009
  }
340002
340010
  function contentTypes(overrides, extensionDefaults) {
340003
340011
  return {
340004
- findContentType: function(path94) {
340005
- var overrideContentType = overrides[path94];
340012
+ findContentType: function(path95) {
340013
+ var overrideContentType = overrides[path95];
340006
340014
  if (overrideContentType) {
340007
340015
  return overrideContentType;
340008
340016
  } else {
340009
- var pathParts = path94.split(".");
340017
+ var pathParts = path95.split(".");
340010
340018
  var extension = pathParts[pathParts.length - 1];
340011
340019
  if (extensionDefaults.hasOwnProperty(extension)) {
340012
340020
  return extensionDefaults[extension];
@@ -340255,12 +340263,12 @@ var require_comments_reader = __commonJS({
340255
340263
  var require_path_is_absolute = __commonJS({
340256
340264
  "node_modules/path-is-absolute/index.js"(exports2, module2) {
340257
340265
  "use strict";
340258
- function posix2(path94) {
340259
- return path94.charAt(0) === "/";
340266
+ function posix2(path95) {
340267
+ return path95.charAt(0) === "/";
340260
340268
  }
340261
- function win32(path94) {
340269
+ function win32(path95) {
340262
340270
  var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
340263
- var result2 = splitDeviceRe.exec(path94);
340271
+ var result2 = splitDeviceRe.exec(path95);
340264
340272
  var device = result2[1] || "";
340265
340273
  var isUnc = Boolean(device && device.charAt(1) !== ":");
340266
340274
  return Boolean(result2[2] || isUnc);
@@ -340274,7 +340282,7 @@ var require_path_is_absolute = __commonJS({
340274
340282
  // node_modules/mammoth/lib/docx/files.js
340275
340283
  var require_files = __commonJS({
340276
340284
  "node_modules/mammoth/lib/docx/files.js"(exports2) {
340277
- var fs77 = __require("fs");
340285
+ var fs78 = __require("fs");
340278
340286
  var url2 = __require("url");
340279
340287
  var os29 = __require("os");
340280
340288
  var dirname11 = __require("path").dirname;
@@ -340294,19 +340302,19 @@ var require_files = __commonJS({
340294
340302
  }
340295
340303
  var base = options2.relativeToFile ? dirname11(options2.relativeToFile) : null;
340296
340304
  function read(uri, encoding) {
340297
- return resolveUri(uri).then(function(path94) {
340298
- return readFile15(path94, encoding).caught(function(error51) {
340305
+ return resolveUri(uri).then(function(path95) {
340306
+ return readFile15(path95, encoding).caught(function(error51) {
340299
340307
  var message = "could not open external image: '" + uri + "' (document directory: '" + base + "')\n" + error51.message;
340300
340308
  return promises6.reject(new Error(message));
340301
340309
  });
340302
340310
  });
340303
340311
  }
340304
340312
  function resolveUri(uri) {
340305
- var path94 = uriToPath(uri);
340306
- if (isAbsolutePath(path94)) {
340307
- return promises6.resolve(path94);
340313
+ var path95 = uriToPath(uri);
340314
+ if (isAbsolutePath(path95)) {
340315
+ return promises6.resolve(path95);
340308
340316
  } else if (base) {
340309
- return promises6.resolve(resolvePath(base, path94));
340317
+ return promises6.resolve(resolvePath(base, path95));
340310
340318
  } else {
340311
340319
  return promises6.reject(new Error("could not find external image '" + uri + "', path of input document is unknown"));
340312
340320
  }
@@ -340315,18 +340323,18 @@ var require_files = __commonJS({
340315
340323
  read
340316
340324
  };
340317
340325
  }
340318
- var readFile15 = promises6.promisify(fs77.readFile.bind(fs77));
340326
+ var readFile15 = promises6.promisify(fs78.readFile.bind(fs78));
340319
340327
  function uriToPath(uriString, platform) {
340320
340328
  if (!platform) {
340321
340329
  platform = os29.platform();
340322
340330
  }
340323
340331
  var uri = url2.parse(uriString);
340324
340332
  if (isLocalFileUri(uri) || isRelativeUri(uri)) {
340325
- var path94 = decodeURIComponent(uri.path);
340326
- if (platform === "win32" && /^\/[a-z]:/i.test(path94)) {
340327
- return path94.slice(1);
340333
+ var path95 = decodeURIComponent(uri.path);
340334
+ if (platform === "win32" && /^\/[a-z]:/i.test(path95)) {
340335
+ return path95.slice(1);
340328
340336
  } else {
340329
- return path94;
340337
+ return path95;
340330
340338
  }
340331
340339
  } else {
340332
340340
  throw new Error("Could not convert URI to path: " + uriString);
@@ -340526,18 +340534,18 @@ var require_docx_reader = __commonJS({
340526
340534
  readElement: contentTypesReader.readContentTypesFromXml,
340527
340535
  defaultValue: contentTypesReader.defaultContentTypes
340528
340536
  });
340529
- function readNumberingFromZipFile(zipFile, path94, styles) {
340537
+ function readNumberingFromZipFile(zipFile, path95, styles) {
340530
340538
  return xmlFileReader({
340531
- filename: path94,
340539
+ filename: path95,
340532
340540
  readElement: function(element) {
340533
340541
  return numberingXml.readNumberingXml(element, { styles });
340534
340542
  },
340535
340543
  defaultValue: numberingXml.defaultNumbering
340536
340544
  })(zipFile);
340537
340545
  }
340538
- function readStylesFromZipFile(zipFile, path94) {
340546
+ function readStylesFromZipFile(zipFile, path95) {
340539
340547
  return xmlFileReader({
340540
- filename: path94,
340548
+ filename: path95,
340541
340549
  readElement: stylesReader.readStylesXml,
340542
340550
  defaultValue: stylesReader.defaultStyles
340543
340551
  })(zipFile);
@@ -340568,10 +340576,10 @@ var require_style_map = __commonJS({
340568
340576
  });
340569
340577
  }
340570
340578
  function updateRelationships(docxFile) {
340571
- var path94 = "word/_rels/document.xml.rels";
340579
+ var path95 = "word/_rels/document.xml.rels";
340572
340580
  var relationshipsUri = "http://schemas.openxmlformats.org/package/2006/relationships";
340573
340581
  var relationshipElementName = "{" + relationshipsUri + "}Relationship";
340574
- return docxFile.read(path94, "utf8").then(xml.readString).then(function(relationshipsContainer) {
340582
+ return docxFile.read(path95, "utf8").then(xml.readString).then(function(relationshipsContainer) {
340575
340583
  var relationships = relationshipsContainer.children;
340576
340584
  addOrUpdateElement(relationships, relationshipElementName, "Id", {
340577
340585
  "Id": "rMammothStyleMap",
@@ -340579,21 +340587,21 @@ var require_style_map = __commonJS({
340579
340587
  "Target": styleMapAbsolutePath
340580
340588
  });
340581
340589
  var namespaces = { "": relationshipsUri };
340582
- return docxFile.write(path94, xml.writeString(relationshipsContainer, namespaces));
340590
+ return docxFile.write(path95, xml.writeString(relationshipsContainer, namespaces));
340583
340591
  });
340584
340592
  }
340585
340593
  function updateContentTypes(docxFile) {
340586
- var path94 = "[Content_Types].xml";
340594
+ var path95 = "[Content_Types].xml";
340587
340595
  var contentTypesUri = "http://schemas.openxmlformats.org/package/2006/content-types";
340588
340596
  var overrideName = "{" + contentTypesUri + "}Override";
340589
- return docxFile.read(path94, "utf8").then(xml.readString).then(function(typesElement) {
340597
+ return docxFile.read(path95, "utf8").then(xml.readString).then(function(typesElement) {
340590
340598
  var children = typesElement.children;
340591
340599
  addOrUpdateElement(children, overrideName, "PartName", {
340592
340600
  "PartName": styleMapAbsolutePath,
340593
340601
  "ContentType": "text/prs.mammoth.style-map"
340594
340602
  });
340595
340603
  var namespaces = { "": contentTypesUri };
340596
- return docxFile.write(path94, xml.writeString(typesElement, namespaces));
340604
+ return docxFile.write(path95, xml.writeString(typesElement, namespaces));
340597
340605
  });
340598
340606
  }
340599
340607
  function addOrUpdateElement(elements, name30, identifyingAttribute, attributes) {
@@ -341285,9 +341293,9 @@ var require_document_to_html = __commonJS({
341285
341293
  };
341286
341294
  var paths = [];
341287
341295
  if (run2.highlight !== null) {
341288
- var path94 = findHtmlPath({ type: "highlight", color: run2.highlight });
341289
- if (path94) {
341290
- paths.push(path94);
341296
+ var path95 = findHtmlPath({ type: "highlight", color: run2.highlight });
341297
+ if (path95) {
341298
+ paths.push(path95);
341291
341299
  }
341292
341300
  }
341293
341301
  if (run2.isSmallCaps) {
@@ -341322,15 +341330,15 @@ var require_document_to_html = __commonJS({
341322
341330
  messages.push(unrecognisedStyleWarning("run", run2));
341323
341331
  }
341324
341332
  paths.push(stylePath);
341325
- paths.forEach(function(path95) {
341326
- nodes = path95.wrap.bind(path95, nodes);
341333
+ paths.forEach(function(path96) {
341334
+ nodes = path96.wrap.bind(path96, nodes);
341327
341335
  });
341328
341336
  return nodes();
341329
341337
  }
341330
341338
  function findHtmlPathForRunProperty(elementType, defaultTagName) {
341331
- var path94 = findHtmlPath({ type: elementType });
341332
- if (path94) {
341333
- return path94;
341339
+ var path95 = findHtmlPath({ type: elementType });
341340
+ if (path95) {
341341
+ return path95;
341334
341342
  } else if (defaultTagName) {
341335
341343
  return htmlPaths.element(defaultTagName, {}, { fresh: false });
341336
341344
  } else {
@@ -343032,11 +343040,11 @@ var require_options_reader = __commonJS({
343032
343040
  // node_modules/mammoth/lib/unzip.js
343033
343041
  var require_unzip = __commonJS({
343034
343042
  "node_modules/mammoth/lib/unzip.js"(exports2) {
343035
- var fs77 = __require("fs");
343043
+ var fs78 = __require("fs");
343036
343044
  var promises6 = require_promises();
343037
343045
  var zipfile = require_zipfile();
343038
343046
  exports2.openZip = openZip;
343039
- var readFile15 = promises6.promisify(fs77.readFile);
343047
+ var readFile15 = promises6.promisify(fs78.readFile);
343040
343048
  function openZip(options2) {
343041
343049
  if (options2.path) {
343042
343050
  return readFile15(options2.path).then(zipfile.openArrayBuffer);
@@ -345756,16 +345764,16 @@ ${body}${more}`,
345756
345764
  LIMIT ${maxHits}
345757
345765
  `);
345758
345766
  for (const h3 of hits) {
345759
- const path94 = hitPath(
345767
+ const path95 = hitPath(
345760
345768
  titleById.get(h3.session_id) ?? h3.session_id,
345761
345769
  h3.turn,
345762
345770
  h3.role
345763
345771
  );
345764
345772
  groups.push({
345765
- file: path94,
345773
+ file: path95,
345766
345774
  matchCount: countOccurrences2(h3.content ?? "", query)
345767
345775
  });
345768
- lines.push(`${path94}
345776
+ lines.push(`${path95}
345769
345777
  ${snippetAround(formatTurnPlain(h3.role, h3.content ?? ""), query)}`);
345770
345778
  }
345771
345779
  const totalHits = hits.length;
@@ -347826,23 +347834,23 @@ function findAutonomousOp(chatId, turnId, operationId) {
347826
347834
  return sessionLogs.get(sessionKey(chatId, turnId))?.find((o2) => o2.operationId === operationId);
347827
347835
  }
347828
347836
  function autonomousOpFromPermissionExec(operationId, operationType, preview, execApproved) {
347829
- let path94;
347837
+ let path95;
347830
347838
  let summary;
347831
347839
  const p2 = preview;
347832
347840
  if (Array.isArray(p2)) {
347833
347841
  const first2 = p2[0];
347834
- path94 = first2?.path;
347842
+ path95 = first2?.path;
347835
347843
  summary = first2?.description;
347836
347844
  } else if (p2 && typeof p2 === "object") {
347837
347845
  const o2 = p2;
347838
- if (typeof o2.path === "string") path94 = o2.path;
347839
- if (typeof o2.command === "string") path94 = o2.command;
347846
+ if (typeof o2.path === "string") path95 = o2.path;
347847
+ if (typeof o2.command === "string") path95 = o2.command;
347840
347848
  if (typeof o2.description === "string") summary = o2.description;
347841
347849
  }
347842
347850
  return {
347843
347851
  operationId,
347844
347852
  type: operationType,
347845
- path: path94,
347853
+ path: path95,
347846
347854
  summary: summary ?? operationType,
347847
347855
  timestamp: Date.now(),
347848
347856
  result: execApproved ? "success" : "failed",
@@ -349283,7 +349291,9 @@ async function runContextAssembly(state2, deps) {
349283
349291
  const CONTEXT_PROACTIVE_THRESHOLD = 0.55;
349284
349292
  const fillAfterProactive = dispatchEstimate / workingWindowTokens;
349285
349293
  if (fillAfterProactive >= CONTEXT_PROACTIVE_THRESHOLD) {
349286
- const livePct = Math.round(fillAfterProactive * 100);
349294
+ const livePct = Math.round(
349295
+ dispatchEstimate / Math.max(1, contextWindowTokens) * 100
349296
+ );
349287
349297
  logCompactionLine(dispatchEstimate, "reminder");
349288
349298
  proactiveContextReminderForStream = `Context is at ${livePct}% capacity. Consider calling compress_context before your next heavy tool use.`;
349289
349299
  }
@@ -349297,9 +349307,12 @@ async function runContextAssembly(state2, deps) {
349297
349307
  sections: [],
349298
349308
  trimReport: [],
349299
349309
  dispatchedTokens: dispatchEstimate,
349300
- // The context meter reports against the WORKING window, so "% used" means
349301
- // "how close to compaction", not "how close to the model's hard limit".
349302
- contextWindow: workingWindowTokens
349310
+ // The context meter reports against the model's FULL window, so "% used"
349311
+ // means "how full is the model's context" — matching the compaction
349312
+ // reminder's number (which triggers on the working window but reports
349313
+ // against the full window). Reporting the working window here made the UI
349314
+ // show e.g. "100%" while the reminder said "198%" for the same dispatch.
349315
+ contextWindow: contextWindowTokens
349303
349316
  });
349304
349317
  return {
349305
349318
  systemPrompt,
@@ -350048,16 +350061,16 @@ var init_run_command_guidance = __esm({
350048
350061
  });
350049
350062
 
350050
350063
  // src/lib/agent/mutation-verify.ts
350051
- function recordUnverifiedEdit(turnId, path94) {
350064
+ function recordUnverifiedEdit(turnId, path95) {
350052
350065
  let set3 = unverifiedEditsByTurn.get(turnId);
350053
350066
  if (!set3) {
350054
350067
  set3 = /* @__PURE__ */ new Set();
350055
350068
  unverifiedEditsByTurn.set(turnId, set3);
350056
350069
  }
350057
- set3.add(path94);
350070
+ set3.add(path95);
350058
350071
  }
350059
- function clearUnverifiedEdit(turnId, path94) {
350060
- unverifiedEditsByTurn.get(turnId)?.delete(path94);
350072
+ function clearUnverifiedEdit(turnId, path95) {
350073
+ unverifiedEditsByTurn.get(turnId)?.delete(path95);
350061
350074
  }
350062
350075
  function getUnverifiedEditFeedback(turnId) {
350063
350076
  if (turnId == null) return null;
@@ -352899,10 +352912,10 @@ async function hasConfiguredGitIdentity(workspacePath) {
352899
352912
  return result2.exitCode === 0 && result2.stdout.trim().length > 0;
352900
352913
  }
352901
352914
  async function getCurrentCommitHash({
352902
- path: path94,
352915
+ path: path95,
352903
352916
  ref = "HEAD"
352904
352917
  }) {
352905
- const gitDir = resolveGitDir(path94);
352918
+ const gitDir = resolveGitDir(path95);
352906
352919
  if (!gitDir) return "";
352907
352920
  const result2 = await exec(["rev-parse", ref], gitDir);
352908
352921
  if (isGitMissingResult(result2)) {
@@ -353507,11 +353520,11 @@ var init_interceptor = __esm({
353507
353520
  * Update workspace path and ID (e.g. after create_workspace in same turn).
353508
353521
  * Ensures subsequent run_command/write_file in this session use the new project root.
353509
353522
  */
353510
- setWorkspace(path94, id) {
353511
- this.workspacePath = path94;
353523
+ setWorkspace(path95, id) {
353524
+ this.workspacePath = path95;
353512
353525
  if (id != null) this.workspaceId = id;
353513
353526
  logger113.log(
353514
- `[PermissionInterceptor] Workspace updated to: ${path94} (id: ${id})`
353527
+ `[PermissionInterceptor] Workspace updated to: ${path95} (id: ${id})`
353515
353528
  );
353516
353529
  }
353517
353530
  // ════════════════════════════════════════════════════════════════════════════
@@ -353922,12 +353935,12 @@ var init_interceptor = __esm({
353922
353935
  }
353923
353936
  }
353924
353937
  const preview = operation.request.preview;
353925
- const path94 = preview?.path;
353926
- if (path94 && RESULT_BEARING_FILE_OPS.has(operation.request.operation)) {
353938
+ const path95 = preview?.path;
353939
+ if (path95 && RESULT_BEARING_FILE_OPS.has(operation.request.operation)) {
353927
353940
  const opType = preview.type === "create" ? "create" : preview.type === "delete" ? "delete" : "update";
353928
353941
  return {
353929
353942
  success: true,
353930
- path: path94,
353943
+ path: path95,
353931
353944
  operation: opType,
353932
353945
  oldContent: preview.oldContent ?? "",
353933
353946
  newContent: preview.content ?? "",
@@ -353939,8 +353952,8 @@ var init_interceptor = __esm({
353939
353952
  ...preview.notice ? { output: preview.notice } : {}
353940
353953
  };
353941
353954
  }
353942
- if (path94) {
353943
- return { success: true, path: path94 };
353955
+ if (path95) {
353956
+ return { success: true, path: path95 };
353944
353957
  }
353945
353958
  if (operation.request.operation === "mcp_server_write") {
353946
353959
  const note = operation.request.preview.resultNote;
@@ -359044,6 +359057,65 @@ var init_turn_session_choices = __esm({
359044
359057
  });
359045
359058
 
359046
359059
  // src/lib/memory/recall.ts
359060
+ import fs71 from "node:fs/promises";
359061
+ import path89 from "node:path";
359062
+ function decayWeight(w2, daysSinceUse) {
359063
+ if (!(daysSinceUse > 0)) return w2;
359064
+ return 1 + (w2 - 1) * Math.pow(0.5, daysSinceUse / WEIGHT_DECAY_HALFLIFE_DAYS);
359065
+ }
359066
+ function applyDecay(weights, now2) {
359067
+ const out = {};
359068
+ for (const [file2, v2] of Object.entries(weights)) {
359069
+ const days = v2.lastUsedAt > 0 ? (now2 - v2.lastUsedAt) / 864e5 : Infinity;
359070
+ const w2 = decayWeight(v2.w, days);
359071
+ if (Math.abs(w2 - 1) < 0.01) continue;
359072
+ out[file2] = { w: w2, lastUsedAt: v2.lastUsedAt };
359073
+ }
359074
+ return out;
359075
+ }
359076
+ function bumpWeights(weights, files, now2) {
359077
+ const out = { ...weights };
359078
+ for (const file2 of files) {
359079
+ const prev = out[file2];
359080
+ out[file2] = {
359081
+ w: Math.min(WEIGHT_CAP, (prev?.w ?? 1) + WEIGHT_BUMP),
359082
+ lastUsedAt: now2
359083
+ };
359084
+ }
359085
+ return out;
359086
+ }
359087
+ async function readWeights(dir) {
359088
+ try {
359089
+ const raw = await fs71.readFile(path89.join(dir, WEIGHTS_FILE), "utf8");
359090
+ const parsed = JSON.parse(raw);
359091
+ if (!parsed || typeof parsed !== "object") return {};
359092
+ const out = {};
359093
+ for (const [file2, v2] of Object.entries(parsed)) {
359094
+ const entry = v2;
359095
+ if (!entry || typeof entry !== "object" || typeof entry.w !== "number") continue;
359096
+ out[file2] = {
359097
+ w: entry.w,
359098
+ lastUsedAt: typeof entry.lastUsedAt === "number" ? entry.lastUsedAt : 0
359099
+ };
359100
+ }
359101
+ return out;
359102
+ } catch {
359103
+ return {};
359104
+ }
359105
+ }
359106
+ async function writeWeights(dir, weights) {
359107
+ try {
359108
+ await fs71.writeFile(path89.join(dir, WEIGHTS_FILE), JSON.stringify(weights), "utf8");
359109
+ } catch (err2) {
359110
+ logger122.warn(
359111
+ "recall: could not write weights \u2014",
359112
+ err2 instanceof Error ? err2.message : err2
359113
+ );
359114
+ }
359115
+ }
359116
+ async function persistWeights(dir, weights, now2) {
359117
+ await writeWeights(dir, applyDecay(weights, now2));
359118
+ }
359047
359119
  function ageLabel(days) {
359048
359120
  if (days <= 0) return "today";
359049
359121
  if (days === 1) return "1 day ago";
@@ -359052,17 +359124,33 @@ function ageLabel(days) {
359052
359124
  function tokenize2(s3) {
359053
359125
  return s3.toLowerCase().split(/[^a-z0-9]+/).filter((t3) => t3.length > 1 && !STOP_WORDS.has(t3));
359054
359126
  }
359055
- function localRecallMatch(message, candidates) {
359056
- const msg = new Set(tokenize2(message));
359057
- if (msg.size === 0) return [];
359058
- const scored = candidates.map((c2) => {
359059
- const name30 = tokenize2(c2.file.replace(/\.md$/i, ""));
359060
- const desc2 = tokenize2(c2.description ?? "");
359061
- let score2 = 0;
359062
- for (const t3 of msg) {
359063
- if (name30.includes(t3)) score2 += 2;
359064
- if (desc2.includes(t3)) score2 += 1;
359065
- }
359127
+ function docTokens(c2) {
359128
+ const name30 = tokenize2(c2.file.replace(/\.md$/i, ""));
359129
+ const desc2 = tokenize2(c2.description ?? "");
359130
+ return [...name30, ...name30, ...desc2];
359131
+ }
359132
+ function idf(term, docs) {
359133
+ const containing = docs.reduce((n2, d2) => n2 + (d2.includes(term) ? 1 : 0), 0);
359134
+ return Math.log(1 + (docs.length - containing + 0.5) / (containing + 0.5));
359135
+ }
359136
+ function bm25(query, doc, docs, avgLen) {
359137
+ let score2 = 0;
359138
+ for (const term of query) {
359139
+ let tf = 0;
359140
+ for (const t3 of doc) if (t3 === term) tf++;
359141
+ if (tf === 0) continue;
359142
+ score2 += idf(term, docs) * (tf * (BM25_K1 + 1) / (tf + BM25_K1 * (1 - BM25_B + BM25_B * (doc.length / avgLen))));
359143
+ }
359144
+ return score2;
359145
+ }
359146
+ function localRecallMatch(message, candidates, weights) {
359147
+ const query = tokenize2(message);
359148
+ if (query.length === 0 || candidates.length === 0) return [];
359149
+ const qset = new Set(query);
359150
+ const docs = candidates.map(docTokens);
359151
+ const avgLen = docs.reduce((n2, d2) => n2 + d2.length, 0) / Math.max(1, docs.length);
359152
+ const scored = candidates.map((c2, i4) => {
359153
+ const score2 = bm25(qset, docs[i4], docs, avgLen) * (weights?.[c2.file]?.w ?? 1);
359066
359154
  return { file: c2.file, score: score2 };
359067
359155
  }).filter((x4) => x4.score > 0).sort((a2, b3) => b3.score - a2.score || a2.file.localeCompare(b3.file));
359068
359156
  return scored.slice(0, RECALL_MAX_NOTES).map((x4) => x4.file);
@@ -359099,8 +359187,18 @@ function parseRecallReply(text5, candidates) {
359099
359187
  return out;
359100
359188
  }
359101
359189
  async function selectRelevantMemories(args2) {
359102
- const { message, candidates } = args2;
359190
+ const { message, candidates, memoryDir } = args2;
359103
359191
  if (!message.trim() || candidates.length === 0) return [];
359192
+ const now2 = Date.now();
359193
+ let weights = {};
359194
+ if (memoryDir) {
359195
+ weights = applyDecay(await readWeights(memoryDir).catch(() => ({})), now2);
359196
+ }
359197
+ const local2 = localRecallMatch(message, candidates, weights);
359198
+ if (local2.length > 0) {
359199
+ if (memoryDir) await persistWeights(memoryDir, bumpWeights(weights, local2, now2), now2);
359200
+ return local2;
359201
+ }
359104
359202
  try {
359105
359203
  const { generateText: generateText2 } = await Promise.resolve().then(() => (init_dist16(), dist_exports3));
359106
359204
  const { readSettings: readSettings2 } = await Promise.resolve().then(() => (init_settings(), settings_exports));
@@ -359121,22 +359219,20 @@ async function selectRelevantMemories(args2) {
359121
359219
  abortSignal: AbortSignal.timeout(RECALL_TIMEOUT_MS)
359122
359220
  });
359123
359221
  recordAuxUsage2(args2.chatId, result2.usage, "memory");
359124
- return parseRecallReply(result2.text, candidates);
359222
+ const chosen = parseRecallReply(result2.text, candidates);
359223
+ if (memoryDir && chosen.length > 0) {
359224
+ await persistWeights(memoryDir, bumpWeights(weights, chosen, now2), now2);
359225
+ }
359226
+ return chosen;
359125
359227
  } catch (err2) {
359126
359228
  logger122.warn(
359127
359229
  "recall: selector failed \u2014",
359128
359230
  err2 instanceof Error ? err2.message : err2
359129
359231
  );
359130
- const local2 = localRecallMatch(message, candidates);
359131
- if (local2.length > 0) {
359132
- logger122.info(`recall: local fallback matched ${local2.join(", ")}`);
359133
- } else {
359134
- logger122.info("recall: skipped (selector failed and no local match)");
359135
- }
359136
- return local2;
359232
+ return [];
359137
359233
  }
359138
359234
  }
359139
- var import_electron_log125, logger122, RECALL_MAX_NOTES, RECALL_TIMEOUT_MS, RECALL_MAX_OUTPUT_TOKENS, RECALL_MESSAGE_CHARS, RECALL_SYSTEM_PROMPT, STOP_WORDS;
359235
+ var import_electron_log125, logger122, RECALL_MAX_NOTES, RECALL_TIMEOUT_MS, RECALL_MAX_OUTPUT_TOKENS, RECALL_MESSAGE_CHARS, WEIGHTS_FILE, WEIGHT_CAP, WEIGHT_BUMP, WEIGHT_DECAY_HALFLIFE_DAYS, RECALL_SYSTEM_PROMPT, STOP_WORDS, BM25_K1, BM25_B;
359140
359236
  var init_recall = __esm({
359141
359237
  "src/lib/memory/recall.ts"() {
359142
359238
  import_electron_log125 = __toESM(require_src());
@@ -359145,6 +359241,10 @@ var init_recall = __esm({
359145
359241
  RECALL_TIMEOUT_MS = 2500;
359146
359242
  RECALL_MAX_OUTPUT_TOKENS = 512;
359147
359243
  RECALL_MESSAGE_CHARS = 4e3;
359244
+ WEIGHTS_FILE = "weights.json";
359245
+ WEIGHT_CAP = 4;
359246
+ WEIGHT_BUMP = 0.5;
359247
+ WEIGHT_DECAY_HALFLIFE_DAYS = 14;
359148
359248
  RECALL_SYSTEM_PROMPT = `You pick which of a project's memory notes an AI coding agent should have in front of it for the user's next message. You get the message and the notes, each as its file name, type, age and description.
359149
359249
  Reply with JSON only, in the form {"files": ["<file>", ...]}: at most ${RECALL_MAX_NOTES} files, only notes clearly useful for THIS message, fewest first. Reply {"files": []} when none are.`;
359150
359250
  STOP_WORDS = /* @__PURE__ */ new Set([
@@ -359207,6 +359307,8 @@ Reply with JSON only, in the form {"files": ["<file>", ...]}: at most ${RECALL_M
359207
359307
  "after",
359208
359308
  "make"
359209
359309
  ]);
359310
+ BM25_K1 = 1.2;
359311
+ BM25_B = 0.75;
359210
359312
  }
359211
359313
  });
359212
359314
 
@@ -359226,8 +359328,8 @@ __export(session_context_exports, {
359226
359328
  renderRecalledNote: () => renderRecalledNote,
359227
359329
  withMemoryContext: () => withMemoryContext
359228
359330
  });
359229
- import fs71 from "node:fs/promises";
359230
- import path89 from "node:path";
359331
+ import fs72 from "node:fs/promises";
359332
+ import path90 from "node:path";
359231
359333
  function escapeRe2(s3) {
359232
359334
  return s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
359233
359335
  }
@@ -359327,7 +359429,7 @@ function deriveRecalledNotes(rows2) {
359327
359429
  for (const row of rows2) {
359328
359430
  if (row.role !== "user" || !row.modelContent) continue;
359329
359431
  for (const m3 of row.modelContent.matchAll(re2)) {
359330
- out.set(path89.basename(m3[1]), m3[2]);
359432
+ out.set(path90.basename(m3[1]), m3[2]);
359331
359433
  }
359332
359434
  }
359333
359435
  return out;
@@ -359350,15 +359452,15 @@ ${SYSTEM_REMINDER_CLOSE}`;
359350
359452
  async function readNotes(dir, now2) {
359351
359453
  let names;
359352
359454
  try {
359353
- names = (await fs71.readdir(dir, { withFileTypes: true })).filter((e3) => e3.isFile() && e3.name.endsWith(".md") && e3.name !== MEMORY_INDEX_FILE).map((e3) => e3.name);
359455
+ names = (await fs72.readdir(dir, { withFileTypes: true })).filter((e3) => e3.isFile() && e3.name.endsWith(".md") && e3.name !== MEMORY_INDEX_FILE).map((e3) => e3.name);
359354
359456
  } catch {
359355
359457
  return [];
359356
359458
  }
359357
359459
  const notes = await Promise.all(
359358
359460
  names.map(async (file2) => {
359359
- const abs = path89.join(dir, file2);
359461
+ const abs = path90.join(dir, file2);
359360
359462
  try {
359361
- const [text5, st2] = await Promise.all([fs71.readFile(abs, "utf8"), fs71.stat(abs)]);
359463
+ const [text5, st2] = await Promise.all([fs72.readFile(abs, "utf8"), fs72.stat(abs)]);
359362
359464
  const fm = readNoteFrontmatter(text5);
359363
359465
  const stamped = fm.modified ? Date.parse(fm.modified) : NaN;
359364
359466
  const written = Number.isFinite(stamped) ? stamped : st2.mtimeMs;
@@ -359400,7 +359502,7 @@ async function buildMemoryTurnContext(args2) {
359400
359502
  const parts = [];
359401
359503
  let raw = "";
359402
359504
  try {
359403
- raw = await fs71.readFile(indexPath, "utf8");
359505
+ raw = await fs72.readFile(indexPath, "utf8");
359404
359506
  } catch {
359405
359507
  raw = "";
359406
359508
  }
@@ -359433,7 +359535,8 @@ async function buildMemoryTurnContext(args2) {
359433
359535
  message: args2.userText,
359434
359536
  candidates,
359435
359537
  chatId: args2.chatId,
359436
- turnModel: args2.turnModel
359538
+ turnModel: args2.turnModel,
359539
+ memoryDir: dir
359437
359540
  }).catch(() => []);
359438
359541
  const byFile = new Map(fresh.map((n2) => [n2.file, n2]));
359439
359542
  for (const file2 of chosen) {
@@ -359492,8 +359595,8 @@ __export(chat_stream_handlers_exports, {
359492
359595
  removeThinkingTags: () => removeThinkingTags,
359493
359596
  resolveModeChange: () => resolveModeChange
359494
359597
  });
359495
- import fs72 from "node:fs";
359496
- import * as path90 from "path";
359598
+ import fs73 from "node:fs";
359599
+ import * as path91 from "path";
359497
359600
  import * as os26 from "os";
359498
359601
  import * as crypto7 from "crypto";
359499
359602
  import { readFile as readFile14, writeFile as writeFile10, unlink as unlink2 } from "fs/promises";
@@ -359839,9 +359942,9 @@ function registerChatStreamHandlers() {
359839
359942
  const hash3 = attachment.id || crypto7.createHash("md5").update(base64Data).digest("hex");
359840
359943
  if (seenAttachmentHashes.has(hash3)) continue;
359841
359944
  seenAttachmentHashes.add(hash3);
359842
- const fileExtension = path90.extname(attachment.name);
359945
+ const fileExtension = path91.extname(attachment.name);
359843
359946
  const filename = `${hash3}${fileExtension}`;
359844
- const filePath = path90.join(TEMP_DIR, filename);
359947
+ const filePath = path91.join(TEMP_DIR, filename);
359845
359948
  await writeFile10(filePath, Buffer.from(base64Data, "base64"));
359846
359949
  attachmentPaths.push(filePath);
359847
359950
  const resolvedMimeType = mimeTypes[fileExtension] || "application/octet-stream";
@@ -360237,7 +360340,7 @@ ${hookContext.join("\n\n")}`
360237
360340
  logger124.log(
360238
360341
  `Using workspace for chat ${req.chatId}: ${appPath || "(none)"} (appId: ${effectiveAppId ?? req.appId ?? "n/a"})`
360239
360342
  );
360240
- if (hasWorkspace && appPath && !fs72.existsSync(appPath)) {
360343
+ if (hasWorkspace && appPath && !fs73.existsSync(appPath)) {
360241
360344
  logger124.warn(`Workspace path does not exist on disk: ${appPath}`);
360242
360345
  safeSend(event.sender, "chat:activity", {
360243
360346
  id: `workspace-path-missing-${req.chatId}`,
@@ -360942,7 +361045,7 @@ ${hookContext.join("\n\n")}`
360942
361045
  try {
360943
361046
  setTimeout(
360944
361047
  async () => {
360945
- if (fs72.existsSync(filePath)) {
361048
+ if (fs73.existsSync(filePath)) {
360946
361049
  await unlink2(filePath);
360947
361050
  logger124.log(`Deleted temporary file: ${filePath}`);
360948
361051
  }
@@ -361116,9 +361219,9 @@ var init_chat_stream_handlers = __esm({
361116
361219
  init_finalize();
361117
361220
  init_context_sections();
361118
361221
  logger124 = import_electron_log127.default.scope("chat_stream_handlers");
361119
- TEMP_DIR = path90.join(os26.tmpdir(), "atlarix-attachments");
361120
- if (!fs72.existsSync(TEMP_DIR)) {
361121
- fs72.mkdirSync(TEMP_DIR, { recursive: true });
361222
+ TEMP_DIR = path91.join(os26.tmpdir(), "atlarix-attachments");
361223
+ if (!fs73.existsSync(TEMP_DIR)) {
361224
+ fs73.mkdirSync(TEMP_DIR, { recursive: true });
361122
361225
  }
361123
361226
  }
361124
361227
  });
@@ -361134,13 +361237,13 @@ __export(temp_hygiene_exports, {
361134
361237
  startTempHygiene: () => startTempHygiene,
361135
361238
  sweepTempOnQuit: () => sweepTempOnQuit
361136
361239
  });
361137
- import fs75 from "node:fs";
361240
+ import fs76 from "node:fs";
361138
361241
  import fsp2 from "node:fs/promises";
361139
361242
  import os28 from "node:os";
361140
361243
  import net5 from "node:net";
361141
- import path92 from "node:path";
361244
+ import path93 from "node:path";
361142
361245
  function leasesDir() {
361143
- return path92.join(os28.tmpdir(), LEASES_DIR_NAME);
361246
+ return path93.join(os28.tmpdir(), LEASES_DIR_NAME);
361144
361247
  }
361145
361248
  function isAlive2(pid) {
361146
361249
  try {
@@ -361153,9 +361256,9 @@ function isAlive2(pid) {
361153
361256
  function registerTempLease(surface2) {
361154
361257
  if (leasePath) return;
361155
361258
  try {
361156
- fs75.mkdirSync(leasesDir(), { recursive: true });
361157
- const p2 = path92.join(leasesDir(), `${process.pid}.json`);
361158
- fs75.writeFileSync(p2, JSON.stringify({ pid: process.pid, surface: surface2, since: Date.now() }));
361259
+ fs76.mkdirSync(leasesDir(), { recursive: true });
361260
+ const p2 = path93.join(leasesDir(), `${process.pid}.json`);
361261
+ fs76.writeFileSync(p2, JSON.stringify({ pid: process.pid, surface: surface2, since: Date.now() }));
361159
361262
  leasePath = p2;
361160
361263
  process.once("exit", releaseTempLease);
361161
361264
  } catch (e3) {
@@ -361165,7 +361268,7 @@ function registerTempLease(surface2) {
361165
361268
  function releaseTempLease() {
361166
361269
  if (!leasePath) return;
361167
361270
  try {
361168
- fs75.rmSync(leasePath, { force: true });
361271
+ fs76.rmSync(leasePath, { force: true });
361169
361272
  } catch {
361170
361273
  }
361171
361274
  leasePath = null;
@@ -361211,12 +361314,12 @@ async function liveInboxPids() {
361211
361314
  }
361212
361315
  function inboxPath(pid) {
361213
361316
  const own = peerSocketPath(process.platform, pid);
361214
- return peerSocketDirOverride ? path92.join(peerSocketDirOverride, path92.basename(own)) : own;
361317
+ return peerSocketDirOverride ? path93.join(peerSocketDirOverride, path93.basename(own)) : own;
361215
361318
  }
361216
361319
  async function peerInboxPids() {
361217
361320
  const own = peerSocketPath(process.platform, 0);
361218
- const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" : path92.dirname(own));
361219
- const prefix = path92.basename(own).replace(/0(\.sock)?$/, "");
361321
+ const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" : path93.dirname(own));
361322
+ const prefix = path93.basename(own).replace(/0(\.sock)?$/, "");
361220
361323
  let names;
361221
361324
  try {
361222
361325
  names = await fsp2.readdir(dir);
@@ -361242,7 +361345,7 @@ async function otherLiveHolders() {
361242
361345
  const pid = Number(m3[1]);
361243
361346
  if (pid === process.pid) continue;
361244
361347
  if (isAlive2(pid)) live2.add(pid);
361245
- else await fsp2.rm(path92.join(leasesDir(), name30), { force: true }).catch(() => {
361348
+ else await fsp2.rm(path93.join(leasesDir(), name30), { force: true }).catch(() => {
361246
361349
  });
361247
361350
  }
361248
361351
  for (const pid of await liveInboxPids()) live2.add(pid);
@@ -361267,7 +361370,7 @@ async function sweepTempDirsCounting(opts) {
361267
361370
  if (!entry.isDirectory()) continue;
361268
361371
  if (entry.name === LEASES_DIR_NAME) continue;
361269
361372
  if (LIVE_WHILE_RUNNING.has(entry.name) && (!opts.includeLive || others > 0)) continue;
361270
- const full = path92.join(root2, entry.name);
361373
+ const full = path93.join(root2, entry.name);
361271
361374
  try {
361272
361375
  if (entry.name.startsWith(OTHER_PROCESS_PREFIX)) {
361273
361376
  const stat9 = await fsp2.stat(full);
@@ -361410,8 +361513,8 @@ set("ATLARIX_QUICKJS_WASM", assets.quickjsWasm);
361410
361513
  registerBundledSkills(assets.skills);
361411
361514
 
361412
361515
  // src/headless/atlarix-headless.mts
361413
- import fs76 from "node:fs";
361414
- import path93 from "node:path";
361516
+ import fs77 from "node:fs";
361517
+ import path94 from "node:path";
361415
361518
 
361416
361519
  // src/lib/workspace-app-by-path.ts
361417
361520
  init_db2();
@@ -361429,9 +361532,9 @@ async function workspaceAppIdForPath(dir) {
361429
361532
 
361430
361533
  // src/headless/headless-runner.ts
361431
361534
  init_fake_sender();
361432
- import fs73 from "node:fs";
361535
+ import fs74 from "node:fs";
361433
361536
  import os27 from "node:os";
361434
- import path91 from "node:path";
361537
+ import path92 from "node:path";
361435
361538
 
361436
361539
  // src/headless/auto-approve.ts
361437
361540
  var sleep = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
@@ -361696,16 +361799,16 @@ async function runHeadlessAgent(opts) {
361696
361799
  const mode = opts.mode ?? "build";
361697
361800
  const resolveHandler = opts.resolveHandler ?? defaultResolveHandler;
361698
361801
  if (!process.env.ATLARIX_USER_DATA_DIR) {
361699
- process.env.ATLARIX_USER_DATA_DIR = fs73.mkdtempSync(
361700
- path91.join(os27.tmpdir(), "atlarix-headless-ud-")
361802
+ process.env.ATLARIX_USER_DATA_DIR = fs74.mkdtempSync(
361803
+ path92.join(os27.tmpdir(), "atlarix-headless-ud-")
361701
361804
  );
361702
- process.env.ATLARIX_HOME_DIR ??= path91.join(os27.homedir(), ".atlarix");
361805
+ process.env.ATLARIX_HOME_DIR ??= path92.join(os27.homedir(), ".atlarix");
361703
361806
  }
361704
361807
  process.env.ATLARIX_HEADLESS = "1";
361705
361808
  process.env.ATLARIX_DISABLE_TEXT_TOOLS = "1";
361706
361809
  if (!process.env.ATLARIX_MEMORY) process.env.ATLARIX_MEMORY = "off";
361707
361810
  const userDataDir = process.env.ATLARIX_USER_DATA_DIR;
361708
- fs73.mkdirSync(userDataDir, { recursive: true });
361811
+ fs74.mkdirSync(userDataDir, { recursive: true });
361709
361812
  const { initializeDatabase: initializeDatabase2 } = await Promise.resolve().then(() => (init_db2(), db_exports));
361710
361813
  const db3 = initializeDatabase2();
361711
361814
  const schema = await Promise.resolve().then(() => (init_schema(), schema_exports));
@@ -361742,7 +361845,7 @@ async function runHeadlessAgent(opts) {
361742
361845
  effort: opts.effort
361743
361846
  });
361744
361847
  if (opts.provider.apiKey) setPinnedProviderKey(providerId, opts.provider.apiKey);
361745
- fs73.mkdirSync(settingsDir, { recursive: true });
361848
+ fs74.mkdirSync(settingsDir, { recursive: true });
361746
361849
  if (!handlersRegistered) {
361747
361850
  handlersRegistered = true;
361748
361851
  const { registerChatStreamHandlers: registerChatStreamHandlers2 } = await Promise.resolve().then(() => (init_chat_stream_handlers(), chat_stream_handlers_exports));
@@ -361826,7 +361929,7 @@ init_core_proxy();
361826
361929
 
361827
361930
  // src/headless/api-key-file.ts
361828
361931
  init_pinned_provider_key();
361829
- import fs74 from "node:fs";
361932
+ import fs75 from "node:fs";
361830
361933
  function pinApiKeyFile(file2, provider) {
361831
361934
  if (provider.id === "compass") {
361832
361935
  return { error: "--api-key-file is for your own provider's key, not Atlarix Core (use --core-token-file)" };
@@ -361840,8 +361943,8 @@ function pinApiKeyFile(file2, provider) {
361840
361943
  } catch (e3) {
361841
361944
  return { error: e3.message };
361842
361945
  }
361843
- const key = fs74.readFileSync(file2, "utf8");
361844
- fs74.rmSync(file2, { force: true });
361946
+ const key = fs75.readFileSync(file2, "utf8");
361947
+ fs75.rmSync(file2, { force: true });
361845
361948
  if (!key.trim()) return { error: "the --api-key-file was empty" };
361846
361949
  setPinnedProviderKey(providerId, key);
361847
361950
  return { providerId };
@@ -361876,7 +361979,7 @@ ${err2.stack}` : "";
361876
361979
  }
361877
361980
 
361878
361981
  // src/headless/atlarix-headless.mts
361879
- var VERSION15 = false ? "dev" : "15.12.3";
361982
+ var VERSION15 = false ? "dev" : "15.12.5";
361880
361983
  if (process.argv[2] === "run") process.argv.splice(2, 1);
361881
361984
  var RUN_HELP = `atlarix run: one turn without the UI, for scripts and CI
361882
361985
 
@@ -361929,7 +362032,7 @@ async function main() {
361929
362032
  registerTempLease2("headless");
361930
362033
  const workspace = arg("workspace") ?? process.cwd();
361931
362034
  const promptFile = arg("prompt-file");
361932
- const prompt = promptFile ? fs76.readFileSync(promptFile, "utf8") : arg("prompt");
362035
+ const prompt = promptFile ? fs77.readFileSync(promptFile, "utf8") : arg("prompt");
361933
362036
  if (!prompt) {
361934
362037
  console.error("atlarix-headless: --prompt or --prompt-file is required");
361935
362038
  process.exit(2);
@@ -361956,22 +362059,22 @@ async function main() {
361956
362059
  if (a2 !== "--attach") return [];
361957
362060
  const file2 = process.argv[i4 + 1];
361958
362061
  if (!file2) return [];
361959
- if (!fs76.existsSync(file2)) {
362062
+ if (!fs77.existsSync(file2)) {
361960
362063
  console.error(`atlarix-headless: --attach ${file2}: no such file`);
361961
362064
  process.exit(2);
361962
362065
  }
361963
362066
  return [
361964
362067
  {
361965
- name: path93.basename(file2),
361966
- type: ATTACH_MIME[path93.extname(file2).toLowerCase()] ?? "application/octet-stream",
361967
- data: fs76.readFileSync(file2).toString("base64")
362068
+ name: path94.basename(file2),
362069
+ type: ATTACH_MIME[path94.extname(file2).toLowerCase()] ?? "application/octet-stream",
362070
+ data: fs77.readFileSync(file2).toString("base64")
361968
362071
  }
361969
362072
  ];
361970
362073
  });
361971
362074
  const coreTokenFile = arg("core-token-file");
361972
362075
  if (coreTokenFile) {
361973
- setPinnedCoreToken(fs76.readFileSync(coreTokenFile, "utf8"));
361974
- fs76.rmSync(coreTokenFile, { force: true });
362076
+ setPinnedCoreToken(fs77.readFileSync(coreTokenFile, "utf8"));
362077
+ fs77.rmSync(coreTokenFile, { force: true });
361975
362078
  }
361976
362079
  const apiKeyFile = arg("api-key-file");
361977
362080
  if (apiKeyFile) {
@@ -362001,7 +362104,7 @@ async function main() {
362001
362104
  await refreshCoreModelOverrides2();
362002
362105
  }
362003
362106
  const res = await runHeadlessAgent({
362004
- workspaceDir: fs76.realpathSync(workspace),
362107
+ workspaceDir: fs77.realpathSync(workspace),
362005
362108
  prompt,
362006
362109
  provider: {
362007
362110
  // Default to the OpenRouter builtin (native FC + provider pin). Pass
@@ -362022,7 +362125,7 @@ async function main() {
362022
362125
  });
362023
362126
  if (outputFile) {
362024
362127
  const { finalAnswerText: finalAnswerText2 } = await Promise.resolve().then(() => (init_assistant_message_parts(), assistant_message_parts_exports));
362025
- fs76.writeFileSync(outputFile, res.lastAssistant ? finalAnswerText2(res.lastAssistant) : "");
362128
+ fs77.writeFileSync(outputFile, res.lastAssistant ? finalAnswerText2(res.lastAssistant) : "");
362026
362129
  }
362027
362130
  console.error(
362028
362131
  `[atlarix-headless] completed=${res.completed} workspace=${workspace}` + (outputFile ? ` output=${outputFile}` : "")